When trying to use the Pathplanner 2024, I noticed that there are 3 ways I can choose from to convey a trajectory into the movement of my Robot. My questions are : What’s the exact differences between these three controllers? How these difference reflects in the behaviour of our robot? Also, how to select the controller according to actual usage?

If you have a swerve robot, you need to use the holonomic controller.

If you don’t, I’d start with Ramsete and then look into LTV. They are interchangeable, but LTV has been used less since it was relatively new when many teams were going with swerve robots. The time variation in LTV has to do with being able to space the points along a path unequally so that you can be more precise following more complex sections, if I recall correctly. I don’t have much experience with LTV because of swerve.

That’s not what it does. LTVUnicycleController (WPILib API 2024.1.1-beta-4-18-gaeb1a4a)

The linear time-varying unicycle controller has a similar form to the LQR, but the model used to compute the controller gain is the nonlinear unicycle model linearized around the drivetrain’s current state.

This controller is a roughly drop-in replacement for

`RamseteController`

with more optimal feedback gains in the “least-squares error” sense.See section 8.9 in Controls Engineering in FRCFIRST Robotics Competition for a derivation of the control law we used shown in theorem 8.9.1.

A linear time-varying controller in this context is a controller where a nonlinear model is repeatedly linearized, then LQR is applied to the linearized system. It’s a linear model that changes over time.

Ramsete is a unicycle controller as well.

OK, so I guess I will just use the holomic controller since we’re using a swerve drive.