[ros-users] ROS_MASTER_URI from inside .launch file

Ivan Dryanovski ivan.dryanovski at gmail.com
Tue Aug 24 22:06:39 UTC 2010


Hi,

Is it possible to set the ROS_MASTER_URI variable from inside a launch file?

I tried this:

<env name="ROS_MASTER_URI" value="http://strange:11311"/>

But it doesn't seem to have any effect, as seen in the output:

------------------------------------------------------------------------------
roslaunch pelican_launch gmapping.launch

... logging to /home/idryanov/.ros/log/7061568a-afcb-11df-a5c2-0026f288bc39/roslaunch-idryanov-desktop-10047.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://idryanov-desktop:42454/

SUMMARY
========

PARAMETERS
 * /slam_gmapping/llsamplestep
 ...
 * /slam_gmapping/linearUpdate

NODES
  /
    laser_ortho_projector (laser_ortho_projector/laser_ortho_projector)
    slam_gmapping (gmapping/slam_gmapping)

starting new master (master configured for auto start)
process[master]: started with pid [10061]
ROS_MASTER_URI=http://idryanov-desktop:11311/

setting /run_id to 7061568a-afcb-11df-a5c2-0026f288bc39
------------------------------------------------------------------------------

Thanks,

Ivan Dryanovski



More information about the ros-users mailing list