Skip to content

fix that if no parameter is updated, the user callback is not called - #383

Open
fabianhirmann wants to merge 2 commits into
PickNikRobotics:mainfrom
ARTI-Robots:main
Open

fix that if no parameter is updated, the user callback is not called#383
fabianhirmann wants to merge 2 commits into
PickNikRobotics:mainfrom
ARTI-Robots:main

Conversation

@fabianhirmann

@fabianhirmann fabianhirmann commented Aug 28, 2026

Copy link
Copy Markdown

This can be the case if one node has multiple param listeners in multiple namespaces and then the add_on_set_parameters_callback is called for all the parameter changes and not just for the relevant ones.

@fabianhirmann

Copy link
Copy Markdown
Author

After the pull request is merged, please backport the change to at least ROS 2 Humble as well.

@christophfroehlich christophfroehlich added the backport-humble Triggers PR backport to ROS 2 humble. label Aug 28, 2026

@christophfroehlich christophfroehlich left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description sounds reasonable to be fixed, but can you please add tests for that?

@fabianhirmann

Copy link
Copy Markdown
Author

Description sounds reasonable to be fixed, but can you please add tests for that?

Thank you for your quick response! I also added now a test in example/test/example_test_gtest.cpp because as far as I saw at the other test cases there is no testing of the behavior of the produced ParamListener. The newly created test passes with my changes and fails when tested without my changes.

By that I also noticed that I missed to update the generator for update_runtime_parameter but this is now also fixed (all tests should pass now (at least this is the case when testing the changes on ROS Humble)).

@christophfroehlich christophfroehlich left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the test, can you add one for the python module as well please?

…(this can be the case if one node has multiple param listeners in multiple namespaces and then the add_on_set_parameters_callback is called for all the parameter changes and not just for the relevant ones)
@fabianhirmann

Copy link
Copy Markdown
Author

Thanks for the test, can you add one for the python module as well please?

Thank you for the catch! I also added now a test for the python module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-humble Triggers PR backport to ROS 2 humble.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants