Custom Service Server 3.3

Hello,

I have run into this ROS error quite a lot. Each time I checked the paths and everything seems to be alright. I was wondering if there any other mistakes that might trigger this error.

ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/user/catkin_ws/src
ROS path [2]=/home/simulations/public_sim_ws/src
ROS path [3]=/opt/ros/kinetic/share

Cheers,

Josh

Hi @josho.wallace,
what Error?

ERROR: cannot launch node of type [custom_service_srv_pkg/custom_service_server.py]: custom_service_srv_pkg
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/user/simulation_ws/src
ROS path [2]=/home/user/catkin_ws/src
ROS path [3]=/home/simulations/public_sim_ws/src
ROS path [4]=/opt/ros/kinetic/share

Okay, try to run
source /home/user/catkin_ws/devel/setup.bash

You have to run this command EVERY time after you used catkin_make for EVERY shell you want to use. See if that fixes the problem.

Yep, I already did that after I made adjustments to the package and CMAKE files. I ran it again to double check and I still received the same errors.

when you execute
roscd
what directory are you in? If it is not your catkin_ws/devel, try sourceing your setup.bash again and run roscd again. What are your results?

roscd brings me to /home/user/catkin_ws/devel

please post your launch file and a screenshot of your folder structure of the pkg. You can also try deleting devel and build folders and rebuild everything

I did not type the correct package name in the launch file. So the error is caused because it can’t find the package. Why does all the other ROS path stuff come up?

Hi @josho.wallace,

That came up because ROS was trying to find the package/python file.

I suppose the error is resolved now? If not, please also check that the python file is executable and and that the name is correct:

Hi @bayodesegun,

The problem is now solved. Thank you for the help.

1 Like