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

Launching a rosbag record node on a remote machine

asked 2020-02-24 03:15:38 -0500

max11gen gravatar image

updated 2022-01-22 16:10:22 -0500

Evgeny gravatar image

I'm trying to launch a rosbag record node on a remote machine. The reason why I'm trying to do this, is because I want to have a synchronous recording of topics on two different machines. I am aware, that I could just record all topics on one machine, however, for some reason I am missing data, when I am doing so (if you have suggestions on how to solve that, I'd be happy to hear about them, too). My launch file record_bags.launch looks like this:

    <machine name="comp2" address="" user="user" env-loader="/home/user/catkin_ws/devel/remote_env_load.bash" default="false" />
    <node pkg="rosbag" type="record" name="record_kinect" machine="comp2" respawn="false" output="screen" args="--duration=5 -O /home/user/test.bag /topic3 /topic4" />
    <node pkg="rosbag" type="record" name="record_atis" respawn="false" output="screen" args="--duration=5 -O /home/user/test.bag /topic1 /topic2" />

The remote_env_load.bash on the remote machine "comp2" looks like this:

export ROS_IP=
source /opt/ros/melodic/setup.bash
source /home/user/catkin_ws/devel/setup.bash

Now when I use roslaunch record_bags.launch I get the following error:

error launching on [, uri]: ERROR: Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/", line 332, in launch
    succeeded, failed = runner.launch()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/", line 662, in launch
  File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/", line 637, in _setup
    launched = self._launch_master()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/", line 400, in _launch_master
    validate_master_launch(m, self.is_core, self.is_rostest)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/", line 83, in validate_master_launch
    if not
  File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/", line 273, in get_host
    host, _ =
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosgraph/", line 91, in parse_http_host_and_port
    raise ValueError('not a valid URL')
ValueError: not a valid URL

Launch of the following nodes most likely failed: rosbag/record

Does anyone have an idea on what is going wrong here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-02-24 04:29:31 -0500

gvdhoorn gravatar image

As the name of the variable implies, it should be set to a full URI, not just an IP.

So it should most likely be:


in your case.

edit flag offensive delete link more


Great thanks. If you don't mind, I'd have another little question to append: Is there a way to make sure these to records will start at the exact same time?

max11gen gravatar image max11gen  ( 2020-02-24 04:58:31 -0500 )edit

If you don't mind, I'd have another little question to append

actually: posting follow-up questions in comments on accepted answers is a bad idea. They have very low visibility. It'd be better to post a new question (and potentially referring back to this one in your new post).

gvdhoorn gravatar image gvdhoorn  ( 2020-02-24 05:13:50 -0500 )edit

You are right. I just posted another question. Thanks for your help, and feel free to remove these comments.

max11gen gravatar image max11gen  ( 2020-02-24 05:28:54 -0500 )edit

Question Tools



Asked: 2020-02-24 03:15:38 -0500

Seen: 802 times

Last updated: Feb 24 '20