Low framerate for Depth image on Jetson Xavier NX

I am running the Jetson ROS2 wrapper in a Docker container on my Jetson Xavier NX.
I do run the default launch file zed2i.launch.py.
The framerate of my depth image on “/zed2i/zed_node/disparity/disparity_image” is around 3.4Hz.

Is that expected?

SDK Version: 3.8.2 - Build 63211_622b02a5
ROS2 Humble

Hi @maxpolzin
welcome to the Stereolabs community.

No, that’s not expected. The Xavier NX allows getting a higher frame rate, the final value depends on the configuration that you are using.

Can you share your settings?

Thx for your fast response!

I am running a vanilla clone of GitHub - stereolabs/zed-ros2-wrapper: ROS 2 wrapper for the ZED SDK, commit: 60e5b6602bde785110f5bfbfb8b0b628d6af385b

image_tools (commit: a62ab876da2599627fe6a86bbc79040c62509422)

ROS2 Foxy

ZED_SDK 3.8.0

Jetpack 5.0.2: # R35 (release), REVISION: 1.0, BOARD: t186ref, EABI: aarch64

ROS logs:


ZED Camera Component

  • namespace: /zed2i
  • node name: zed_node

*** DEBUG parameters ***

  • Debug mode: FALSE
  • Debug sensors: FALSE
    *** GENERAL parameters ***
  • Camera model: zed2i - ZED 2i
  • SDK Verbose: 1
  • SVO: live
  • SVO Loop: FALSE
  • SVO Realtime: TRUE
  • Camera name: zed2i
  • Camera ID: 0
  • Camera SN: 0
  • Camera timeout [sec]: 5
  • Camera reconnection temptatives: 5
  • Camera framerate: 60
  • GPU ID: -1
  • Camera resolution: 2 - HD720
  • Region of interest:
  • Camera self calibration: TRUE
  • Camera flip: FALSE
  • [DYN] Publish framerate [Hz]: 60
    *** VIDEO parameters ***
  • Use old extrinsic parameters: 0
  • [DYN] Image downsample factor: 1
  • [DYN] Brightness: 4
  • [DYN] Contrast: 4
  • [DYN] Hue: 0
  • [DYN] Saturation: 4
  • [DYN] Sharpness: 4
  • [DYN] Gamma: 8
  • [DYN] Auto Exposure/Gain: TRUE
  • [DYN] Exposure: 80
  • [DYN] Gain: 80
  • [DYN] Auto White Balance: TRUE
  • [DYN] White Balance Temperature: 42
  • Video QoS History: KEEP_LAST
  • Video QoS History depth: 1
  • Video QoS Reliability: RELIABLE
  • Video QoS Durability: VOLATILE
    *** DEPTH parameters ***
  • Depth quality: 3 - ULTRA
  • Depth downsample factor: 1
  • Min depth [m]: 0.2
  • Max depth [m]: 20
  • Depth Sensing Mode: 0 - STANDARD
  • Depth Stabilization: TRUE
  • OpenNI mode (16bit point cloud): FALSE
  • [DYN] Point cloud rate [Hz]: 10
  • [DYN] Depth Confidence: 50
  • [DYN] Depth Texture Confidence: 100
  • [DYN] Remove saturated areas: TRUE
  • Depth QoS History: KEEP_LAST
  • Depth QoS History depth: 1
  • Depth QoS Reliability: RELIABLE
  • Depth QoS Durability: VOLATILE
    *** POSITIONAL TRACKING parameters ***
  • Positional tracking enabled: TRUE
  • Base frame id: base_link
  • Map frame id: map
  • Odometry frame id: odom
  • Broadcast Odometry TF: TRUE
  • Broadcast Pose TF: TRUE
  • Broadcast Static IMU TF [not for ZED]: TRUE
  • [DYN] Depth minimum range: 0
  • [DYN] TF timestamp offset: 0
  • [DYN] Path publishing rate: 2
  • Path history lenght: -1
  • Initial pose: [0,0,0,0,0,0,]
  • Area Memory: TRUE
  • Area Memory DB:
  • Gravity as origin [not for ZED]: FALSE
  • IMU Fusion [not for ZED]: TRUE
  • Floor Alignment: FALSE
  • Init Odometry with first valid pose data: TRUE
  • 2D mode: FALSE
  • Pose/Odometry QoS History: KEEP_LAST
  • Pose/Odometry QoS History depth: 1
  • Pose/Odometry QoS Reliability: RELIABLE
  • Pose/Odometry QoS Durability: VOLATILE
    *** SENSORS STACK parameters ***
  • Sensors Camera Sync: FALSE
  • Sensors publishing rate: 100 Hz
  • Sensors QoS History: KEEP_LAST
  • Sensors QoS History depth: 1
  • Sensors QoS Reliability: RELIABLE
  • Sensors QoS Durability: VOLATILE
    *** Spatial Mapping parameters ***
  • Spatial Mapping Enabled: FALSE
  • Spatial Mapping resolution [m]: 0.1
  • 3D Max Mapping range [m]: 20
  • Map publishing rate [Hz]: 0.5
  • Clicked point topic: /clicked_point
  • Sensors QoS History: KEEP_LAST
  • Sensors QoS History depth: 1
  • Sensors QoS Reliability: RELIABLE
  • Sensors QoS Durability: VOLATILE
    *** OBJECT DETECTION parameters ***
  • Object Detection enabled: FALSE
  • OD min. confidence: 50
  • OD prediction timeout [sec]: 0.5
  • OD tracking: TRUE
  • Object Detection model: 0 - MULTI CLASS BOX FAST
  • Object Filtering mode: 1 - NMS 3D
  • MultiClassBox people: TRUE
  • MultiClassBox vehicles: TRUE
  • MultiClassBox bags: TRUE
  • MultiClassBox animals: TRUE
  • MultiClassBox electronics: TRUE
  • MultiClassBox fruits and vegetables: TRUE
  • MultiClassBox sport-related objects: TRUE
  • Body format: 1 - POSE_34
  • Skeleton fitting: TRUE (forced by object_detection.body_format)
  • Obj. Det. QoS History: KEEP_LAST
  • Obj. Det. QoS History depth: 1
  • Obj. Det. QoS Reliability: RELIABLE
  • Obj. Det. QoS Durability: VOLATILE
    *** SERVICES ***
  • ‘/zed2i/zed_node/reset_odometry’
  • ‘/zed2i/zed_node/reset_pos_tracking’
  • ‘/zed2i/zed_node/set_pose’
  • ‘/zed2i/zed_node/enable_obj_det’
  • ‘/zed2i/zed_node/enable_mapping’
  • ‘/zed2i/zed_node/start_svo_rec’
  • ‘/zed2i/zed_node/stop_svo_rec’
  • ‘/zed2i/zed_node/toggle_svo_pause’
    ***** STARTING CAMERA *****
    SDK Version: 3.8.2 - Build 63211_622b02a5
    *** CAMERA OPENING ***
    Logging level INFO
    [Init] Depth mode: ULTRA
    [Init] Camera successfully opened.
    [Init] Camera FW version: 1523
    [Init] Video mode: HD720@60

ZED SDK running on GPU #0

  • Camera Model → ZED 2i
  • Serial Number → 34108941
  • Input type → USB input type
  • Camera FW Version → 1523
  • Sensors FW Version → 777
  • Camera native frame size → 1280x720
  • Downsampled image size → 1280x720
  • Downsampled depth map size → 1280x720
    *** Setting ROI ***
  • Error generating the region of interest image mask.

TOP Output

Tasks: 248 total, 1 running, 247 sleeping, 0 stopped, 0 zombie
%Cpu(s): 14.9 us, 15.1 sy, 0.0 ni, 64.2 id, 0.0 wa, 3.9 hi, 2.0 si, 0.0 st
MiB Mem : 6854.9 total, 3774.2 free, 1406.2 used, 1674.4 buff/cache
MiB Swap: 3427.4 total, 3427.4 free, 0.0 used. 5148.4 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29138 **** 20 0 9711932 203116 107788 S 89.8 2.9 9:24.19 zed_wrapper

Processor is 64.2%idle and zed_wrapper uses roughly 1cpu.


ros2 topic hz /zed2i/zed_node/imu/data: 98Hz
ros2 topic hz /zed2i/zed_node/rgb_raw/image_raw_color: ~18Hz
ros2 topic hz /zed2i/zed_node/disparity/disparity_image: ~18Hz

When reducing the image resolution to VGA and setting the depth mode to performance I obtain:
ros2 topic hz /zed2i/zed_node/disparity/disparity_image: ~43Hz


Are these values expected?

In a Docker container with ROS2 Humble, and image_* packages installed from apt, the framerate drops to 3.6Hz. I assume it might have sth. to do with ther serialization and deserialization of the image messages over the docker network between containers and that no shared memory transport is used. Though I am not sure yet.

It would help me, to know the rough framerate which is expected. Should I reach the set 60Hz or is that ruled out and 18 is what I have to expect if ROS shared memory messaging is enabled.

@maxpolzin 18 FPS when using ULTRA depth mode with Xavier NX is expected, you can start ZED Depth Viewer with the same settings to confirm it (look at the FPS reported in the bottom left corner).
You can use PERFORMANCE to increase the FPS if you need.

I noticed that your camera has an old MCU FW Version, I suggest you use ZED Explorer to upgrade to the latest v3.10 (778) and obtain more reliable camera connections.

Great, thx again for the clarification once again.

1 Like