Elevator Subsystem
The Elevator subsystem is responsible for controlling the vertical movement of the robot's elevator mechanism. It provides both closed-loop velocity/position control and open-loop manual control capabilities.
Constructor and Parameters
io
: Hardware interface for controlling the elevator mechanism
Commands
The Elevator subsystem is used by the following commands:
- DefaultElevatorRunAtVelocity
- ElevatorOpenLoop - Command for manual control using percent output
- ElevatorRunToHeight - Moves the elevator to a specified target height and maintains it
Configuration Requirements
-
PID Configuration:
- Separate PID slots must be configured for each control type (VELOCITY, POSITION)
- AT_TARGET_HEIGHT_POSITION_THRESHOLD must be set in ElevatorConstants
-
Hardware Limits:
- MAX_HEIGHT and MIN_HEIGHT must be set in ElevatorConstants
- MAX_OPEN_LOOP_PERCENTAGE must be configured for manual control limits
-
Sensor Configuration:
- Position sensors must be properly configured and zeroed
- Soft limits should be enabled to prevent mechanical damage