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

In my case I had to add this command to my CMakeLists.txt script just bellow the call to add_executable(..) and ament_target_dependencies(...).

install(TARGETS
  <name_of_executable_target>
  DESTINATION lib/${PROJECT_NAME}/
)

This solved the issue.

In my case I had to add this command to my CMakeLists.txt script just bellow the call to add_executable(..) and ament_target_dependencies(...).

install(TARGETS
  <name_of_executable_target>
  DESTINATION lib/${PROJECT_NAME}/
)

After building:

cd ~/ros2_ws
colcon build

And sourcing:

source install/setup.bash

and finally:

ros2 run [package_name] [executable_name]

This solved the issue.