ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Arrays need to be passed using rosparam
instead of the normal param
which is only able to accept scalar values or strings.
The normal param
has no way to tell the difference between a string and an array so it is always interpreted as a string.
Since rosparam
expects YAML syntax it is able to handle arrays. It can also handle dictionaries and others things specifiable in YAML syntax.
In your case it would look like this:
<rosparam param="x0">[0.0, 0.0]</rosparam>
Thanks to @gvdhoorn for answering this in a comment. I tried to expand on it and explain why rosparam
was needed.