This repo starts from the standard Road Runner Quickstart for FTC SDK 11 and adds
MARS-specific libraries on the mars branch. The master branch is kept in
sync with upstream.
Shared modules live in the MarsCommonFtc repository, consumed as a git submodule at MarsCommonFtc/. This allows multiple MARS FTC teams to share the same code with version pinning via tags.
| Module | Purpose |
|---|---|
ControlLib |
MARS control library — motion profiles, filters, localization, simulation, and hardware helpers |
ControlLab |
Desktop Java app for offline tuning and signal visualization (uses XChart + ControlLib) |
WpiMath |
Port of WPILib's math library (geometry, kinematics, estimators, trajectories, controllers, filters, state-space) |
See the MarsCommonFtc setup guide for detailed instructions on adding it to other robot projects.
The Road Runner core and actions libraries are built from source via Git submodule. The FTC-specific utilities continue to be pulled from Maven for compatibility.
Building core from source adds velocity-dependent feedforward and path-constraint features
wired into MecanumDrive/TankDrive: yaw-coupling feedforward (straight-line curl compensation),
anisotropic mecanum feedforward (separate axial and lateral constants), a voltage-aware wheel
constraint (adapts path velocity to available headroom), and a centripetal acceleration limit
(cornering speed cap). All default to no-ops; automatic tuners are provided for each.
Tuning is largely automated: on-robot sysid OpModes identify the feedforward constants
(AxialFeedforwardTuner, LateralFeedforwardTuner, YawCouplingTuner), TrackWidthTuner
corrects the effective track width (the only way to measure it on Pinpoint/OTOS setups),
and PathFeedbackGainTuner finds the follower feedback gains on long path legs. See the
automated tuning flow for the recommended procedure, the
plant model and identification theory for the physics and strategy
behind those numbers, and the
feedforward and constraints guide for the models
behind the extensions.
Motion profiles
SCurvePosition/SCurveVelocity— jerk-limited S-curve motion profilesPositionTrajectoryManager/VelocityTrajectoryManager— stateful trajectory runners
Filters
BiquadLowPassVarDt— biquad low-pass filter with variable dtIIR1LowPassVarDt— first-order IIR low-pass with variable dtKalmanFilter/KalmanFilterOperations— scalar Kalman filter
Localization
FieldPoseEstimator— fuses odometry with sensor updates for field-relative poselocalization/pinpoint/— odometry driver for the goBILDA Pinpoint odometry computer
Motor controllers
FlywheelSimple/FlywheelStateSpace— flywheel velocity controllersMotorBase/VelocityMotorBase— base classes for motor controlVelocityMotorPF/VelocityMotorSdkPidf— velocity motor implementations
Hardware helpers
FtcMotors— motor utility wrappersGoBildaRgbLight— driver for the goBILDA RGB indicator light
Simulation
EncoderSim— software encoder model for unit testingFlywheelMotorSim— flywheel motor physics simulation
Utilities
InterpLUT/LUT/LinInterpTable— lookup tables with interpolationRunningIntervalStats— online mean/variance statisticsSetOnChange— value wrapper that fires a callback only on changeProjectileMotion— projectile launch angle / exit velocity calculator
A standalone Java application (./gradlew :ControlLab:run) for offline
analysis. Reads CSV signal files, applies filters from ControlLib, and
renders plots via XChart.
This repo uses nested submodules. Clone with:
git clone --recurse-submodules <repo-url>
# or, after a plain clone:
git submodule update --init --recursive- Road Runner core and actions libraries are built from source via composite
build with the
libs/road-runner/submodule. Dependency substitution insettings.gradleautomatically redirects Maven artifacts to local projects. WpiMathandControlLibare plain Java modules; they run on the desktop JVM and on Android equally.ControlLibuses a shadow JAR to relocate EJML and avoid classpath conflicts on the robot.- Shared modules are included via
projectDirredirects insettings.gradlepointing intoMarsCommonFtc/. Project names (:ControlLib,:WpiMath, etc.) are unchanged, so all existing dependency declarations work as-is.