WristRunToAngle Command
A command that moves the wrist to a specified target angle using closed-loop position control. The command can either end once the target is reached or continuously maintain the position.
Required Subsystems
Constructor Parameters
-wristSubsystem
: The wrist subsystem instance to control
- angle
: The target angle to move to (automatically clamped between MIN_ANGLE and MAX_ANGLE)
- holdPosition
: Optional parameter to maintain position after reaching target
Configuration Requirements
-
PID Configuration
- Position mode PID gains must be properly tuned in WristTalonFXRealConstants
- AT_TARGET_ANGLE_POSITION_THRESHOLD must be set to an appropriate value
- AT_TARGET_ANGLE_TIME_THRESHOLD must be set to an appropriate value
-
Hardware Limits
- MAX_ANGLE and MIN_ANGLE must be configured in WristConstants
-
Soft limits should be enabled to prevent mechanical damage
-
Motor Configuration
- Brake mode should be enabled for position holding
- Feedback sensor must be properly configured and zeroed
- Proper gravity compensation values should be configured