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

Revision history [back]

click to hide/show revision 1
initial version

With colcon build --merge-install (for performance --packages-up-to std_msgs) I can reproduce the failure.

The problem is that when your code generator is being executed (the logic in rosidl_generator_rs_generate_interfaces.cmake) it tries to depend on the rosidl_typesupport_c target. But your package didn't make sure that rosidl_typesupport_c was find_package-ed. That needs to happen before you register your own message generator in rosidl_generator_rs_extras. Otherwise the rosidl_typesupport_c might only be found later and therefore will only try to generate its code after your package has done so.

The easiest fix is to insert the following line in rosidl_generator_rs-extras.cmake.in before calling the macro:

find_package(rosidl_typesupport_c REQUIRED)