# Custom Service Server 3.3

**URL:** <https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005>\
**Category:** ROS Basics In 5 Days (Python)\
**Tags:** error\
**Created:** [October 10, 2019, 5:54pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005 "2019-10-10T17:54:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![josho.wallace](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/j/3da27b/32.png) [@josho.wallace](https://get-help.theconstruct.ai/u/josho.wallace)\
**Post date:** [October 10, 2019, 5:54pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/1 "2019-10-10T17:54:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![simon.steinmann91](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/simon.steinmann91/32/324_2.png) [@simon.steinmann91](https://get-help.theconstruct.ai/u/simon.steinmann91)\
**Post date:** [October 10, 2019, 5:56pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/2 "2019-10-10T17:56:21Z")

</div>

Hi @josho.wallace,  
what Error?

---

<div class="post-metadata">

**Author:** ![josho.wallace](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/j/3da27b/32.png) [@josho.wallace](https://get-help.theconstruct.ai/u/josho.wallace)\
**Post date:** [October 10, 2019, 6:00pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/3 "2019-10-10T18:00:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![simon.steinmann91](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/simon.steinmann91/32/324_2.png) [@simon.steinmann91](https://get-help.theconstruct.ai/u/simon.steinmann91)\
**Post date:** [October 10, 2019, 6:07pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/4 "2019-10-10T18:07:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![josho.wallace](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/j/3da27b/32.png) [@josho.wallace](https://get-help.theconstruct.ai/u/josho.wallace)\
**Post date:** [October 10, 2019, 6:12pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/5 "2019-10-10T18:12:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![simon.steinmann91](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/simon.steinmann91/32/324_2.png) [@simon.steinmann91](https://get-help.theconstruct.ai/u/simon.steinmann91)\
**Post date:** [October 10, 2019, 6:18pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/6 "2019-10-10T18:18:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![josho.wallace](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/j/3da27b/32.png) [@josho.wallace](https://get-help.theconstruct.ai/u/josho.wallace)\
**Post date:** [October 10, 2019, 6:21pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/7 "2019-10-10T18:21:26Z")

</div>

roscd brings me to /home/user/catkin\_ws/devel

---

<div class="post-metadata">

**Author:** ![simon.steinmann91](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/simon.steinmann91/32/324_2.png) [@simon.steinmann91](https://get-help.theconstruct.ai/u/simon.steinmann91)\
**Post date:** [October 10, 2019, 6:25pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/8 "2019-10-10T18:25:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![josho.wallace](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/j/3da27b/32.png) [@josho.wallace](https://get-help.theconstruct.ai/u/josho.wallace)\
**Post date:** [October 10, 2019, 7:09pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/9 "2019-10-10T19:09:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![bayodesegun](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/bayodesegun/32/10684_2.png) [@bayodesegun](https://get-help.theconstruct.ai/u/bayodesegun)\
**Post date:** [October 10, 2019, 7:21pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/10 "2019-10-10T19:21:31Z")

</div>

Hi @josho.wallace,

> [@josho.wallace](#):
>
> 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?

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:

> **[ERROR: cannot launch node of type \[package/file.py\]: can't locate node...](https://get-help.theconstruct.ai/t/error-cannot-launch-node-of-type-package-file-py-cant-locate-node-file-py-in-package-package/54)**
>
> This error is very common when using ROS to launch a python node, either via rosrun or roslaunch. SOLUTION: Does the file file.py… exist in the package package? If not, create it! (Does the package itself exist and is it spelled correctly?)....

---

<div class="post-metadata">

**Author:** ![josho.wallace](https://get-help.theconstruct.ai/letter_avatar_proxy/v4/letter/j/3da27b/32.png) [@josho.wallace](https://get-help.theconstruct.ai/u/josho.wallace)\
**Post date:** [October 10, 2019, 7:37pm UTC](https://get-help.theconstruct.ai/t/custom-service-server-3-3/1005/11 "2019-10-10T19:37:09Z")

</div>

Hi @bayodesegun,

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