Batch parameter events on node startup
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
Feature request
Feature description
When a node starts up, most nodes call declare_parameter several times, each time publishing an rcl_interfaces::msg::ParameterEvent if start_parameter_event_publisher is true on NodeOptions (which it is by default). For large systems with many parameters, this can flood the system with many parameter events on startup. The rcl_interfaces::msg::ParameterEvent message supports sending multiple parameter changes per message, but currently rclcpp only sends one event per message in this case, which is less efficient.
It would be desirable to batch all parameter events from a node startup into one ParameterEvent message.
Implementation considerations
This batching could be implemented in declare_parameters, refactoring it to not directly call declare_parameter in a std::transform, but to at least change the publishing logic.
Also, while the interface supports this, I'm not sure if this would break any assumptions by the ros2 cli.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with rclcpp's declare_parameters implementation and the existing declare_parameter publishing path, using NodeOptions::start_parameter_event_publisher and rcl_interfaces::msg::ParameterEvent as the relevant interfaces. Check how ros2 CLI consumers handle parameter events, then verify that node startup produces one batched event without changing the declared parameters or their values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100