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

Revision history [back]

click to hide/show revision 1
initial version

Sorry; you cannot do this.

roslaunch is designed with explicit interfaces (args) passed between launch files. This keeps launch files readable and makes the dependencies between them explicit and easy to follow. (these are the same reasons why using globals in C/C++ is discouraged)

A launch file must declare any arg that it uses, and the only arguments that are passed to included launch files are those explicitly passed.

Launch files can only set parameters; they cannot read them. This is because roscore (and the parameter server) is not guaranteed to be running when roslaunch is loading and processing a launch file.

If you really want global configuration values, roslaunch can read environment variables, using the $(env) and $(optenv) substitutions.