YahboomTechnology/ROS-robot-expansion-board

Colcon build of driver_ws fails: turtlesim/msg/pose.hpp not found

Opened this issue · 0 comments

I attempted to compile driver_ws via colcon build --symlink-install on a ROS2 humble system. The compile fails with the message indicating the included file <turtlesim/msg/pose.hpp> could not be found. I verified that turtlesim was installed. In looking at the CMakeLists.txt I noteced that turtlesim was not included in the ament_target_dependencies. I edited CMakeLists to include this dependency and the compilation succeeded. An example...
ament_target_dependencies(base_node_X3 rclcpp tf2 tf2_ros nav_msgs geometry_msgs)

should be

ament_target_dependencies(base_node_X3 rclcpp tf2 tf2_ros nav_msgs geometry_msgs turtlesim)

This needs to be done with all three of them.