Kotlin WPILib swerve drivetrain project (REV MAXSwerve-style modules) used by Early College / Hangar 84 for drivetrain development, telemetry, and autonomous path following.
This repo implements a swerve drivetrain with:
- odometry + pose estimation
- PhotonVision-based vision pose updates
- PathPlanner autonomous using AutoBuilder
- real-time telemetry (modules, chassis, pose)
- Kotlin + WPILib command-based structure
- Swerve module control + kinematics
- Odometry +
SwerveDrivePoseEstimator - Vision updates using PhotonVision AprilTags
- PathPlanner autonomous via AutoBuilder
- Telemetry to SmartDashboard / NetworkTables
- Simulation support (sensor simulation + pose comparison)
(Typical mapping used in your RobotContainer projects)
- Left stick: translation (X/Y)
- Right stick X: rotation
- Left bumper (hold): park/lock wheels (calls PARK command)
Autonomous selection is built using buildAutoChooser() and PathPlanner’s AutoBuilder.
Paths can be flipped automatically based on alliance color. :contentReference[oaicite:0]{index=0}
This project publishes detailed telemetry for debugging and tuning, including:
Swerve/YawDegSwerve/PoseSwerve/Chassis/*(vx, vy, omega) :contentReference[oaicite:1]{index=1}
Swerve/<Module>/SpeedMps,AngleDegSwerve/<Module>/DesiredSpeedMps,DesiredAngleDeg- Drive: Current / Output / Temp
- Turn: Current / Output / Temp :contentReference[oaicite:2]{index=2}
Swerve/Vision/HasEstimate:contentReference[oaicite:3]{index=3}
Swerve/Sim/Pose,Swerve/Sim/YawDegSwerve/Sim/Cmd(commanded chassis speeds)Swerve/Sim/Encoders,Swerve/Sim/AzimuthDegSwerve/Sim/PoseCompare(ground truth vs estimated) :contentReference[oaicite:4]{index=4}
- IMU: ADIS16470 (real robot), simulated yaw in sim :contentReference[oaicite:5]{index=5}
- Vision: PhotonVision camera named
"FrontCamera":contentReference[oaicite:6]{index=6} - CAN IDs in
Constants.Swerve:contentReference[oaicite:7]{index=7}
- Branches:
feature/...andfix/... - Validate drive + telemetry in sim when possible
- Keep telemetry keys stable so dashboards don’t break
Early College High School Robotics / Hangar 84
Built with WPILib, PathPlanner, REV libraries, and PhotonVision.