How to get an array of parameters with rclcpp
In ROS1, you could retrieve a list of parameters
The documentation shows get_parameter returning an ParameterVariant but ParameterVariant doesn't seem to have an as_vector
option.
Do you want a list of parameters in a certain namespace, like
/ns/*
->['value of /ns/foo', 'value of /ns/bar', 'value of /ns/baz']
, or do you want one parameter as a vector (e.g. parameter/position
->[1.0, 1.0, 0.0]
)?The latter, one parameter name, which is why I figured
get_parameters
wouldn't work.We may not have that API yet, but we can certainly add it or whatever the appropriate alternative is. There was some work done on lists in parameters this cycle, but I don't know the state off-hand, let me look it up.