http://wiki.ros.org/image_transport/Tutorials/ExaminingImagePublisherSubscriber says setting the image_transport parameter to compressed will cause the compressed image to be subscribed to.
(If there are multiple image subscribers in the same node, I would guess they all would either be using the same transport, only having multiple ImageTransport objects with multiple node handles on different namespaces would allow finer grained control)
If you were running the my_subscriber tutorial code and the image to subscribe to was /usb_cam/image_raw
instead of /camera/image
, you would do this:
rosrun image_transport_tutorial my_subscriber camera/image/compressed:=/usb_cam/image_raw/compressed _image_transport:=compressed
The image is uncompressed for you before it hits your callback, did you want to get the compressed data raw instead?
rqt_image_view looks like it is directly subscribing to the compressed image, I wonder if it is doing something different?
Originally posted by lucasw with karma: 8729 on 2016-10-27
This answer was ACCEPTED on the original site
Post score: 0