Greetings everyone,
I was wondering if anyone could give me a set of steps for achieving autonomous paths using Pathplanner for a differential drive using Ramsete commands. I have thoroughly read the Pathplanner docs and tried to set everything accordingly
AutoBuilder.configureRamsete(
this::getPose, // Robot pose supplier
this::resetOdometry, // Method to reset odometry (will be called if your auto has a starting pose)
this::getWheelSpeeds, // Current ChassisSpeeds supplier
this::toWheelSpeeds, // Method that will drive the robot given ChassisSpeeds
new ReplanningConfig(), // Default path replanning config. See the API for the options here
() -> {
problem 1- When trying to set up the AutoBuilder , I’m not sure exactly sure what goes for the this::getWheelSpeeds, // Current ChassisSpeeds supplier
this::toWheelSpeeds, //
//Here are the two methods used
public DifferentialDriveWheelSpeeds getWheelSpeeds() {
return new DifferentialDriveWheelSpeeds(m_leftEncoder.getRate() , m_rightEncoder.getRate() );
}
public DifferentialDriveWheelSpeeds toWheelSpeeds(ChassisSpeeds chassisSpeeds)
{
return m_kinematics.toWheelSpeeds(chassisSpeeds);
}
– The this::getWheelSpeeds, keeps throwing an error and I can seem to find what it needs
problem 2- Do I still need to write a Ramsete Command trajectory in the RobotContainer.java like in previous years or is it completely handled by the PathPlanner GUI?
Problem 3- Though, PathPlanner automatically places the Auto paths inside my project directories, and I managed to get an error-free program. When I run the Simulation program, it crashes as soon as I hit the autonomous option.
I tried to sync up all of the simulation tools namely WPILIB’s simulation GUI, AdvantageScope and PathPlanner altogether and was unable to simulate autonomous paths.
In summary, our team would like to be able to simulate our autonomous paths using WPILIB’ Simulation tools + AdvantageScope +PathPlanner 2024 for a Differential Drive using the Ramsete Command. Any help would be appreciated.
P.S: I am working on uploading the code to Github very soon!