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

Confuse about env name and env loader

asked 2015-11-25 04:38:03 -0500

dsgthlr gravatar image

updated 2015-11-25 10:10:32 -0500

gvdhoorn gravatar image

Here is my launch file:

<launch>
  <group ns="rover1">
    <env name="ROS_MASTER_URI" value="http://Master:11311"/> 
    <machine name="Slaver1" address="Slaver1" user="pi"  env-loader="/opt/ros/indigo/env_rover.sh" />
    <machine name="Master"  address="Master"  user="hlr" env-loader="/opt/ros/indigo/env_rover.sh" /> 
    <node pkg="rover_net" name="ControlNode" type="ControlNode" />
    <node machine="Slaver1" pkg="rover_net" name="SensorNode" type="SensorNode" />
    <node machine="Slaver1" pkg="rosserial_python" name="serial_node" type="serial_node.py" args="/dev/ttyACM0" />
  </group>
</launch>

AND below is my env-loader file:

#!/bin/sh
. /home/pi/catkin_ws/devel/setup.sh
exec "$@"

My qustion is since I have set the ROS_MASTER_URI but the remote machine is also:

Slaver1-0]: ROS_MASTER_URI=http://localhost:1131

unless I add:

export ROS_MASTER_URI=http://Master:11311

It seems that the env name have no work. I am confuse about How the args we set in the launch file pass to the env_rover.sh? Thank for Anything Help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-07-30 03:06:11 -0500

The problem you mentioned is probably because one can not set environment variable on the remote machine if you not set it inside machine tag. In your case the variable will be only set on local (master) computer.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2015-11-25 04:36:25 -0500

Seen: 1,133 times

Last updated: Jul 30 '18