Getting started
Installation
YAMS ships as two vendordeps, one per WPILib command framework. Install exactly one of them. The two conflict with each other and cannot be installed side by side.
Commands v2
https://cdn.yassrobotics.com/yams_commands2.json
yams.commands2.* + yams.core.*
Yes
Commands v3
https://cdn.yassrobotics.com/yams_commands3.json
yams.commands3.* + yams.core.*
No
The Commands v3 vendordep is Java only, because WPILib does not publish a C++ Commands v3 API. All Maven artifacts are served from https://cdn.yassrobotics.com/.
Online
In VS Code, open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P).Run WPILib: Manage Vendor Libraries, then Install new libraries (online).
Paste the URL for the command framework your project uses (see the table above) and press Enter.
YAMS wraps vendor hardware, so also install the vendordeps for the motor controllers you use: REVLib 2027 (SPARK MAX, SPARK FLEX), Phoenix 6 (TalonFX, TalonFXS), or ThriftyLib 2027 (Nova).
Offline
Each GitHub release includes <version>-YAMS-Offline.zip. It contains a maven folder and a vendordeps folder that merge into your WPILib 2027_alpha7 home folder. That folder is created by the WPILib installer, so install WPILib first.
Expand-Archive -Path "$HOME\Downloads\<version>-YAMS-Offline.zip" -DestinationPath "C:\Users\Public\wpilib\2027_alpha7" -Forceunzip -o ~/Downloads/<version>-YAMS-Offline.zip -d ~/wpilib/2027_alpha7Afterwards, run WPILib: Manage Vendor Libraries, then Install new libraries (offline), and pick Yet Another Mechanism System (Commands v2) or (Commands v3).
Java packages
The Java API is split into two layers:
yams.core.*: mechanism and motor controller state, physics simulation, telemetry, configs, wrappers, gearing, math, and units. It has no dependency on a command framework.yams.commands2.*oryams.commands3.*: the classes that createCommandandTriggerobjects. Import the mechanisms (Arm,Elevator,Pivot,FlyWheel, ...),SmartMotorControllerConfig,SwerveDriveConfig,SwerveDrive, andSwerveInputStreamfrom here.
Everything else (ArmConfig, SparkWrapper, MechanismGearing, TelemetryVerbosity, ...) comes from yams.core. WPILib itself now lives under org.wpilib.*.
Example code
Minimal example: Java
The snippet below creates a single-motor arm using YAMS.
In the Commands v3 examples, each mechanism's periodic() and simulationPeriodic() are called from Robot.robotPeriodic() before Scheduler.getDefault().run(). The Commands v3 example robot shows the full pattern.
Minimal example: C++
C++ supports WPILib Commands v2. WPILib C++ types live in the wpi:: namespaces (wpi::units, wpi::math, wpi::cmd).
Next steps
Configuring a Motor Controller: CAN IDs, inversion, current limits, and encoder configuration
Building an Arm Subsystem: full arm setup with motion profiling and simulation
Last updated
Was this helpful?
