If auto is based on the side of the field, we put RED_ or BLUE_ before the path and auto name
The auto name should include the location that it starts
The auto name should have a unique identifier
Ex: An auto resembles a Y shape, starts on amp side, and starts on the red side, therefore we call it RED_AmpY
Ex: An auto is the same as RED_AmpY, but skips the first note, therefore we call it RED_AmpSkipY
Path names should be the same as the auto followed by a number (starting at 1) based on where they fall in the sequence
Ex: A path that is the third path in RED_AmpY would be named RED_AmpY3
Linked waypoint names should be the same name as the path that they end
Ex: the link between RED_AmpSkipY1 and RED_AmpSkipY2 would be named RED_AmpSkipY1
Auto: A collection of Commands and Paths that can be selected as an option for the autonomous period
Path: A single continuous section of an auto that can contain named commands (as events), rotation targets, waypoints, and more
Named Command: A command with a specific identifier that can be run in an auto sequence or utilized in event markers, to be declared in code
Can be run in parallel if they don't require the same subsystems
Ex: intake - Runs the intake until interrupted
Ex: aimAndShoot - A sequential command group that aims the turret, moves the pivot to the calculated angle, revs the shooter wheels, then shoots, then stows
Event Marker: An event marker is a sequence that can be run in the middle of a path without interrupting the driving
Rotation Target: A target rotation goal, the path will strive to reach the goal by the time it hits that point in the path. Selecting "Reach as Fast as Possible" will cause the path to prioritize rotating immediately
Waypoint: A point on the path that path planner will run the trajectory through
Spline: The line and circle connected to a waypoint on either side, decides the curve that the waypoint will use towards the next waypoint or from the last waypoint
Create a new auto file, following all naming conventions. Create a corresponding folder in the paths section.
Create paths for each of the robot's movements. Follow naming conventions and put the path into the corresponding folder.
Add each path to the auto in the correct order Review in PathPlanner to make sure that the robot moves as expected.
If needed, link the starting and ending points of each path.
Create named commands in the auto for each of the robot's actions. If an event should run while the robot is moving, (Ex. spinning up the intake), use event markers in the path where it should take place. Otherwise, use named commands in the auto.
Note:
The robot's odometry may or may not be accurate, and autonomous mode is especially sensitive to odometry inaccuracy. Paths will likely need constant tuning.
Paths can be put into groups with other commands. By putting them in a race group with a command, a path can be prematurely ended. This will kill the path, but will not stop the drivetrain. The drivetrain will continue to move at the same velocities, and must be manually stopped.
By making a named command that ends only whenever a condition is true, we can use a race group to make a path that will be run only if the condition is true, ending as soon as it is false. If we make the named command only check the condition when it starts, we have essentially created a path-based if-statement.