E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position...

45
1 E160 – Lecture 3 Autonomous Robot Navigation Instructor: Chris Clark Semester: Spring 2016 Figures courtesy of Siegwart & Nourbakhsh

Transcript of E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position...

Page 1: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

1

E160 – Lecture 3 Autonomous Robot Navigation

Instructor: Chris Clark Semester: Spring 2016

Figures courtesy of Siegwart & Nourbakhsh

Page 2: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

2

New Bot 1

http://spectrum.ieee.org/automaton/robotics/robotics-hardware/robot-octopus-takes-to-the-sea

Page 3: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

3

Control Structures Planning Based Control

Perception

Localization Cognition

Motion Control

Prior Knowledge Operator Commands

!

Page 4: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

4

Motion Uncertainty

1.  Odometry & Dead Reckoning 2.  Modeling motion 3.  Odometry on the Jaguar 4.  Example System

Page 5: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

5

Odometry & Dead Reckoning

§  Odometry §  Use wheel sensors to update

position §  Dead Reckoning

§  Use wheel sensors and heading sensor to update position

§  Straight forward to implement §  Errors are integrated,

unbounded http://www.guiott.com

Page 6: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

6

Odometry & Dead Reckoning

§  Odometry Error Sources?

Page 7: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

7

Odometry & Dead Reckoning

§  Odometry Error Sources?

§  Limited resolution during integration §  Unequal wheel diameter §  Variation in the contact point of the wheel §  Unequal floor contact and variable friction can lead to

slipping

Page 8: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

8

Odometry & Dead Reckoning

§  Odometry Errors §  Deterministic errors can be eliminated through proper

calibration §  Non-deterministic errors have to be described by

error models and will always lead to uncertain position estimate.

Page 9: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

9

Motion Uncertainty

1.  Odometry & Dead Reckoning 2.  Modeling motion 3.  Odometry on the Jaguar 4.  Example System

Page 10: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

10

Modeling Motion

§  If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what is the resulting new position p’ ?

XI

YI

p

p’

Δsr

Δsl

Page 11: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

11

Modeling Motion

§  To start, let’s model the change in angle Δθ and distance travelled Δs by the robot. §  Assume the robot is travelling on a circular arc of

constant radius.

Δsr

Δsl

Page 12: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

12

Modeling Motion

§  Begin by noting the following holds for circular arcs:

Δsl = Rα Δsr = (R+2L)α Δs = (R+L)α

Δsr

Δsl

Δs

R

2L

α

Page 13: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

13

Modeling Motion

§  Now manipulate first two equations: Δsl = Rα Δsr = (R+2L)α To: Rα = Δsl Lα = (Δsr - Rα)/2 = Δsr /2 – Δsl /2

Page 14: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

14

Modeling Motion

§  Substitute this into last equation for Δs:

Δs = (R+L)α = R α + Lα = Δsl + Δsr /2 – Δsl /2 = Δsl /2 + Δsr /2

= Δsl + Δsr 2

Page 15: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

15

Modeling Motion

§  Or, note the distance the center travelled is simply the average distance of each wheel: Δs = Δsr + Δsl 2

Δsr

Δsl

Δs

Page 16: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

16

Modeling Motion

§  To calculate the change in angle Δθ, observe that it equals the rotation about the circular arc’s center point

Δθ = α

Δs

α

α

Page 17: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

17

Modeling Motion

§  So we solve for α by equating α from the first two equations: Δsl = Rα Δsr = (R+2L)α

This results in: Δsl / R = Δsr / (R+2L) (R+2L) Δsl = R Δsr 2L Δsl = R (Δsr - Δsl ) 2L Δsl = R

(Δsr - Δsl )

Page 18: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

18

Modeling Motion

§  Substitute R into α = Δsl / R = Δsl (Δsr - Δsl ) / (2L Δsl )

= (Δsr - Δsl ) 2L

So… Δθ = (Δsr - Δsl ) 2L

Page 19: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

19

Modeling Motion

§  Now that we have Δθ and Δs, we can calculate the position change in global coordinates. §  We use a new segment of length Δd.

XI

YI θ + Δθ

Δd

Δs

Page 20: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

20

Modeling Motion

§  Now calculate the change in position as a function of Δd.

XI

YI θ + Δθ

Δd

θ + Δθ/2 Δx

Δy

Page 21: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

21

Modeling Motion

§  Using Trig: Δx = Δd cos(θ + Δθ/2) Δy = Δd sin(θ + Δθ/2)

XI

YI

Δd

θ + Δθ/2 Δx

Δy

Page 22: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

22

Modeling Motion

§  Now if we assume that the motion is small, then we can assume that Δd ≈ Δs :

§  So… Δx = Δs cos(θ + Δθ/2) Δy = Δs sin(θ + Δθ/2)

θ + Δθ

Δd

Δs

Page 23: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

23

Modeling Motion

§  Summary:

Page 24: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

24

Modeling Uncertainty in Motion

§  Let’s consider wheel rotation measurement errors, and see how they propagate into positioning errors. §  Example: the robot actually moved forward 1 m on the x axis,

but there are errors in measuring this.

If:

Δs = 1 + es Δθ = 0 + eθ

where es and eθ are error terms

Δs

Δθ

Page 25: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

25

Modeling Uncertainty in Motion

§  According to the following equations, the error es = 0.001m produces errors in the direction of motion. Δx = Δs cos(θ + Δθ/2) Δy = Δs sin(θ + Δθ/2)

§  However, the Δθ term affects each direction differently.

If eθ = 2 deg and es = 0 meters, then: cos(θ + Δθ/2) = 0.9998 sin(θ + Δθ/2) = 0.0175

Page 26: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

26

Modeling Uncertainty in Motion

§  So Δx = 0.9998 Δy = 0.0175

§  But the robot actually went to x =1,y =0, so the errors in each direction are Δx = +0.0002 Δy = -0.0175

§  THE ERROR IS BIGGER IN THE “Y” DIRECTION!

Page 27: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

27

Modeling Uncertainty in Motion

§  Errors perpendicular to the direction grow much larger.

Page 28: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

28

Modeling Uncertainty in Motion

§  Error ellipse does not remain perpendicular to direction.

Page 29: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

29

Motion Uncertainty

1.  Odometry & Dead Reckoning 2.  Modeling Uncertainty in motion 3.  Odometry on the Jaguar 4.  Example System

Page 30: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

30

Odometry on the Jaguar

§  Goals: §  Calculate the resulting robot position and orientation

from wheel encoder measurements. §  Display them on the GUI.

Page 31: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

31

Odometry on the Jaguar

§  Method cont’: §  Make use of the fact that your encoder has resolution

of 190 counts per revolution. Be able to convert this to a distance travelled by the wheel. rϕr = Δsr

§  Given the distance travelled by each wheel, we can calculate the change in the robot’s distance and orientation. Δs = Δsr + Δsl Δθ = (Δsr - Δsl ) 2 2L

Page 32: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

32

Odometry on the Jaguar

§  Method cont’: §  Now you should be able to update the position/

orientation in global coordinates. Δx = Δs cos(θ + Δθ/2) Δy = Δs sin(θ + Δθ/2)

Page 33: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

33

Motion Uncertainty

1.  Odometry & Dead Reckoning 2.  Modeling Uncertainty in motion 3.  Odometry on the Jaguar 4.  Example System

Page 34: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

The VideoRay MicroROV

§  ROV Specs §  Two horizontal thrusters,

one vertical §  Forward facing color

camera §  Rear facing B/W camera §  1.4 m/s (2.6 knots) speed §  152m depth rating §  Depth & Heading sensors §  SeaSprite Scanning Sonar

Page 35: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

The VideoRay MicroROV

§  ROV Modeling

Page 36: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Equations of Motion

§  6 degrees of freedom (DOF): §  State vectors:

body-fixed velocity vector: earth-fixed pos. vector:

DOF Surge Sway Heave Roll Pitch Yaw

Velocities u v w p q r

Position & Attitude x y z φ θ ψ

Forces & Moments X Y Z K M N

[ ] [ ][ ] [ ]TTTT

TTTT

zyx

rqpwvu

ψθφηηη

ννν

,,,,,,

,,,,,,

11

21

==

==

Page 37: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Equations of Motion

§  Initial Assumptions

§  The ROV will usually move with low velocity when on mission §  Almost three planes of symmetry; §  Vehicle is assumed to be performing non-coupled motions.

[W. Wang et al., 2006]

Page 38: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Equations of Motion

§  Horizontal Plane:

§  Vertical Plan: �

[W. Wang et al., 2006]

Page 39: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Theory vs. Experiment

§  Coefficients for the dynamic model are pre-calculated using strip theory;

§  A series of tests are carried out to validate the hydrodynamic coefficients, including §  Propeller mapping §  Added mass coefficients §  Damping coefficients

Page 40: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Propeller Thrust Mapping

§  The forward thrust can be represented as:

Page 41: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Direct Drag Forces

§  The drag can be modeled as non linear functions

Drag in Heave (Z) Direction

Drag in Sway (Y) Direction

Drag in Surge (X) Direction

Page 42: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Perpendicular Drag Forces

•  Heave (Z) drag from surge speed

Page 43: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Model Verification

§  Yaw Verification

Page 44: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Model Verification

§  Surge Verification

Page 45: E160 – Lecture 3 Autonomous Robot Navigation10 Modeling Motion ! If a robot starts from a position p, and the right and left wheels move respective distances Δsr and Δsl, what

Autonomous Control