zed-ros2-wrapper: [BUG] Unable to subscribe and display /zed/zed_node/left/image_rect_color Images
Describe the bug
Subscribing to the sensor_msgs/msg/Image topic named /zed/zed_node/left/image_rect_color images fails and does not show images are being published.
Device information:
- OS: Ubuntu
- OS version: 20.04
- CPU: i7
- GPU Nvidia: GTX Geforce 1060
- ZED SDK Version: 3.5.0
- ROS Wrapper version: latest dev_foxy
- ZED Camera Model: ZED
To Reproduce
Steps to reproduce the behavior:
To Reproduce: Setup
cd $HOME
mkdir -p ~/zed_ros2_ws/src && cd ~/zed_ros2_ws/src
git clone https://github.com/stereolabs/zed-ros2-wrapper.git --single-branch --branch dev_foxy --depth 1
git clone https://github.com/stereolabs/zed-ros2-examples.git --single-branch --branch dev_foxy --depth 1
cd ~/zed_ros2_ws/
source /opt/ros/foxy/setup.bash
colcon build --symlink-install --cmake-args=-DCMAKE_BUILD_TYPE=Release
# Launch zed_display_rviz2
ros2 launch zed_display_rviz2 display_zed.launch.py
Observed that RViz2 is indeed able to display published images from /zed/zed_node/left/image_rect_color. See screenshot attached. However, RGB Image /zed/zed_node/rgb/image_rect_color/ does not show any images.
Run zed_tutorial_video example subscription node taken from this ZED tutorial link.
source /opt/ros/foxy/setup.bash
cd ~/zed_ros2_ws/
source install/setup.bash
ros2 run zed_tutorial_video zed_tutorial_video --ros-args -r left_image:=/zed/zed_node/left/image_rect_color -r right_image:=/zed/zed_node/right/image_rect_color
zed_tutorial_video is unresponsive and does not show anything.
Run ros2 topic echo to check if images are being published.
source /opt/ros/foxy/setup.bash
ros2 topic echo /zed/zed_node/left/image_rect_color
Observed that nothing is being echoed on this topic, even though we confirmed earlier that RVIz2 is able to display the images being published on the same topic. Refer to .gif animation below.
Expected behavior
Expected to run the following commands and observe the sensor_ msgs/msg/Image raw information being published onto terminal while zed_display_rviz2 ROS2 package is running:
source /opt/ros/foxy/setup.bash
ros2 topic echo /zed/zed_node/left/image_rect_color
Screenshots

Additional context
Attempting to write my own ROS2 node that subscribes to the images published on this topic to use for subsequent 2D image processing.
Others
Not sure what I am doing wrong or missing here. Will appreciate any help. Thanks.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 35 (11 by maintainers)
@kquigley29 I’m working on the fix. It should be available in the
masterbranch (Eloquent) in a few hours. It is already available for the Foxy distribution in thedev_foxybranchMr. Myzhar Thank you for your patience and quick reply! I installed image_common 3.0.0 as you said, and it compiled successfully! Hope you have a great new day at work!

I had the same issue change the reliability from Reliable to Best Effort in rviz2 under the topic pull down.
@cardboardcode I just noticed that you are using a ZED camera. I tested it with a ZED2 and it worked correctly. I will test it with a ZED in the next few hours and I will fix the eventual issue with it.
I will test it in the next hours and I will be back to you with a solution 👍
Can you try to subscribe to the pose or odom topic in a second console window to see if the image topics are published. I remember to have fixed a similar issue, but I guess that the fix has not yet been propagated from the
dev_foxybranch to themasterbranch (see https://github.com/stereolabs/zed-ros2-wrapper/issues/31)ROS2 requires a bit of attention when subscribing to topics. The Quality of Service (QoS) profiles for publisher and subscriber must be compatible. You can read more in the online documentation: https://www.stereolabs.com/docs/ros2/zed-node/#published-topics