[ros-users] read parameter in launch file

Jack O'Quin jack.oquin at gmail.com
Tue Oct 5 17:05:49 UTC 2010

On Tue, Oct 5, 2010 at 11:04 AM, Axelrod, Benjamin <baxelrod at irobot.com> wrote:
> Is there any way to read a parameter in a launch xml file?  For example, I
> set the value of a parameter at the top of the file, then lower in the file
> I read the parameter and use it for something.  Or must this type of thing
> be done through environment variables?  If so, this seems like a strange
> restriction.  Is there any reasoning behind this?

Not sure what your use case is, but there are other options available.

You can set a parameter at the top of a launch file and use it in
several nodes using the searchParam() method, which works even with
included launch files and subordinate namespaces.

More information about the ros-users mailing list