ros2cli icon indicating copy to clipboard operation
ros2cli copied to clipboard

No way to load a ros param file for all nodes

Open ckurtz22 opened this issue 2 years ago • 4 comments


Feature request

Feature description

ROS2 has no functionality for loading a parameter file that contains parameters for multiple nodes. This was easily doable in ROS1 and there is no reason it should not be possible in ROS2. For example, parameter file named "params.yaml" contains the following:

/my_node1:
  ros__parameters:
    param1: 1.0
    param2: "test"
/my_node2:
  ros__parameters:
    param3: 73

and then running ros2 param load params.yaml would apply the relevant parameters to the nodes named /my_node1 and /my_node2

Implementation considerations

It makes no sense why this would not be allowed under the ROS2 framework, considering the parameter file already requires nodes to be explicitly named.

ckurtz22 avatar Nov 10 '22 04:11 ckurtz22

right, this cannot be done with current ros2 param command, since it requires node_name in the argument. I think this feature is reasonable.

CC: @ros2/team

fujitatomoya avatar Nov 10 '22 18:11 fujitatomoya

This sounds like a fun one, I'd like to take the work if the team is happy with the modification. Seems straightforward enough.

RFRIEDM-Trimble avatar Nov 15 '22 22:11 RFRIEDM-Trimble

Any updates on this; we could help with the implementation if this suggested feature is desired.

reinzor avatar Oct 27 '23 06:10 reinzor

No, i do not think anybody working on this. feature sounds good to me, but it could not be so straight-forward. currently it knows which node to set the parameters because user specifies so, but this requires to parse the parameter file to which node to call the parameter service (including wildcard), besides needs to create ParameterClient for each of them.

fujitatomoya avatar Oct 27 '23 18:10 fujitatomoya