setting ros parameters via launch files
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.
Asked by anirban on 2021-01-31 21:58:33 UTC
Answers
If I am not mistaken this is shown directly in the rosparam launch wiki.
Asked by JackB on 2021-02-01 09:36:39 UTC
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.
Asked by anirban on 2021-02-01 10:35:12 UTC
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>
Asked by JackB on 2021-02-01 10:43:48 UTC
Comments