ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
2

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

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

2 Answers

Sort by ยป oldest newest most voted
2

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

Vincent Rabaud gravatar image

You can use rosparam. There is an example given here: http://wiki.ros.org/roslaunch/XML/ros...

edit flag offensive delete link more
0

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

Tiki gravatar image

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

lucasw gravatar image

This:

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

    <node ...>

         <rosparam param="source_list" subst_value="True">$(arg source_list)</rosparam> 

    </node>
</launch>
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

3 followers

Stats

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

Seen: 5,445 times

Last updated: Mar 14