Control systems

Press once.
The robot does the rest.

PedroPathing autonomy on our Mecanum V3 base, GoBILDA Pinpoint localization, and a one-button auto-aim that computes heading, distance, RPM, and pitch on its own.

Why PedroPathing.

We plan paths with PedroPathing, generating smooth, predictable trajectories from Bézier curves. To simplify coding, we define paths for one side of the field only; on the other side the code mirrors every path and angle automatically, cutting the chance of error.

Compared with RoadRunner, PedroPathing supports real-time pose correction — the robot keeps adjusting heading and position while following a path, so even a mid-auto collision recovers onto the correct trajectory. It also exposes Bézier control points directly, so we build complex non-linear paths precisely, with a drag-and-drop online tool that renders the simulated run.

Always knows
where it is.

The Mecanum V3 base uses a single GoBILDA Pinpoint odometry computer — two perpendicular encoder pods, no IMU fusion overhead — for high-refresh, high-accuracy pose (x, y, θ) in both auto and teleop. Field-centric drive means the driver never has to track which way the robot faces.

Pinpoint solves pose in hardware and outputs global coordinates over I²C — just two perpendicular pod offsets at init, no software fusion math. PedroPathing's Mecanum follower reads those coordinates directly, making it far simpler to tune than the three-pod swerve stack while delivering the same real-time correction guarantee.

GoBILDA Pinpoint odometry computer
GoBILDA Pinpoint — hardware pose solver (I²C)

Near and far.

AutoMain · near

1
Shoot preload
From the start, turn in place and fire the three preloaded artifacts at the first shot position.
2
Collect row one
Drive the first artifact line, intake on, gather three along a straight path.
3
Return & fire
Return to the start shot point and fire the three collected artifacts.
4
Collect row two & finish
Gather the second line, return, and complete the final volley.

AutoFar · far

1
Move & fire preload
From the far start, drive to a preset point and fire the preloaded artifacts.
2
Collect & midfield shot
Head to the third artifact line, then move to the midfield shot point and fire.
3
Open gate
Unlock the gate to release overflow artifacts back onto the field.
4
Final shot & park
Drive to the final shot-and-park point, fire, and end autonomous parked.
Straight from our engineering notebook
PedroPathing field coordinate map
Field frame — (0,0) to (144,144), heading 0–360°
AutoMain and AutoFar routes overlaid on the field
AutoMain + AutoFar paths — both sides mirrored automatically
Auto-aim logic and burst trigger flow
Auto-aim logic + burst trigger gate

Reads the obelisk.
Picks the path.

In DECODE, the obelisk broadcasts the game's motif — a required color sequence (GPP, PGP, or PPG) — via three AprilTags (IDs 21, 22, 23). At the start of autonomous, the robot reads the visible tag and dispatches one of three pre-planned PedroPathing routes, each optimized to score that specific motif pattern on the ramp.

All three routes share the same collection passes — only the scoring order and gate timing differ. This means tuning one path propagates improvements across all three, and the decision overhead is a single tag-ID lookup at init. No mid-auto branching, no guessing.

21
Tag 21 → Route 1 · GPP
Green first, then two purple — path targets the left gate opening sequence.
22
Tag 22 → Route 2 · PGP
Purple-green-purple — balanced split across both zones, center gate priority.
23
Tag 23 → Route 3 · PPG
Two purple first, green last — maximizes pattern lock before overflow opens.

Two drivers, one map.

Main driver owns the base; second driver owns intake and shooting. Functions are physically grouped — fire, assist, mode — so the layout stays readable mid-match.

Gamepad control scheme
Dual-gamepad control scheme
LSVector drive · translate
RSRotate in place · turret trim
L1Enter auto-aim mode
R1Fire (when up to speed)
R2Turntable forward · buffer
L2Turntable reverse · release
YFlywheel +100 RPM
AFlywheel −100 RPM
XIntake reverse · clear jam
BEmergency stop
↑↓Turret pitch trim
←→Turntable slot index

The math behind
one button.

With the robot's live coordinates, the system computes the bearing to the target with atan2, compares it to current heading to get a heading error, and feeds a PID loop that rotates the base onto target — fast and smooth.

heading_error = atan2(t_y − y, t_x − x) − θ → PID → base rotation

Once aligned, it reads the distance and looks up a calibrated flywheel-RPM model. We recorded twenty valid data points from 1.0–3.0 m — flywheel RPM, arc-plate angle, and hit result — pruned outliers, and fit trend lines into an empirical formula embedded directly in the turret controller.

RPM = f(distance) · pitch via Newton–Raphson: f(θ) = R(v₀, θ, h) − R_target

Pitch comes from a projectile model with drag and height correction, solved with Newton–Raphson to back out the elevation for a required range. In TeleOp, the driver presses one button — the rest is automatic, freeing them to focus on field tactics.

Auto-aim turret geometry
Turret geometry — bearing, range, and pitch solved per shot
Auto-aim heading geometry
ΔX, ΔY → atan2 bearing vs. robot heading
Distance to flywheel RPM calibration scatter
20 calibration points: distance → flywheel RPM
Up-to-speed indicator flowchart
Up-to-speed gate: green light when RPM ≥ target
Per-module PID error convergence
Per-module PID — error convergence under tuning

Every season
one step further.

01
Swerve prototype — per-module PID

Our Swerve V2 prototype used four independent steering PIDs, each tuned to its module's friction and backlash. The lessons — feed-forward tuning, deadband compensation, anti-windup — carried directly into the Mecanum controller.

02
Dual-motor launcher adaptation

Switching from 3-motor (8:1) to Dual-Motor (42.3:1) required a full rewrite of the flywheel speed model and pitch lookup table. Duty-cycle control replaced velocity mode; burst trigger timing was re-calibrated for the new inertia.

03
Motif-driven auto dispatch

Early autonomous used a hard-coded sequence. Replacing it with AprilTag-ID dispatch (tags 21–23 → routes 1–3) meant three motif paths share the same tuned collection segments, so improving one improves all three.

04
Flywheel closed-loop & burst gate

Encoder velocity closed-loop holds flywheel speed within ±30 RPM of target. A "burst gate" waits for RPM ≥ threshold before triggering the turntable, eliminating soft shots caused by early release.

Software iteration diagrams from the engineering notebook
Control iteration diagrams — swerve PID → dual-motor launcher → motif auto