https://github.com/yet-another-software-suite/yams
Yet Another Mechanism System for FRC and FTC
https://github.com/yet-another-software-suite/yams
frc ftc wpilib yagsl yass
Last synced: 5 months ago
JSON representation
Yet Another Mechanism System for FRC and FTC
- Host: GitHub
- URL: https://github.com/yet-another-software-suite/yams
- Owner: Yet-Another-Software-Suite
- License: lgpl-3.0
- Created: 2025-03-27T13:35:02.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-26T02:05:08.000Z (11 months ago)
- Last Synced: 2025-08-26T04:16:20.097Z (11 months ago)
- Topics: frc, ftc, wpilib, yagsl, yass
- Language: Java
- Homepage:
- Size: 1.13 MB
- Stars: 8
- Watchers: 1
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# YAMS - Yet Another Mechanism System
[](https://github.com/Yet-Another-Software-Suite/YAMS/actions/workflows/build-pdf.yml) [](https://github.com/Yet-Another-Software-Suite/YAMS/actions/workflows/ci.yml) [](https://github.com/Yet-Another-Software-Suite/YAMS/actions/workflows/release.yml)
> โจ A flexible, extensible FRC mechanism library built for elevators, arms, turrets, and more โ with simulation and telemetry included.
**YAMS** is a WPILib-compatible library that provides a **unified and extensible interface** for common FRC mechanisms like **elevators**, **arms**, and **pivots** (e.g., turrets). It emphasizes clean separation of control, simulation, and configuration, while offering first-class support for **telemetry**, **feedforward**, and **tuning**.
---
## ๐ Documentation
[YAMS Gitbook](https://yagsl.gitbook.io/yams/documentation)
[YASS Website](https://yetanothersoftwaresuite.com)
---
## ๐ง Key Features
- ๐ง Unified interfaces for `Arm`, `Elevator`, and `Pivot` mechanisms
- โ๏ธ CTRE-style configuration: familiar and readable
- ๐ ๏ธ SmartMotorController abstraction: consistent API for different motor vendors (REV, CTRE, etc.)
- ๐งช Physics-based simulation support (`simIterate()`)
- ๐ Built-in telemetry (works with AdvantageKit, NT, and custom logging)
- ๐ Composable and declarative configuration style
---
## ๐ฆ Installation (WPILib Vendordep)
1. In **VS Code** with WPILib extension:
- Open Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
- Select: `WPILib: Manage Vendor Libraries`
- Choose `Install new library (online or offline)`
- Select **Online**
- Paste the URL to the YAMS vendordep JSON file, e.g.:
`https://yet-another-software-suite.github.io/YAMS/yams.json`
- Press Enter to install
---
## ๐ Examples
The repository contains several example projects under the `/examples` folder demonstrating how to use YAMS for arms, elevators, pivots, and combined subsystems.
These example projects do **not** include YAMS as a dependency via Maven or vendordep directly. Instead, they use a modified `build.gradle` that links the YAMS source code located in the `/yams` folder relative to the example.
This is done by adding the following snippet to the `sourceSets` block in each exampleโs `build.gradle`:
```groovy
sourceSets {
main {
java {
srcDirs 'src/main/java'
srcDirs '../../yams/'
}
}
}
```
---
## ๐ Quick Example
Hereโs a simplified `ArmSubsystem` using a wrapped `TalonFX`:
```java
public class ArmSubsystem extends SubsystemBase {
private final TalonFXS armMotor = new TalonFXS(1);
private final SmartMotorController motor = new TalonFXSWrapper(armMotor, DCMotor.getNEO(1),
new SmartMotorControllerConfig(this)
.withClosedLoopController(4, 0, 0, DegreesPerSecond.of(180), DegreesPerSecondPerSecond.of(90))
.withSoftLimit(Degrees.of(-30), Degrees.of(100))
.withGearing(gearing(gearbox(3, 4)))
.withIdleMode(MotorMode.BRAKE)
.withTelemetry("ArmMotor", TelemetryVerbosity.HIGH)
.withStatorCurrentLimit(Amps.of(40))
.withFeedforward(new ArmFeedforward(0, 0, 0, 0))
.withControlMode(ControlMode.CLOSED_LOOP)
);
private final Arm arm = new Arm(new ArmConfig(motor)
.withLength(Meters.of(0.135))
.withHardLimit(Degrees.of(-100), Degrees.of(200))
.withStartingPosition(Degrees.of(0))
.withTelemetry("ArmExample", TelemetryVerbosity.HIGH)
);
@Override
public void periodic() {
arm.updateTelemetry();
}
@Override
public void simulationPeriodic() {
arm.simIterate();
}
public Command setAngle(Angle angle) {
return arm.setAngle(angle);
}
}
````
More detailed examples for **Elevator** and **Pivot** mechanisms can be found in the `/examples` folder (or your teamโs repo if it includes all three like above).
---
## ๐งช Simulation
Just call `simIterate()` inside `simulationPeriodic()` to simulate the mechanismโs physical behavior โ based on voltage inputs, mass, length, and more.
---
## ๐ Telemetry
YAMS supports telemetry via its internal telemetry interfaces and `SmartMotorControllerTelemetryConfig`.
It integrates with:
* [AdvantageKit](https://github.com/Mechanical-Advantage/AdvantageKit)
* Custom logging tools
* NetworkTables `/Mechanisms` and `/Tuning`
---
## ๐ License
**This project is licensed under the Lesser GNU General Public License v3.0**.
You are free to use, modify, and redistribute the software, provided that any derivative work is also licensed under LGPLv3.
See [`LICENSE`](./LICENSE.txt) for full details.
---
## ๐ค Contributing
We welcome feedback and contributions!
Open an issue for bug reports or feature requests, or fork and open a pull request to contribute.
Inspired by [Manip-Lib](https://github.com/frc5517/Manip-Lib).
---