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

Revision history [back]

You use standard YAML syntax for rosrun paramter assignment.

That being said, I was able to reproduce the behavior you're seeing, and also got some interesting results. Perhaps this is a bug in rosrun? See below:

rosrun rospy_tutorials talker __name:=talker _test:=[0,1,2]
rosparam get /talker/test
    [0, 1, 2]

rosrun roscpp_tutorials talker __name:=talker _test:=[0,1,2]
rosparam get /talker/test

It appears as if parameters are correctly YAML-parsed when using rosrun with a python node, but not with a cpp node. I tried all sorts of different variations on the YAML bit. Using a scalar number works, but all other more-complex YAML constructs (sequences, maps, etc.) all seem to parse as plain strings.

Does anyone have a correct formulation, or is this really a rosrun bug? I was able to reproduce the same behavior in both groovy and fuerte (current debian packages).