WpiLib'20 Mecanum Trajectory (+Ramsete Controller with Mecanum?)

Hello everyone!
I want to implement the new trajectory following features to our mecanum bot and get a deeper understanding of how this whole “trajectory magic” works.

However, after I have viewed “A Deep Dive to Trajectories With WPILib’20” and “Zero to Trajectory Tracking” by 5190, I still had questions about the mecanum side of these. (Both of these tutorials are pretty amazing for beginners like me!) One of these tutorials said that Ramsete Controller is not applicable for Holonomic drivetrains. (I will still try to implement a simple trajectory with a differential constructor and a mecanum chassis but I would love the extra maneuverability of mecanum.)

I wanted to learn how I could implement such a controller for a mecanum drivetrain. Is there anyone on CD who tried it and can share their experience? Or could you direct me in any way that has documentation about this or example code to examine? (I could not see how mecanum odometry can be used with the ramsete controller on the wpilib docs but if there is something I am missing, I would really appreciate it.)

1 Like

You can totally run a Ramsete controller on a mecanum drivetrain, and it will behave exactly as it does on an ordinary differential drive. Of course, this also means that you’re essentially getting no added value out of your drive’s holonomic capabilities for as long as you’re using a ramsete controller. Whether or not this is acceptable to you is a technical decision that you have to make.

If you decide that is not acceptable, you’re in luck, because it turns out path following with a holonomic drive is more-or-less trivial; simply run PID controllers on your x and y positions plus feedforwards taken from the trajectory. WPILib provides some simple examples of how to do this, and though they do not contain heading controls, it is not hard to modify them to do so.

Thank you! Definitely will explore the holonomic capabilities in the off-season, if not during the build-season.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.