ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

roslaunch Unable to contact my own server

asked 2016-12-02 06:35:44 -0600

MZAIADY gravatar image

updated 2016-12-02 10:47:50 -0600

I have Turtlebot, running Indigo.

I'm able to run rviz on my machine

  rosrun rviz rviz

and able to see camera input and other topics from rviz on my machine,

But running:

roslaunch  turtlebot_rviz_launchers view_navigation.launch

Gives the following error

Unable to contact my own server at [ ]. This usually means that the network is not configured properly.

A common cause is that the machine cannot ping itself. Please check for errors by running:


For more tips, please see The traceback for the exception was written to the log file

I can ping the robot machine on "", and from the robot machine it can ping itself and my machine (testing from ssh), also netcat works fine from the two sides !

In my machine I have the following environment variable

export ROS_IP=<robot machine IP>

On the Trutlebot machine

ROS_IP=<robot machine IP>

I noticed that application/tools running using rosrun works fine from my machine and connect to the Turtlebot without any issues, like:

 rosrun kobuki_dashboard kobuki_dashboard   <Works fine>

While, tools starting using roslaunch all having the same issue

 roslaunch turtlebot_dashboard turtlebot_dashboard.launch   <gives the same error>

EDITED: Replace by (to show that this just an example)

edit retag flag offensive close merge delete


Just to make sure: is an IP you own? And is also a domain name you own? And your "robot machine" actually has the ip configured?

gvdhoorn gravatar image gvdhoorn  ( 2016-12-02 07:03:29 -0600 )edit

I used only IP before, which I get using ifconfig, but the got the same issues (only roslaunch not working), then I used machine names (after setting hostnames and mapped IP in /etc/hosts), but I had same issue, then i created my own DNS server/ domain mapping and the same issue still there

MZAIADY gravatar image MZAIADY  ( 2016-12-02 10:05:51 -0600 )edit

Note: "" is just example for the question, not actual domain I'm using, which I have configured in Bind9 DNS server

MZAIADY gravatar image MZAIADY  ( 2016-12-02 10:22:03 -0600 )edit

How do you set the environment variables? Bashrc? manually when you open a terminal? or some other method?

shoemakerlevy9 gravatar image shoemakerlevy9  ( 2016-12-02 12:10:05 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2016-12-02 13:17:42 -0600

tfoote gravatar image

You should not set both ROS_HOSTNAME and ROS_IP. See docs at:

And you appear to be using the same ROS_HOSTNAME/IP for both machines. That should be the address at which to call back to this specific machine not the same address which is likely why you're having trouble.

And lastly you should use an ethernet IP not localhost for multi computer setups.

If you'd like more help please edit your question provide exact outputs and more descriptions about how to reproduce your setup. Such as where are you running the master? What order are you running applications etc. And please show the output of the debugging suggestions at:

edit flag offensive delete link more


Thank you, The is more clear about this.

Specially 4.2 Verify from TurtleBot to Remote PC, this test fails

MZAIADY gravatar image MZAIADY  ( 2016-12-02 13:28:05 -0600 )edit

answered 2016-12-02 13:20:02 -0600

MZAIADY gravatar image

updated 2016-12-02 13:20:27 -0600

Solved: I found the issue, the problem with here

On my remote PC:


While it should be:

export ROS_HOSTNAME=<Remote PC IP>

Same as in this Tutorial : On Remote PC " ROS_HOSTNAME=IP_OF_PC" Not the IP of robot machine

> echo export ROS_MASTER_URI=http://IP_OF_TURTLEBOT:11311 >> ~/.bashrc
> echo export ROS_HOSTNAME=IP_OF_PC >> ~/.bashrc

Although most of tools works fine (e.g rosrun / rostopic list ,...) , but setting ROS_HOSTNAME=IP_OF_PC, what maks roslaunch works fine!!

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-12-02 06:34:19 -0600

Seen: 5,168 times

Last updated: Dec 02 '16