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

Can't find service header files

asked 2020-04-10 13:58:52 -0500

nightduck gravatar image

I can build my project and running rosservice show benchmark_suite/status will reveal it has indeed been declared. But I cannot for the life of me find the header fine. The devel/include directory doesn't exist and inserting a #include "benchmark_suite/status.h" line in my .cpp file shows a "not found error" when building.

CMakeList.txt excerpts:

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rosmsg
  std_msgs
  message_generation
)
...
add_service_files(
  FILES
  status.srv
)
...
add_executable(cubic src/cubic.cpp)
target_link_libraries(cubic ${catkin_LIBRARIES})

package.xml excerpts

...
<build_depend>message_generation</build_depend>
<exec_depend>message_runtime</exec_depend>
...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2020-04-10 14:24:51 -0500

gvdhoorn gravatar image

updated 2020-04-10 14:25:10 -0500

If that is really all you have in your CMakeLists.txt, then I believe you're missing a generate_messages(DEPENDENCIES std_msgs).

See Building messages, services or actions in the Catkin documentation.

edit flag offensive delete link more

Comments

1

That was it, thank you. I missed that step in the wiki

nightduck gravatar image nightduck  ( 2020-04-11 12:37:22 -0500 )edit

Question Tools

Stats

Asked: 2020-04-10 13:57:37 -0500

Seen: 1,623 times

Last updated: Apr 10 '20