## ← Smoothing Algorithm - Artificial Intelligence for Robotics

• 2 Followers
• 15 Lines

### Get Embed Code x Embed video Use the following code to embed this video. See our usage guide for more details on embedding. Paste this in your document somewhere (closest to the closing body tag is preferable): ```<script type="text/javascript" src='https://amara.org/embedder-iframe'></script> ``` Paste this inside your HTML body, where you want to include the widget: ```<div class="amara-embed" data-url="http://www.youtube.com/watch?v=pjgfffzvbUg" data-team="udacity"></div> ``` 4 Languages

Showing Revision 2 created 05/25/2016 by Udacity Robot.

1. In the path planning class, we specified paths as a sequence of points in a 2D grid
2. just like this over here.
3. For the smoothing purposes, we will call each point xi.
4. This is a sequence that goes from x0 to xn-1,
5. and each of the x's is really a 2-dimensional coordinate, but that should be immaterial to the smoothing.
6. You could do this in 1D, 2D, or 3D.
7. Here's the smoothing algorithm. Initially we create variable yi that are the same
8. as all the xi's. Remember that these are the non-smooth locations that the planner has found.
9. Then we optimize two criteria.
10. The first is minimizing this expression over here, and the second looks as follows.
11. In the first one we minimize the error of the ith original point with the ith smooth point,
12. and the second we minimize the distance between consecutive smooth points, both to the square.
13. Here's a little quiz.
14. If we only apply the first criteria--forget about the second one--will we get the original path,
15. and smooth path, or no path. Please check exactly one of those boxes.