# Problem in running Turtlebot project

**URL:** <https://get-help.theconstruct.ai/t/problem-in-running-turtlebot-project/1975>\
**Category:** ROS Basics In 5 Days (Python)\
**Created:** [January 15, 2020, 6:58am UTC](https://get-help.theconstruct.ai/t/problem-in-running-turtlebot-project/1975 "2020-01-15T06:58:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrushikesh.kyathari](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/hrushikesh.kyathari/32/10_2.png) [@hrushikesh.kyathari](https://get-help.theconstruct.ai/u/hrushikesh.kyathari)\
**Post date:** [January 15, 2020, 6:58am UTC](https://get-help.theconstruct.ai/t/problem-in-running-turtlebot-project/1975/1 "2020-01-15T06:58:44Z")

</div>

I have followed the steps as mentioned in the project and have completed all the steps. I have a launch file which launches the three nodes: service\_server node, action\_server node and the main program called my\_node. Everything works perfectly but when the turtlebot reaches the ending of the maze, I get the error:

> …  
> Traceback (most recent call last):  
> File “/home/user/catkin\_ws/src/my\_turtlebot\_main/src/turtlebot\_main.py”, line 37, in   
> my\_object=controller()  
> File “/home/user/catkin\_ws/src/my\_turtlebot\_main/src/turtlebot\_main.py”, line 15, in **init**  
> self.imp\_part()  
> File “/home/user/catkin\_ws/src/my\_turtlebot\_main/src/turtlebot\_main.py”, line 24, in imp\_part  
> result=self.my\_connector()#server starts!  
> File “/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros\_service.py”, line 435, in **call**  
> return self.call(\*args, \*_kwds)  
> File “/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros\_service.py”, line 505, in call  
> raise ServiceException(“unable to connect to service: %s”%e)  
> rospy.service.ServiceException: unable to connect to service: [Errno -2] Name or service not known  
> [my\_node-3] process has died [pid 27099, exit code 1, cmd /home/user/catkin\_ws/src/my\_turtlebot\_main/src/turtlebot\_main.py \_\_name:=my\_node \_\_log:=/home/user/.ros/log/2029e6ba-3760-11ea-a6ab-06f0b4bd1fec/my\_node-3.log].  
> log file: /home/user/.ros/log/2029e6ba-3760-11ea-a6ab-06f0b4bd1fec/my\_node-3_.log

I see that my service client connector: result=self.my\_connector() is failing. But I don’t understand why. Any help would be appreciated.

---

<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:** [January 15, 2020, 10:13am UTC](https://get-help.theconstruct.ai/t/problem-in-running-turtlebot-project/1975/2 "2020-01-15T10:13:50Z")

</div>

Hi @hrushikesh.kyathari,

The error indicates that your service server is not running, and it could be that:

- The service server is not running actually. Maybe it ran and then stopped for some reason. Maybe you didn’t start it?
- The service is running but not yet ready. Did you use the “rospy wait for service” function in your service client? Example:

```auto
# Wait for the service /trajectory_by_name to be running
rospy.wait_for_service('/trajectory_by_name')

```

---

<div class="post-metadata">

**Author:** ![hrushikesh.kyathari](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/hrushikesh.kyathari/32/10_2.png) [@hrushikesh.kyathari](https://get-help.theconstruct.ai/u/hrushikesh.kyathari)\
**Post date:** [January 15, 2020, 11:05am UTC](https://get-help.theconstruct.ai/t/problem-in-running-turtlebot-project/1975/3 "2020-01-15T11:05:29Z")

</div>

That was very silly of me to forget this. Thank you Sir.
