kornia-slam

Visual-inertial SLAM in Rust. Point it at a camera, a stereo pair or a stereo pair with an IMU, and it tracks where the camera is and maps the space around it. Built on kornia-rs.

v0.1, early release. Expect the API to change between minor versions.

EuRoC MH_01_easy
EuRoC V1_01_easy

Features

Quick start

Clone the repository and download a EuRoC sequence in ASL format. MH_01_easy is a good first run.

git clone https://github.com/kornia/kornia-slam && cd kornia-slam

# monocular
cargo run --release -p kornia-slam-app -- euroc --data /path/to/MH_01_easy

# stereo + IMU, scored against ground truth
cargo run --release -p kornia-slam-app -- euroc --data /path/to/MH_01_easy --stereo --imu --evaluate

The other sources, the stereo calibration format and every flag are in the app README.

Use it in Copper

Copper is a Rust runtime that builds, runs and replays a whole robot deterministically. cu-kornia-vio packages kornia-slam's stereo visual-inertial odometry as Copper tasks.

Stereo + IMU in Copper's drone simulator. The dots on the camera image are map points projected through the estimated pose.

Add both crates from the same git source:

[dependencies]
cu-kornia-vio = { git = "https://github.com/kornia/cu-kornia-vio", branch = "main" }
cu-stereo-payloads = { git = "https://github.com/kornia/cu-kornia-vio", branch = "main" }

Get the timestamps right. Stamp each image and IMU sample with its capture time, on one clock. In the drone simulator, a 16 ms image-stamp error made stereo + IMU worse than stereo alone. Fixing it cut the trajectory error over a 440 m flight from 9.7 m to 2.1 m; stereo alone gave 5.7 m.

The Copper guide covers the revisions to pin, the task graph, and the runtime settings for simulation and logging.

SLAM integration for your robot

We start with a fixed-scope assessment. On recordings we agree with you, we find out whether kornia-slam can track reliably on your platform, where and why it fails, and what the next milestone should be. If something breaks it on your setup, we can fix it in a follow-on engagement.

Ask about an assessment

Tell us about your robot, its sensors and what it needs to track.

Roadmap, contributing and questions: GitHub ยท Discord.

kornia-slam is Apache-2.0 licensed.