Ask Your Question
0

Roslaunch fails to set MASTER_URI over ssh [closed]

asked 2013-01-23 05:50:32 -0600

Claudio gravatar image

updated 2014-01-28 17:14:57 -0600

ngrennan gravatar image

I've read this question and set my MASTER_URI accordingly (own machine name) yet the remote node gets launched with another roscore.

Here is my launch file

<launch>
    <machine name="Panda" address="LabRob-Panda-01" user="panda" default="false" env-loader="/opt/ros/fuerte/env.sh"/>

    <!-- send roomba urdf to param server -->
    <param name="robot_description" command="$(find xacro)/xacro.py /home/erupter/Apps/ROS/simple.urdf" />
    <param name="tf_prefix" value="laser"/>
    <param name="use_rep_117" value="true"/>

    <node pkg="tf" type="static_transform_publisher" name="tf" args="0 0 0 0 0 0 base_link laser 10" />"

<!--    <node pkg="joint_state_publisher" type="joint_state_publisher" name="jsp"/> -->

<!--    <node pkg="robot_state_publisher" type="state_publisher" name="laser" >
            <remap from="tf" to="laser" />
    </node> -->


    <!-- Hokuyo Base Node-->
    <node pkg="hokuyo_node" type="hokuyo_node" name="hokuyo_laser" machine="Panda"></node>

    <!-- Rviz Node-->
    <node pkg="rviz" type="rviz" args="-d /home/erupter/Apps/ROS/hokuyo/hokuyo_node/hokuyo_test.vcg" name="rviz01"> </node>
</launch>

And here is the result of the launching

erupter@FCD-04-Ubuntu:~/Apps/ROS$ echo $ROS_MASTER_URI 
http://FCD-04-Ubuntu:11311/

erupter@FCD-04-Ubuntu:~/Apps/ROS$ roslaunch hokuyo.launch 
... logging to /home/erupter/.ros/log/ce7b5b28-6584-11e2-96a3-e0cb4e8e9c06/roslaunch-FCD-04-Ubuntu-32673.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://FCD-04-Ubuntu:57645/
remote[LabRob-Panda-01-0] starting roslaunch
remote[LabRob-Panda-01-0]: creating ssh connection to LabRob-Panda-01:22, user[panda]
launching remote roslaunch child with command: [/opt/ros/fuerte/env.sh roslaunch -c LabRob-Panda-01-0 -u http://FCD-04-Ubuntu:57645/ --run_id ce7b5b28-6584-11e2-96a3-e0cb4e8e9c06]
remote[LabRob-Panda-01-0]: ssh connection created

SUMMARY
========

PARAMETERS
 * /robot_description
 * /rosdistro
 * /rosversion
 * /tf_prefix
 * /use_rep_117

MACHINES
 * Panda

NODES
  /
    hokuyo_laser (hokuyo_node/hokuyo_node)
    rviz01 (rviz/rviz)
    tf (tf/static_transform_publisher)

auto-starting new master
process[master]: started with pid [32695]
ROS_MASTER_URI=http://FCD-04-Ubuntu:11311/

setting /run_id to ce7b5b28-6584-11e2-96a3-e0cb4e8e9c06
process[rosout-1]: started with pid [32708]
started core service [/rosout]
process[tf-2]: started with pid [32722]
process[rviz01-3]: started with pid [32735]
[LabRob-Panda-01-0]: launching nodes...
[LabRob-Panda-01-0]: auto-starting new master
[LabRob-Panda-01-0]: process[master]: started with pid [28756]
[LabRob-Panda-01-0]: ROS_MASTER_URI=http://localhost:11311
[LabRob-Panda-01-0]: setting /run_id to ce7b5b28-6584-11e2-96a3-e0cb4e8e9c06
[LabRob-Panda-01-0]: process[hokuyo_laser-1]: started with pid [28770]
[LabRob-Panda-01-0]: ... done launching nodes

I also tried setting an env like so

<node pkg="hokuyo_node" type="hokuyo_node" name="hokuyo_laser" machine="Panda"> <env name="ROS_MASTER_URI" value="http://FCD-04-Ubuntu:11311"/>

</node>

But it doesn't work. Distro is fuerte on both machines.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Claudio
close date 2013-01-24 04:34:26

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-01-24 04:34:06 -0600

Claudio gravatar image

This is covered in detail in this answer.

Problem is ros_comm version together with actual shell variable. Updating ros_comm and correctly setting the env variable ROS_MASTER_URI corrects the problem.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-01-23 05:50:32 -0600

Seen: 1,660 times

Last updated: Jan 24 '13