Drive to point

Hi programming gods,

I want to move my robot to a specific point by odometry. The turn to point, I have it; however, I am missing part of the driving to the point. My idea is to use Pythagora’s sentence to find the distance to the point then use PID.

I want to know if there is a different solution than this one.

Thanks

Yes that would work. Another similar solution and one more easily translated to programming would be to simply use the distance formula, which is derived from the Pythagorean formula.

Theres’s a couple ways to do this (well) but the simplest is to have your drive pid going and have a turning pid going simultaneously where the turn pid’s error is the difference in the angle of your robot and the angle from your robot’s center to the target.

2 Likes

I believe someone used Bezier Curves for this purpose once

However I’m gonna be using your strategy of “turn to” then use PID

1 Like

Bézier curves should only be done when you already can get a good programming skills score with odometry and PID. I will guarantee you that most top skills teams use PID anyway, so more complexity is not really need for VEX except as a learning experience. You should seriously use @2775Josh 's suggestion, master it, and then look for other options (there are many out there that have been discussed previously on the forum) if you really want to improve your precision. In reality, “better” methods to drive to a point provide diminishing returns with more complexity, but making your robot square and your encoder wheels as strong as possible will make your simple algorithms work spectacularly.

Check out my thread on odometry. Just check my profile.