Robotics StackExchange | Archived questions

micro ros2 build error in micro_ros_demos_rclc

Hi guys, I am current building micro-ros2 in ros2 dashing, following the instructions in https://github.com/micro-ROS/micro-ros-build/blob/dashing/microrossetup/README.md.

I am using Ubuntu 18.04 kernel 4.15.0. When

ros2 run microrossetup build_firmware.sh

then the error comes out

/home/zivy/ros2dashing/urosws/src/uros/micro-ROS-demos/rclc/int32publisher/main.c:28:3: error: unknown type name ‘rclcrett’; did you mean ‘rclrett’?
   rclcrett ret;
   ^~~~~~~~~~
   rclrett
/home/zivy/ros2dashing/urosws/src/uros/micro-ROS-demos/rclc/int32publisher/main.c:30:9: warning: implicit declaration of function ‘rclcinit’; did you mean ‘rmwinit’? [-Wimplicit-function-declaration]
   ret = rclcinit(0, NULL);
         ^~~~~~~~~
         rmwinit

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 urosws && cd urosws

git clone -b $ROS_DISTRO https://github.com/micro-ROS/micro-ros-build.git src/micro-ros-build

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

ros2 run microrossetup createfirmwarews.sh

ros2 run microrossetup build_firmware.sh

colcon build

source install/local_setup.bash

Thanks for you kindly help! I really appreciate!

BTW, I just want to try cbg-executorping-pongcpp package of the ros2_examples fork. And its documention is in https://github.com/micro-ROS/micro-ROS.github.io/blob/master/docs/concepts/clientlibrary/real-time_executor/index.md

Asked by zivy on 2020-03-16 22:42:50 UTC

Comments

Answers

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 https://github.com/boschresearch/ros2_demos/tree/cbg_executor_demo/cbg_executor_demo.

Asked by ralph-lange on 2021-01-22 05:18:47 UTC

Comments