- Motor 1 (
climbNeo1
): Left-side motor - Motor 2 (
climbNeo2
): Right-side motor - Motors are set to brake mode by default to prevent slippage when the robot is stationary.
Movement Control
Independent Motor Control
moveLeft(double speed)
: Controls the left motor (climbNeo1).moveRight(double speed)
: Controls the right motor (climbNeo2).
These methods allow independent control of each motor, providing flexibility in how the robot’s climbing mechanism operates.
Synchronized Motor Control
moveBoth(double speed)
: Controls both motors at the same time for synchronized climbing.
This method ensures both motors move together, allowing the robot to climb uniformly.
Motor Idle Mode
setIdle(IdleMode idle)
This method allows the setting of the idle mode for both motors. Motors can either be in Brake mode (default) or Coast mode:
- Brake Mode: Stops the motor immediately when power is cut, useful for preventing slippage.
- Coast Mode: Allows the motor to gradually come to a stop, which can be beneficial for smoother descent.
Stopping the Motors
coast()
Stops both motors by setting their speed to 0:
Future Enhancements
Soft Limits (Commented out for Future Use)
Soft limits for the motors can be configured to prevent overextension during the climb:
These limits are currently commented out but can be enabled when needed for additional safety during operation.
Telemetry
The subsystem can send telemetry data to the SmartDashboard, although it is currently commented out:
- Climb RPM: Displays the motor’s velocity.
- Climb Voltage: Displays the voltage supplied to the motor.
This telemetry can be used to monitor the performance of the climb motors during a match.
Periodic Functions
periodic()
This method runs every scheduler cycle and can be used to update telemetry data or perform routine checks.
simulationPeriodic()
This method is used when running simulations.
Constants
The constants for the Climb subsystem, such as soft limits, can be stored in the ClimbConstants
class for easy modification and tuning.
Future Improvements
- Enable and tune soft limits for better motor safety.
- Add telemetry for real-time performance monitoring during competition.
- Implement more sophisticated control mechanisms if needed for advanced climbing strategies.
This documentation provides a detailed overview of the Climb subsystem, explaining the key methods and functionalities, including movement control, motor safety features, and future improvements.