rosflight / rosflight_firmware

Firmware for the ROSflight autopilot
http://rosflight.org/
BSD 3-Clause "New" or "Revised" License
130 stars 46 forks source link

ROS2 support via Micro XRCE-DDS / micro-ROS #328

Closed christianrauch closed 9 months ago

christianrauch commented 5 years ago

Are there plans to support ROS2 via Micro XRCE-DDS in the future?

There are efforts to support resource constrained environments, like MCU, via the micro-ROS project (https://discourse.ros.org/t/rmw-microxrcedds-implementation/6727).

While a plain ROS2 port of the rosflight node would already enable ROS2 support, enabling serial communication via micro-ROS / XRCE-DDS directly in the firmware would remove the need for a specific ROS node on a companion computer and allow the flight controller to directly access the ROS2 topics and services.

superjax commented 5 years ago

We actually designed ROSflight with an abstract Comm layer specifically for this reason. (see include/comm_link.h) (as well as the ability to use other serialization protocols, such as protobuf etc...) but haven't actually implemented anything other than the default MAVlink protocol.

Micro XRCE-DDS/ROS2 would definitely be interesting. I personally haven't looked into it much at all, but I think it could simplify a lot of the communications used currently.

If we could still achieve sufficiently high stream rates and keep the implementation clean, then I think it would be a great idea.

No current plans to implement it as of yet, though, mainly due to not enough time.

bsutherland333 commented 9 months ago

We've actually talked a lot about this. We're currently leaning towards not utilizing micro-ros as the micro-ros library is larger than the ROSflight firmware itself, and our firmware developer was running into issues when trying to use freeRTOS with the new H7 board firmware. It could still happen though, it's just not in our immediate plans.