#vex-robotics #autonomous #vexide #vex

no-std evian-tracking

Robot localization and tracking algorithms in evian

1 unstable release

Uses new Rust 2024

new 0.0.1-rc.1 Apr 20, 2025

#398 in Robotics


Used in evian-motion

MIT license

56KB
907 lines

Robot localization and tracking.

This crate provides traits and systems for tracking and localizing the position, orientation, velocity, and forward travel of a mobile robot in a 2D environment. The goal is to measure accurate data about the robot and provide it to motion algorithms.

The traits provided in this crate allow for motion algorithms to operate generically over any tracking system implementation, provided that the implementation measures the necessary data.

Tracking systems may choose to implement the following traits for motion algorithms to use:

Below is an example of a motion algorithm function that is generic across all differential drivetrains with tracking systems that measure a robot's forward wheel travel:

async fn motion(drivetrain: &mut Drivetrain<Differential, impl TracksForwardTravel>) {
    // Motion goes here...
}

Additionally, a reference implementation of a tracking system that performs wheeled odometry is provided by the wheeled module.

A quick note about units!

evian made the intentional choice to be primarily unitless, mainly because stable Rust currently lacks many of the features needed to provide a good developer experience using typed units. Although several widely-used libraries exist in stable Rust (such as uom), there is no single obvious choice to be made here and this region of the Rust ecosystem seems to be in a fairly volatile state that would make it dangerous to fully commit to a single library this early on.

As such, evian made the decision to forego requiring specific units of measure where possible, particular in measures of length. Instead, length is typically provided in wheel units, which is defined as "whatever the user measured their wheels with". This gives users a choice of what units to use and keeps everything generally stable while the Rust ecosystem tries to figure out what typed units library to go with.

Dependencies

~1.9–2.6MB
~44K SLoC