Pathplanner Rotating in Place for Holonimic (Swerve) Drives

Simple yes or no question. (One hopes) :slight_smile:

Is it possible in Pathplanner to rotate a swerve drive in place.
If so is there an example in the documentation.

No, trajectory generation in general isn’t built for turn-in-place actions. PID control on your swerve’s rotation can be used instead.

No, but you can easily write a command like TurnInPlace so that only the rotation of swerve will change and you can tune this with additional PID.

You can also put it in the NamedCommands in PathPlanner so that after executing the path, for example, your robot can get to the respective rotation.

1 Like

I found this thread while researching the same question of whether I can rotate (pivot) in place with Path Planner.

I see that I can create a named command to be able to insert this action in an auto path, but since you can’t pass parameters to named commands, it means that I need a named command for each possible turn angle or destination.

I found the same issue when adding a command to set the angle setpoint for our shooter.

It would be wonderful if there was a mechanism to pass a parameter to a user command triggered from PathPlanner.