Implement onParametersSet for handling only analyzers node parameters#551
Merged
Conversation
The previous implementation is using a callback that is invoked for all the parameter events of all ROS 2 nodes and it filters by node name. It could lead to race conditions when setting parameters depending on the depth size of the callback. With this new approach, the callback is only triggered when setting parameters for the analyzers node, avoiding possible race conditions when setting the parameters.
Contributor
Author
|
@ct2034 could you review/merge these changes? |
ct2034
approved these changes
May 19, 2026
Collaborator
ct2034
left a comment
There was a problem hiding this comment.
Thanks for your contribution. This is a lot cleaner than before :)
This was referenced May 19, 2026
mergify Bot
added a commit
that referenced
this pull request
May 19, 2026
Implement onParametersSet for handling only analyzers node parameters (backport #551)
mergify Bot
added a commit
that referenced
this pull request
May 19, 2026
Implement onParametersSet for handling only analyzers node parameters (backport #551)
mergify Bot
added a commit
that referenced
this pull request
May 19, 2026
Implement onParametersSet for handling only analyzers node parameters (backport #551)
ct2034
added a commit
to redvinaa/diagnostics
that referenced
this pull request
May 20, 2026
…ros#551) The previous implementation is using a callback that is invoked for all the parameter events of all ROS 2 nodes and it filters by node name. It could lead to race conditions when setting parameters depending on the depth size of the callback. With this new approach, the callback is only triggered when setting parameters for the analyzers node, avoiding possible race conditions when setting the parameters. Co-authored-by: Christian Henkel <christian.henkel2@de.bosch.com>
ct2034
added a commit
that referenced
this pull request
May 20, 2026
* Add starting_up_state parameter to Updater * Lint * Change to unsigned char * Remove condition * Fix example relative path (#550) * Implement onParametersSet for handling only analyzers node parameters (#551) The previous implementation is using a callback that is invoked for all the parameter events of all ROS 2 nodes and it filters by node name. It could lead to race conditions when setting parameters depending on the depth size of the callback. With this new approach, the callback is only triggered when setting parameters for the analyzers node, avoiding possible race conditions when setting the parameters. Co-authored-by: Christian Henkel <christian.henkel2@de.bosch.com> * Get rid of deprecated rclcpp::spin_some() (#563) Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * -Wreorder Signed-off-by: Christian Henkel <christian.henkel2@de.bosch.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Signed-off-by: Christian Henkel <christian.henkel2@de.bosch.com> Co-authored-by: Noel Jiménez García <noel.jimenez.gar@gmail.com> Co-authored-by: Christian Henkel <christian.henkel2@de.bosch.com> Co-authored-by: Maurice Alexander Purnawan <mauricepurnawan@gmail.com>
ct2034
added a commit
that referenced
this pull request
May 20, 2026
* Add starting_up_state parameter to Updater * Lint * Change to unsigned char * Remove condition * Fix example relative path (#550) * Implement onParametersSet for handling only analyzers node parameters (#551) The previous implementation is using a callback that is invoked for all the parameter events of all ROS 2 nodes and it filters by node name. It could lead to race conditions when setting parameters depending on the depth size of the callback. With this new approach, the callback is only triggered when setting parameters for the analyzers node, avoiding possible race conditions when setting the parameters. * Get rid of deprecated rclcpp::spin_some() (#563) * -Wreorder --------- (cherry picked from commit 60232a7) Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Signed-off-by: Christian Henkel <christian.henkel2@de.bosch.com> Co-authored-by: Vince Reda <60265874+redvinaa@users.noreply.github.com> Co-authored-by: Noel Jiménez García <noel.jimenez.gar@gmail.com> Co-authored-by: Christian Henkel <christian.henkel2@de.bosch.com> Co-authored-by: Maurice Alexander Purnawan <mauricepurnawan@gmail.com>
ct2034
added a commit
that referenced
this pull request
May 20, 2026
* Add starting_up_state parameter to Updater * Lint * Change to unsigned char * Remove condition * Fix example relative path (#550) * Implement onParametersSet for handling only analyzers node parameters (#551) The previous implementation is using a callback that is invoked for all the parameter events of all ROS 2 nodes and it filters by node name. It could lead to race conditions when setting parameters depending on the depth size of the callback. With this new approach, the callback is only triggered when setting parameters for the analyzers node, avoiding possible race conditions when setting the parameters. * Get rid of deprecated rclcpp::spin_some() (#563) * -Wreorder --------- (cherry picked from commit 60232a7) Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Signed-off-by: Christian Henkel <christian.henkel2@de.bosch.com> Co-authored-by: Vince Reda <60265874+redvinaa@users.noreply.github.com> Co-authored-by: Noel Jiménez García <noel.jimenez.gar@gmail.com> Co-authored-by: Christian Henkel <christian.henkel2@de.bosch.com> Co-authored-by: Maurice Alexander Purnawan <mauricepurnawan@gmail.com>
ct2034
added a commit
that referenced
this pull request
May 20, 2026
* Add starting_up_state parameter to Updater * Lint * Change to unsigned char * Remove condition * Fix example relative path (#550) * Implement onParametersSet for handling only analyzers node parameters (#551) The previous implementation is using a callback that is invoked for all the parameter events of all ROS 2 nodes and it filters by node name. It could lead to race conditions when setting parameters depending on the depth size of the callback. With this new approach, the callback is only triggered when setting parameters for the analyzers node, avoiding possible race conditions when setting the parameters. * Get rid of deprecated rclcpp::spin_some() (#563) * -Wreorder --------- (cherry picked from commit 60232a7) Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Signed-off-by: Christian Henkel <christian.henkel2@de.bosch.com> Co-authored-by: Vince Reda <60265874+redvinaa@users.noreply.github.com> Co-authored-by: Noel Jiménez García <noel.jimenez.gar@gmail.com> Co-authored-by: Christian Henkel <christian.henkel2@de.bosch.com> Co-authored-by: Maurice Alexander Purnawan <mauricepurnawan@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous implementation is using a callback that is invoked for all the parameter events of all ROS 2 nodes and it filters by node name. It could lead to race conditions when setting parameters depending on the depth size of the callback.
With this new approach, the callback is only triggered when setting parameters for the analyzers node, avoiding possible race conditions when setting the parameters.