Autonomous - HHS-Team670/MustangLib GitHub Wiki
- First, ensure that your Field Markings are as accurate as possible
- Plan your autonomous routines efficiently. Realistically, you can only refine two or three.
- Add the routines to PathPlanner, including waypoints.
- Create a class that extends
SequentialCommandGroupand implementsMustangCommand(SeeCenterEngage.javain2023-Robotfor reference)
Testing autonomous routines can be incredibly tedious, time consuming, and frustrating. While testing, use the following guidelines to reduce variance from one trial to the next. This will help to converge on an effective, consistent autonomous routine as quickly as possible.
-
Always hover over
Enter. No explanation needed. -
Designate a video-taker. It's super helpful to observe what went wrong. Was the trajectory wrong? Did it overshoot in the middle or just at the end? Was the intake spinning? etc. Also, when you review the videos, you'll feel like Tadashi from Big Hero Six :)
-
Use pass-through when possible. Turning often introduces skew with a Swerve drive, and is very inconsistent with a Tank drive. Utilize pass-through or pass-over when possible. See Our 2022 Auto for an example of pass-through, and 971's 2023 Auto for an example of pass-over. 254's 2018 Auto utilized pass-through to place 4 cubes on the Switch and was a major contributor to their undefeated season.
-
When turning IS necessary, turn fast The slow turn on the left is worse than the fast turn on the right. When the robot turns too slowly, it varies more from one trial to the next.

- Adjust the curve using the handles, NOT by adding another waypoint. Only add waypoints when absolutely necessary! For example, both of these create an S-curve, but the first one is better. When you use fewer control points, the robot will generally move more smoothly. If you have used Adobe Illustrator, iDraw, GIMP, or other digital art programs, you'll be familiar with the system of control points and handles to define a smooth curve.

- When you start tuning your competition paths, set your max speed and acceleration as high as you need them. Every time you change them, you will need to re-tune each path. SDS Mk4i L2 modules have a max velocity of 4-4.25 meters per second, and your acceleration can be slightly higher than the max speed if necessary.
Max Vel and Max Accel are "generator settings" in PathPlanner, but they are ALSO constants in code. You must update the values in both places!
-
Slow is smooth, and smooth is fast. See Team 2056's autonomous routine in 2023. Reduce jerkiness by reducing the max acceleration.
-
Align the robot methodically at the start of every trial. When possible, align the robot against a wall or barrier. Physically align all swerve modules before each trial. Make sure that your re-zeroing process is repeatable and consistent.
In 2023, the Arm was particularly finnicky since the 3 joints all had some mechanical backlash. The wrist could wiggle by ~20 degrees without the encoder detecting any change. So, when zeroing the arm, we needed to ensure that the claw was on the correct "side" of the dead zone, or else the wrist would be zeroed inconsistently. To zero the arm, we placed it in the
STOWEDstate (claw facing outwards), let gravity pull the joints downward, then restarted code. Once all joints gave aHealthStateofGREEN, we could pre-load the cone and rotate the Wrist to theSTARTINGstate inside the frame perimeter. These extra steps increased consistency between trials and at competitions.
- Tape down carpet seams. See 2023 Auton Testing (2:28)
Here are some other autonomous routines to be inspired by!
971 2023
In 2023, 971 used 4 cameras on their robot for a super-advanced vision-based pose estimation. That allowed them to have a consistent "3 + balance" by their first competition.
254 2018
In 2018, 254 had a 4-cube autonomous routine that let them win control of the scale at the start of nearly every match. Because of the game design in 2018, that often immediately secured the win.
6328 2022
In 2022, 6328 used an incredibly advanced autonomous routine during Einstein playoffs. It took advantage of a loophole in the 2022 rule book.
G210 - During AUTO, a ROBOT ... [may not contact] CARGO still in its staged location on the opposite side of the FIELD.
However, according to this rule, if the cargo HAS been moved, then you ARE allowed to touch it. So, their autonomous:
- Scored two of their own cargo
- Intook an opponent's cargo
- Turned 180 degrees so their camera could see the ball and adjust the robot's angle
- Turned 180 degrees back
- Dispensed the opponent cargo across the center line to move their color cargo from its original spot!
- Crossed the center line and intook both balls
- Used a color sensor to eject the opponent's ball and score their own