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

micro ros2 build error in micro_ros_demos_rclc

asked 2020-03-16 22:42:50 -0500

zivy gravatar image

updated 2020-03-16 23:05:57 -0500

Hi guys, I am current building micro-ros2 in ros2 dashing, following the instructions in

I am using Ubuntu 18.04 kernel 4.15.0. When

ros2 run micro_ros_setup

then the error comes out

/home/zivy/ros2_dashing/uros_ws/src/uros/micro-ROS-demos/rclc/int32_publisher/main.c:28:3: error: unknown type name ‘rclc_ret_t’; did you mean ‘rcl_ret_t’?
   rclc_ret_t ret;
   ^~~~~~~~~~ rcl_ret_t /home/zivy/ros2_dashing/uros_ws/src/uros/micro-ROS-demos/rclc/int32_publisher/main.c:30:9: warning: implicit declaration of function ‘rclc_init’; did you mean ‘rmw_init’? [-Wimplicit-function-declaration]
   ret = rclc_init(0, NULL);
         ^~~~~~~~~ rmw_init 

It seems the ros2 doesn't include rclc file. But I don't know how to fix it. I use the command as follows:

source /opt/ros/$ROS_DISTRO/setup.bash

mkdir uros_ws && cd uros_ws

git clone -b $ROS_DISTRO src/micro-ros-build

rosdep update && rosdep install --from-path src --ignore-src -y

ros2 run micro_ros_setup

ros2 run micro_ros_setup

colcon build

source install/local_setup.bash

Thanks for you kindly help! I really appreciate!

BTW, I just want to try cbg-executor_ping-pong_cpp package of the ros2_examples fork. And its documention is in

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2021-01-22 04:18:47 -0500

ralph-lange gravatar image

The cbg-executor_ping-pong_cpp package mentioned in the last sentence is not intended directly for use with micro-ROS, although it has been developed in the project's context. In the meanwhile, the cbg-executor (which is not a new executor but a refinement of the executor interface) has been integrated into rclcpp's master branch, i.e. you can test it in the Rolling release. I'm also adapting the demo. Please find it at

edit flag offensive delete link more

Question Tools



Asked: 2020-03-16 22:42:50 -0500

Seen: 604 times

Last updated: Jan 22 '21