stereolabs / zed-ros-wrapper

ROS wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros/
MIT License
447 stars 391 forks source link

Zed2i depth framerate really slow when subscribing from other machine #875

Closed Alessio-Parmeggiani closed 1 year ago

Alessio-Parmeggiani commented 1 year ago

Preliminary Checks

Description

Hi, I have a problem regarding the depth computed using the Zed2i on a jetson Nano on Ubuntu 20.04 with ROS noetic.

By launching the file zed2i.launch I get about 2fps for the depth images using quality=performance when looking at the images in another computer.

Some things I noticed:

I already tried subscribing to the compressed topics but nothing changed.

Presentazione senza titolo

Steps to Reproduce

  1. launch zed2i.launch on the jetson nano
  2. on another pc connected to the same ROS network: rostopic hz /zed2i/zed_node/depth/depth_registered/compressedDepth
  3. alternative: visualize on Rviz the topic /zed2i/zed_node/depth/depth_registered

Expected Result

The depth frequency should be higher than 2fps, it should be the same as the one of the Jetson Nano

Actual Result

On the jetson nano I get a publishing rate of 15 hz on the depth topic, on another computer I get a rate of 2hz

ZED Camera model

ZED2i

Environment

Jetson Nano
Ubuntu 20.04
ROS noetic
CUDA 10.2
Jetpack 4.6-b197

Anything else?

No response

Myzhar commented 1 year ago

The compressed depth is a high demanding topic. The compression of the data takes too much elaboration power and the Jetson Nano cannot handle it.

Myzhar commented 1 year ago

Can I ask you how can you run Ubuntu 20.04 on the Jetson Nano? The JP4 is based on Ubuntu 18.04.

Alessio-Parmeggiani commented 1 year ago

The compressed depth is a high demanding topic. The compression of the data takes too much elaboration power and the Jetson Nano cannot handle it.

Yeah but in the shell on the Nano I can see that the depth is being computed at 15 hz so the Nano can handle it. Instead on another machine I receive it at 2 hz and it should not be a communication issue because normal images are received at the expected rate.

Can I ask you how can you run Ubuntu 20.04 on the Jetson Nano? The JP4 is based on Ubuntu 18.04.

I needed ROS noetic so used these files to install ubuntu 20: https://github.com/Qengineering/Jetson-Nano-Ubuntu-20-image

Myzhar commented 1 year ago

Hi @Alessio-Parmeggiani I'm sorry, but this is not an issue related to the ZED ROS Wrapper. It's something related to ROS itself and to a Jetson Nano not using the default standard configuration, so we cannot analyze and test this issue. I'm closing it, please feel free to ask to re-open it if you notice that the wrong behavior is related to a bug or a misconfiguration of the Wrapper.

Alessio-Parmeggiani commented 1 year ago

I partially solved the problem, i used rosrun rqt_reconfigure rqt_reconfigure to change the parameters of the topic /zed2i/zed_node/depth/depth_registered/compressedDepth.

By changing compression type from png to rvl the depth image is now received at 10 Hz (the same rate at which it is being computed), the same result can be obtained with png compression by setting png quality and quantization to a lower number (e.g. png quality=1 and quantization to 2, the quality does not decrease a lot).

These parameters can then be set in the same launch file that launches the zed camera so that everything is done automatically.