Skip to content

jkaflik/omros2-firmware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omros2-firmware

Overview

This is a OpenMower mainboard firmware replacement to work with OpenMowerROS2 alternative ROS software. More details about this firmware can be found in documentation.

Features

  • ROS2 node using Micro-ROS
    • Auto-reconnect
    • Power-related publishers
    • IMU publisher
  • Charging
  • LED status
  • IMU
  • Emergency mode
    • Emergency publisher
    • Emergency restart service
  • Cover panel support

Usage

LED Status Indicators

The firmware uses onboard NeoPixel LED(s) to display the current system status. Multiple status conditions can be active simultaneously and will be displayed in sequence.

LED Status Colors:

  • Green: ROS connected
  • Yellow: Battery charging
  • Magenta: Battery discharging
  • Red: Battery low
  • Blue: IMU sensor failure

When multiple statuses are active, each status will be shown for approximately 800ms with a 200ms black separator between them. The sequence will continue to cycle through all active statuses.

Build

Prepare environment

Important

This firmware is meant to be run on a OpenMower hardware or compatible.

Firmware is build against a RP2040 chip only using PlatformIO. Default target is a remotely run OpenOCD with a Pico board as a SWD target. Everything should work out of the box. Make sure your --upload-port is your Raspberry Pi host. (one used for the OpenMower)

Note

Only Raspberry Pi5 is supported. OpenOCD configuration is crafted for it. If you want to use another board, see older commits in this repository.

On the hardware side, you need to connect the Raspberry Pi SWD interface to the target SWD interface. Luckily, on the OpenMower mainboard there is are circuits to do so. All you have to do is to use 4 jumpers on J22.

J22

When executing build/debug target, along with firmware, the bash script will be deployed to target Raspberry Pi and executed.

Build (& run)

platformio run -t upload

(note: you can use pio run as well, so it doesn't upload to target)

Debugging

Use your IDE integration to debug the code. You can use pio debug command as well. This will run the same bash script as in the upload command, but it will not upload the firmware. You can use pio debug -t upload to upload the firmware and start debugging.

Micro-ROS agent for testing

You can use the Micro-ROS agent container to test the firmware. To run it a remote RaspberryPi device run the following command:

make agent_remote

If you have an access to the Pico's UART0 directly on your host machine run:

make agent MICRO_ROS_DEVICE=/dev/ttyAMA0

About

A firmware for OpenMower mainboard that acts as a node using Micro-ROS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages