ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

micro-ROS: Could not find ROS middleware implementation 'rmw_cyclonedds_cpp'

asked 2023-02-13 01:28:41 -0500

Achyut gravatar image

updated 2023-02-14 01:26:41 -0500

gvdhoorn gravatar image

microROS installation received the following error message alert box

'colcon build' failed(rmw_implementation + 3)
/home/ubuntu/microros_ws/firmware/mcu_ws

I am following this 'Connect ESP32 to ROS2' below , I actually have galactic ROS2 in my Ubuntu 20.04.5 LTS host.

https://medium.com/@SameerT009/connec...

After Step 5. Build firmware

Nothing to add. Just Copy and Paste. It takes a white to complete.

$ ros2 run micro_ros_setup build_firmware.sh

I get the error alert message **'colcon build' failed(rmw_implementation + 3)

/home/ubuntu/microros_ws/firmware/mcu_ws**

and the below details in the terminal:: Please Help. Thank you. I have done source

source /opt/ros/galactic/setup.bash

$ `cmake --version`
cmake version 3.16.3

CMake suite maintained and supported by Kitware (kitware.com/cmake).

snippet of error in terminal after above Step 5

error
 CMake Error at /home/ubuntu/microros_ws/firmware/mcu_ws/install/share/rmw_implementation_cmake/cmake/get_default_rmw_implementation.cmake:60 (message):
  Could not find ROS middleware implementation 'rmw_cyclonedds_cpp'.  Choose
  one of the following: rmw_microxrcedds
Call Stack (most recent call first):
  CMakeLists.txt:22 (get_default_rmw_implementation)

  ---to fix above error
  cd /home/ubuntu/microros_ws/firmware/mcu_ws/install/share/rmw_implementation_cmake
  sudo nano package.xml
  add
  <build_depend>rmw</build_depend>
  <depend>rmw_cyclonedds_cpp</depend>


Finished <<< rmw_microxrcedds [1.69s]
Starting >>> rmw_implementation
--- stderr: action_msgs                                                                           
CMake Warning at /home/ubuntu/microros_ws/firmware/mcu_ws/install/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake:116 (message):
  Package 'rcutils' exports library 'dl' which couldn't be found
Call Stack (most recent call first):
  /home/ubuntu/microros_ws/firmware/mcu_ws/install/share/rcutils/cmake/rcutilsConfig.cmake:41 (include)
  /home/ubuntu/microros_ws/firmware/mcu_ws/install/share/rosidl_runtime_c/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /home/ubuntu/microros_ws/firmware/mcu_ws/install/share/rosidl_runtime_c/cmake/rosidl_runtime_cConfig.cmake:41 (include)
  /home/ubuntu/microros_ws/firmware/mcu_ws/install/share/builtin_interfaces/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package)
  /home/ubuntu/microros_ws/firmware/mcu_ws/install/share/builtin_interfaces/cmake/builtin_interfacesConfig.cmake:41 (include)
  CMakeLists.txt:14 (find_package)


---
Finished <<< action_msgs [2.24s]
Starting >>> test_msgs
--- stderr: rmw_implementation                                                                     
CMake Error at /home/ubuntu/microros_ws/firmware/mcu_ws/install/share/rmw_implementation_cmake/cmake/get_default_rmw_implementation.cmake:60 (message):
  Could not find ROS middleware implementation 'rmw_cyclonedds_cpp'.  Choose
  one of the following: rmw_microxrcedds
Call Stack (most recent call first):
  CMakeLists.txt:22 (get_default_rmw_implementation)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-02-20 09:28:56 -0500

Achyut gravatar image

updated 2023-02-20 09:30:58 -0500

export RMW_IMPLEMENTATION=rmw_microxrcedds# Thank you @Pablogs and @gvdhoorn # Then starting from the beginning of $colcon build, help me resolve this # Steps: https://medium.com/@achyutros/ros-2-m...

edit flag offensive delete link more
0

answered 2023-02-14 01:26:03 -0500

gvdhoorn gravatar image

updated 2023-02-14 01:30:38 -0500

As mentioned in #q412461 by @Pablogs, micro-ROS does not support Cyclone.

Seeing as you write you are using Galactic -- which uses rmw_cyclonedds_cpp by default -- the error is "expected".

The CMake logic in rmw_implementation is trying to see which RMW to build for, sees the RMW_IMPLEMENTATION environment variable set to rmw_cyclonedds_cpp (default for Galactic) and then tries to make that the standard for micro-ROS as well.

As that's not supported, the error message is printed.

The article you link documents/uses Foxy, which uses Fast-RTPS. micro-ROS does support Fast-RTPS, hence why it works there.

If you really want/need to keep using Galactic (note: it is end-of-life since December 2022), you could try installing ros-galactic-rmw-fastrtps-cpp, export RMW_IMPLEMENTATION=rmw_fastrtps_cpp in the terminal you'll use to build everything, stopping the ROS 2 daemon (for good measure: ros2 daemon stop), clearing out your micro-ROS workspace and then attempt the build again.

Note: to use micro-ROS, you will have to repeat the export RMW_IMPLEMENTATION=rmw_fastrtps_cpp for all terminals you will be starting ROS 2 / micro-ROS nodes in. You might want to add it to your .bashrc or similar file.

edit flag offensive delete link more

Comments

Thank you @Pablogs and @gvdhoorn . I am Still getting the error after installing using/export rmw_fastrtps_cpp

---
Finished <<< action_msgs [2.04s]
Starting >>> test_msgs
--- stderr: rmw_implementation                                       
CMake Error at /home/achyut/microros_ws/firmware/mcu_ws/install/share/rmw_implementation_cmake/cmake/get_default_rmw_implementation.cmake:60 (message):
  Could not find ROS middleware implementation 'rmw_fastrtps_cpp'.  Choose
  one of the following: rmw_microxrcedds
Call Stack (most recent call first):
  CMakeLists.txt:22 (get_default_rmw_implementation)
Achyut gravatar image Achyut  ( 2023-02-14 12:59:09 -0500 )edit
1

Apologies. Where I wrote rmw_fastrtps_cpp that should've been rmw_microxrcedds, but what I don't really understand is why you have to set that manually. I don't recall to have done that.

gvdhoorn gravatar image gvdhoorn  ( 2023-02-16 09:56:59 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2023-02-13 01:24:05 -0500

Seen: 502 times

Last updated: Feb 20 '23