|
YAMS
Yet Another Mechanism System
|
YAMS is a C++ FRC robotics library that provides a unified, hardware-agnostic abstraction layer for common robot mechanisms. It wraps REV SPARK and CTRE TalonFX motor controllers behind a single interface and ships ready-to-use implementations for arms, elevators, pivots, flywheels, and swerve drives all with built-in simulation and telemetry support.
Compatible with WPILib 2026, REVLib, and CTRE Phoenix 6.
| Namespace | Description |
|---|---|
| yams | Root namespace; include YAMS.hpp to pull in everything |
| yams::exceptions | Exception types thrown by YAMS (e.g. ArmConfigurationException) |
| yams::gearing | GearBox and sprocket/chain gearing calculations |
| yams::math | Control math: LQRController, DerivativeTimeFilter, SmartMath |
| yams::mechanisms | Abstract base SmartMechanism and all concrete implementations |
| yams::mechanisms::config | Config structs for every mechanism type |
| yams::mechanisms::positional | Arm, Elevator, Pivot, SmartPositionalMechanism |
| yams::mechanisms::velocity | FlyWheel, SmartVelocityMechanism |
| yams::mechanisms::swerve | SwerveDrive, SwerveModule, SwerveDriveConfig |
| yams::mechanisms::swerve::utility | SwerveInputStream |
| yams::motorcontrollers | SmartMotorController abstract base and wrapper types |
| yams::motorcontrollers::local | SparkWrapper (REV SPARK MAX / FLEX) |
| yams::motorcontrollers::remote | TalonFXWrapper, TalonFXSWrapper (CTRE Phoenix 6) |
| yams::motorcontrollers::simulation | Simulation suppliers and sensor data |
| yams::telemetry | Mechanism and motor controller telemetry publishers |
| yams::units | Extended FRC unit types (YUnits) |
Add the YAMS vendordep JSON to your robot project, then include the convenience header:
Configure and construct a mechanism: