# Smoother paths in prog. skills using arcs

Even though the fastest path from point A to point B is a straight line, depending on the robot’s heading, traveling in a certain arc at the beginning is the fastest. You can make this work by drawing an imaginary circle around the robot and a line from the robot’s starting position to the desired position, and following where the lines intersect, but I don’t know how to do that. If I’m using a standard tank drive, how do I accomplish this task?

You’ll want to research “Trajectory Generation” (often in the context of “Motion Profiling”). For example: https://github.com/JaciBrunning/Pathfinder . This basically looks like a “constraint” problem (how to I get my robot from Pose A to Pose B in the shortest amount of time, given velocity, acceleration, etc. restrictions)

Other relevant searches might be “Pure Pursuit”. This is the first in a series of videos that does a reasonable job walking thru an implementation of Pure Pursuit: FTC Programming: Pure Pursuit Tutorial 1 - YouTube

4 Likes

Thanks for the help. I’m only in 7th grade, so I don’t quite know trigonometry yet, but the information was very helpful. Thanks!

I generate my pure pursuit paths with Bezier curves. I learned how these curves work form a short khan academy unit that can be found here
Note: Bezier curves do not require any trigonometry knowledge

4 Likes

okay, but how do I do that using math for programming? also, if I need odometry, how do I do that?

Unfortunately, trignomotry is a must for implementing odometry and pure pursuit, even some move to reference pose/point algorithms. I would recommend looking into that first.

I’ll link two more pure pursuit resource:
I used python and the smoothing algorithm they cited to create smooth paths:

If you want to look more into path tracking, this article is very helpful (it requires a lot of math, but if you are really interested in the topic, I would recommend reading it in the future):

5 Likes

thanks. I haven’t looked deeply into it, but maybe I can use the GPS sensor for the odometry. I will let you know if it helps as soon as I can.

Roblox Developers offer a really good article for Bezier Curves with a code example in Lua:
https://developer.roblox.com/en-us/articles/Bezier-curves

1 Like