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

Parameter list from launch file

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

paulbovbel gravatar image

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

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
4

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

dornhege gravatar image

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

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">
        - (planning_scene_navstack_init@libplanner_modules_pr2.so /map 0.05 1)
        - (putdown_init@libputdown_modules.so /map)
</rosparam>
edit flag offensive delete link more

Question Tools

Stats

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

Seen: 3,826 times

Last updated: Feb 05 '15