[ros-users] [Discourse.ros.org] [Embedded] RMW-microxrcedds implementation

Borja Outerelo ros.discourse at gmail.com
Mon Nov 5 15:28:01 UTC 2018



Hi.

We have been working on an implementation of RMW using eProsima's Micro XRCE-DDS.
We made this as part of OFERA project approach to embedded ROS 2.

In a nutshell, this approach consists on changing middleware implementation (from DDS to DDS-XRCE) and change the user API (using rclc) for cross-compile all the stack for the microcontroller. Currently, some tests have been done using NuttX over STM32.
Apart from that NuttX tests, this packages work on a Linux machine without issues and using either RCLCPP or RCLC, see the provided demos to further information.


The implementation consists of a set of new packages:

https://github.com/microROS/micro-ROS-demos
https://github.com/microROS/micro-ros-agent
https://github.com/microROS/rosidl_typesupport_microxrcedds
https://github.com/microROS/rmw-microxrcedds

And modifications to the rclc.
https://github.com/microROS/rclc

All these packages work with the existing ROS 2 stack (rcl, rmw, typesupport...).
>From these packages, rmw and typesupport have tests implemented.
All should compile using standard colcon tools in a ROS 2 environment, colcon build, colcon test.
You just need to add these repositories to your ROS 2 workspace.

For testing purposes, I have attached a file with all the required ROS 2 repositories and micro-ROS specific ones.

https://gist.github.com/BorjaOuterelo/cf7b21f46feac8b7c9a45e914ac5b531

Once you cloned the repositories, these are the commands you may want to run to try it:

**#Build All**
`colcon build --cmake-args -DBUILD_SHARED_LIBS=ON`
**#configure environment variables**
`. ~/ros2_ws/install/./local_setup.bash`
**#Run agent node**
`~/ros2_ws/install/uros_agent/lib/uros_agent/uros_agent udp 8888`
**#Run rclcpp demo publisher**
`~/ros2_ws/install/complex_msg_publisher_cpp/lib/complex_msg_publisher_cpp/complex_msg_publisher_cpp`
**#Run rclc demo publisher**
`~/ros2_ws/install/complex_msg_publisher_c/lib/complex_msg_publisher_c/complex_msg_publisher_c`
**#Run rclcpp demo subscriber**
`~/ros2_ws/install/complex_msg_subscriber_cpp/lib/complex_msg_subscriber_cpp/complex_msg_subscriber_cpp`
**#Run rclc demo subscriber**
`~/ros2_ws/install/complex_msg_subscriber_c/lib/complex_msg_subscriber_c/complex_msg_subscriber_c`

Furthermore, you can run Micro ROS packages tests with:

`colcon test --packages-select rosidl_typesupport_microxrcedds_c rosidl_typesupport_microxrcedds_c_tests rosidl_typesupport_microxrcedds_cpp rosidl_typesupport_microxrcedds_cpp_tests rosidl_typesupport_microxrcedds_test_msg rmw_microxrcedds`

All these packages are work in progress and will be updated and extend API. Currently, only publish/subscribe API has been implemented.
Currently working on polishing a NuttX build system.





---
[Visit Topic](https://discourse.ros.org/t/rmw-microxrcedds-implementation/6727/1) or reply to this email to respond.




More information about the ros-users mailing list