ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
172 stars 161 forks source link

Fix printing of integer and double arrays. #804

Closed clalancette closed 1 year ago

clalancette commented 1 year ago

In the ros2param code, we get integer and double arrays as literal Python arrays. When printing that out in ros2 param get, they look something like:

Double values are: array('d', [1.4, 1.5])

But that isn't really what we want the user to see. So call .tolist() on these before we print, so it looks like:

Double values are: [1.4, 1.5]

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

clalancette commented 1 year ago

CI: