# SLAM algorithm used by ZED

**URL:** <https://community.stereolabs.com/t/slam-algorithm-used-by-zed/4498>\
**Category:** Software\
**Tags:** slam\
**Created:** [February 1, 2024, 5:46pm UTC](https://community.stereolabs.com/t/slam-algorithm-used-by-zed/4498 "2024-02-01T17:46:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sobmoyen](https://community.stereolabs.com/user_avatar/community.stereolabs.com/sobmoyen/32/2517_2.png) [@sobmoyen](https://community.stereolabs.com/u/sobmoyen)\
**Post date:** [February 1, 2024, 5:46pm UTC](https://community.stereolabs.com/t/slam-algorithm-used-by-zed/4498/1 "2024-02-01T17:46:38Z")

</div>

Is there any documentation/paper on the SLAM algorithm used by ZED and its comparison to other state-of-the-art algorithms?

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [February 1, 2024, 7:40pm UTC](https://community.stereolabs.com/t/slam-algorithm-used-by-zed/4498/2 "2024-02-01T19:40:37Z")

</div>

Hi @sobmoyen  
the Positional Tracking module of the ZED SDK uses Visual Inertial Odometry algorithms with loop closure that have been internally developed upon years of R&D in this field.  
Unfortunately, this is closed information and I cannot reveal more.

---

<div class="post-metadata">

**Author:** ![Ori](https://community.stereolabs.com/user_avatar/community.stereolabs.com/ori/32/3703_2.png) [@Ori](https://community.stereolabs.com/u/Ori)\
**Post date:** [January 6, 2025, 11:26am UTC](https://community.stereolabs.com/t/slam-algorithm-used-by-zed/4498/3 "2025-01-06T11:26:09Z")

</div>

Hi @Myzhar ,  
Is that possible to save the “map”(feature map?) and load it again later using ROS2 interface?

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [January 7, 2025, 10:39am UTC](https://community.stereolabs.com/t/slam-algorithm-used-by-zed/4498/4 "2025-01-07T10:39:34Z")

</div>

> [@Ori](#):
>
> Is that possible to save the “map”(feature map?) and load it again later using ROS2 interface?

Yes, you can.  
You must set `area_memory` to `true and a valid path for `area\_memory\_db\_path`:

> <https://github.com/stereolabs/zed-ros2-wrapper/blob/master/zed_wrapper/config/common_stereo.yaml#L79C13-L80>

---

<div class="post-metadata">

**Author:** ![Ori](https://community.stereolabs.com/user_avatar/community.stereolabs.com/ori/32/3703_2.png) [@Ori](https://community.stereolabs.com/u/Ori)\
**Post date:** [March 4, 2025, 7:00am UTC](https://community.stereolabs.com/t/slam-algorithm-used-by-zed/4498/5 "2025-03-04T07:00:11Z")

</div>

I faced 2 problems, the very first area file sould be generated directly from the sdk and not ros2 interface(right?)  
when I ran spatial\_mapping.py I generated .obj file, is the requested area file?  
then I provided the full path to the .obj file:  
area\_memory\_db\_path: ‘/home/ori/ros2\_ws/mesh\_gen.obj’  
but still it got [ERROR] Unable to load area file

---

<div class="post-metadata">

**Author:** ![Myzhar](https://community.stereolabs.com/user_avatar/community.stereolabs.com/myzhar/32/11_2.png) [@Myzhar](https://community.stereolabs.com/u/Myzhar)\
**Post date:** [March 4, 2025, 12:01pm UTC](https://community.stereolabs.com/t/slam-algorithm-used-by-zed/4498/6 "2025-03-04T12:01:18Z")

</div>

> [@Ori](#):
>
> I faced 2 problems, the very first area file sould be generated directly from the sdk and not ros2 interface(right?)

You can also use the ROS 2 Wrapper to generate it.

> [@Ori](#):
>
> when I ran spatial\_mapping.py I generated .obj file, is the requested area file?

No, that’s from the spatial mapping module, not from the localization module.

> [@Ori](#):
>
> area\_memory\_db\_path: ‘/home/ori/ros2\_ws/mesh\_gen.obj’  
> but still it got [ERROR] Unable to load area file

This is wrong indeed. Please do not confuse [Spatial Mapping](https://www.stereolabs.com/docs/spatial-mapping) with [Positional Tracking](https://www.stereolabs.com/docs/positional-tracking).

The documentation provides all the required information.

---

<div class="post-metadata">

**Author:** ![Ori](https://community.stereolabs.com/user_avatar/community.stereolabs.com/ori/32/3703_2.png) [@Ori](https://community.stereolabs.com/u/Ori)\
**Post date:** [March 4, 2025, 1:26pm UTC](https://community.stereolabs.com/t/slam-algorithm-used-by-zed/4498/7 "2025-03-04T13:26:43Z")

</div>

Thanks! I managed to create area file and obj file, both directly from the sdk(the python files exmaple),

1. I ran the ROS2 wrapper with mapping and positional tracking enabled in the config file, but no area and obj file created(I can see the tracking and mapping in RVIZ). how can I store them?
2. from the mesh I generated using the sdk, I want to voxelize it for path planning, is there a tool or recommended way to do it?
