Setting multiple parameters with ros2 param set
Is there a way to change multiple ROS2 node parameters from CLI at once? As I have seen, ros2 param set
syntax supports setting only one parameter at a time. This triggers the parameter set callback for each parameter, however, I need to have them all in a single callback.
Thank you.
Asked by nickcage on 2019-07-18 03:28:56 UTC
Answers
You could try to send via service call
. This is a command line example to set 2 parameters:
ros2 service call /your_node/set_parameters rcl_interfaces/srv/SetParameters "{parameters: [{name: "parameter_name", value: {type: 2, integer_value: 2}}, {name: "an_int_value", value: {type: 2, integer_value: 2}}]}"
Asked by ignacio on 2019-10-02 14:21:10 UTC
Comments
This solution isn't working, this service call
example calls the callback twice instead of once. I'm still looking a solution for this.
Asked by Boufont on 2021-10-06 11:09:30 UTC
Comments