How to publish compressed images (ROS)

Hi,

Using the ROS ZED SDK, There was one time I saw the zed2 camera publish rgb rectified compressed images. However, I haven’t been able to reproduce that ability — I see only the regular rectified rgb images topic among the list of topics. Is there any toggle for turning on the publishing of the compressed version of the images?
Thank you

Hi @orrblue
to publish the compressed images you must have installed all the required packages.

sudo apt install ros-<distribution>-image-transport-plugins ros-<distribution>-compressed-image-transport ros-<distribution>-theora-image-transport ros-<distribution>-compressed-depth-image-transport
1 Like

After installing the recommended packages, I am not seeing the compressed image topics published on my system after launching the cameras in ROS2 humble with 3.8 sdk. What else do I need to do to get compressed image topics?

Hi @bradyasheehan
the ROS2 Wrapper uses image_transport to publish image messages, so you can enable compressed topics by simply installing the required image_transport plugin.
This is the command to enable all the compression plugins:
sudo apt install ros-humble-image-transport-plugins ros-humble-theora-image-transport ros-humble-compressed-depth-image-transport ros-humble-compressed-image-transport

/zed2/zed_node/left/camera_info
/zed2/zed_node/left/image_rect_color
/zed2/zed_node/left/image_rect_color/compressed
/zed2/zed_node/left/image_rect_color/compressedDepth
/zed2/zed_node/left/image_rect_color/theora
/zed2/zed_node/left/image_rect_gray
/zed2/zed_node/left/image_rect_gray/compressed
/zed2/zed_node/left/image_rect_gray/compressedDepth
/zed2/zed_node/left/image_rect_gray/theora
1 Like