Independent Project: WhoopLib is a student-led initiative and is not endorsed by or affiliated with Texas A&M University.
Pretense
Howdy,
I’m releasing WhoopLib as a free, open-source suite of templates to give the VEX community a practical, easy-to-learn foundation for advanced robotics and robot/computer interaction. It includes wheel and optional vision odometry, PID control, pure pursuit path following, and fusion of vision and wheel pose estimates via a Jetson Nano. The source is intentionally unbundled and editable to keep integration for VEXcode and PROS simple.
Competition use is the responsibility of each team; please verify legality against the current season’s rules. WhoopLib works with zero, one, or two pod odometry setups and offers an experimental vision fusion mode, which at present is most stable when paired with two pod odometry.
I’ve observed that with the library, the same code exhibits lower performance under PROS than under VEXcode. The root cause is under investigation, with differences in hardware interfacing being a leading hypothesis. I hope the community adopts, adapts, and helps improve it.
A Simple SLAM Solution with both PROS and VEXCode support.
Features
Odometry & Pose Estimation
- Visual odometry / pose estimation
- Wheel odometry / pose estimation (inspired by JAR-Template)
- Fusion odometry (visual + wheel) with rolling average filter
Control & Motion
WhoopControllerwith auto-configuration for Split Arcade, Tank, Left Stick Arcade, and Right Stick Arcade- Path generation: Dubins curves (thanks to Andrew Walker) and Pure Pursuit
- Point-to-point navigation (move between Point A and Point B)
- High-level motion primitives: precise turning (by degrees / to face coordinates), forward/reverse movement with historical position memory for resilience
- General PID controller with anti-windup (
kR, aka “retracted windup”) - Slew rate limiter for motor movements
- Motor voltage-to-speed linearization
Utilities & Abstractions
TwoDPoseclass simplifying linear algebra, modeled with similarities to Roblox’s CFrames- Units system (
_in,_v,_mm, etc.) - Simplified MicroSD card file system
- Autonomous selector with optional persistent saving via MicroSD
Documentation & Ecosystem
- Comprehensive and continuously updated documentation for a low floor and high ceiling
Roadmap (Needs Maintainer)
- Object Detection and Gridded Permanence system
- Detecting other robots that impede the path of the robot, and drive around
- Implementation of a Jetson Orion Nano instead of the End-Of-Line (EOL) Jetson Nano
- Implementation of a better SLAM solution instead of relying on the EOL Realsense T265 Camera
- Capability to Use Different Devices like Oak-D, etc. for Visual Odometry
- Capability to Use Lidar
- Virtual Highway system
Video Of WhoopLib
Here is a video of WhoopLib in motion on a robot from team WHOOP that has seen screentime on the Worlds 2024 stage:
As you see, the robot uses odometry for tracking, dubins-curves for path generation, pure pursuit for distance and rotation error, and two symbiotic PID’s that switch between point-turns and curvature turns.
Resources
Documentation on how to get started can be found here:
GitHub repository can be found here:
Acknowledgements
- E-Bots πLons: Odometry Documentation
- JAR-Template: Odometry Inspiration
- Librealsense: Depth Capturing
- Andrew Walker: Path Generation with Dubins-Curves
- LearnCpp: Resource for learning C++
License
Distributed under the MIT License.
