ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Zed2i depth framerate really slow when subscribing from other machine

asked 2022-12-05 16:15:25 -0500

updated 2022-12-07 12:48:36 -0500

Hi, I have a problem regarding the depth computed using the Zed2i stereo camera on a jetson Nano on Ubuntu 20.04 with ROS noetic. I am using zed_ros_wrapper to connect the zed to ROS noetic.

By launching the file zed2i.launch to use the camera I get about 2fps for the depth images using quality=performance (the lowest setting) when looking at the images in another computer.

Some details:

  • the problem starts in the exact moment I subscribe to the depth topic using Rviz or rostopic, I guess this is when the Zed starts computing the depth.
  • By using zed depth viewer, so without using ROS, I get about 30fps with depth quality set to ultra.
  • When visualizing using rostopic hz the rate of the depth on the Jetson Nano I get about 13 fps
  • When visualizing using rostopic hz the rate of the same depth topic on another computer I get 2 fps
  • When visualizing multiple normal image topics on another computer the visualization is smooth: about 15-20 fps

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

The strange thing is that it does not seem to be a computational issue because the Nano achieve 15 fps on its terminal, and it should not be a communication issue since with normal images I get an high rate on the receiving PC.

image description

Environment:

  • Jetson Nano
  • Ubuntu 20.04
  • ROS noetic
  • CUDA 10.2
  • Jetpack 4.6-b197
edit retag flag offensive close merge delete

Comments

The data is sent completely uncompressed over the network, unless you have very wide bandwidth in your LAN there will always be throttling that looks like that. Use rostopic bw to figure out if the network is being throttled. Personally, I have tons of problems of this type with any non-trivial data, so if you figure something good out I'm very interested. In particular, what image topics are you hzing? I also use Zed cameras.

Per Edwardsson gravatar image Per Edwardsson  ( 2022-12-09 03:55:18 -0500 )edit

Hi @Per Edwardsson, thanks for the answer. Since I can't use the jetson and the zed at the moment, I can't test the command you suggested, when I test it I'll let you know the results.

Your intuition about the network problem could be right, but I also tested the compressed depth that wa sent by the zed and the issue persisted. So maybe the /zed2i/depth_registered/compressedDepth topic was not being compressed in the correct way. Whenever I can use the zed again I'll test this with rostopic bw. Maybe I could also verify if by compressing in a custom way the depth I can reduce the problem.

AlessioParmeggiani gravatar image AlessioParmeggiani  ( 2022-12-13 03:22:11 -0500 )edit
1

Sounds good. The compressed topics haven't worked for me for a good while (I'm on ROS2), so I have yet to view images coming through the ROS network. If you manage to send data through custom compression, feel free to comment to me as I'm curious about that. Thanks.

Per Edwardsson gravatar image Per Edwardsson  ( 2022-12-13 03:25:03 -0500 )edit

Yes, I'll let you know if I discover something interesting. I am using ROS 1 (noetic) by the way so something could not apply in your case

AlessioParmeggiani gravatar image AlessioParmeggiani  ( 2022-12-13 03:28:50 -0500 )edit

@Per Edwardsson I found something interesting by using rostopic bw.

rostopic bw /zed2i/zed_node/depth/depth_registered=1.8MB/s
rostopic hz /zed2i/zed_node/depth/depth_registered=0.4-0.8Hz

rostopic bw .../depth/depth_registered/compressedDepth=200KB/s
rostopic hz .../depth/depth_registered/compressedDepth=1.2Hz

rostopic bw .../left/image_rect_color=2.3MB/s
rostopic hz .../left/image_rect_color=2.2Hz

rostopic bw .../left/image_rect_color/compressed=500-600KB/s
rostopic hz .../left/image_rect_color/compressed=12Hz

It seems that the problem is not the bandwidth, in fact the rgb image use a higher bandwidth than the depth but is received at a higher rate. Moreover on the depth the compressed version weighs around 9 times less (1.8Mb against 200KB) but the rate it's only 1.5-3 times bigger.

All the commands have been executed on a different machine than the jetson nano, on the nano I get 15 hz for eveery topic.

AlessioParmeggiani gravatar image AlessioParmeggiani  ( 2022-12-15 02:06:13 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-12-23 02:06:34 -0500

updated 2023-05-16 10:12:26 -0500

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 (and consumes 2.8MB/s of bandwidth), the same result can be obtained with png compression by setting png quality and quantization to a lower number.

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

EDIT (months later...): here is the related Github Issue

edit flag offensive delete link more
2

answered 2023-05-16 11:54:15 -0500

angcorcue2 gravatar image

I had a very similar issue with the point cloud from the ZED2i on a Jetson AGX, and I resolved it by switching to Cyclone DDS. It's important to note that the configuration of Cyclone DDS needs to be implemented identically on both machines. I hope this information is helpful to you.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-12-05 16:15:25 -0500

Seen: 145 times

Last updated: May 16 '23