Ask Your Question

node on rqt_graph is in red color always

asked 2014-09-23 17:55:50 -0600

MKI gravatar image

updated 2014-09-23 17:58:27 -0600


This question is for experienced ROS users. First about My setup which involves, a raspberrypi (B+ model, wheezy OS, ROS groovy deb installation) and desktop PC (AMD dual core, Ubuntu 12.04.5, ROS groovy). I use a simple wifi-router to setup connection between the two machines. I also have followed the network setup very carefully, which are as follows:

Case 1: (Initial Setup)

machine A (Desktop-PC; ROS MASTER): ROS_HOSTNAME=desktop-PC; ROS_MASTER_URI=http://desktop-PC:11311; (IP address of my PC)

machine B (raspberrypi): ROS_HOSTNAME=desktop-PC; ROS_MASTER_URI=http://desktop-PC:11311; (IP address of my raspberrypi)

now having said that, I start roscore on machine A, and with the above network setup I am able to view rosnodes on my raspberrypi with $ rosnode list. following which, I setup the turtlesim_node on machine B after which I setup the turtle_teletop node on machine A . Now, when I issue command using the teletop node the turtle on machine B does not move. a quick check on rqt_graph, reveals that my turtlesim_node is in red color. (something is wrong!).

Case 2:(Slight Change in the Network setup)

machine A (Desktop-PC; ROS MASTER): ROS_HOSTNAME=desktop-PC; ROS_MASTER_URI=http://desktop-PC:11311; (IP address of my PC)

machine B (raspberrypi): ROS_HOSTNAME=desktop-PC; ROS_MASTER_URI=http://desktop-PC:11311; (IP address of my PC)

now the change is done only with ROS_IP. The remaining setup are similar to that in case 1 . Now, when I issue command using the teletop node on machine A to the turtle on machine B , it moves!.But, a quick refresh on rqt_graph, reveals that my turtlesim_node is still in red color. (I feel something is really wrong! or I am missing a point here!).

so, again I kindly request ROS users to clarify this issue.



edit retag flag offensive close merge delete


Following the this note, note that ROS_HOSTNAME should take precedence over ROS_IP, and you really shouldn't need to set both. Try instead setting ROS_HOSTNAME on the RPi to the hostname of the RPi (not the desktop).

jarvisschultz gravatar imagejarvisschultz ( 2014-09-23 18:17:34 -0600 )edit

and for completeness, try not setting ROS_IP at all. Alternatively, use ROS_IP as you have it in Case 1, and don't set ROS_HOSTNAME. Also note, that for some network configurations, adding a .local to the end of ROS_HOSTNAME can help with name resolution.

jarvisschultz gravatar imagejarvisschultz ( 2014-09-23 18:19:05 -0600 )edit

For a more detailed explanation, watch my ROSCon talk from 2013 to get a better idea of how all of these environment variables interact and impact topic negotiation:

ahendrix gravatar imageahendrix ( 2014-09-23 18:41:53 -0600 )edit

Thank you, @jarvisschultz and @ahendrix , for the quick response. will try again with the above idea in mind.

MKI gravatar imageMKI ( 2014-09-24 07:36:17 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-13 09:35:00 -0600

MKI gravatar image

updated 2014-10-14 14:13:13 -0600


I watched the ROSCon talk by ahendrix, and tried out few different types of network configurations, I guess this might be helpful for anyone who is having trouble setting up their own network with ROS.

Things needed :

  1. A router (DNS server), which is capable of assigning IP addresses.
  2. connect all the devices which are part of your ROS ecosystem to this router. (also having access to the router homepage can be handy to get the mapping of 'devices to their respective IP address' ). if not try to use $ ifconfig command to find out IP address on each device.
  3. On your Master Device, Just execute the following commands, Start with $ roscore, now open another terminal, and issue the following commands,

    (For eg. Assuming the IP is, check yours and make suitable changes )

    $ export ROS_IP=

    $ export ROS_MASTER_URI=

  4. Now, On your slave or Client device/s, get the IP of your slave device/s and issue the following commands. Again, assuming your slave IP is (check this and modify according to what you get)

    $ export ROS_IP=

    $ export ROS_MASTER_URI=

NOTE: These commands are localized to the terminal you are currently working on. So, when you want to working on a new terminal make sure you issue these commands again. Also, It is not necessary to export your ROS_HOSTNAME. Be sure to export only your ROS_IP. This reduces all sort of complications.

5 . if you have done steps 1 to 4 correctly, then there should not be any trouble with your ROS network setup. Follow the same pattern in all your successive slave device/s.

Some of you might want to setup a direct connection between your PC and say for eg, an embedded device like Arduino or Rpi with an Ethernet cable. In that case make sure you follow the ROSCon video mentioned above, the last 5 or 7 minutes of the talk will give you an Idea as to what is essential for you in your setup.



edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-09-23 17:55:50 -0600

Seen: 569 times

Last updated: Oct 14 '14