VEX VRC · Team 3142C · 2024-25 Season

PALE

Predictive Adaptive Localization Engine

A runtime intelligence framework that governs when and how a VEX robot corrects its estimated position during autonomous — eliminating overcorrection on fast maneuvers and undercorrection during sensor drift.

0%
Failure Reduction
0
MCL Particles
50Hz
Update Rate
0%
Route Completion

01 / The Problem

Autonomous correction is a two-sided failure mode

Overcorrection

Fast maneuvers during corrections

When the robot applies a localization correction mid-sprint, the correction vector compounds with already high velocity — causing the robot to overshoot targets by 15-30% in high-speed autonomous modes.

Undercorrection

Sensor drift goes undetected

When sensors drift slowly, correction thresholds tuned for accuracy ignore small but accumulating errors. By late in the autonomous period, position error exceeds recoverable bounds.

The naive approach — apply all corrections blindly at every timestep — fails both ways. What we needed was a system that knew when to trust its own estimates and when the sensor data was actually informative versus noisy. That insight is PALE's core job.

02 / The System

Confidence-gated correction

PALE wraps the 300-particle MCL system and scores the particle cloud at every timestep. A tight cluster means high localization confidence — corrections are safe to apply. A diffuse cloud signals ambiguity — corrections are held until confidence recovers or a higher-priority correction event triggers.

Step 1

Particle Spread Scoring

At each 50Hz cycle, PALE computes the variance of all 300 particle positions. Low variance = high confidence. High variance = hold correction.

Step 2

Drift Prediction

Known high-drift maneuvers (sharp turns, acceleration peaks) open a preemptive correction window so the system catches errors before they compound.

Step 3

Correction Gating

Only corrections that exceed the confidence threshold AND pass the velocity gate get applied. Others are queued, averaged, and applied when conditions are right.

PROS C++ — Confidence scoring (simplified)

// Score particle spread — tight cluster = high confidence float scoreParticleSpread(const std::vector<Particle>& particles) { float varX = 0, varY = 0; float meanX = 0, meanY = 0; for (auto& p : particles) { meanX += p.x; meanY += p.y; } meanX /= particles.size(); meanY /= particles.size(); for (auto& p : particles) { varX += (p.x - meanX) * (p.x - meanX); varY += (p.y - meanY) * (p.y - meanY); } return 1.0f / (1.0f + (varX + varY) / particles.size()); } // Gate correction — only apply when confidence + velocity conditions are met bool shouldApplyCorrection(float confidence, float velocity, bool driftFlagged) { if (driftFlagged) return confidence > DRIFT_THRESHOLD; return confidence > CONFIDENCE_THRESHOLD && velocity < MAX_CORRECTION_VELOCITY; }

02.5 / Under the Hood

The MCL foundation

PALE sits on top of a Monte Carlo Localization engine: 300 weighted particles each representing a hypothesis of where the robot is on the field. After every odometry update, particles are resampled proportional to how well they match the sensor readings.

Sensor Fusion
  • Optical tracking wheel for X/Y displacement, immune to wheel slip
  • IMU heading fused with encoder data for rotation accuracy
  • Vision landmarks used as absolute resets when confidence drops below threshold
  • Field-symmetric initialization — particles seeded at all 4 starting orientations, pruned by first movement
Why MCL over EKF
  • EKF linearizes non-Gaussian noise — fails badly near field walls where readings are ambiguous
  • MCL naturally represents multimodal distributions — two plausible positions can coexist until evidence resolves them
  • 300 particles is the empirical sweet spot: sufficient coverage without exceeding the V5 Brain's cycle-time budget

03 / The Team

Who built this

HV

Henry Van Ness

Captain · Software

Built PALE, RouteLab, and the MCL system. Leads autonomous strategy and software architecture.

RT

Rohan Thomas

Software · Libraries

Created WhaleLib, the core motion control library powering the robot's subsystems and driver assistance features.

HM

Henry Miller

Software · Routing

Handles autonomous route design and path planning, translating field strategy into executable robot movement sequences.

04 / Results

A full season of validation

PALE shipped mid-season and ran in every match for the remainder of Pushback. Across qualification matches, elimination rounds, and the State Skills run, autonomous failure rate dropped from 1-in-2 to 1-in-7 — an 86% reduction. Route completion climbed to 93% and held even on the mirrored blue-side autonomous, which previously had a known IMU drift issue.

86%
fewer autonomous failures vs. pre-PALE baseline
93%
full-route autonomous completion rate across all matches
0
mid-match localization resets required at State Championship

See PALE in action

The MCL simulator visualizes all 300 particles updating in real-time as the robot moves through an autonomous route.