Package frc.robot.subsystems.climber
Class ClimberSim
java.lang.Object
frc.robot.subsystems.climber.ClimberSim
- All Implemented Interfaces:
ClimberIO
Simulation implementation of the climber subsystem.
This class provides a mock implementation of ClimberIO for testing and simulation
purposes. It allows developers to test climber control logic without physical hardware.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.subsystems.climber.ClimberIO
ClimberIO.ClimberInputs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAnglePivot(Angle angle) Sets the target angle for the pivot mechanism.voidsetHeightTelescope(Distance height) Sets the height for the telescope mechanismvoidsetVoltagePivot(double volts) Sets the voltage for the pivot motor.voidsetVoltageTelescope(double volts) Sets the voltage for the telescope motor.voidupdateInputs(ClimberIO.ClimberInputs inputs) Updates the climber input values for simulation.
-
Constructor Details
-
ClimberSim
public ClimberSim()
-
-
Method Details
-
updateInputs
Updates the climber input values for simulation.In simulation, this method can be used to update simulated sensor readings and other input states.
- Specified by:
updateInputsin interfaceClimberIO- Parameters:
inputs- the input container to update with current climber state
-
setVoltageTelescope
public void setVoltageTelescope(double volts) Sets the voltage for the telescope motor.- Specified by:
setVoltageTelescopein interfaceClimberIO- Parameters:
volts- the voltage to apply to the telescope motor, in volts
-
setVoltagePivot
public void setVoltagePivot(double volts) Sets the voltage for the pivot motor.- Specified by:
setVoltagePivotin interfaceClimberIO- Parameters:
volts- the voltage to apply to the pivot motor, in volts
-
setAnglePivot
Sets the target angle for the pivot mechanism.- Specified by:
setAnglePivotin interfaceClimberIO- Parameters:
angle- the desired pivot angle
-
setHeightTelescope
Sets the height for the telescope mechanism- Specified by:
setHeightTelescopein interfaceClimberIO- Parameters:
height- the desired height
-