ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Two ways to get a dictionary (key, value) on the ROS parameter server: loading a correctly formatted yaml file, or in-line in a rosparam
for the node
(in this case, joint_state_publisher
).
zeros: joint1: {0.5} joint2: {0.6}
If that is the actual formatting, then that won't work in neither case. The whole zeros
parameter should be a dictionary, not its individual elements (which you are doing by adding the curly braces ({
, }
).
In a yaml (note indentation):
zeros:
joint1: 0.5
joint2: 0.6
in-line in launch file:
<node type="joint_state_publisher" ..>
<rosparam>
zeros:
joint1: 0.5
joint2: 0.6
</rosparam>
</node>
In both cases indentation is required for the parser to create a proper dictionary out of the yaml.
2 | No.2 Revision |
Two ways to get a dictionary (key, value) on the ROS parameter server: loading a correctly formatted yaml file, or in-line in a rosparam
for the node
(in this case, joint_state_publisher
).
zeros: joint1: {0.5} joint2: {0.6}
If that is the actual formatting, then that won't work in neither either case. The whole zeros
parameter should be a dictionary, not its individual elements (which you are doing by adding the curly braces ({
, }
).
In a yaml (note indentation):
zeros:
joint1: 0.5
joint2: 0.6
in-line in launch file:
<node type="joint_state_publisher" ..>
<rosparam>
zeros:
joint1: 0.5
joint2: 0.6
</rosparam>
</node>
In both cases indentation is required for the parser to create a proper dictionary out of the yaml.