English subtitles

← 06-08 Your Robot Car

Get Embed Code
6 Languages

Showing Revision 1 created 06/29/2012 by Amara Bot.

  1. Now let's put them all together into a single piece of software.
  2. Upfront it took me about a whole day to do this.
  3. I'm not going to ask you to do it all yourself,
  4. because it's going to cost you probably at least an hour if it takes me a day.
  5. But I still want to be able to take all the lessons that we did together into a single system.
  6. I'm going to help you a little bit--bits and pieces--
  7. but up front here is the environment that I wrote for you,
  8. which is very much derived from the environment we studied in the past.
  9. We have a class robot that has certain kinds of noise characteristics you can find over here.
  10. As I scroll down, you can see the familiar init function, the position-setting function,
  11. the set_noise function, and then we have two checking functions--
  12. whether we have a collision with the world called "grid," which I will show you in a minute.
  13. and we have a check_goal function to see if we reached a goal
  14. according to a certain distance threshold.
  15. The move function should be very familiar at this point.
  16. It applies noise to the motion command.
  17. It the same code that you originally wrote.
  18. Then we have a very simple sense function, which measures the robot's (x, y) location,
  19. similar to a GPS on a car but with substantial measurement noise.
  20. Corresponding to this sense function we have a measurement probability function
  21. that you might want to use in your filter, and it evaluates the probability
  22. of a measurement relative to the ground truth coordinates of the robot using Gaussians.
  23. Armed with all this here is the problem.
  24. I'm going to give you a grid. Here is an example grid. Let me draw this for you.
  25. This specific one happens to be of dimensions 6 and 5,
  26. and there are a number of blocked off cells like this.
  27. If we look carefully into the code, you'll find information about the initial starting location
  28. on the left upper corner and the goal location, which is the bottom right corner.
  29. In putting everything together, you're going to build a robotic car using our bicycle model
  30. that'll drive through the free space through the continuous free space
  31. on something close to the shortest path all the way into the goal.
  32. Here is my solution that I implemented
  33. and that you will get to see for the most part towards the end of this class.
  34. I am starting up over here. These are my obstacles.
  35. They implement as circles through the center of these grid cells.
  36. It's not exactly correct but good enough for my implementation.
  37. Here are multiple runs using the same code, and you can see they're far from optimal.
  38. They are non-optimal because there is control noise,
  39. and there is also measurement noise.
  40. But they all make it safely through free space into the corner where the goal objective is.
  41. If we look at them in detail, like this solution over here.
  42. You'll find that the spacing of the circles is somewhat variable.
  43. You'll find that there's little corners over here that are either the result of control noise
  44. or of measurement noise or of my somewhat deficient implementation.
  45. You'll also find the control set points that are the smooth points of my A-star planner
  46. as shown here in green.
  47. In the version that I implemented for you, the controller does something very, very different.
  48. It actually chooses as the control objective to head straight to the goal,
  49. using the atan2 function, executes the action at a speed of 0.1,
  50. and then reports a collision whenever the robot is moving.
  51. Just looking down to the output where we see the robot's coordinates
  52. along with the orientation there are very frequent collisions
  53. that the robot undergoes in its attempt to reach the goal,
  54. which it eventually does, but you can see 2 big regions of collisions
  55. until the goal is finally reached.