-
Notifications
You must be signed in to change notification settings - Fork 808
Open
ros2/rcl
#1256Labels
Description
I've created a simple ROS node that requires a BYTE_ARRAY as a parameter using:
self.declare_parameter("byte_array", [])There doesn't seem a way however to actually pass a byte array using ros2 run, because it always gets interpreted as an integer array, no matter the way.
ros2 run my_pkg my_node --ros-args -p byte_array:=[0x11,0x12,0x13]
Error while starting My_node node: Trying to set parameter 'byte_array' to '[17, 18, 19]' of type 'INTEGER_ARRAY', expecting type 'BYTE_ARRAY'
ros2 run my_pkg my_node --ros-args --params-file test.yaml
Error while starting My_node node: Trying to set parameter 'byte_array' to '[17, 18, 19]' of type 'INTEGER_ARRAY', expecting type 'BYTE_ARRAY'
Where the test.yaml file looks like:
my_node:
ros__parameters:
byte_array: [0x11,0x12,0x13]Am I doing something wrong or is it simply not implemented?
I'm using ROS humble installed on Ubuntu 22.04 using the ROS apt repositories.
romainreignier