Pathplanner Auto not Rotating to Target

When we set a rotation target in pathplanner, our robot does not follow that and just follows the path without rotating.

Here is the link to our code,

I am also having the same issue, the telemetry on pathplanner shows that I am following the path, but the robot does not rotate

@ryanhubbs i cannot find any usage of pathplanner in the linked code… let me know if i missed something

but, is it possible that neither of you have set the rotation target in the goal end state?

maybe the gyro is giving you degrees that you are sending to pathplannner as radians? this happened to my team.

1 Like

Is your odometry showing the robot rotating? You can check using a Field2d.

I also noticed you are also initializing your gyro twice, I would remove the ahrs variable you have at the top.

The AutoBuilder code in drivetrain.java is for pathplanner