Cpp Example: Path Groups - mjansen4857/pathplanner GitHub Wiki
Using AutoBuilder
and PathPlannerAuto
is the preferred way to utilize autos created in PathPlanner. See Cpp 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.
#include <pathplanner/lib/auto/PathPlannerAuto.h>
using namespace pathplanner;
// Use the PathPlannerAuto class to get a path group from an auto
auto 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.
frc::Pose2d startingPose = PathPlannerAuto::getStartingPoseFromAutoFile("Example Auto");