Fatal error: trajectory_by_name_srv/TrajByName.h: No such file or directory

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:

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