First time here? Check out the FAQ!


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

failed to roslaunch remotely on another computer

asked Nov 11 '16

johnyang gravatar image

updated Nov 14 '16

I am trying to remotely launch realsense from another computer. Pinging the remote PC has no problem. I can also execute the launch file from remote computer with roscore on my current PC successfully. I tried to set up a launch file like following:

<launch>
    <machine name="croc3up1" address="138.25.248.87" user="croc3up1" password="croc3up1" env-loader="~/catkin_ws/src/croc3_robot/config/env.sh" default="true"/>
    <!-- just testing a simple node-->
    <node machine="croc3up1" pkg="tf" type="static_transform_publisher" name="virtual_joint_broadcaster_0" args="0 0 0 0 0 0 link0 world 100" />
</launch>

I also tried this:

<include file="$(find realsense_test)/launch/realsense_test.launch" machine="croc3up1"/>

However I am getting the following error message:

... logging to /home/johnyang/.ros/log/25f83d3e-a7db-11e6-bef6-086266c7c72e/roslaunch-johnyang-ubuntu1404-7206.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://138.25.248.22 :33411/
remote[138.25.248.87-0] starting roslaunch
remote[138.25.248.87-0]: creating ssh connection to 138.25.248.87:22, user[croc3up1]
launching remote roslaunch child with command: [env ROS_MASTER_URI=http://localhost:11311 ~/catkin_ws/src/croc3_robot/config/env.sh roslaunch -c 138.25.248.87-0 -u http://138.25.248.22 :33411/ --run_id 25f83d3e-a7db-11e6-bef6-086266c7c72e]
remote[138.25.248.87-0]: ssh connection created
remote[138.25.248.87-0]: [:33411/] is not a launch file name
The traceback for the exception was written to the log file

[138.25.248.87-0] killing on exit
remote roslaunch failed to launch: croc3up1
The traceback for the exception was written to the log file

env.sh looks like following:

export ROS_HOSTNAME="138.25.248.87"
export ROS_IP="138.25.248.87"
. ~/catkin_ws/devel/setup.sh
exec "$@"

It sounded like the env.sh file is executed properly and ssh connection is established correctly. However it seemed having difficulty finding the the correct launch file to execute (throwing "is not a launch file name" error). The launch file is definitely put on the 2nd PC.

If I just manually ssh into the 2nd PC and I can perform all the roslaunch straight away (since I setup source ~/catkin/devel/setup.bash in ~/.bashrc etc already).

Any clue why using the "machine" tag to remotely start launch files does not work here? (I'm using ROS Jade) Thanks.

Preview: (hide)

Comments

I found something suspicious in the terminal output. There is a space between "http://138.25.248.22" and ":33411"... which is probably the major reason of the error. Maybe there is a bug in the source code for ROS Jade

johnyang gravatar image johnyang  ( Nov 14 '16 )edit

1 Answer

Sort by » oldest newest most voted
1

answered Nov 14 '16

johnyang gravatar image

I figured out eventually after going through the log and source code of roslaunch. It's actually because I had "export ROS_HOSTNAME=hostname -I" instead of "export ROS_HOSTNAME=138.25.248.22". This will then not create that extra space behind the server uri.

Preview: (hide)

Comments

If you are going to use IPs, please consider setting ROS_IP instead of ROS_HOSTNAME. See wiki/EnvironmentVariables - Node Environment Variables - ROS_IP/ROS_HOSTNAME for some info on those variables.

gvdhoorn gravatar image gvdhoorn  ( Nov 14 '16 )edit

That's a good point. Thanks.

johnyang gravatar image johnyang  ( Nov 15 '16 )edit

Question Tools

1 follower

Stats

Asked: Nov 11 '16

Seen: 1,322 times

Last updated: Nov 13 '16