Description
Currently, ros2 param get requires both a node name and parameter name as positional arguments:
ros2 param get <node_name> <parameter_name>
This proposal suggests extending the command to support an optional node name, allowing users to query a parameter across all discovered nodes:
ros2 param get <parameter_name> # Query all nodes
ros2 param get <node_name> <parameter_name> # Existing behavior (unchanged)
When invoked without a node name, the command would iterate through all available nodes and print the parameter value (or indicate if not set) for each.
Motivation
System-wide parameter inspection: Parameters like use_sim_time are commonly set across many nodes. Verifying consistency currently requires running multiple commands or writing a script.
Debugging efficiency: When troubleshooting parameter-related issues, developers often need to check the same parameter across the entire system to identify misconfigurations.
Design / Implementation Considerations
Proposed Syntax
# New: Query parameter across all nodes
ros2 param get use_sim_time
# Existing: Query specific node (unchanged)
ros2 param get /my_node use_sim_time
Output Format
/node_a: use_sim_time: False
/node_b: use_sim_time: True
(/node_c: if parameter not set, it does not print)
- Fully backward compatible
- Existing
ros2 param get <node> <param> syntax unchanged
- Disambiguation: If ambiguity exists between a node name and parameter name, prefer the existing 2-argument interpretation or require explicit
--all-nodes flag
Additional Information
This pattern could extend to other ros2 param subcommands:
ros2 param set <parameter> <value> — Set across all nodes (with confirmation)
Description
Currently,
ros2 param getrequires both a node name and parameter name as positional arguments:This proposal suggests extending the command to support an optional node name, allowing users to query a parameter across all discovered nodes:
When invoked without a node name, the command would iterate through all available nodes and print the parameter value (or indicate if not set) for each.
Motivation
System-wide parameter inspection: Parameters like
use_sim_timeare commonly set across many nodes. Verifying consistency currently requires running multiple commands or writing a script.Debugging efficiency: When troubleshooting parameter-related issues, developers often need to check the same parameter across the entire system to identify misconfigurations.
Design / Implementation Considerations
Proposed Syntax
Output Format
ros2 param get <node> <param>syntax unchanged--all-nodesflagAdditional Information
This pattern could extend to other
ros2 paramsubcommands:ros2 param set <parameter> <value>— Set across all nodes (with confirmation)