SVO2 recording from ZED2i saying corrupted

I am using a ZED 2i camera with Nvidia Jetson Orin Nano (Jetpack 5.1.2) and ROS Noetic. When trying to record svo using

rosservice call /zed_front/zed_node/start_svo_recording "/home/smlab/test.svo"

with the
svo_compression: 0 (Lossless) in the common.yaml file.
The recording successfully happens in svo version 2. and I am able to safely close the recording using

rosservice call /zed_front/zed_node/stop_svo_recording

However when trying to run the recorded .svo2 file using

roslaunch zed_wrapper zed2i.launch svo_file:=/home/smlab/test.svo2

It says corruption detected, attempting to fix and then crashes.

[ INFO] [1715838759.119866615]:  *** Opening ZED 2i - SVO - /home/smlab/test_scrap.svo2 ***
[2024-05-16 05:52:39 UTC][ZED][INFO] Logging level INFO
[2024-05-16 05:52:39 UTC][ZED][INFO] Corruption detected in SVO file, attempting to auto-repair the file...
================================================================================REQUIRED process [zed_front/zed_node-2] has died!
process has died [pid 5263, exit code -9, cmd /home/smlab/catkin_ws/devel/lib/zed_wrapper/zed_wrapper_node __name:=zed_node __log:=/home/smlab/.ros/log/e0327b90-12b5-11ef-bb7a-cc4740556185/zed_front-zed_node-2.log].
log file: /home/smlab/.ros/log/e0327b90-12b5-11ef-bb7a-cc4740556185/zed_front-zed_node-2*.log
Initiating shutdown!
================================================================================
[zed_front/zed_node-2] killing on exit
[zed_front/zed_front_state_publisher-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done[ INFO] [1715838759.119866615]:  *** Opening ZED 2i - SVO - /home/smlab/test_scrap.svo2 ***
[2024-05-16 05:52:39 UTC][ZED][INFO] Logging level INFO
[2024-05-16 05:52:39 UTC][ZED][INFO] Corruption detected in SVO file, attempting to auto-repair the file...
================================================================================REQUIRED process [zed_front/zed_node-2] has died!
process has died [pid 5263, exit code -9, cmd /home/smlab/catkin_ws/devel/lib/zed_wrapper/zed_wrapper_node __name:=zed_node __log:=/home/smlab/.ros/log/e0327b90-12b5-11ef-bb7a-cc4740556185/zed_front-zed_node-2.log].
log file: /home/smlab/.ros/log/e0327b90-12b5-11ef-bb7a-cc4740556185/zed_front-zed_node-2*.log
Initiating shutdown!
================================================================================
[zed_front/zed_node-2] killing on exit
[zed_front/zed_front_state_publisher-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

I tried capturing in svo gen 1 format by setting the environment variable to 1, but that recording doesn’t include IMU data. Is there any way to either record IMU data in gen 1 svo or to fix this svo2 corruption issue?

Hi @jyothish
Welcome to the Stereolabs community.

Are you using the latest ZED SDK v4.1.1.
This patch version should have solved the SVO2 issues you cited.

Can you also try to use ZED Explorer to record and play the SVO2 in order to exclude eventual ROS Wrapper issues?

Hi @Myzhar
I am using ZED SDK 4.1.0 currently.
Will you be able to tell how I can upgrade the ZED SDK version on Jetson?

I shall update the findings from ZED Explorer here shortly.

Thank you so much for your prompt response.

Hi @jyothish
the upgrade process is straightforward:

The installer automatically removes the old version and installs the new one.

Hi @Myzhar
Thank you for your prompt response.

The problem seems to be not solved still. I have been able to record an svo2 file using the rosservice but the same file when played back using roslaunch zed_wrapper zed2i.launch svo_file:=/home/user/test.svo2 does not seem to generate point cloud on rostopic /zed2i/zed_node/point_cloud/cloud_registered or even camera info topics - rendering the recorded SVO not very useful. I was under the impression that a recorded svo2 will simulate as if the data is coming live from a physical camera, hence allowing for all the features of zed ros wrapper to be usable - however that doesn’t seem to be the case.

Another point is that the ZED_Explorer and ZED_Depth_Viewer in the SDK tools folder, are both crashing on jetson when trying to load the said svo2 file. On the latest version of the SDK for windows, the file is showing as “invalid svo file”.

I appreciate your support in the matter.
Thanks,
Jyothish.

Hi @jyothish
can you try to repair the SVO by using the ZED_SVO_Editor tool?
ZED_SVO_Editor -repair <input.svo2>

The repair script is automatically getting killed as noted in the following terminal output:

smlab@ubuntu:/usr/local/zed/tools$ ZED_SVO_Editor -repair /home/smlab/basanti.svo2
-repair option detected
* Repair in progress... Please wait *
Killed

The script generated a *_repaired.svo2 file but it is 0kb in size.

Hi @jyothish,

There have been a number of bug fixes for svo2 in version 4.1.1. Can you please confirm that on Jetson with the SDK version 4.1.1, you are able to record an svo2 in LOSSLESS compression mode, with ZED_Explorer or the SDK recording sample, and are able to replay the SVO in any of our tools (i.e. ZED_Depth_Viewer) or ROS?

Hi @mattrouss ,

  • The SVO2 recording captured using ROS wrapper is corrupted and unfixable as discussed earlier - This is after I upgraded to SDK 4.1.1.
  • The GUI applications in the SDK (4.1.1) on my test system (Jetson Orin Nano - Jetpack 5.1.2) crash rightaway when I try to record session.
  • Using the example python files given by you, I was able to record session. But playback on Jetson is not working - ZED Explorer and Depth Viewer both crash. But this recording is able to run fine on a windows system. The same file when tried to play using ROS, does not publish any data on any of the topics.

I noticed today that on ROS 2 documentation you have written explicitly that
Note: The ZED ROS 2 Wrapper now supports the SVO v2 format, which is available from the ZED SDK v4.1. ‘’
Does this mean that ROS 1 wrapper doesn’t support SVO v2?

Hi @jyothish,

Thank you for the provided information.

  • We are further investigating the unrepairable SVOs and preparing a fix for the next patch.
  • When you record using ZED_Explorer, are you setting the compression mode to “LOSSLESS”?

SVO2 recording is available in ROS 1 as well as ROS2.