Skip to content
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

Add an option to subscribe to compressed image topics. #28

Merged

Conversation

rayferric
Copy link
Contributor

  • Also allow for relative names in cam_base_topic.

I have added a new parameter called image_sub_compressed: false. When enabled, aruco_tracker will subscribe to cam_base_topic/compressed instead of cam_base_topic.

This modification is a workaround, because normally, image compression is handled by setting image_transport::TransportHints. However we are unable to use image_transport with lifecycle nodes.

Enabling this feature makes aruco_tracker work much faster and allows us to successfully use it with a multi-camera setup.

Copy link
Member

@bjsowa bjsowa left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. I just have a couple of suggestions.

aruco_opencv/package.xml Outdated Show resolved Hide resolved
aruco_opencv/src/aruco_tracker.cpp Outdated Show resolved Hide resolved
aruco_opencv/src/aruco_tracker.cpp Outdated Show resolved Hide resolved
aruco_opencv/src/aruco_tracker.cpp Outdated Show resolved Hide resolved
@rayferric rayferric force-pushed the image-sub-compressed branch from c0027a7 to b29a6ab Compare March 26, 2024 21:29
Copy link
Member

@bjsowa bjsowa left a comment

Choose a reason for hiding this comment

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

Please reset the compressed image subscription in on_shutdown method.

Other than that, looks good. I will merge it after testing the new functionality.

@bjsowa bjsowa merged commit 1150e04 into fictionlab:humble Mar 27, 2024
3 checks passed
@bjsowa
Copy link
Member

bjsowa commented Mar 27, 2024

@Mergifyio backport iron rolling

Copy link
Contributor

mergify bot commented Mar 27, 2024

backport iron rolling

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Mar 27, 2024
* Add an option to subscribe compressed image topics

Also allow for relative names in cam_base_topic

* Fix code style divergence reported by colcon test

* Properly forward the original header when decompressing image messages.

* Update aruco_opencv/src/aruco_tracker.cpp

Co-authored-by: Błażej Sowa <[email protected]>

* Update aruco_opencv/src/aruco_tracker.cpp

Co-authored-by: Błażej Sowa <[email protected]>

* Restructure image callbacks

* Remove the unnecessary 'copy elision' comment

* Reset compressed_img_sub_ in on_shutdown()

---------

Co-authored-by: Błażej Sowa <[email protected]>
(cherry picked from commit 1150e04)
mergify bot pushed a commit that referenced this pull request Mar 27, 2024
* Add an option to subscribe compressed image topics

Also allow for relative names in cam_base_topic

* Fix code style divergence reported by colcon test

* Properly forward the original header when decompressing image messages.

* Update aruco_opencv/src/aruco_tracker.cpp

Co-authored-by: Błażej Sowa <[email protected]>

* Update aruco_opencv/src/aruco_tracker.cpp

Co-authored-by: Błażej Sowa <[email protected]>

* Restructure image callbacks

* Remove the unnecessary 'copy elision' comment

* Reset compressed_img_sub_ in on_shutdown()

---------

Co-authored-by: Błażej Sowa <[email protected]>
(cherry picked from commit 1150e04)
bjsowa pushed a commit that referenced this pull request Mar 27, 2024
* Add an option to subscribe compressed image topics

Also allow for relative names in cam_base_topic

* Fix code style divergence reported by colcon test

* Properly forward the original header when decompressing image messages.

* Update aruco_opencv/src/aruco_tracker.cpp

Co-authored-by: Błażej Sowa <[email protected]>

* Update aruco_opencv/src/aruco_tracker.cpp

Co-authored-by: Błażej Sowa <[email protected]>

* Restructure image callbacks

* Remove the unnecessary 'copy elision' comment

* Reset compressed_img_sub_ in on_shutdown()

---------

Co-authored-by: Błażej Sowa <[email protected]>
(cherry picked from commit 1150e04)

Co-authored-by: Ray Ferric <[email protected]>
bjsowa pushed a commit that referenced this pull request Mar 27, 2024
* Add an option to subscribe compressed image topics

Also allow for relative names in cam_base_topic

* Fix code style divergence reported by colcon test

* Properly forward the original header when decompressing image messages.

* Update aruco_opencv/src/aruco_tracker.cpp

Co-authored-by: Błażej Sowa <[email protected]>

* Update aruco_opencv/src/aruco_tracker.cpp

Co-authored-by: Błażej Sowa <[email protected]>

* Restructure image callbacks

* Remove the unnecessary 'copy elision' comment

* Reset compressed_img_sub_ in on_shutdown()

---------

Co-authored-by: Błażej Sowa <[email protected]>
(cherry picked from commit 1150e04)

Co-authored-by: Ray Ferric <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants