-
Notifications
You must be signed in to change notification settings - Fork 55
Handle dynamic reconfiguration of parameters #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Very cool! I remember that last time there were some complexities to which parameters can be read only, but that might have been just for the name and type. I'll take a deeper look at this tonight. |
|
Thanks, just FYI: This PR on laser_filters is kind of related |
|
OK life got in the way today.... will check on this tomorrow. |
|
I remember there was some subtlety about which params could/should be readable last time I was working on this code, so I need to dive into this a bit more and make sure I understand it. Hopefully will have time this weekend. |
|
I'll do a more detailed review tomorrow, but I have a couple of initial thoughts.
|
be2196c to
acda704
Compare
|
Hey Jonathan, Thanks for your feedback. About point 2: I added this functionality, however as read_only, to comply to naming in the parameter description. |
|
I think it's worth using the right callbacks for each distro, although it would be a bit more work. We ran into a similar issue in the laser_filters package with matched_callbacks (ros-perception/laser_filters#195), which weren't supported in humble. The solution was to define a compile flag based on the version of rclcpp and use that to enable or disable the feature. How does that approach sound? We would use "post set parameter callback" on versions where rclcpp has them, and "on set parameter callback" on versions where it doesn't (humble). |
|
I looked a bit into this approach. It is possible off course, but it is going to result in quite a lot of #ifdefs in this code and causes a breaking change for all the implementations of the filter_base class. That counts for laser_filters, but possibly people's own implementations. You already use the
Knowing this impact, do you still want to implement it this way? If you do, i can add it to this PR, and make one extra for laser_filters. But for code readability and for the sake of backwards compatibility i still rather keep on_set_parameter_callback for all ros2 versions. |
|
Yes, I think you're right. I'll plan to update the callback type next time we have a new ros2 distro; at that point we'll probably want to branch for humble anyway. |
|
Was this the last PR you had for filters? If so I'll do a release and we can start on the laser_filters PRs :-) |
|
Yes, I think this it it :) |
Hey,
We wanted to be able to tweak filter parameters dynamically. So we added the functionality to handle parameter updates in the FilterChain. I did have to make parameters readable for that. I don't know if there is a specific reason to make them read_only?