Swerve Drive Basics for FRC Robots
A swerve drivetrain lets a robot translate and rotate by independently steering each wheel module.
Site connection
The 2024 robotics writing describes the team's move to swerve, PathPlanner, vision, odometry, and simulation.
Visual model
Chassis motion becomes four module vectors
Change strafe and rotation to see why each wheel receives a different command.
Interactive
Each module receives its own speed and wheel angle
What Makes Swerve Different
A tank drive changes direction mostly by varying left and right wheel speeds. A swerve drive can point each wheel module independently.
That means the robot can move sideways, diagonally, rotate in place, or combine translation and rotation.
Kinematics
The driver asks for chassis motion: x velocity, y velocity, and angular velocity. Swerve kinematics converts that chassis command into each module's speed and angle.
Odometry runs the other direction: it estimates the robot pose from gyro angle and module movement.
| Input | Output |
|---|---|
| Chassis speeds | Wheel speeds and angles |
| Gyro plus module positions | Estimated robot pose |
| Field-relative joystick command | Robot-relative chassis command |
Common Pitfalls
- Mixing field-relative and robot-relative coordinates.
- Trusting odometry after a gyro disconnect.
- Forgetting to desaturate wheel speeds when commands exceed physical limits.
- Testing only in simulation and skipping module zeroing on hardware.
Quick check
Quiz
What does swerve kinematics convert?
- Battery voltage into code
- Chassis motion into module states
- Camera images into AprilTags
- LED colors into robot modes
Swerve kinematics maps desired chassis velocity to wheel speeds and angles.