Choreo is used to create auto paths and trajectory files which can be put into the code
Making Paths
Paths:
You can create multiple paths in the same choreo files
It is a best practice to make your paths pieces of an auto
All your paths should be either right or left, they can be mirrored in the code
The code handles alliance swaps
This button generates the most optimal path with your given waypoints and constraints:
You MUST press this if you need code
Ctrl+G (Windows) or Cmd+G (Mac)
Variables:
These can be values for constraints, or waypoints
This allows for consistency across paths
Constraints Menu:
Allows you to enable and disable constraints
Allows editing of the constraints ranges and values
Waypoints:
Pose Waypoints: Position + Heading
Translation Waypoints: Position
Empty Waypoints: Position, the path generation treats these as a 'suggestion'
Paths can be split at waypoints
Splits the path at an index that can be referenced in the code (first index is zero)
Helpful in code for things such as terrain traversal, or if the robot needs to take an action mid path
Constraints:
Can be used to limit velocity, acceleration, and where the robot can go
Can be applied on a specific range of waypoints, or the entire path
Many applications
Event Markers:
Signifies an event in the code such as:
Intake start
Shoot
They do not actually change anything
Gradient:
By default, it signifies velocity
It can be changed to show multiple things
Settings
Allows for you to customize the robot for more accurate paths and code generation
Uploading Choreo to the Code
Create a choreo folder in the deploy folder of the code
Click the three lines in the top left
Save project as
Save in the choreo folder
These must be committed, just like normal code
Once paths are in the code, the automatically update on YOUR computer when you click the generate button (they need to be re-committed)
Making Autos
This auto (illegal as of champs):
Shoots preload
Delays
Crosses the bump
Runs the intake while the robot traverses the neutral zone
Follows choreo path right infront of opponents hub to steal their balls
Shoots a cycle
Goes to the depot
Shoots depot balls
Create a file with the auto name
Instantiate all the paths as AutoTrajectory objects
Create a start position
Create a prepRoutine
Reset the pose
Use commands to combine robot actions with the paths
Adding the Autos to the Selector
It's pretty simple for now, just follow the formula above
Once the autos are in the selector, RobotContainer.java gets the selected auto and sends it to Robot.java