The goal#
Go from a boxed COTS swerve module to a driving drivetrain. Modern FRC swerve is almost entirely COTS, so the project is integration, not invention.
Step 1 — Pick a module and motors#
Good current options:
- REV 3in MAXSwerve (REV-21-3005) with a NEO 2.0 or Kraken X60 drive motor and a NEO 550 steer motor. The 15T Spline Input Kit (REV-21-3009) adapts a NEO 2.0 or Kraken X60 to the module (the Kraken needs the included spacer plate).
- SDS MK4i / MK4n / MK5n: the MK5n steering ratio is 287:11 (~26.09:1). Its drive motor is a Kraken X60 (or REV NEO V1.1 / NEO Vortex) and its steer motor is a compact Kraken X44.
- WCP Swerve X2 / X2S: built around the Kraken X60 for drive (the X2S adds a Kraken X44 for steer). The older WCP Swerve X also runs a Kraken X60.
Pick a drive gear ratio by trading top speed vs pushing force. Faster ratios give a higher free speed but lower traction-limited acceleration; most teams land near a 5:1-6:1 drive reduction for a ~15-17 ft/s robot.
Step 2 — Mount it square#
All four modules must be parallel and square to the frame. A few degrees of toe causes scrub, wasted current, and a robot that fights itself. Use the manufacturer's mounting holes and a machined or laser-cut bellypan; do not hand-drill module mounts. Record each module's CANcoder/absolute steer offset so wheels zero pointing forward.
Step 3 — Characterize with SysId#
The drive motors closely obey V = kS*sgn(v) + kV*v + kA*a. Run a SysId quasistatic + dynamic routine to get kS, kV, kA per WPILib. These feed your drive feedforward so the robot tracks commanded speeds and drives straight (mismatched wheel kV is a top cause of veering).
Step 4 — Stand up kinematics#
SwerveDriveKinematics kin = new SwerveDriveKinematics(
fl, fr, bl, br); // Translation2d module locations from robot center
ChassisSpeeds speeds = new ChassisSpeeds(vx, vy, omega);
SwerveModuleState[] states = kin.toSwerveModuleStates(speeds);
SwerveDriveKinematics.desaturateWheelSpeeds(states, MAX_SPEED);
for (int i = 0; i < 4; i++) modules[i].setDesiredState(states[i]);
Always call desaturateWheelSpeeds so a high omega + vy command never exceeds a module's max speed and de-syncs the drive.
Step 5 — First-drive checklist#
- Push the robot by hand and watch each module's reported angle/velocity flip sign correctly.
- With wheels off the ground, drive +X slowly; confirm all four wheels point and spin forward.
- Verify steer absolute offsets, then drive field-relative with a fresh gyro zero.
- Set drive current limits (e.g. 40-60 A) to stay under the 120 A main breaker during a full-speed push.
the part worth keeping
Key takeaways
- Modern swerve is a COTS integration task: choose module (REV MAXSwerve / SDS MK4i-MK5n / WCP Swerve X2) and drive ratio for your speed-vs-traction target.
- Mount all four modules parallel and square off a machined bellypan; record absolute steer offsets so wheels zero forward.
- Characterize drive with SysId (kS/kV/kA) and always desaturateWheelSpeeds so combined translation+rotation commands stay achievable.
Mechanical, Build & PneumaticsWorked Examples & Mini-Projectslesson 5 of 5
Keep going
Take the quiz+10 XP with an accountwhere this came from
Sources and corrections
This lesson is AI-assisted: drafted from primary sources, then reviewed and edited by hand. Errors still get through. When one is reported we fix it and write down what changed, in public, in the corrections log.
sources and further reading
- revrobotics.comREV 3in MAXSwerve Module (REV-21-3005)
- swervedrivespecialties.comSDS MK5n Swerve Module
- docs.wpilib.orgWPILib Introduction to System Identification (SysId)
- docs.wcproducts.comWCP Swerve Docs
clipped to this lesson
Articles that go further on this
The lesson gets you through the topic. These go wider on it, and they read in one sitting.
- 8 min readFRC Motors Compared: NEO vs Kraken X60 vs Falcon 500 vs NEO VortexCompare FRC brushless motors: REV NEO, NEO Vortex, Kraken X60, and Falcon 500. Exact specs, FOC explained, and which motor to pick for drivetrain vs mechanisms./blogread it
- 13 min readFRC Swerve Module Offsets: Calibration & Backwards WheelsZero your FRC swerve module offsets correctly, and fix wheels that spin backwards, modules that fight each other, and field-relative drive that feels rotated./blogread it
- 12 min readFRC Swerve Modules Compared: MK4/MK4i, MAXSwerve, WCP & ThriftyA practical FRC swerve module comparison: SDS MK4i and MK4n, REV MAXSwerve, WCP Swerve X2, and Thrifty Swerve on motors, wheels, ratios, and cost./blogread it
answer sheet
Lesson quiz
All 3 right completes the lesson. Miss one and only that question comes back, anything you already answered correctly stays banked.
0 of 3 answered
01Why is integrating a modern COTS swerve module framed as integration rather than invention?
02Why must all four swerve modules be mounted parallel and square off a machined or laser-cut bellypan?
03Why should SwerveDriveKinematics.desaturateWheelSpeeds always be called before commanding the swerve modules?
Answer every question to submit.
All 47 lessons in Mechanical, Build & Pneumaticsopenclose
01 / prerequisites
02 / drivetrains
03 / power-transmission
04 / structure-materials-fasteners
05 / mechanisms-fabrication-assembly
06 / pneumatics-fundamentals
07 / pneumatic-components
08 / build-wire-program
09 / safety-rules-testing
10 / worked-examples-mini-projects
- Not read yet:Mini-Project 1: A Single-Jointed Arm From Math to Motion
- Not read yet:Mini-Project 2: A Two-Stage Cascade Elevator
- Not read yet:Mini-Project 3: A Velocity-Controlled Flywheel Shooter
- Not read yet:Mini-Project 4: A Pivoting Roller Intake
- Not read yet:Mini-Project 5: Integrating a COTS Swerve Module
11 / common-mistakes-troubleshooting
- Not read yet:Pneumatics Won't Fire: A Full Diagnostic Tree
- Not read yet:The Robot Won't Drive Straight (and Other Drivetrain Sins)
- Not read yet:Gearboxes That Grenade and Fasteners That Vibrate Loose
- Not read yet:Closed-Loop Mechanisms That Oscillate, Sag, or Stall
- Not read yet:Field-Ready Reliability: Inspection, Spares, and the Pit Checklist
12 / advanced-techniques-case-studies
- Not read yet:Characterizing Any Mechanism with SysId
- Not read yet:Simulation-Driven Design with WPILib Physics Models
- Not read yet:Motion Profiling and Superstructure Coordination
- Not read yet:Designing for Weight, Stiffness, and Manufacturability
- Not read yet:Case Studies: Learning From Open Alliance Robots