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

Revision history [back]

click to hide/show revision 1
initial version

the terminology i used is more illustrative to the configuration i setup. that question will help me clarify things.

That's great, but seeing as you're posting on a (the?) forum about ROS and problems using it, it'd be good to use the terminology from that domain in the way it is meant to be used. That will make things easier to understand for people reading your question.

there is one server running roscore and the edge device is setup to listen on the topics from the roscore server.

So two PCs/hosts (in this example): one running the ROS Master and perhaps other things) and the other running a nr of ROS nodes.

the ROS_IP, ROS_HOST and ROS_MASTER_URI is set to the server running roscore on both the server(master/server) and edge device(slave/client).

To get it out of the way: have you seen wiki/ROS/Tutorials/MultipleMachines?

ROS_IP should be set to the (publicly) reachable IP of the host itself. Not to any IP of another host.

ROS_HOSTNAME (that is probably the variable you refer to) should be set to a (publicly) resolvable (forward and reverse) FQDN of the host itself. Not to any name of another host.

But only if you actually have DNS set up for that host (and all other hosts in your ROS application).

ROS_MASTER_URI should be set to the IP or FQDN of the host running a (publicly) reachable ROS Master instance (at whichever port you configure it to run, default: 11311).

Setting this last one to localhost does not make sense when trying to reach a Master on a remote host.

In your case:

  • on the host running your ROS Master:
    • if you have DNS working for all hosts involved:
      • set ROS_HOSTNAME to the FQDN at which your Master can be reached
      • set ROS_MASTER_URI to http://$ROS_HOSTNAME:11311 (or localhost, as it's running the Master locally)
      • do not set ROS_IP
    • if DNS does not work:
      • set ROS_IP to the IP at which your Master can be reached
      • set ROS_MASTER_URI to http://$ROS_IP:11311 (or localhost, as it's running the Master locally)
      • do not set ROS_HOSTNAME
  • on your other host(s):
    • if you have DNS working for all hosts involved:
      • set ROS_HOSTNAME to the FQDN at which your other host can be reached
      • set ROS_MASTER_URI to http://<FQDN_of_your_ROS_master>:11311
      • do not set ROS_IP
    • if DNS does not work (or is not available):
      • set ROS_IP to the IP at which your other host can be reached
      • set ROS_MASTER_URI to http://<IP_of_your_ROS_master>:11311
      • do not set ROS_HOSTNAME

You'll want to add this to your .bashrc or some other file which will set this for all shells / sets up your environment, as otherwise it will not work.

the command run on the client is: roslaunch rosbridge_server rosbridge_websocket.launch wich is what is producing that error.

As I wrote: it's roslaunch which produces that error message.