Package frc.robot.subsystems.intake.arm
Class ArmIOSim
java.lang.Object
frc.robot.subsystems.intake.arm.ArmIOSim
- All Implemented Interfaces:
ArmIO
Simulation implementation for the intake arm IO interface.
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.subsystems.intake.arm.ArmIO
ArmIO.ArmIOInputs -
Constructor Summary
ConstructorsConstructorDescriptionArmIOSim()Creates a new ArmIOSim and initializes the simulated Spark MAX motor controllers. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetPosition(Angle angle) Commands the arm motor to move to a specified position using closed-loop control.voidstop()Tells the motor to stop trying to reach its setpointvoidupdateInputs(ArmIO.ArmIOInputs inputs) Updates inputs by simulating physics models and updating the SparkMaxSim state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface frc.robot.subsystems.intake.arm.ArmIO
clearFaults
-
Constructor Details
-
ArmIOSim
public ArmIOSim()Creates a new ArmIOSim and initializes the simulated Spark MAX motor controllers.
-
-
Method Details
-
updateInputs
Updates inputs by simulating physics models and updating the SparkMaxSim state.- Specified by:
updateInputsin interfaceArmIO- Parameters:
inputs- The inputs object to update.
-
setPosition
Description copied from interface:ArmIOCommands the arm motor to move to a specified position using closed-loop control.- Specified by:
setPositionin interfaceArmIO- Parameters:
angle- The target angle for the arm.
-
stop
public void stop()Description copied from interface:ArmIOTells the motor to stop trying to reach its setpoint
-