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

Compressed Image Display #1288

Draft
wants to merge 17 commits into
base: rolling
Choose a base branch
from

Conversation

mjforan
Copy link
Contributor

@mjforan mjforan commented Oct 24, 2024

Addresses #738

I added RosTopicMultiProperty, which extends RosTopicProperty with a list of message types instead of one single type. This allows the ImageDisplay to show raw and compressed image topics together in its selector list. ImageDisplay was altered to use an image_transport subscriber so it can seamlessly display any installed image type. There is also a handful of frivolous changes to comply with the style linters.

Tested with raw and compressed images. Assuming the other types work as well because the conversion happens in the image_transport library.

Uncertainties:

  • RosTopicMultiProperty: Is the name ok? Is there a simpler way to achieve my goal without adding a one-off property?
  • plugin_description.xml: I added the other image_transport topic types here so Image Display appears in the "Add/By topic" menu. Adding the display will fail if the associated image_transport plugin is not installed. Should ros-$ROS_DISTRO-image-transport-plugins be added to package.xml?

@mjforan
Copy link
Contributor Author

mjforan commented Nov 7, 2024

Added a property to manually override image transport type. Rviz determines the transport by checking the topic name against image_transport conventions, e.g. camera_name/raw, camera_name/compressed, etc. If this is not the case, the transport must be set manually.
I also fixed the crash caused by adding a topic with an unavailable transport. Instead it will provide an error on the status property saying the transport is not installed.

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

This is wierd

rviz2_image_transport

I had a default rviz.config file with an image display and Rviz2 crashes, do you mind to take a look ? we don't want to break user.

@mjforan
Copy link
Contributor Author

mjforan commented Nov 8, 2024

@ahcorde

This is wierd

Sorry about that, I have pushed a fix.

I had a default rviz.config file with an image display and Rviz2 crashes, do you mind to take a look ? we don't want to break user.

Please provide details so I can reproduce your issue.

@mjforan
Copy link
Contributor Author

mjforan commented Nov 8, 2024

I would like to list the available image transports in a status message. However, setStatusStd only seems to work when it is called from subscribe, not onInitialize or updateTopic. Any idea why?

The status message doesn't really matter except the transport->message type map is hard-coded, so we will want a warning if a new transport type is used which does not exist in the map.

@mjforan
Copy link
Contributor Author

mjforan commented Nov 12, 2024

I noticed the Jazzy version of image_transport finally allows passing in custom QoS so I updated the API here to match. This change is not compatible with previous versions of ROS.

@mjforan mjforan mentioned this pull request Nov 12, 2024
@mjforan
Copy link
Contributor Author

mjforan commented Nov 13, 2024

Can ImageDisplay be combined with the parent class ImageTransportDisplay? That would allow CameraDisplay to also show compressed image topics.

@mjforan mjforan marked this pull request as draft November 13, 2024 13:47
@mjforan mjforan force-pushed the compressed-image-display branch from 48133ae to 40711b7 Compare November 20, 2024 23:42
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.

3 participants