ZEDx SVO File broken in ROS2

Hello. TL;DR: The SVO file saving seems broken in the latest ROS2 wrapper update. I am using the latest wrapper, and SVO saving doesn’t work with depth_mode set to NONE.

Setup

  • zedx
  • l4t 36.4 , Orin AGX Dev kit 64G
  • zed sdk 5.2
  • zedx quad link v1.4
  • zedx used in SLAVE mode

Case 1: depth mode set to NONE

git diff

root@ubuntu:~/temp_ws/src/zed-ros2-wrapper# git diff
diff --git a/zed_wrapper/config/common_stereo.yaml b/zed_wrapper/config/common_stereo.yaml
index d485caa..af66585 100644
--- a/zed_wrapper/config/common_stereo.yaml
+++ b/zed_wrapper/config/common_stereo.yaml
@@ -82,7 +82,7 @@
             publish_roi_mask: false # Advertise the ROI mask image topic that is published only if a node subscribes to it
 
         depth:
-            depth_mode: 'NEURAL_LIGHT' # Matches the ZED SDK setting: 'NONE', 'NEURAL_LIGHT', 'NEURAL', 'NEURAL_PLUS' - Note: if 'NONE' all the modules that requires depth extraction are disabled by default (Pos. Tracking, Obj. Detection, Mapping, ...)
+            depth_mode: 'NONE' # Matches the ZED SDK setting: 'NONE', 'NEURAL_LIGHT', 'NEURAL', 'NEURAL_PLUS' - Note: if 'NONE' all the modules that requires depth extraction are disabled by default (Pos. Tracking, Obj. Detection, Mapping, ...)
             depth_stabilization: 30 # Forces positional tracking to start if major than 0 - Range: [0,100]
             openni_depth_mode: false # 'false': 32bit float [meters], 'true': 16bit unsigned int [millimeters]
             point_cloud_freq: 10.0 # [DYNAMIC] Frequency of the pointcloud publishing. This value must be equal or less than the camera framerate.
root@ubuntu:~/temp_ws/src/zed-ros2-wrapper#

wrapper terminal

[component_container_isolated-2] [INFO] [1772576315.167857088] [zed.zed_node]: === Subscribers ===                                                                                                         
[component_container_isolated-2] [INFO] [1772576315.167870976] [zed.zed_node]:  * No subscribers                                                                                                           
[component_container_isolated-2] [INFO] [1772576315.174307296] [zed.zed_node]: === zed started ===                                                                                                         
[component_container_isolated-2] [INFO] [1772576345.099202848] [zed.zed_node]: ** Start SVO Recording service called **                                                                                    
[component_container_isolated-2] [2026-03-03 17:19:05 UTC][ZED][INFO] [Init]  Notice: This recording uses SVO version 2, which includes high-frequency IMU data. To revert to legacy SVO mode, set the ZED_
SDK_SVO_VERSION environment variable to 1.                                                                                                                                                                 
[component_container_isolated-2] NvMMLiteOpen : Block : BlockType = 8                                                                                                                                      
[component_container_isolated-2] ===== NvVideo: NVENC =====                                                                                                                                                
[component_container_isolated-2] NvMMLiteBlockCreate : Block : BlockType = 8                                                                                                                               
[component_container_isolated-2] NvVideo: H265 : Profile : 1                                                                                                                                               
[component_container_isolated-2] [INFO] [1772576345.123955296] [zed.zed_node]: SVO Recording started:                                                                                                      
[component_container_isolated-2] [INFO] [1772576345.124093120] [zed.zed_node]:  * Bitrate: 0                                                                                                               
[component_container_isolated-2] [INFO] [1772576345.124153952] [zed.zed_node]:  * Compression mode: H265 LOSSLESS                                                                                          
[component_container_isolated-2] [INFO] [1772576345.124190720] [zed.zed_node]:  * Framerate: 0                                                                                                             
[component_container_isolated-2] [INFO] [1772576345.124220064] [zed.zed_node]:  * Input Transcode: FALSE                                                                                                   
[component_container_isolated-2] [INFO] [1772576345.124245984] [zed.zed_node]:  * Filename: /logging/zed_slave_svo_test6_public_no_depth_tf_on.svo2                                                        
[component_container_isolated-2] NVMEDIA: Need to set EMC bandwidth : 2872000                                                                                                                              
[component_container_isolated-2] [INFO] [1772576383.392501248] [zed.zed_node]: ** Stop SVO Recording service called **                                                                                     
[component_container_isolated-2] [INFO] [1772576383.482627424] [zed.zed_node]: SVO Recording stopped                                                                                                       
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)                                                                                                                                                
[robot_state_publisher-1] [INFO] [1772576408.461615808] [rclcpp]: signal_handler(signum=2)                                                                                                                 
[INFO] [robot_state_publisher-1]: process has finished cleanly [pid 14132]                                                                                                                                 
[component_container_isolated-2] [INFO] [1772576408.461638176] [rclcpp]: signal_handler(signum=2)
[component_container_isolated-2] [INFO] [1772576408.689522944] [zed.zed_node]: === CLOSING CAMERA === 
[component_container_isolated-2] [INFO] [1772576409.401094624] [zed.zed_node]: === CAMERA CLOSED ===
[component_container_isolated-2] Opening in BLOCKING MODE 
[INFO] [component_container_isolated-2]: process has finished cleanly [pid 14134]

File is recorded using these instructions with compression mode = 4

airlab@ubuntu:/logging$ ZED_SVO_Editor --inf /logging/zed_slave_svo_test6_public_no_depth.svo2 
-inf option detected
*FAIL : failed to get infos from  "/logging/zed_slave_svo_test6_public_no_depth.svo2" 
 You can try the -repair option to repair the SVO file

Repairing the file also doesn’t work

Case 2: no git diff - used this commit - ROS 2 - Modify node behaviors when Positional Tracking is disabled · stereolabs/zed-ros2-wrapper@24024d8 · GitHub

Result - SVO recrding works in this case

[component_container_isolated-2] [INFO] [1772576907.285690208] [zed.zed_node]: ** Start SVO Recording service called **
[component_container_isolated-2] [2026-03-03 17:28:27 UTC][ZED][INFO] [Init]  Notice: This recording uses SVO version 2, which includes high-frequency IMU data. To revert to legacy SVO mode, set the ZED_SDK_SVO_VERSION environment variable to 1.
[component_container_isolated-2] NvMMLiteOpen : Block : BlockType = 8 
[component_container_isolated-2] ===== NvVideo: NVENC =====
[component_container_isolated-2] NvMMLiteBlockCreate : Block : BlockType = 8 
[component_container_isolated-2] NvVideo: H265 : Profile : 1 
[component_container_isolated-2] [INFO] [1772576907.316465760] [zed.zed_node]: SVO Recording started: 
[component_container_isolated-2] [INFO] [1772576907.316583424] [zed.zed_node]:  * Bitrate: 0
[component_container_isolated-2] [INFO] [1772576907.316624864] [zed.zed_node]:  * Compression mode: H265 LOSSLESS
[component_container_isolated-2] [INFO] [1772576907.316649664] [zed.zed_node]:  * Framerate: 0
[component_container_isolated-2] [INFO] [1772576907.316664928] [zed.zed_node]:  * Input Transcode: FALSE
[component_container_isolated-2] [INFO] [1772576907.316679232] [zed.zed_node]:  * Filename: /logging/zed_slave_svo_test7_depth_on.svo2
[component_container_isolated-2] NVMEDIA: Need to set EMC bandwidth : 2872000 
[component_container_isolated-2] NvVideo: bBlitMode is set to TRUE 
[component_container_isolated-2] [INFO] [1772576963.525668768] [zed.zed_node]: ** Stop SVO Recording service called **
[component_container_isolated-2] NVENC_H265: Unsupported frameRate (Supported: 1.0 - 60.0), setting to deault value 30.00
[component_container_isolated-2] [INFO] [1772576963.746973696] [zed.zed_node]: SVO Recording stopped
airlab@ubuntu:/logging$ ZED_SVO_Editor --inf /logging/zed_slave_svo_test7_depth_on.svo2 
-inf option detected
Open
```ing in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 279 
NvMMLiteBlockCreate : Block : BlockType = 279 
SVO Infos : SVO v 2
Image Size : [ 1920  x  1200 ]
Framerate :  30
Number of Frames :  1687
ZED Serial Number :  40735594
Compression mode :  " H265 Lossless (GPU) compression"
Camera model :  "ZED X"
Camera Fw version :  2001
ZED SDK version that generated this file :  5.2.0

Hi @Parv-Maheshwari
I’ve just tested with the latest version: GitHub - stereolabs/zed-ros2-wrapper: ROS 2 wrapper for the ZED SDK · GitHub
commit: ROS 2 - Modify node behaviors when Positional Tracking is disabled · stereolabs/zed-ros2-wrapper@24024d8 · GitHub
and it works as expected.

Please add more information concerning your setup

Even with the latest commit now, if both the pos_tracking and depth mode are disabled (basically the git diff), the SVO file will be corrupt. When you say you tested the commt and it works as expected did you test with the pos_tracking and depth_mode disabled.

Yes, with the latest version of the ZED ROS2 Wrapper the problem that you described is not present.

Hello Myzhar, I confirmed on my end that the issue still exists even with the latest ROS2 driver. I am using the updated beta firmware you provided earlier to fix the ZEDX slave mode. Can you please confirm if you can replicate / not replicate the problem with the same firmware

https://community.stereolabs.com/t/re-understanding-slave-mode-on-the-quad-capture-card/10822?u=parv-maheshwari

Hi @Myzhar

I found the cause, and the problem is still present on the latest master (b19902d). The firmware turned out to be unrelated: it’s in the wrapper’s grab loop.

Cause: in threadFunc_zedGrab(), when neither depth nor positional tracking is required, the node calls mZed->read() instead of mZed->grab():

if (isDepthRequired() || isPosTrackingRequired()) {
  mGrabStatus = mZed->grab(mRunParams);
} else {
  mGrabStatus = mZed->read();
}

read() doesn’t feed the SVO encoder. start_svo_rec succeeds and the file is created, but no frame is ever written, so the SVO is corrupt. The log shows it: with depth on, the encoder prints NvVideo: bBlitMode is set to TRUE after recording starts and NVENC_H265: Unsupported frameRate ... on stop. With depth off neither line appears, because the encoder never receives a frame.

How to reproduce: change these lines in zed_wrapper/config/common_stereo.yaml, starting from master:

depth:
    depth_mode: 'NONE'              # default: 'NEURAL_LIGHT'
pos_tracking:
    pos_tracking_enabled: false     # default: true
    pos_tracking_mode: 'GEN_1'      # default: 'AUTO'

pos_tracking_mode: 'GEN_1' matters. With GEN_3, which AUTO may give on newer SDKs, positional tracking can still run without depth: the default publish_tf: true or depth_stabilization: -1 turns it on. The node then uses grab() and the SVO is fine. On my SDK 5.2.0, AUTO already gives GEN_1.

Then record a few seconds:

ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedx
ros2 service call /zed/zed_node/start_svo_rec zed_msgs/srv/StartSvoRec "{svo_filename: '/tmp/test.svo2', compression_mode: 4}"
# wait ~10 s
ros2 service call /zed/zed_node/stop_svo_rec std_srvs/srv/Trigger

Without the fix, /tmp/test.svo2 is a few KB and won’t open, and the two NVENC lines above are missing from the log. With the fix, it grows by tens of MB per second and plays back normally.

Fix: always call grab() while recording. It’s a one-line change to the condition, recording || isDepthRequired() || isPosTrackingRequired(). No depth is computed, because enable_depth stays false. PR: Fix SVO recording when depth and positional tracking are not required by Parv-Maheshwari · Pull Request #461 · stereolabs/zed-ros2-wrapper · GitHub

Test files (same config, depth off; the only difference is the fix):

Setup: ZED X in slave mode, Quad Link v1.4, AGX Orin 64 GB, L4T 36.4, ZED SDK 5.2.0, wrapper master at b19902d.

Hi @Parv-Maheshwari

Are you sure of this?
In that case it’s not expected and I must forward this information to the ZED SDK team to fix it.

Good catch and thank you for reporting.