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

Parameter list from launch file

asked 2013-02-22 03:40:48 -0500

paulbovbel gravatar image

updated 2015-02-05 12:30:09 -0500

I'm using rosserial to pull a list of gains from the parameter server, but I can't seem to figure out how to use the <param> tag to create a list of values in a launch file.

EDIT: Specifically, trying to make one parameter of 'list' type, and then could be pulled in one go as shown here.

EDIT2: <rosparam param = "~pid">[0.1, 0.1, 0.1, 100]</rosparam> works to load a list, however roslaunch seems to automatically parse the values as strings

EDIT3: <rosparam param = "pid">[0.1, 0.1, 0.1, 100.0]</rosparam> works fine

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-22 03:51:11 -0500

dornhege gravatar image

updated 2013-02-22 03:54:34 -0500

If you use the tag to load the list you can use a yaml file like so:

- item
- item2

However, if you want to set the param directly as a list within the launch file using <rosparam> here is an example. Look for the planner_options parameter.

<rosparam param="planner_options">
        - ( /map 0.05 1)
        - ( /map)
edit flag offensive delete link more

Question Tools


Asked: 2013-02-22 03:40:48 -0500

Seen: 3,740 times

Last updated: Feb 05 '15