Intro to Motion Profiling & Path Following

Hello! My team programs in python and I have recently been wanting to learn more about motion profiling. I figured this was a good place to start compiling a list of resources I could use to learn. (I do have a year of AP Calc AB under my belt and am currently taking BC.)

What resources does your team use for path generation? Also, to dive into the specifics, I of course understand the concept of PID but have yet to get an opportunity to implement it – any suggestions for places to start?

If you haven’t already, check out the new 2020 documentation(there’s not as much python support for frc, but you can see how implementation is for Java/C++). One of the easiest ways to start PID is with a simple positional controller using the drivetrain encoders-- for example, moving the robot forward x feet by counting encoders(distance/wheel circumference*encoder counts per rotation) and tuning it to be as quick and accurate as possible.

If you’re thinking about Pathfinder-style motion profiling, there’s a RobotPy example program that does that: https://github.com/robotpy/examples/tree/master/physics-pathfinder

You can expect the 2020 WPILib changes to make it into RobotPy, but that work has not been completed so there’s nothing to see yet.

1 Like

Try this 254 talk for an overview of PID/etc, and information on motion planning.