Robotics StackExchange | Archived questions

Need to Connect uP to ROS/Linux on a new project. Is ROS2 the way to go?

I have a STM32F type microcontroller running a sensor and I'd like it to interface to ROS as a node over a serial (USB, SPI, I2C,..) link. This uP is not an Arduino. It runs a real-time OS.

With Effort, I might get ROS Serial to work and then run a ROS Serial server on the Linux side. In fact, I've prototyped this using an Arduino in place of my actual device and messages flow in both directions.

But if ROS 2 is the future perhaps I should run a DDS library on my STM32? And then some kind of DDS to ROS 1 bridge on the Linux side? I've not studied ROS 2 enough but I think it uses a "standard" message passing protocol and I should use that, especially if my RTOS supports it.

Just looking for general advice at this time. Possibly I've not thought of some good options.

My use case is building "smart" controllers that play with ROS well. For example, a base controller that connects with USB to a ROS/Linux system and subscribes to cmd_vel and publishes TF and odometry. Literally a "plug and play" ROS node.

Asked by chrisalbertson on 2019-03-29 16:46:48 UTC

Comments

Is a uP a microprocessor?

Asked by jayess on 2019-03-29 16:54:00 UTC

Answers

I know that there's several ongoing efforts. In particular I think that https://github.com/PX4/px4_ros_com is the most actively used/hands on. There's active work to extend that implementation at: https://github.com/osrf/ros2_serial_example

Another bridging approach is implemented in https://github.com/ROBOTIS-GIT/ros2arduino

There's a much more comprehensive project: https://microros.github.io to fully leverage DDS XRCE implementations and provide a more complete ROS2 API inside the microcontroller instead of a bridging approach that's under active development.

Asked by tfoote on 2019-03-29 16:53:38 UTC

Comments

@tfoote: it's OSS, so bound to happen, but: ros2_serial_example looks like it sits in a similar space as the ros2arduino packages creates by ROBOTIS. What was the rationale for creating ros2_serial_example?

Asked by gvdhoorn on 2019-03-30 02:41:15 UTC

It's a short term project focused on upgrading the px4_ros_com implementation with the goal to merge back. As can be seen at the top of the Readme there's a lot of similar implementations we linked to, including ros2arduino,out there and we'd like to bring them all together. We specidically called ours an example as it's not designed to be a long term package. We worked on things like leveraging the ROS2 type support libraries and other things to help with scaling instead of I think all the other approaches that hard code message support.

Asked by tfoote on 2019-04-01 13:22:25 UTC