I want to align to the AMP by either defining a pre-planned path and pathfinding to it, creating a path on-the-fly, or just pathfinding from the current robot pose to the amp (from point to point).
I’ve checked the docs, which say that you have no control over the heading for pathfinding between points, which is something I want.
Also, does anyone recommend one method over another (pathfinding to a path vs pathfinding to a pose vs path on-the-fly by using bezier points from the final position and current pose.
I believe the heading mentioned is not the robot’s rotation, but that controller line you have when creating a path that decides from which side to start the motion.
I wouldn’t use path planner. It’s pregenerated and you want to be able to get to the amp from anywhere. Use WPILibs TrajectoryGenerator for on the fly trajec generation directly from any possible robot pose to the amp, with the correct heading
I would definitely use path planner. We have had great results path planning to a specific pose from the robots current pose, and if you want it will automatically avoid field elements you cannot drive through or under.
You might find the new pathfindToPoseFlipped feature helpful as it will flip the pose based on alliance color (the regular one will not). This will prevent you from having to enter in the pose of both the red and the blue amps.
Also, if I’m using a limelight & odometry for the SwervePoseEstimator, should I align to the amp using just the april tag on the amp in 2d mode, or should my current estimated pose w PathPlanner’s pathfind to a pose to get to the amp?
Estimated pose for sure, the pose estimator is much more stable. You shouldn’t count on seeing the april tag + you can activate the command from further away.