We made a very basic 2 m. path that goes forward (screenshotted below). When simulating the path being run in telemetry, it looks fine. Furthermore, when the robot was on the cart (and the wheels were not in contact with any surface), the wheels moved as expected (this was tested once, will do further testing to confirm this behavior)
However, when we run the path on the robot, the path is executed, but then the robot makes a wild 180 degree turn at the very end of the path. Unsure why this is happening. The path’s starting position and ending position are identical. The only difference is that the path has a large rotation at the end.
I’ve attached snippets of the pathplanner code implementation below. Any guidance would be greatly appreciated.
^Telemetry shown on actual robot when auto is run (apologies for the blurry photo, but it is clear there is a rotation occurring).
Updating here: simulation is still not yielding any possible errors, but the robot on the cart seems to also want to rotate 180 degrees. Any suggestions would be greatly appreciated. We are mostly using 364’s method of operating swerve.
It’s very likely there’s nothing wrong with your Pathplanner setup. YAGSL used to have this issue. It’s potentially caused by it automatically swapping back to the default command (Teleop Drive) after it finishes the path.
Any idea on how to resolve this? The PathPlanner setup only commands the drivebase robot relative, so I’m a little bit confused on the swapping you’re talking about.
I believe that @Technologyman00 is refering to once the Auto ends, the robot runs it’s default drive command, which may be turning it to a certain heading.
Might be worth trying just the Auton period, without teleop, if you can. Or disabling your default drive command to see if the issue persists.