ros2 param set, on_parameter_event called twice
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 262
- Forks
- 228
- Avg merge
- 23h 15m
- Merged PRs (30d)
- 12
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 18.04
- Installation type:
- source
- Version or commit hash:
- 2049b2f
- DDS implementation:
- Fast-RTPS
- Client library (if applicable):
- rclcpp
Steps to reproduce issue
ros2 param set /parameter_events plop 42
Expected behavior
Call on_parameter_event once with the new/changed/deleted parameters
Actual behavior
Call on_parameter_event twice, the first time with no parameters then with the new/changed/deleted parameters
Additional information
When I set a parameter using the parameter client in a node, on_parameter_event is called once, as it should be, but when I set a parameter using command line, the on_parameter_event is called twice. And the first time it's triggered, there is no parameters inside.
The output using a node :
[INFO] [parameter_events]:
Parameter event:
new parameters:
foo
changed parameters:
deleted parameters:
The output using command line ros2 param set /parameter_events plop 42 :
[INFO] [parameter_events]:
Parameter event:
new parameters:
changed parameters:
deleted parameters:
[INFO] [parameter_events]:
Parameter event:
new parameters:
plop
changed parameters:
deleted parameters:
I created a simple/minimal file to test this : here, based on the demos pkg.
I'm not 100% sure whether the issue should be here or in rclcpp, but since it only happens when I use the command line, I'm posting it here.
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 by reproducing ros2 param set /parameter_events plop 42 and compare its behavior with the parameter-client path described in the issue. Inspect the ros2 param set entry point and the linked parameter_events_async.cpp example from the demos package. Done means the command-line operation produces one parameter event containing the changed parameter, rather than an empty event followed by a populated one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100