ROS2 Declaring Dictionary Parameter Python

asked 2021-11-05 14:20:37 -0600

echo gravatar image

Is there a good substitute to declare a parameter with a dictionary value in ROS2 as it seems that dictionaries aren't supported for it? For example, I tried

node.declare_parameter('parameter_name', dict())

but got the error message

TypeError: The given value is not one of the allowed types.

I'm currently trying to port an existing ROS1 project to ROS2 and this parameter had initially been a dictionary already so I'd ideally like to make pretty minimal changes.

Does anyone know a good way around this?

edit retag flag offensive close merge delete


Any updates on this?

rezenders gravatar image rezenders  ( 2022-12-14 11:21:48 -0600 )edit