We have code to interface with the driver joystick and Limelight camera, to control the gatherer/shooter motors, and, when #5 is implemented, to track the position of the robot. The next step is to connect these individual parts into a cohesive whole with a button-driven command (or multiple) that:
- Engages the gatherer motor until cargo is collected;
- Locates the target hub with the Limelight and uses PID to adjust the robot's yaw until it is 'close enough' to facing the target;
- Gets the necessary shooter motor power by feeding the horizontal distance of the robot to the desired hub (obtained from odometry) into
ShooterSubsystem::powerToHitTarget;
- Engages the shooter motor with the necessary power until the cargo is launched; and then
- Disengages both the gatherer and shooter motors.
This shooting pipeline must, of course, be available in both autonomous and teleoperated modes.
(If shooting does not occur instantaneously after gathering, then step 1 and steps 2–5 should each be initiated by a single button press.)
We have code to interface with the driver joystick and Limelight camera, to control the gatherer/shooter motors, and, when #5 is implemented, to track the position of the robot. The next step is to connect these individual parts into a cohesive whole with a button-driven command (or multiple) that:
ShooterSubsystem::powerToHitTarget;This shooting pipeline must, of course, be available in both autonomous and teleoperated modes.
(If shooting does not occur instantaneously after gathering, then step 1 and steps 2–5 should each be initiated by a single button press.)