Zed-ros2-wrapper max_depth problem (ZEDX)

Hello,

I’m trying to get depth information for the objects far then 10m.
/zed/zed_node/depth/depth_registered/compressedDepth - does not contain information about any object between 10 and 19m

zedx.yaml
    depth:
      min_depth: 1.0 
      max_depth: 19.0 

Setup:
zed-ros2-wrapper - latest,
SDK 5.2.1

Also tried(started from) SDK 5.1 and older version of zed-ros2-wrapper

My topics in sample:

/zed/zed_node/depth/depth_registered/compressedDepth
/zed/zed_node/left/color/rect/image/compressed
/zed/zed_node/left/color/rect/image/camera_info

ZED_Depth_Viewer can show the data I’m interested in
Sample based on SDK API - can show.
zed-ros2-wrapper with /zed/zed_node/depth/depth_registered - also can!
but not for /zed/zed_node/depth/depth_registered**/compressedDepth**

Is it expected behavior?
Do you have any recommandation how to get it working with **compressedDepth?
**
Thank you for any helpful information

Hi @sergii
have you checked if the point cloud contains depth information in the expected range?

Please share the full node log to check that all the parameters are correctly set.

Please also check the parameters of the compressedDepth topic.

It looks like the code of the compressed depth transport has a parameter to set the maximum depth value that is hard coded to 10 meters:

I tested and I cannot see this parameter exposed…

Hi, Myzhar

Thank you for your tests. Now I see that compressed_depth_image_transport it is not reliably exposed/configured in a ROS 2-friendly way.

Can you show how you are setting max_depth in from wrapper to compressed_depth_image_transport?
I’m going to prepare a patch for compressed_depth_image_transport.

Now I have
ros2 param get /zed/zed_node depth.max_depth
Double value is: 19.0
But it’s not visible in compressed_depth_image_transport

There’s no code for this because this parameter is not correctly exposed by the compressed_depth_image_transport package.

You are the first user to notice and report this problem that is only affecting the compressedDepth topic for the reasons exposed above.

Ok, let me summarize.

Stereolabs recommends using compressed depth to improve the performance (reduce the bandwidth) But the configuration does not work due to the third-party issue (compressed_depth_image_transport).

I realized the support in compressed_depth_image_transport is like a ROS2 param.
command-line: ros2 param set node parameter value - works on my end.

I can rebuild compressed_depth_image_transport with hardcoded depth_max.
But we need to use two cameras, ZEDX and ZEDX mini, and I can’t use a hardcoded 12m for ZEDX mini because I also have to limit it to a lower range.(I don’t need 12 and even 10m for mini)

Can you share some binaries (SDK part) that use the ROS2 params approach for any of the ZEDX cameras for compressedDepth?

You can use the same code for both. If the maximum depth in the Wrapper is set to a value lower than the maximum depth value that you set in compressed_depth_image_transport, the compressed depth map will use the value of the Wrapper.