There is a problem with the image topic in zed_ros2_wrapper when using cv_bridge.

"We are using a ZED2i camera with zed_ros2_wrapper. However, when using cv_bridge and Open3D, there is an issue with the ROS2 image topic—it seems like the image is being distorted. Please see the attached images for reference. Could you help us identify the cause?

Hi @junil
Welcome to the Stereolabs community.

The problem that you reported is a typical case of frame tearing that different factors can cause:

  • The host is overloaded, so the USB 3 controller buffer is not flushed in time, causing overflows.
  • The USB 3 connection is not stable

USB 3 connection instability can be caused by:

  • A damaged USB 3 cable
  • USB 3 extenders
  • USB 3 hubs
  • Unstable USB 3 port
  • Cable placed close to the power cables of other devices
  • other factors

Please verify that none of the factors listed above are affecting your setup.

Thank you for your reply, Myzhar.

We are currently using Stereolabs’ official USB 3 ZED cable and a USB 3 port.

Nevertheless, the issue described above is still occurring.
Therefore, it doesn’t seem to be a problem with the cable or hardware.
From the tests we conducted, the issue appears when running the ZED2i camera with zed_ros2_wrapper and then converting the image topic using cv_bridge into OpenCV. However, we don’t understand why the original image gets distorted like that.

I suspect the cv_bridge conversion is taking many resources.
Are you using composition and IPC to limit the resources required for communication?

Please read our documentation to learn more:

Thank you for your reply, Myzhar.

I will carefully review the documents you provided and attempt the suggested approaches. Once I have tested them, I will get back to you with my feedback.

Hello Myzhar,

I have carefully reviewed the documents you provided and followed the steps accordingly.
As a conclusion, I found that when applying DDS Middleware and Network tuning, the issues occurred more frequently when using CycloneDDS.

Regarding zed_ipc, it did not seem to run properly, although this might be because we are currently testing with only one camera.

Additionally, when we tested with two PCs — where PC1 publishes topics using zed_ros2_wrapper and PC2 subscribes to those topics to run our source code — we did not encounter any issues. However, our intention is to run everything on a single PC, rather than relying on a two-PC setup.

Could you kindly advise us if there is any alternative solution you would recommend?

Thank you very much for your support.

Can you please run ZED_Explorer and ZED_Depth_Viewer and verify if the problem is also present with the ZED SDK tools?