Robotics StackExchange | Archived questions

How to subscribe to image_transport topic in RViz?

Is it not possible for RViz to subscribe to compressed image topics? I'm using the raspicam_node to publish a compressed image stream from a camera on a raspberry pi:

https://github.com/fpasteau/raspicam_node

I can display in RViz fine if I republish the topic locally on my desktop, but it would be nice to have RViz subscribe directly. Is that possible?

Asked by Jeffrey Kane Johnson on 2017-06-15 14:47:23 UTC

Comments

You may be able to make rviz subscribe to the compressed image by changing the Transport Hint property of the Image View or Camera View.

Asked by ahendrix on 2017-06-16 00:29:18 UTC

I also thought that, but the only hint listed is 'raw'; I can't change it to something else.

Asked by Jeffrey Kane Johnson on 2017-06-16 19:28:00 UTC

Typing compressed in the Transport Hint might work.

Asked by ahendrix on 2017-06-16 23:59:45 UTC

Would be nice, but it's only a dropdown box; can't type anything in it.

Asked by Jeffrey Kane Johnson on 2017-06-18 00:59:47 UTC

Can someone please complete the solution. How can we add compressed to the transport hint?

Asked by Kansai on 2021-03-23 19:26:38 UTC

Answers

1) Published the compressed image on /your_topic_here/compressed

2) Add an Image in rviz. Under Image Topic fill in /your_topic_here (without the compressed)

3) Select compressed from the dropdown.

image description

I believe compressed does not appear in the dropdown unless the compressed sub-topic is available.

Asked by bsaund on 2020-07-10 12:51:21 UTC

Comments

How do we make the compressed sub-topic available?

Asked by Kansai on 2021-03-23 19:24:32 UTC

Hi, is there a example for ros2 and rviz2?

Asked by andy2008 on 2022-01-19 20:35:10 UTC