Zed2i depth framerate really slow when subscribing from other machine
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.
Environment:
- Jetson Nano
- Ubuntu 20.04
- ROS noetic
- CUDA 10.2
- Jetpack 4.6-b197
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 youhz
ing? I also use Zed cameras.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.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.
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
@Per Edwardsson I found something interesting by using rostopic bw.
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.