PEDROPATHING SOFTWARE
We use PedroPathing for our autonomous code. To determine our robot’s position on the field, we use the GoBuilda V2 pinpoint odometry pods, which count rotations to navigate and track the distance our robot has traveled.
Read obelisk for color pattern
Shoot 3 preloaded artifacts in correct order close to the depot
Cycle first two rows of artifacts in the correct order close to the depot
If we have three seconds or more left, park next to chute lever
If not, we stay parked in our score pose, which is off the line
MAX TOTAL POINTS: 48
Read obelisk for color pattern
Shoot 3 preloaded artifacts in correct order from the far scoring zone
Load the far row of artifacts
Score from far scoring zone
Park off triangle out of the way facing human player zone
MAX TOTAL POINTS: 33
OBELISK SOFTWARE
At the beginning of auto the Limelight reads the obelisk, and converts the ID into a color order. It stores the pattern and uses the sorter logic to call the colors in the right order to lauch.
Looking for fiducial, correcting with PIDF, and powering up the flywheel
Indicates to driver it’s ready to launch!
RPM CALCULATION SOFTWARE
How far the ball goes depends on the RPM of the flywheel. The limelight looks for the distance between the center of the camera to the center of the goal fiducial. We have a LUT that covers the distance input space to RPM space. To get output RPM we take a linear interpolation between the two closest points of the current distance.
This chart shows how the RPM correlates with the distance from the fiducial
This code sets the RPM based on the distance from the April Tag
AIMING SOFTWARE
We have a “launch mode” triggered by the gamepad that tells the Limelight to look for the AprilTag. The Eye PIDF converts angle error in x from AprilTag to joystick steering input [-1.0,1.0]. The PIDF output is added to the driver input and may be overridden. The robot can also shoot while moving. The robot first takes the velocity from the odometry pods and calculates the magnitude. The direction from the velocity is based off of the robots original starting point, so we grab the robot orientation from the joystick while aiming at the AprilTag. The x-value from the joystick becomes a delta angle that offsets left/right velocity, and the y-value becomes a delta RPM that changes the RPM of the flywheel to adjust to movement closer/farther from the board.
Now a Hamsterz Alumni, Anya comes in occasionally on Tuesdays as a Software Mentor for the team, and is always a member in our hearts <333