## ← 19-21 Localization Question 2 Solution

• 1 Follower
• 10 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=UlPfYHG_Yn8" data-team="udacity"></div> ``` 2 Languages

Showing Revision 1 created 11/28/2012 by Amara Bot.

1. This robot is located at 0, 10 and it points at 45 degrees.
2. In doing so, it moves some right and some up.
3. In fact the same ratio in the x dimension as it will be in the y dimension.
4. Now cosine of this θ here, is about 0.7071 multiplied by 5 added to 0 and you get 3.5355.
5. It so turns out that this is also the value of sin θ,
6. so you can add the same value over here to the x value of 10, which gives us 13.5355.
7. Finally, we find that within 1 second the initial heading is canceled out by the change of heading,
8. so we'll be facing in this direction over here, and that angle is just zero.
9. If you got those right, this was a somewhat tedious exercise on simple geometry,
10. but this is the kind of math you need to implement in particle filter equations like those over here in robotics.