ZED 2i camera data drift in small indoor space — request code/parameter review

Hello guys,

I am working with a Unitree Go2 quadruped robot for indoor and outdoor environment monitoring. I’m using the ZED 2i + ZED Box Mini for visual SLAM and pose tracking.

I’ve modified the positional tracking sample to:

  • set the camera to HD720 @ 60 fps,

  • enable pose smoothing,

  • enable Area Memory (save/load map.area),

  • log pose (XYZ + quaternion + timestamp) to CSV.

However, after running the program, I still notice no difference or improvement in drift. This drift is a problem because it directly affects my robot’s navigation performance.

I would like your help with two things:

  1. Can you please check if I applied HD720@60 and Area Memory correctly in this code? If it looks correct, why might I still see drift, and are there extra parameters I should tune (depth mode, runtime options, reprojection, etc.)?

  2. How can I connect this to the Unitree Go2 robot for visual SLAM? For example, should I send the ZED pose into ROS2 /odom, or is there a recommended integration workflow between ZED SDK and Unitree SDK?

Any advice or example setups would be really helpful. I can also share the full project (ZIP + logs) if needed.

Thanks a lot for your support!

[Here is the code:

]

Hi @Justinmars
Welcome to the Stereolabs community.

The behavior that you described is expected with ZED SDK v5.0.x.
The upcoming ZED SDK v5.1 will:

  • Improve .area loop closure performance
  • Introduce a new 2D mode that really reduces the drift in case of 2D tracking

Do you have the opportunity to record SVOs in the same conditions as your tests and share them with us (you can send them to support@stereolabs.com) to use them as a test bench for the new SDK?

Hi @Myzhar,

Sure, I can record the SVO files under the same test conditions and will send them to support@stereolabs.com tomorrow. Hopefully, they will help improve the new SDK.

Best regards,
Hong Wei Soon