-
Notifications
You must be signed in to change notification settings - Fork 120
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
[ROS2] reconfigurable transport scoped parameters for CompressedDepthPublisher #145
[ROS2] reconfigurable transport scoped parameters for CompressedDepthPublisher #145
Conversation
- runtime reconfiguration - <image>.<transport>.<param> as future replacement of <image>.<param> - e.g. `image.compressedDepth.png_level` instead of `image.png_level` - support both ways for now - emit deprecation warnings on setting through non-transport scoped parameter - synchronize deprecated changes to new ones - this is necessary for dynamic reconfigure - add ROS1 like ranges for parameters (min/max) - some cleanup - remove unnecessary includes, using statements, etc. Default png_level was left the same as for compressed_image_transport - this is OpenCV default (3) - the deprecated paramterer name clashes here with compressed_image_transport - I don't really want to consider if there is a race between plugin loading for default value - side notes: - in ROS2 default was 9 - 9 is not usable for real-time processing on most machines - in ROS1 default is now 1 - 3 is typically usable for real-time processing - this should probably be made even with ROS1 after removing deprecated parameters Related to ros-perception#140 Builds up on ros-perception#110
compressed_depth_image_transport/src/compressed_depth_publisher.cpp
Outdated
Show resolved
Hide resolved
compressed_depth_image_transport/src/compressed_depth_publisher.cpp
Outdated
Show resolved
Hide resolved
compressed_depth_image_transport/src/compressed_depth_publisher.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, apart from minor suggestions, rest looks good.
Happy to merge once suggestions are addressed.
Co-authored-by: Kenji Brameld <[email protected]>
Co-authored-by: Kenji Brameld <[email protected]>
Co-authored-by: Kenji Brameld <[email protected]>
There is one more thing that your review made me aware of. As:
Setting deprecated But maybe that is expected. We will get 2x warnings from both |
The "deprecated" code you have in this PR seems to reflect this current strange behavior correctly, and will allow those that depend on this behavior to gracefully take on the new API). How about we be explicit about this png_level parameter, in both depth and compressedDepth. We could change: to the following if (the name of the topic is "png_level"): In regards to getting 2x warnings, this is not a problem as there are actually two plugins complaining. |
A reasonable compromise is
Then we will get from plugins
Without hardcoding any transport names in warning messeges. |
For: - compressed_depth_image_transport - compressed_image_transport
compressed_depth_image_transport/src/compressed_depth_publisher.cpp
Outdated
Show resolved
Hide resolved
For already declared attributes those reads do nothing
That's a good compromise. Just one final thing, and we're good to go I think |
@Mergifyio backport iron |
✅ Backports have been created
|
[ROS2] reconfigurable transport scoped parameters for CompressedDepthPublisher (backport #145)
#140 fix for CompressedDepthPublisher
#108 like (runtime reconfigurable)
Builds up on top of #110 so if merged that one should also be closed.
Implementation is #143 like.
png_level
defaultI left default
png_level
the same as forcompressed_image_transport
.Both plugins use
png_level
and clash on deprecated parameter name as mentioned in #140and we don't want to consider race between plugin loaders (e.g. which default value wins).
We can set it again to something different once deprecated parameters are removed.
code repetition
There is some code repetition between:
This should be temporary until deprecated parameters are removed.