Yet Another Mechanism System
Welcome to your team’s new mechanism system
Get started in 30 minutes
Less guesswork, no complexity—just your first successful mechanism, fast.
Setting up your first mechanism should be easy and painless, and that's exactly what YAMS aims to provide.
YAMS provides an effortless programming experience by neatly dividing the process into distinct steps: SmartMotorController Configuration, SmartMotorController creation, Mechanism configuration, and Mechanism creation. This structured approach simplifies the integration of mechanisms like Arms, Elevators, Pivots (like turrets and hoods), SwerveDrives, FlyWheels. allowing developers to effortlessly manage and control them using commands from Mechanism classes. Built exclusively for WPILib command-based programming, YAMS also offers sophisticated features such as advanced telemetry and live tuning, ensuring a streamlined and efficient development process for all supported mechanisms.
// Create your motor controller config
SmartMotorControllerConfig motorConfig = new SmartMotorControllerConfig(this)
.withClosedLoopController(4, 0, 0)
.withTrapezoidalProfile(DegreesPerSecond.of(180), DegreesPerSecondPerSecond.of(90))
.withSoftLimits(Degrees.of(-30), Degrees.of(100))
.withGearing(new MechanismGearing(GearBox.fromReductionStages(3, 4)))
.withZeroPower(MotorMode.BRAKE)
.withTelemetry("ArmMotor", TelemetryVerbosity.HIGH)
.withStatorCurrentLimit(Amps.of(40))
.withMotorInverted(false)
.withClosedLoopRampRate(Seconds.of(0.25))
.withOpenLoopRampRate(Seconds.of(0.25))
.withFeedforward(new ArmFeedforward(0, 0, 0, 0))
.withControlMode(ControlMode.CLOSED_LOOP)
.withStartingPosition(Degrees.of(0));
// Create your motor
TalonFXS armMotor = new TalonFXS(1);
SmartMotorController motor = new TalonFXSWrapper(armMotor, DCMotor.getNEO(1), motorConfig);
// Create your mechanism config
ArmConfig config = new ArmConfig()
.withLength(Meters.of(0.135))
.withHardLimits(Degrees.of(-100), Degrees.of(200))
.withTelemetry("ArmExample", TelemetryVerbosity.HIGH);
// Create the Arm!
Arm arm = new Arm(config, motor);
Join a community of over 400 teams!
Join our Discord community or create your first PR in just a few steps.
Last updated
Was this helpful?
