Skip to content

Java Example: Path Groups

Michael Jansen edited this page Nov 7, 2023 · 3 revisions

Using AutoBuilder and PathPlannerAuto is the preferred way to utilize autos created in PathPlanner. See Java Example: Build an Auto. However, you can still use autos to mimic the path group functionality available in previous PathPlanner versions.

Getting a path group will only retrieve the paths added to that auto. Any other commands added to the auto will not be included. Use the example above if you want to create a full auto from the GUI.

// Use the PathPlannerAuto class to get a path group from an auto
List<PathPlannerPath> pathGroup = PathPlannerAuto.getPathGroupFromAutoFile("Example Auto");

// You can also get the starting pose from the auto. Only call this if the auto actually has a starting pose.
Pose2d startingPose = PathPlannerAuto.getStartingPoseFromAutoFile("Example Auto");
Clone this wiki locally