ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
The credit goes to @Geoff.
I will add my attempt to solve this problem so people should save their time if they encounter this problem. In my case, I've defined a custom message ExampleServiceMsg.srv
in srv
folder in package example_service
. This package is a server that receives request. In this package, three header files are generated ExampleServiceMsg.h
, ExampleServiceMsgResponse.h
and ExampleServiceMsgRequest.h
. These files reside in devel/include/example_service
.
Now I've created a new package service_client
. This package needs to use ExampleServiceMsg.h
, a customized message generated in example_service
package. To allow the new package to detect the header file, we need to the following: in package.xml
<build_depend>example_service</build_depend>
<exec_depend>example_service</exec_depend>
in CMakelists.txt
for the new package
find_package(catkin REQUIRED COMPONENTS example_service)