ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can't set multiple parameters with one invocation of ros2 param set. You need to call it once for each parameter you want to set. If you need to change multiple parameters without your node doing something in between each parameter being changed, you should use a managed life cycle node (see here for a demo). Deactive the node so that it stops executing, change all the parameters, then re-activate it again.

You _can_ set multiple values within a single parameter when that parameter is a structure. You have to specify the parameter value on the command line using yaml. For example:

ros2 param set /listener position '{x: 2.0, y: 0.0, z: 0.0}'

You can't set multiple parameters with one invocation of ros2 param set. You need to call it once for each parameter you want to set. If you need to change multiple parameters without your node doing something in between each parameter being changed, you should use a managed life cycle node (see here for a demo). Deactive the node so that it stops executing, change all the parameters, then re-activate it again.

You _can_ can set multiple values within a single parameter when that parameter is a structure. You have to specify the parameter value on the command line using yaml. For example:

ros2 param set /listener position '{x: 2.0, y: 0.0, z: 0.0}'

You can't set multiple parameters with one invocation of ros2 param set. You need to call it once for each parameter you want to set. If you need to change multiple parameters without your node doing something in between each parameter being changed, you should use a managed life cycle node (see here for a demo). Deactive the node so that it stops executing, change all the parameters, then re-activate it again.

You can set multiple values within a single parameter when that parameter is a structure. You have to specify the parameter value on the command line using yaml. For example:

ros2 param set /listener position '{x: '1.0, 2.0, y: 0.0, z: 0.0}' 3.0}'