Ask Your Question

Confuse about env name and env loader

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

dsgthlr gravatar image

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

gvdhoorn gravatar image

Here is my launch file:

  <group ns="rover1">
    <env name="ROS_MASTER_URI" value="http://Master:11311"/> 
    <machine name="Slaver1" address="Slaver1" user="pi"  env-loader="/opt/ros/indigo/" />
    <machine name="Master"  address="Master"  user="hlr" env-loader="/opt/ros/indigo/" /> 
    <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="" args="/dev/ttyACM0" />

AND below is my env-loader file:

. /home/pi/catkin_ws/devel/
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 Thank for Anything Help!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

destogl gravatar image

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



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

Seen: 602 times

Last updated: Jul 30 '18