FRC 1506 Robot Control & Physics Simulation
250 Hz rigid-body physics simulation, CTRE Phoenix 6 swerve odometry, and multi-camera AprilTag pose fusion.
Executive Overview
Mechanical assembly timelines limit physical track testing for high-speed swerve odometry, autonomous routines, and dynamic targeting.
MapleSim desktop simulation running dyn4j physics at 250 Hz, fusing CTRE swerve odometry with dual Limelight vision in an Extended Kalman Filter.
Decoupled software validation from hardware, enabling 8 autonomous routines and shoot-on-the-move targeting to be tuned pre-delivery.
[ PathPlanner Autonomous Commands ] ──► [ Swerve Kinematics & Desaturation ]
│
┌──────────────────────────────────┴──────────────────────────────────┐
▼ ▼
[ Physical Robot Hardware ] [ MapleSim dyn4j Sim ]
- CTRE Kraken/Falcon Swerve - 250 Hz (4ms) Physics Loop
- Dual Limelight MegaTag2 Vision - Synthetic AprilTag Pipeline
│ │
└──────────────────────────────────┬──────────────────────────────────┘
▼
[ Extended Kalman Filter (EKF) ]
│
▼
[ Shoot-on-the-Move Ballistic Math ]
Technical Architecture
1. MapleSim: 250 Hz dyn4j Physics Simulation
Simulates chassis inertia (55 kg) and 4 swerve contact patches to evaluate pathing routines on desktop CPUs:
MapleSim Swerve Physics Simulation Loop Java
2. Multi-Sensor Pose Fusion (Limelight MegaTag2 + EKF)
Fuses 250 Hz wheel odometry with dual optical Limelight coprocessors, scaling covariance dynamically based on target distance:
Dynamic Optical Covariance Pose Estimator Java
Key Takeaways & Verification
- Sim Determinism: 250 Hz physics loop executes in < 0.8ms compute time per frame, validating 8 auto routines pre-hardware.
- Odometry Precision: Multi-camera vision fusion reduced cumulative autonomous path drift to < 2.5 cm over 15-second cycles.