I was interested in using PathPlanner lib to create autonomous paths using a nice GUI.
I had some code in RobotContainer that looked like this:
public Command getAutonomousCommand() {
PathPlannerPath path = PathPlannerPath.fromPathFile("chargestation");
// An example command will be run in autonomous
return AutoBuilder.followPathWithEvents(path);
}
Of course, this wouldn’t run because I hadn’t configured the AutoBuilder yet.
So while looking at the docs on the github page, I was on Build An Auto page when I saw 3 different ways of configuring the AutoBuilder.
They were all very confusing; I don’t know what a ramsete, LTV or a Holonomic controller was, and looking at WPILib documentation confused me even more.
I think I need to use a Ramsete controller? But the AutoBuilder.configureRamsete() parameters confused me, what’s a poseSupplier, resetPose, speedsSupplier, and all of these other
Not entirely sure what LTV is but ramsete is a “tank” style drivetrain where the speeds outputted by pathplanner are for the left and right sides of your robot, where holonomicmis for something more akin to swerve
Thanks I’m pretty sure now that I need to use a ramsete controller, as our test robot is a tank drive.
However, when I call AutoBuilder.configureRamsete(), I’m overwhelmed by the amount of parameters. For example: what’s a poseSupplier, resetPose, speedsSupplier etc.
To clarify, I’m not asking about what type or object to use, vscode already tells me this, for example the poseSupplier is a Supplier, but what even is a Supplier<>? How am I supposed to figure out what to put here?
Not entirely sure about the new pathplanner but I can’t imagine it’s changed, usually that would be a method that returns the robot’s pose2d, a method to reset that pose, etc
You may need some block diagrams to understand what they’re saying about the controller inputs and outputs, but unfortunately I don’t have any.
It’s a function that takes no arguments and returns a value. This can be either a member function or a lambda (inline function). Supplier (Java SE 17 & JDK 17)