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

setting ros parameters via launch files

asked 2021-01-31 20:58:33 -0600

anirban gravatar image

updated 2021-01-31 20:59:44 -0600

I need to set controller joint names as rosparameters which has values as list type. From terminal, I can set that parameter value as below

rosparam set controller_joint_names "[joint_1,joint_2]"

However, I want that parameter value to be set from the launch file. For that, I have used the following command in the launch file.

<param name=controller_joint_names value="[joint_1,joint_2]" />

Using the above command in roslaunch file throws the error saying rosparameter value is not list type. Any help in resolving the error will be appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-02-01 08:36:39 -0600

JackB gravatar image

If I am not mistaken this is shown directly in the rosparam launch wiki.

edit flag offensive delete link more

Comments

Thank you for your response. I have gone through that page you pointed to. I followed the same format for parameter value as a list but it seems I am still getting the same error.

anirban gravatar image anirban  ( 2021-02-01 09:35:12 -0600 )edit

Then why aren't you following the tutorial like this:

<rosparam param="controller_joint_names">[joint_1, joint_2]</rosparam>

Or this:

<arg name="controller_joint_names" default="[joint_1, joint_2]"/>
<rosparam param="controller_joint_names" subst_value="True">$(arg controller_joint_names)</rosparam>
JackB gravatar image JackB  ( 2021-02-01 09:43:48 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2021-01-31 20:58:33 -0600

Seen: 491 times

Last updated: Feb 01 '21