Autonomous
1. Create a New Auto Class
PathPlanner2. Create a New Auto Class
Example:
public class MyAutoMode extends AutoBase {
private Superstructure s = Superstructure.getInstance();
private TrajectorySet t;
public MyAutoMode(StartingPosition startingPosition) {
boolean mirror = startingPosition.mirrored;
Trajectory part1 = l.trajectories.get(startingPosition.name + "To_Start");
Trajectory part2 = l.trajectories.get("StartToPickup");
Trajectory part3 = l.trajectories.get("PickupToScore");
t = new TrajectorySet(
mirror,
part1,
part2,
part3
);
}
@Override
public void routine() {
// Autonomous sequence goes here
}
}3. Define and Use TrajectorySet
4. Implement the routine() Method
5. Coordinating Subsystems with Path Following
Example: Change Superstructure State After Reaching a Distance
6. Reuse Behavior with Helper Methods
Example: scoreNet()
7. Simulation Pose Setup
8. Add to Auto Selector
Last updated