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

I managed to solve this problem. Here is all things that I done in CMakeLists.txt:

  • add find_package(std_srvs REQUIRED)
  • add ament_target_dependencies(your_node_name rclcpp std_srvs)
  • add ament_export_dependencies(std_srvs) (not sure if that line is necessary but it works now for me)

In package.xml file:

  • add build_depend std_srvs
  • add exec_depend std_srvs