> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.stereolabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.stereolabs.com/_mcp/server.

# Samples - Global Localization

This section contains samples demonstrating how to use the ZED SDK's [Global Localization](/docs/development/zed-sdk/modules/global-localization/) module for global-scale localization on a real-world map, fusing the camera's visual-inertial odometry with **real GNSS data**. If you're looking for a minimal, GNSS-hardware-free introduction to the API, see the [Global Localization tutorial](/docs/tutorials/global-localization/) instead.

> **Note**
>
> This module requires a stereo camera equipped with an inertial sensor (IMU), such as the ZED 2/2i, ZED Mini, ZED X, ZED X Mini, ZED X Nano.

## Getting Started

* First, download the latest version of the [ZED SDK](https://www.stereolabs.com/developers/).
* Download the [Global Localization](https://github.com/stereolabs/zed-sdk/tree/master/global%20localization) sample code in C++ or Python.

## Samples in this category

### Live

Uses the Global Localization API with both a ZED camera and an external GNSS sensor. Displays the corrected positional tracking in the ZED reference frame using an OpenGL window, and the geo-position on a real-world map in a browser. *(C++, Python)*

[GitHub](https://github.com/stereolabs/zed-sdk/tree/master/global%20localization/live)

### Recording

Records data from both a ZED camera and an external GNSS sensor to an SVO file and a JSON file respectively, producing the input data needed by the Playback sample. *(C++, Python)*

[GitHub](https://github.com/stereolabs/zed-sdk/tree/master/global%20localization/recording)

### Playback

Uses the Global Localization API for global-scale localization on a real-world map, using the data produced by the Recording sample to display geo-positions on a map. *(C++, Python)*

[GitHub](https://github.com/stereolabs/zed-sdk/tree/master/global%20localization/playback)

### Map Server

A small web server used by the Live and Playback samples to display location data on a real-world map in a browser.

[GitHub](https://github.com/stereolabs/zed-sdk/tree/master/global%20localization/map%20server)