udacity lesson 5: robot motion

20
19. FEBRUARY 2014 UDACITY LESSON 5: ROBOT MOTION

Upload: beth

Post on 22-Feb-2016

47 views

Category:

Documents


0 download

DESCRIPTION

Udacity lesson 5: Robot Motion. Agenda. Path Smoothing PID. Motivation. In motion planning, we learned to plan a path But how do we turn that discrete path into an actual continuous path, that the robot can follow efficiently? - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Udacity lesson 5: Robot Motion

19. FEBRUARY 2014

UDACITY LESSON 5:ROBOT MOTION

Page 2: Udacity lesson 5: Robot Motion

Agenda›Path Smoothing›PID

2

Page 3: Udacity lesson 5: Robot Motion

Motivation› In motion planning, we learned to plan a path

› But how do we turn that discrete path into an actual continuous path, that the robot can follow efficiently?

› Additionally, how do we get the robot to follow the path – how do we control its motion?

3

Page 4: Udacity lesson 5: Robot Motion

Path Smoothing›Until now, all paths have been straight and discrete, divided into grids, like this:

4

Page 5: Udacity lesson 5: Robot Motion

Path Smoothing›We’d rather have a line that a robot can follow at a constant speed, and as short as possible. A bit like this:

5

Page 6: Udacity lesson 5: Robot Motion

Path Smoothing

6

›The first criterion minimizes distance between original and smooth -> favors the original path

›The second criterion minimizes distance within the smoothed path -> favors a pile of points in one place

Page 7: Udacity lesson 5: Robot Motion

Path Smoothing›Weighing these terms can yield a smooth path:

7

Page 8: Udacity lesson 5: Robot Motion

Path Smoothing›We can use gradient descent optimization with the following update rules for each iteration:

›Where they each correspond to one of the previously stated terms

8

Page 9: Udacity lesson 5: Robot Motion

Path Smoothing›Finally, we might want to add a term that avoids obstacles to our system:

9

Page 10: Udacity lesson 5: Robot Motion

Path Smoothing›Demo: ›Pathsmooth.m

10

Page 11: Udacity lesson 5: Robot Motion

PID control›Control theory is about how to adjust our system to interact with the real world.

›In the case of a robot, it will mostly be connected to moving around.

›We use sensor input as the robots “senses”. The controller is then the brain that takes this input and converts it to the correct motion.

11

Page 12: Udacity lesson 5: Robot Motion

PID Control›The most common type of controller is the PID:

12

Page 13: Udacity lesson 5: Robot Motion

PID Control›P: Proportional control. Drives the system based on the current error.

›I: Integral control. Drives the system based on an integral of past errors. Removes steady state error.

›D: Derivative control. Drives the system based on a derivative of past errors 13

Page 14: Udacity lesson 5: Robot Motion

PID Control›So how to implement this?

›Or maybe in code:

14

Page 15: Udacity lesson 5: Robot Motion

PID Tuning›We need values for Kp, Ki and Kd.

›These must fit the physical properties of the system we control. Motor speed, robot weight, turn radius etc.

15

Page 16: Udacity lesson 5: Robot Motion

PID Tuning›There are a lot of methods for finding these parameters. Two examples:

›Twiddle›Ziegler-Nichols

16

Page 17: Udacity lesson 5: Robot Motion

17

Page 18: Udacity lesson 5: Robot Motion

Ziegler-Nichols›All gains are set to zero›P is increased until the system oscillates with a constant amplitude. The gains can then be found as:

18

Page 19: Udacity lesson 5: Robot Motion

PID Control›Demo:›PIDSmooth.py

19

Page 20: Udacity lesson 5: Robot Motion

Discussion

20