Skip to content

micro-ros support #2171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bmagyar opened this issue Apr 9, 2025 · 9 comments
Open

micro-ros support #2171

bmagyar opened this issue Apr 9, 2025 · 9 comments

Comments

@bmagyar
Copy link
Member

bmagyar commented Apr 9, 2025

Is your feature request related to a problem? Please describe.
Better support for boards such as

Describe the solution you'd like
Investigate potentially supporting micro-ros-based hardware OR provide documentation for going about this

Describe alternatives you've considered
https://github.com/PickNikRobotics/topic_based_ros2_control

@bmagyar
Copy link
Member Author

bmagyar commented Apr 9, 2025

Anything else you could add here @yassine-cherni ? Let's work out some more details

@bmagyar bmagyar moved this to Kilted in Roadmap / Features Apr 9, 2025
@yassine-cherni
Copy link

Hi @bmagyar thanks for opening this issue, it’s spot-on for our work at OORB-Open-Organic-Robotics our diff-drive robot uses an RPi5 for high-level tasks (sensor fusion, navigation) and an STM32F4 Discovery for low-level control (encoders, IMU, motor PWM via PID), linked via a new SPI hardware_interface with micro-ROS.

Why It Matters
Micro-ROS support in ros2_control would simplify integrating microcontrollers like the STM32F4 Discovery ( or ESP32 ) into ROS 2, keeping real-time performance intact unlike topic_based_ros2_control, which drops that edge.

Proposed Solution
I’d suggest:

  • A ros2_control template for micro-ROS hardware interfaces (e.g., SPI setup for STM32).

  • Docs on building real-time micro-ROS plugins and optimizing latency aiming for <2 ms end-to-end latency would be ideal for embedded setups.

@gavanderhoorn
Copy link

gavanderhoorn commented Apr 9, 2025

Docs on building real-time micro-ROS plugins and optimizing latency aiming for <2 ms end-to-end latency would be ideal for embedded setups.

this would be great, but I don't expect this to be possible. At least not with standard TCP or even UDP based transports and probably when using rmw_microxrcedds.

And with the Agent between your micro-ROS client and your ROS 2 / DDS application.

Especially for reliable topics, but even for best-effort topics (see eProsima/Micro-XRCE-DDS-Client#394) the overhead of having the additional hop through the Agent is quite significant.

@tonybaltovski
Copy link

tonybaltovski commented Apr 10, 2025

We use topics for the Jackal's diff drive interface. It has a micro-ROS based MCU currently.

@bmagyar
Copy link
Member Author

bmagyar commented Apr 10, 2025

@yassine-cherni I know I asked already but are you using a specific board that has the stm32 integrated with the raspi or they are separate? Could you please share the exact link for it? (I know you did already at the meeting yesterday but I cannot recover it :-/)

@bmagyar
Copy link
Member Author

bmagyar commented Apr 10, 2025

Thanks for the feedback @gavanderhoorn , insightful as always! Anything else you have on this front would be very valuable

@yassine-cherni
Copy link

Hi @bmagyar , The STM32F4 Discovery and Raspberry Pi 5 are separate boards in our setup. We connect them via SPI, Raspberry pi 5 , Stm32f4 discovery

@christophfroehlich
Copy link
Contributor

I answered similar questions on stack exchange from time to time. Which means, there is a community interest (or confusion) about it.

My question is, why do you need the extra layer of micro-ros? I can imagine that it provides some out-of-the box experience with supported uCs, e.g. without the hassle of writing SPI drivers in C++. But as already mentioned, I'm not sure if the desired realtime requirements can be met. But compared to topic_based_ros2_control there could still be room for improvement.

@bmagyar
Copy link
Member Author

bmagyar commented May 7, 2025

Additional FYI @sachinkum0009

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Kilted
Development

No branches or pull requests

5 participants