PathPlanner Holonomic Rotation Help

Hello this is the first year we are using path planner and java in general. We have managed to get some basic autonomous paths working but when we tried to introduce holonomic drive, the robot started going in a completely opposite direction in a completely different speed. Here is the link to our code: GitHub - Respawn-Robotics/Swiss-Cheese: Prototype Robot Code

I assume it has something to do with the rotation PID, but I also have no clue how to tune that as well. We did sysID characterization for all the other values but I don’t know if anything from that applies to rotationPID.

1 Like

We made a 3 meter long straight path where the robot started with a heading of 0 and rotated to a heading of 90 and modified the kP value for the omega PID controller. We found that kP=5 got us within half of a degree.

Did the max velocity impact those values at all? Or should it not matter.

It sounds like your path is being transformed for the red alliance. Either select the blue alliance in your driver station or disable the alliance transformation for testing. There is a PPSwerveControllerCommand overload that takes a useAllianceColor boolean to let you disable this.

1 Like