lib7842 is a collection of powerful utilities and motion algorithms for VEX V5 robots. Designed to be used with the PROS framework, it builds on top of the OkapiLib library.
lib7842 was in development during my time on the 7842F/B robotics team between 2018-2021.
This is released as-is, with little documentation (other than the source code) and no support. It is made public to add to my portfolio and to help inspire other teams on what is possible. It is not recommended trying to directly use, as there is no support but also no learning benefit from copy/pasting the code.
All source code is located in /include/lib7842/
and /src/lib7842/
.
Some parts of the library, especially the odometry and trajectory generation, are documented in my journal.
Example usage of the library, and what is possible using an autonomous routine, is available in my change up competition code.
Demonstration of open-loop trajectory generator:
- Introduction | Journal | Python Implementation
- 1D Trapezoidal Motion Profile, parameterized for distance, supporting
piecewise velocity waypoints
(
api/trajectory/profile
) - Skid-steer open-loop trajectory generation
(
trajectory/skidGenerator
), with high-speed computation and oversaturation protection. - X-drive open-loop trajectory generation
(
trajectory/xGenerator
), with arbitrary heading profiling and waypoints- supports following the trajectory like a skid-steer (at an arbitrary start heading), or rotating while driving
- Async actions for chassis controllers
(
api/async
|Async/Trigger
) - Convenience class for creating subsystems that use Tasks
(
TaskWrapper
| Writeup) - Modular GUI system for rapidly displaying important information on the V5
Brain using LVGL
(
api/gui
|GUI
)- Easy selectors, buttons, graphs, odom display, vision display, and more
- V5 Vision Sensor Filtering and Processing
(
api/vision
|Container/Vision
| Writeup)
- Three-Encoder Odometry
(
CustomOdometry
) - Skid-Steer PID-based chassis controller
(
OdomController
| Writeup)- Supports custom behaviour for turning, settling, and async actions
- X-drive PID-based chassis controller
(
OdomXController
| Writeup)- Supports custom behaviour for turning while strafing, settling, and async actions
- Comprehensive path representation library
(
api/positioning/spline
)- Arcs, n-th degree Bézier curves, Hermite splines, arc meshing, and more
- Full constexpr compile-time sampling support
- Pure Pursuit path following
(
api/purePursuit
| Writeup)- Skid-steer pure pursuit controller with improved settling behaviour
(
PathFollower
) - X-drive pure pursuit controller with custom turning-while-strafing behaviour
(
PathFollowerX
)
- Skid-steer pure pursuit controller with improved settling behaviour
(
- Built on top of OkapiLib device abstractions, so is platform-agnostic
- Can be built on PC using OkapiLib mocking library
- LVGL GUI library can be developed on PC
- Unit tests written for most components using
doctest
- Tests are included in class source files
- Tests are run both in CI but also on
debug
deployments on the V5
- Use git flow for development