Problems with Path Planner

Hey all, I’ve been working on getting path planner lib to work after the 2024 season update, I believe that there may be something wrong with how I’m getting my Chassis Speeds or possibly how I’m setting my module speeds while configuring the Holonomic settings.

My configuration code is in frc.robot.subsystems.Swerve along with all other relative functions.

When I test my pathplanner auto it is supposed to drive forward but it spins at a high velocity instead.

Source Code: github.com/Team4539/2024-2025

Any help is appreciated, thank you!

At first glance, I don’t really see anything immediately buggy; however, I would advise to move your arm motors and your color sensor out of the swerve subsystem.

That stuff should be part of a separate subsystem.

1 Like

Thank you for for the feedback, I will move those in the next commit!

Maybe it’s a relic of troubleshooting but using the resetGyro named command in an auto, like you’re doing in “Straight Auto” is not a good idea.

PathPlanner will set the pose for you (based on the starting pose entered.) Although resetGyro might work with “Straight Auto” when you’re on the blue alliance, it’s going to spin your robot around when you’re on the red alliance.

1 Like

Removed resetGryo

Did that solve it for you?