th2747
November 4, 2019, 12:38am
1
Hello I’m at ROS IN 5 DAYS, Unit 3: Services in ROS, ex. 3.1
I’ve copied the simple_service_client.cpp, modified the CMakeList, and the error happened during the catkin_make:
It seems that catkin is not finding the srv file in another package.
I’ve source the catkin_ws and the “rossrv rossrv show trajectory_by_name_srv/TrajByName” command returns the proper result.
Does anybody know how to fix this? Thank you very much!
Hi @th2747 ,
You can fix this by adding trajectory_by_name_srv
as a dependency in the package. Please check this post for details:
Hi @shaktigehlaut ,
You need to include the package trajectory_by_name_srv as dependency in your package. I apologize that this was not mentioned in the notebook. We will update the notebook ASAP.
The easiest way is to add it as a dependency when creating the package:
catkin_create_pkg service_client_pkg roscpp trajectory_by_name_srv
But since you have created the package already, just modify your CMakeLists.txt and package.xml as follows:
CMakeLists.txt: add trajectory_by_name_srv to find…
Hello
I also have the same problem although all the steps you said was did and I still have the same error message. Could you please help me ?
1 Like
THIS IS THE ERROR MEASSAGE
and this is the CMakeLists
1 Like
Hi Bayodesegun,
I followed your solution, but it still cannot find the ‘.h’ file.
Could you please check my and my fellow students’ problem again?
I think if it’s because the public_ws
doesn’t have the generated rossrv msg header file.
Best,
Weiheng