Crate mapping_algorithms

source ·
Expand description

Build Pipeline codecov GitHub Issues MIT

GitHub Stars GitHub Watchers GitHub Forks

Discord Channel


§A SLAM ecosystem for Rust

§⚠️ Unstable API ⚠️

§Warning: this crate is in early development, breaking API changes are to be expected.


Add this to your Cargo.toml:

mapping-algorithms = { git = "" }
mapping-suites = { git = "" }


§no_std support

While the std feature is enabled by default, these crates were designed with no_std support in mind,
provided that a memory allocator is configured (these crate do use the alloc crate).

It can be easily achieved like so:

default-features = false

default-features = false


These crates provides profiling and instrumentation insight via the tracing crate.

To use it, simply enable the tracing feature in your Cargo.toml, and use your choice of a subscriber. Note that different functions have different tracing levels.

Since each and every function is instrumented, be sure to remember the overhead for enabling tracing.


These crates heavily rely on generics, and suffers severe performance penalties in debug
(We strive to be very fast in release though).

For this purpose, a pregenerated feature exists, which provides access to public pre-generated functions for most use cases and types.
This is recommended for most users, and allows bypassing the generics overhead.


In your Cargo.toml:

# Enables the pregenerated feature (This is enabled by default)
features = ["pregenerated"]

# Compiles these crates with max optimizations
opt-level = 3

opt-level = 3

Code example:

// Instead of doing this:
let res = icp::icp::<f32, 2 > (...); // Uses generics, uses your project's optimization level

// Do this(Runs much faster):
let res = icp::single_precision::icp_2d(...); // Is a regular function, uses the crate's optimization level

The pregenerated macro is enabled by default.


If you would like to contribute, we welcome your contributions. Please be sure to check out our


  • Implementation of an Ackerman vehicle steering model.
  • Implementations of Bresenham line algorithms.
  • Implementation of the Haversine formula, which calculate the distance and bearing between two points
  • An Iterative Closest Point algorithm, useful in matching Point Clouds. Contains a 2D implementation when using the 2d feature, and a 3D implementation when using the 3d feature.
  • A K-Dimensional Tree data structure, useful for various geo-spatial computations.
  • A Collection of pathfinding algorithms
  • Implementation of a Point-In-Convex-Hull algorithm, for both the singular and plural cases.
  • Implementations of a Point-In-Polygon algorithm for both the singular and plural cases.
  • A module containing common and interfacing structs and types.
  • Various utility functions that are commonly used by these algorithms.