Rosanswers logo

Hi all:

I have an issue launching a single talker and listener in two machines. It seems like one of the nodes is launched properly but with the other one (launched in the remote machine) is unable to start due to an error parsing the URI of the host. I tried to find some more information about the error but I have found nothing on the Internet.

This is the log of the roslaunch process: seems like both machines are connected properly and roslaunch tries to execute the listener node in the remote machine after launching the talker node successfully, and then it fails:

    [roslaunch][INFO] 2015-07-02 10:23:40,469: ... successfully launched [talker_java-1]
    [roslaunch][INFO] 2015-07-02 10:23:40,470: launch_nodes: launching remote nodes ...
    [roslaunch][INFO] 2015-07-02 10:23:40,568: []: launching nodes...
    [roslaunch][ERROR] 2015-07-02 10:23:40,633: error launching on [, uri]: ERROR: Traceback (most recent call last):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/server.py", line 331, in launch
    succeeded, failed = runner.launch()
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 646, in launch
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 622, in _setup
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 386, in _launch_master
    validate_master_launch(m, self.is_core, self.is_rostest)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/launch.py", line 81, in validate_master_launch
    if not rosgraph.network.is_local_address(m.get_host()):
  File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/core.py", line 272, in get_host
    host, _ = rosgraph.network.parse_http_host_and_port(self.uri)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/network.py", line 91, in parse_http_host_and_port
    raise ValueError('not a valid URL')
ValueError: not a valid URL

[roslaunch][ERROR] 2015-07-02 10:23:40,633: Launch of the following nodes most likely failed: beginner_tutorials/listener
[roslaunch][INFO] 2015-07-02 10:23:40,633: ... launch_nodes complete
[more unrelated log lines here after the error...]
[roslaunch.pmon][INFO] 2015-07-02 10:23:47,637: ProcessMonitor exit: killing
[roslaunch][INFO] 2015-07-02 10:23:47,637: [] killing on exit
[roslaunch.remoteprocess][INFO] 2015-07-02 10:23:47,651: remote[]: closing ssh connection
[roslaunch.remoteprocess][INFO] 2015-07-02 10:23:47,729: remote[]: ssh connection closed
[roslaunch][INFO] 2015-07-02 10:23:48,037: process[talker_java-1]: SIGINT killed with return value 130

This is the .launch file I am trying to test:


<machine name="adrian-laptop" address="" user="adrian" env-loader="rosws/adrian-laptop-envloader.sh"/>
<machine name="ctdesks50" address="" user="adrian.gonzalez" />

<node pkg="rosjava_tutorial" name="talker_java" type="execute" args="com.github.rosjava.rosjava_tutorial.my_pub_sub_tutorial.Talker" machine="ctdesks50"/>
<node pkg="beginner_tutorials" name="listener_C" type="listener" output="screen" machine="adrian-laptop"/>


And the env-loader in the remote machine is this one:

exec "$@"

Thank you in advance for your help, Adrian

Originally posted by AdrianGonzalez on ROS Answers with karma: 27 on 2015-07-02

Post score: 0


1 Answer 1


Rosanswers logo

I guess the problem is you need that you need to use hostnames instead of IP adresses. IP addresses as URI never worked for me.

Try adding hostnames in each computer in the /etc/hosts file if you do not have DNS on your network. And use your hostname for the URIs

Originally posted by cyborg-x1 with karma: 1376 on 2015-07-02

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by AdrianGonzalez on 2015-07-02:
ok, i have substituted the IP by the hostnames and the result is the same

error launching on [ctdesks46-0, uri http://ctdesks46:52649/]
File "/opt/ros/indigo/lib/python2.7/dist-packages/rosgraph/network.py", line 91, in parse_http_host_and_port       

I can't see anything weird

Comment by cyborg-x1 on 2015-07-02:
A problem in parse_http_host_and_port ... How does your ROS Master URI look like (env-loader scripts and localhost) http://YourMasterMachine:11311 ?

Comment by AdrianGonzalez on 2015-07-02:
good point! All logs (as you see) show the http:// but it was not present in ROS_MASTER_URI. Correcting that made the trick. Thank you!

Comment by cyborg-x1 on 2015-07-02:
You're welcome


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.