Introduction
LemLib's odometry, PID and motion algorithms, ported line for line from PROS to vexide.
VectorLib is LemLib 0.5.6 rewritten in Rust for vexide 0.9. Odometry, PID, exit conditions, drive curves, the motion queue and every motion are ported line for line, so the constants that tuned your C++ robot drive your Rust robot the same way.
It also includes team 38535A's additions: the LemLib-TitanTron features, TitanReset distance sensor resets, and an on-controller PID tuner.
Install
Add the crate, select the toolchain and upload to the V5 brain.
Coming from LemLib
Your PROS code, line by line, in VectorLib.
Motions
Turns, swings, move to point or pose, and pure pursuit, with every default.
How parity is proven
2,558,685 values compared against the original C++, none different.
What's included
| From | In VectorLib |
|---|---|
| LemLib 0.5.6 | Chassis, odometry with any sensor combination, Pid, exit conditions, ExpoDriveCurve, tank / arcade / curvature, turn_to_heading, turn_to_point, swing_to_heading, swing_to_point, move_to_point, boomerang move_to_pose, pure pursuit follow, logger and telemetry |
| LemLib-TitanTron | ScalingImu, early lambdas on every motion, follow on a Vec<Pose>, calculate_odom_offsets, public PID gains |
| TitanReset 0.0.8 | vectorlib::titan_reset: distance sensor resets and location recording |
| Pushback | vectorlib::pid_tuner: tune kP and kD from the controller |
The brain-screen UI (LVGL) is not ported.