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

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 https://github.com/micro-ROS/micro-ros-build/blob/dashing/micro_ros_setup/README.md.

I am using Ubuntu 18.04 kernel 4.15.0. When

ros2 run micro_ros_setup build_firmware.sh

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 https://github.com/micro-ROS/micro-ro... src/micro-ros-build

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

ros2 run micro_ros_setup create_firmware_ws.sh

ros2 run micro_ros_setup 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-executor_ping-pong_cpp package of the ros2_examples fork. And its documention is in https://github.com/micro-ROS/micro-ROS.github.io/blob/master/_docs/concepts/client_library/real-time_executor/index.md

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

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 https://github.com/boschresearch/ros2....

edit flag offensive delete link more

Question Tools

2 followers

Stats

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

Seen: 599 times

Last updated: Jan 22 '21