Ask Your Question
1

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
4

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">
        - (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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 2,967 times

Last updated: Feb 05 '15