ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
172 stars 161 forks source link

No way to load a ros param file for all nodes #778

Open ckurtz22 opened 1 year ago

ckurtz22 commented 1 year ago

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.

fujitatomoya commented 1 year ago

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

RFRIEDM-Trimble commented 1 year ago

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

reinzor commented 10 months ago

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

fujitatomoya commented 10 months ago

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.