Launching a rosbag record node on a remote machine
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:
<launch>
<machine name="comp2" address="10.0.0.1" 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" />
</launch>
The remote_env_load.bash on the remote machine "comp2" looks like this:
#!/bin/bash
export ROS_IP=10.0.0.1
export ROS_MASTER_URI=10.0.0.2
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 [10.0.0.1-0, uri http://10.0.0.1:41387/]: ERROR: Traceback (most recent call last):
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/server.py", line 332, in launch
succeeded, failed = runner.launch()
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/launch.py", line 662, in launch
self._setup()
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/launch.py", line 637, in _setup
launched = self._launch_master()
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/launch.py", 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/launch.py", line 83, in validate_master_launch
if not rosgraph.network.is_local_address(m.get_host()):
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/core.py", line 273, in get_host
host, _ = rosgraph.network.parse_http_host_and_port(self.uri)
File "/opt/ros/melodic/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
Launch of the following nodes most likely failed: rosbag/record
Does anyone have an idea on what is going wrong here?