Turrets/Wrists
Why are Turrets and Wrists the same thing? Aren't they both Arms?
Basic Turret Config
TalonFXS turretMotor = new TalonFXS(1);
SmartMotorControllerConfig motorConfig = new SmartMotorControllerConfig(this)
.withControlMode(ControlMode.CLOSED_LOOP)
.withClosedLoopController(4, 0, 0, DegreesPerSecond.of(180), DegreesPerSecondPerSecond.of(90))
// Configure Motor and Mechanism properties
.withGearing(new MechanismGearing(GearBox.fromReductionStages(3, 4)))
.withIdleMode(MotorMode.BRAKE)
.withMotorInverted(false)
// Setup Telemetry
.withTelemetry("TurretMotor", TelemetryVerbosity.HIGH)
// Power Optimization
.withStatorCurrentLimit(Amps.of(40))
.withClosedLoopRampRate(Seconds.of(0.25))
.withOpenLoopRampRate(Seconds.of(0.25));
SmartMotorController motor = new TalonFXSWrapper(turretMotor,
DCMotor.getNEO(1),
motorConfig);
PivotConfig m_config = new PivotConfig(motor)
.withStartingPosition(Degrees.of(0)) // Starting position of the Pivot
.withWrapping(Degrees.of(0), Degrees.of(360)) // Wrapping enabled bc the pivot can spin infinitely
.withHardLimit(Degrees.of(0), Degrees.of(720)) // Hard limit bc wiring prevents infinite spinning
.withTelemetry("PivotExample", TelemetryVerbosity.HIGH) // Telemetry
.withMOI(Meters.of(0.25), Pounds.of(4)); // MOI CalculationStarting Position
Wrapping
Hard Limits
MOI
Last updated