GPU Usage/Power Issues Using ZED2 with Jetson Xavier NX

I want to give brief information about my system (hardware, sofware etc.) and describe my situation. I am using the following hardware and softwares:

  • Nvidia Jetson Xavier NX 16GB (Computing platform)
  • ZED2 (Depth sensor)
  • ROS2 Humble (Framework)

I am trying to collect pointcloud and pose information to compute the environmental traversability for my robot to perform path planning. At the beginning, I thought that the ZED2 camera feeds the depth information to the host but then I realized that it only feeds the raw sensor readings and heavy load is handled by the host computing platform. Now, even if I use PERFORMANCE mode for depth_mode, my Jetson module gives OC_ALARM sometimes. When I use QUALITY mode, GPU usage of Jetson goes to 99% and it always gives OC_ALARM. When I try to run my algorithms with that configuration, it makes my whole system very very slow and I cannot even ssh to my Jetson anymore.

If you need any other information and/or detail just ask for it. I will appreciate your support.

Sincerely,
Selim

Hi @selim
Welcome to the Stereolabs community.

What you described is correct.
I recommend you read this guide to tune your environment and improve the performance.

What ZED SDK version are you using?

Hi @Myzhar

I am using SDK version of 5.0 with l4t35.4 in docker and I will definitely try your suggestion following the guide you provided but still wondering about the benefit of network tuning since I think that my issue is about the computational source usage.

Also you said “What you described is correct“ but in another post, you are saying “18 FPS when using ULTRA depth mode with Xavier NX is expected“. So, what do I need to understand? Is the situation that I faced expected or am I doing something wrong?

I tried desreasing both the grab_frame_rate in zed2.yaml and the pub_frame_rate in common_stereo.yaml to 5Hz. I am also using PERFORMANCE mode for the time being and it seems like now Jetson is not giving OC_ALARM warning that frequently but the depth information in the pointcloud is very wrong and changes rapidly (I mean it is both noisy and wrong especially for ground floor it goes like the floor is underground, idk why). I tried the same configuration on my PC, which has better hardware, but the result is the same. The pointcloud is wrong for PERFORMANCE and QUALITY options, it is better for ULTRA option but still noisy and it is perfect for NEURAL and NEURAL_PLUS options but it gets slower. This showed that the wrong depth/pointcloud calculation is not about using Jetson but is about something else that I did not figure out yet. I am providing images that shows that issue (PERFORMANCE and NEURAL modes).

Thanks for your consideration,
Selim

What performance can you get by using ZED Depth Viewer?

A curiosity, are you running RViz2 on the Jetson?

Hi @Myzhar

I installed ZED SDK 5.0.6 on my PC and used ZED Depth Viewer. I didn’t see depth mode options PERFORMANCE, QUALITY and ULTRA. There was a warning in the terminal logs when I am using ZED2 on my Jetson saying that these modes are depreciated, maybe that is the case. So, I cannot make a proper conclusion about the results that I saw in ROS2 wrapper. On the other hand, NEURAL modes were just fine even if they still have some noise in Depth Viewer (there is a big but!). However, I am not seeing the noisy points that much (nearly never) while visualizing the pointcloud in RViz2 using ZED SDK ROS2 wrapper and NEURAL modes.

I am connecting to my Jetson via ssh so there is no GUI or RViz2 usage on Jetson at all.

They are obsolete modes, they are only available when using the API for backward compatibility, but we do not expose them via ZED Depth Viewer any longer.

You could use NoMachine or subscribe to RViz2 topics from a remote machine on the same network.

Hi @Myzhar ,

Thank you for your time trying to help me but I think I didn’t clarify enough my system.

When using ZED2’s NEURAL modes, GPU usage of my Jetson Xavier NX climbs to 99% and OC_ALARM warnings are frequently logged on message buffer of the kernel. After couple of seconds, Jetson forces itself to shutdown. When I try to use the depreciated modes, they also give OC_ALARM warning but not that frequently. So, I am able to work with them. My biggest question for the time being is that: Is it suitable to use ZED2 cam with Jetson Xavier NX? According to your answer, it is possible and I should expect 18FPS using ULTRA mode. However, these depreciated modes’ depth calculation is not good enough and not even close to NEURAL mode calculations.

Also, it is clear that I am debugging the system using a remote machine not to load the Jetson with GUI stuff. Using the common network, I can see all the topics that are published on Jetson.

Up to now, I couldn’t improve my depth calculation quality but increased the fps modifying the publish rate parameters. However, I need quality over rate. So, I need to somehow use the NEURAL modes on my Jetson. If I cannot do that, I should either dedicate one Jetson only for running ZED2 or change my stereo depth cam.

Thanks,
Selim

Hi Selim,
the behaviors that you describe are expected for the Jetson Xavier NX model that is now outdated.
I recommend you check that the cooling fan is always running at the maximum speed and the cooler fins are clean.

Please also try to use jtop to monitor the temperature and the current drained by the device.

Hi @Myzhar

According to my investigations, OC_ALARM warning in the logs of Jetson board is about GPU usage. ZED2 is not computing the depth data on itself. Instead, ZED2 supplies the raw data (stereo cam frames, motion data etc.) to the host device (in our case it is Jetson Xavier NX) and the host device is responsible for calculating the depth data. Since it is a heavy computation, ZED SDK makes use of GPU highly. That much GPU usage alarms the Jetson and it gives OC_ALARM warning.

Although it is workable with the warning, it sometimes leads to an unexpected shutdown of Jetson. I tried supplying power externally using a power supply both to Jetson power input and the USB hub (also ZED2) but it didn’t help. I couldn’t even test this configuration with NEURAL depth calculation modes but I observed how NEURAL mode is good on my desktop PC.

Monitoring jtop allowed me to make a conclusion that thermal readings don’t even exceed 50 degrees Celcius and current readings are not even close to the max limits (Jetson draws 2.5A @ 12V, USB Hub draws 0.6A @ 12V).

I think it is not a proper use case for ZED2 camera with that Jetson board model and it needs more computational source.

Thanks,
Selim

This is correct.

It is not recommended to use ZED 2 cameras with USB Hubs. Hubs can degrade the quality of the USB 3 connection, especially if the channel is shared with other devices.