Package frc.robot.subsystems.climber
Class ClimberReal
java.lang.Object
frc.robot.subsystems.climber.ClimberReal
- All Implemented Interfaces:
ClimberIO
Real hardware implementation of the climber subsystem.
This class interfaces with actual TalonFX motor controllers for both the telescope extension and pivot rotation mechanisms. It configures motors with Phoenix 6 features including motion magic control for the pivot and voltage control for the telescope.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.subsystems.climber.ClimberIO
ClimberIO.ClimberInputs -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new ClimberReal instance and configures all motors and sensors. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetAnglePivot(Angle angle) Sets the target angle for the pivot mechanism using motion magic control.voidsetHeightTelescope(Distance height) Sets the target height for the telescope mechanism using pidvoidsetVoltagePivot(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 input container with current sensor readings from all motors.
-
Constructor Details
-
ClimberReal
public ClimberReal()Constructs a new ClimberReal instance and configures all motors and sensors.
-
-
Method Details
-
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
-
setHeightTelescope
Sets the target height for the telescope mechanism using pid- Specified by:
setHeightTelescopein interfaceClimberIO- Parameters:
height- the desired height in any distance unit
-
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
-
setAnglePivot
Sets the target angle for the pivot mechanism using motion magic control.- Specified by:
setAnglePivotin interfaceClimberIO- Parameters:
angle- the desired pivot angle in any angle unit
-
updateInputs
Updates the input container with current sensor readings from all motors.Refreshes all status signals and updates the input object with current positions, velocities, voltages, and currents for both mechanisms.
- Specified by:
updateInputsin interfaceClimberIO- Parameters:
inputs- the input container to populate with current hardware state
-