Hi, I was wondering if any programming geniuses could explain what a pure pursuit controller is. I tried to read some articles(at least those that aren’t banned on my school computer) but those didn’t really clear up what pure pursuit was. If someone could also show like some demo code to demonstrate what it would look like, that would be great.
Here are some questions that I have:
Is it used in autonomous (Sorry if that sounds stupid, I have a small brain)
Is it just PID, because PID completes an action in multiple steps
Does it use GPS?
I heard something about using odometry, can someone elaborate.
Can someone also explain what motion profiling means. I did some research on it and it sounds like PID.
Thanks, and if anyone knows what any of these things mean, please explain like you are explaining something to a 5 year old. In other words understandable to a beginner. Thanks again.
While I have never used the pure pursuit controller, I have done some reading on the topic and can at least refer you to a resource. https://wiki.purduesigbots.com/software/control-algorithms/basic-pure-pursuit
From my understanding, the robot is given a path to follow in autonomous, and uses it to adjust the angular velocity of the motors. It allows a robot to “look ahead” a certain distance to anticipate changes of direction and stay on a path. This, when paired with a PID, which adjusts the speed of the robot as it approaches a target, can allow a robot to smoothly follow a pre-designed path. Odometery, or an absolute positioning system derived from wheel encoders, is used to monitor where on the path the robot is and how far it is from its target, allowing the robot to adjust to remain on its path at the right speed.
Also, if the math seems a bit complicated, I’d take a stab at asking ChatGPT to explain the concept of pure pursuit to you, that’s done me wonders in the past.
PID is a closed loop controller. The point is that no matter what happens, the robot will always end up at the same point twice. It accomplishes this by using values taken, sometimes using the motor encoders, sometimes with tracking wheels, etc. However, because of oscillation, the movement can be very jarring sometimes and unsmooth.
Motion profiling is an open loop controller. It uses a preplanned route to feed into an algorithm and give velocity / voltage values to each motor. However, even if it runs into an obstacle, it will still attempt to continue on this path, unlike PID. This is why most would not recommend motion profiling for this year’s game. The randomness of the triballs and general obstacles around the field make motion profiling not great.
would there be a scenario where you might want to use motion profiling versus PID? If motion profiling cannot move around or avoid an obstacle, why would you use it? Thanks.
Well, it’s not that motion profiling can’t get around an obstacle, but the obstacle has to be consistent. Triballs (and the barrier) are inconsistent. Motion profiling can’t adjust for these obstacles. However, in a game like change up or spin up where the obstacles are very consistent, motion profiling can be very useful.