Ask Your Question

Roslaunch xml: How to pass a list of strings as parameters?

asked 2015-07-08 14:58:50 -0500

tbh gravatar image

updated 2015-09-22 13:22:36 -0500

130s gravatar image

Is there any way to pass a list of strings as an argument in a launch file? Something like

  <arg name="source_list" default="[a_topic,a_second_topic]"/>
     <param name="source_list" value="$(arg source_list)"/>
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2015-09-22 05:01:28 -0500

Vincent Rabaud gravatar image

You can use rosparam. There is an example given here:

edit flag offensive delete link more

answered 2018-03-22 10:37:47 -0500

Tiki gravatar image

updated 2019-03-14 16:37:08 -0500

lucasw gravatar image


  <arg name="source_list" default="[a_topic,a_second_topic]"/>

    <node ...>

         <rosparam param="source_list" subst_value="True">$(arg source_list)</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



Asked: 2015-07-08 14:58:50 -0500

Seen: 10,170 times

Last updated: Mar 14 '19