0
$\begingroup$

Rosanswers logo

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.


Originally posted by johnyang on ROS Answers with karma: 66 on 2016-11-11

Post score: 0


Original comments

Comment by johnyang on 2016-11-13:
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

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by johnyang with karma: 66 on 2016-11-13

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2016-11-14:
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.

Comment by johnyang on 2016-11-15:
That's a good point. Thanks.

$\endgroup$

Your Answer

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