English subtitles

← Office Hours Week 4 - Artificial Intelligence for Robotics

Get Embed Code
2 Languages

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

  1. Hello, and welcome to the fourth Office Hours.
  2. We've had a lot of really good discussion in the forums and some great questions.
  3. Let's start with a question from Michael.
  4. He asks, "In the last office hours, you mentioned something
  5. about the possibility of a project at the end of the class.
  6. What are your thoughts on the students building a robotic car?"
  7. I just recorded the final class, and I actually spent some time putting everything together
  8. into a simulation of a car at the level we've been operating--not a real car.
  9. Honestly, it took me a whole day to put this all together.
  10. It's substantial work, because at the surface these pieces fit together nicely,
  11. but when you put them together, you realize that what the planner generates is not quite
  12. isn't quite exactly what the controller really wants.
  13. Tuning those parameters was actually a challenge,
  14. but what I've done is for the final class, I'm giving you the environment first
  15. and saying solve the problem of driving a car from A to B.
  16. If you're really so inclined, you can go out and really try it,
  17. but as the class goes on I give you most of my implementation, leaving bits and pieces out.
  18. Then you can go and plug those bits and pieces and and hopefully make it work.
  19. Unfortunately, I can't really give you a real car. That's the real fun thing.
  20. As we'll see in the final example, the methods that we discussed are the core methods.
  21. They give you a good path, but they won't give you a path good enough for actual driving.
  22. There's a lot of work that goes beyond this class that could be done
  23. to make things smoother and more elegant. Perfect.
  24. Tangled asked, "In the Unit 4.14 video, you mentioned something about the other cars honking."
  25. He wants to know if Junior can here.
  26. Does he have a microphone sensor that affects his actions, and can he honk himself?
  27. [Sebastian:] None of our cars hear, and none of our cars honk.
  28. I know in certain parts of the world that's a recipe for not driving confidently and safely in traffic,
  29. but we chose not to make audio communication part of that experiment.
  30. George asked, "While it's possible to constantly re-plan
  31. if enough computational power is available,
  32. A-star assumes a static and deterministic world."
  33. Can you comment on some of the possible pitfalls of using A-star?
  34. And what are some of the alternatives to this algorithm?
  35. Those are great and really deep questions,
  36. to which I've dedicated a number or research years, it turns out,
  37. and I've graduated a number of PhD students on that very topic.
  38. A-star gives you a taste of how cool planning can be,
  39. but there are many, many opens problems.
  40. For example, A-star cannot deal with branching outcomes where you flip a coin,
  41. and you have to pursue both outcomes. It just doesn't work.
  42. It cannot deal with information gathering.
  43. Sometimes in planning what you want to do is take
  44. a specific action just for the sake of a reducing uncertainty.
  45. For example, if I am going to a grocery store, and I don't know whether I have money with me,
  46. I might just check, do I have my money here, and this checking action
  47. has no other bearing than informing me that my money is in my pocket.
  48. That is completely not doable with A-star now.
  49. The dynamic programming stuff that I discussed has that flavor.
  50. You can actually pursue multiple outcomes and bring them together.
  51. It is computationally very inefficient, so you have to basically go over the entire state space.
  52. The fact that we wrote the universal plans is just
  53. a side effect of pursuing every possible combination.
  54. The moment the state space gets very large, dynamic programming doesn't scale.
  55. It's a big, open issue.
  56. Now, if you go to something like Google Maps, what you'll find is
  57. that you can do instant path planning between two points.
  58. What Google has been doing is pre-caching a lot of the principal sub-plans,
  59. so the remaining planning problem of finding the shortest path becomes mostly a table lookup.
  60. They've done this in a way that's actually optimal.
  61. They can prove it's optimal for path planning.
  62. It's really an amazing achievement that's way beyond A-star.
  63. The planning field is much more interesting than the lecture alluded.
  64. I just want to get your juices flowing to have you use one.
  65. Now, we did use A-star in our world,
  66. and the way we addressed re-planning in the current environment
  67. is that we just plan really, really fast.
  68. We had a version of A-star that was super fast.
  69. If we saw something new, it would just re-plan, and that was just fine for us.
  70. You mentioned something about dynamic programming just now,
  71. and a student had a very good question about that.
  72. How large is the planning policy for Junior?
  73. In Junior's case and the Google self-driving car cases,
  74. we don't do that much planning.
  75. We basically plan only within the visual horizon of the vehicle horizon of the vehicle itself.
  76. We don't address the problem of how to get from here to Paris or what streets to take
  77. We assume that's solved by Google Maps.
  78. We assume a fixed route in all our driving, but once the fixed route is speced out,
  79. all the planning that takes place is within the visual range of the robot.
  80. They are typically 3-dimensional state spaces.
  81. They're typically x, y, and orientation.
  82. Now, in some of our experiments we also use velocity as a state variable,
  83. because sometimes you want to take a little detour so you can straighten and be faster,
  84. but they are relatively low-dimensional spaces.
  85. Okay. Another question from George was about prohibitively expensive left turns.
  86. Are the costs of actions--are these a dynamic variable
  87. that's constantly being updated or are they static within the car?
  88. The way we've handled the cost of action is we have a version that looks
  89. at the global picture--like go from A to B and find the cost there--
  90. then zooming back to the local picture.
  91. And the local picture variable is to actually consider cars right now at this moment
  92. whereas in the global picture we assume a static world,
  93. and we make a fixed cost for left turns.
  94. Now, as we go to the local picture, we do a lot of local roll outs,
  95. local look-ahead plans--not dissimilar from A-star--
  96. and then fill in the actual cost of left turns and replace them with the assume cost.
  97. That's sometimes needs a different action.
  98. There situations where we are planning to do a lane shift but we can't
  99. because it's just too expensive right now.
  100. We'd rather endure being stuck behind a slower car until the lane shift is cleared.
  101. There's an interplay between two levels of planning going on.
  102. A student wants to know about multi-goal environments.
  103. An obvious example of a multi-goal environment would be a parking lot.
  104. I want to get to an empty parking spot.
  105. That's a great question I should've asked you the students,
  106. because it has a really nice and obvious answer, which is--here's the answer.
  107. In A-star, you can certainly designate multiple states to be goal states.
  108. Nothing prohibits this. You just have to make sure your heuristic is admissible.
  109. It takes a value that is underestimating or at least estimating correctly
  110. the distance to any of those goal states. Then it's just fine.
  111. The same is true for dynamic programming. You can certainly have multiple goal states there.
  112. Nothing in the formulation is a problem.
  113. Talking about heuristic functions, a student had a question,
  114. and I think a lot of people are wondering,
  115. since this is really where A-star gets its speed in the choice of the heuristic function,
  116. are they deduced algorithmically or are they just done with intuition or trial and error?
  117. How do we decide?
  118. That's a fantastic question.
  119. That's actually a really deep question as well.
  120. In the car domain, we actually calculate heuristic function,
  121. and we have two heuristic functions we kind of superimpose.
  122. Both of them get at the gist of the problem, but are much easier to compute.
  123. Suppose we have an environment with obstacles,
  124. and your planning space is 3-dimensional--your x, your y, and your orientation.
  125. One way to do your heuristic is to ignore the rotational degree of freedom
  126. and assume you're moving a disk in any direction.
  127. Obviously, moving a robot in any direction is easier
  128. than being constrained by the filters or the car.
  129. This becomes now a 2-dimensional problem, and by going from 3 dimensions to 2 dimensions,
  130. we can solve the entire problem in no time.
  131. We plan in 2D and use the 2D planning result as a heuristic for the 3D planner.
  132. The reason why it works is because 2D planning is so much faster than 3D planning.
  133. That's on that is basically ignoring the physical constraints of the car
  134. and going to a simpler car model which can move in any direction any time.
  135. The second heuristic we're using looks at the 3D problem but without obstacles.
  136. We can pre-plan the optimal action of a 3D robot that has turning constraints
  137. in the 3D space--x, y, and orientation--to any goal location in advance--
  138. we do this once and it's true forever--without any obstacles.
  139. What this gets us is that sometimes to get in a certain target orientation,
  140. you have to take a certain turn, and that turn has to be taken no matter what,
  141. and obstacles will only make it worse.
  142. If you compute this obstacle-free heuristic,
  143. you sort of get an underestimate that gets only worse with obstacles.
  144. You have an admissible heuristic.
  145. We toss both of their heuristics in as heuristics in A-star,
  146. and we get a speed-up of a planner easily of a factor of 10^10 in practice.
  147. That's very interesting. Great.
  148. So it's actually--I'm giving this as an example.
  149. I don't want you to really implement those right now, but that shows you how deep this question really is.
  150. If you can come up with good ways of cheating and solving
  151. the problem by lessening constraint and do it much faster,
  152. that tends to be a great heuristic for A-star.
  153. All right. Thanks a lot. We had a lot of great questions.
  154. I'm sure we'll have a lot next week.
  155. Can you give us a little preview of what's coming in Units 5 and 6?
  156. Yes, first I want to thank you for these questions.
  157. I really appreciate how deep they are, and how much you connect with the material.
  158. I think that's great.
  159. I honestly personally much prefer them over questions
  160. such as, "When can I buy my next self-driving car?"
  161. I think is really deep material I'm trying to teach you,
  162. and I love the fact that many of you are diving in and really deeply,
  163. because that's what I want to enable you to do, to apply it in a deep way.
  164. So keep these questions coming.
  165. In Unit 5 and 6 I'll dive into control.
  166. Control is now the art of turning these abstract, discrete, and chucky paths
  167. into actual steering motion.
  168. It's a continuous thing, because your steering is continuous, and time is continuous.
  169. We're going to go away from the discrete world and into the continuous world.
  170. In Unit 6 I try to toss everything together.
  171. In Unit 6 we program, hopefully, a robotic car with my help
  172. where we go all the way to localization at the same time
  173. and path planning at the same time and control
  174. and hopefully generate some actual trajectories by our simulated car.
  175. Can't wait. I'm sure the students feel the same way. Thanks a lot.
  176. See you in class.