37
Mobile Robotics Sƶren Schwertfeger / åøˆę³½ä» Lecture 3

Mobile Robotics - ShanghaiTech

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Mobile Robotics

Sƶren Schwertfeger / åøˆę³½ä»

Lecture 3

Outlineā€¢ Wheeled locomotionā€¢ Coordinate system & mathā€¢ Kinematics

Mobile Robotics 2ShanghaiTech University - SIST - 24.11.2015

Motivationā€¢ Autonomous mobile robots move

around in the environment. Therefore ALL of them:ā€¢ They need to know where they are.ā€¢ They need to know where their goal is.ā€¢ They need to know how to get there.

ā€¢ Odometry!ā€¢ Robot:

ā€¢ I know how fast the wheels turned =>ā€¢ I know how the robot moved =>ā€¢ I know where I am J

Mobile Robotics 3ShanghaiTech University - SIST - 24.11.2015

Odometryā€¢ Robot:

ā€¢ I know how fast the wheels turned =>ā€¢ I know how the robot moved =>ā€¢ I know where I am J

ā€¢ Marine Navigation: Dead reckoning (using heading sensor)

ā€¢ Sources of error (AMR pages 269 - 270):ā€¢ Wheel slip

ā€¢ Uneven floor contact (non-planar surface)ā€¢ Robot kinematic: tracked vehicles, 4 wheel differential drive..

ā€¢ Integration from speed to position: Limited resolution (time and measurement)ā€¢ Wheel misalignmentā€¢ Wheel diameter uncertaintyā€¢ Variation in contact point of wheel

Mobile Robotics 4ShanghaiTech University - SIST - 24.11.2015

Mobile Robots with Wheelsā€¢ Wheels are the most appropriate solution for most applications

ā€¢ Three wheels are sufficient to guarantee stability

ā€¢ With more than three wheels an appropriate suspension is required

ā€¢ Selection of wheels depends on the application

Mobile Robotics 5ShanghaiTech University - SIST - 24.11.2015

The Four Basic Wheels Types

ā€¢ a) Standard wheel: Two degrees of freedom; rotation around the (motorized) wheel axle and the contact point

ā€¢ b) Castor wheel: Three degrees of freedom; rotation around the wheel axle, the contact point and the castor axle

Mobile Robotics 6ShanghaiTech University - SIST - 24.11.2015

The Four Basic Wheels Types

ā€¢ c) Swedish wheel: Three degrees of freedom; rotation around the (motorized) wheel axle, around the rollers and around the contact point

ā€¢ d) Ball or spherical wheel: Suspension technically not solved

Mobile Robotics 7ShanghaiTech University - SIST - 24.11.2015

Characteristics of Wheeled Robots and Vehiclesā€¢ Stability of a vehicle is be guaranteed with 3 wheels

ā€¢ center of gravity is within the triangle with is formed by the ground contact point of the wheels.

ā€¢ Stability is improved by 4 and more wheelā€¢ however, this arrangements are hyperstatic and require a flexible suspension system.

ā€¢ Bigger wheels allow to overcome higher obstaclesā€¢ but they require higher torque or reductions in the gear box.

ā€¢ Most arrangements are non-holonomic (see chapter 3)ā€¢ require high control effort

ā€¢ Combining actuation and steering on one wheel makes the design complex and adds additional errors for odometry.

Mobile Robotics 8ShanghaiTech University - SIST - 24.11.2015

Different Arrangements of Wheels Iā€¢ Two wheels

ā€¢ Three wheels

Omnidirectional Drive Synchro Drive

Center of gravity below axle

Mobile Robotics 9ShanghaiTech University - SIST - 24.11.2015

Different Arrangements of Wheels IIā€¢ Four wheels

ā€¢ Six wheels

Mobile Robotics 10ShanghaiTech University - SIST - 24.11.2015

Uranus, CMU: Omnidirectional Drive with 4 Wheels

ā€¢ Movement in the plane has 3 DOFā€¢ thus only three wheels can be

independently controlledā€¢ It might be better to arrange three

swedish wheels in a triangle

Mobile Robotics 11ShanghaiTech University - SIST - 24.11.2015

Rugbot, Jacobs Robotics: Tracked Differential Drive

ā€¢ Kinematic Simplification:ā€¢ 2 Wheels, located at the

center

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 12

Introduction: Mobile Robot Kinematics

ā€¢ Aimā€¢ Description of mechanical behavior of the robot for design and controlā€¢ Similar to robot manipulator kinematics ā€¢ However, mobile robots can move unbound with respect to its environment

ā€¢ there is no direct way to measure the robotā€™s positionā€¢ Position must be integrated over timeā€¢ Leads to inaccuracies of the position (motion) estimate

-> the number 1 challenge in mobile robotics

Mobile Robotics 13ShanghaiTech University - SIST - 24.11.2015

COORDINATE SYSTEM

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 14

Right Hand Coordinate Systemā€¢ Standard in Roboticsā€¢ Positive rotation around X is

anti-clockwiseā€¢ Right-hand rule mnemonic:

ā€¢ Thumb: z-axisā€¢ Index finger: x-axis ā€¢ Second finger: y-axisā€¢ Rotation: Thumb = rotation axis,

positive rotation in finger directionā€¢ Robot Coordinate System:

ā€¢ X frontā€¢ Z up (Underwater: Z down)ā€¢ Y ???

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 15

Right Hand Rule http://en.wikipedia.org/wiki/Right-hand_rule

Odometry

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 16

y

x0 x

y

ā„±"

ā„±#[%]

ā„±#[']

ā„±#[(]

ā„±#[)]

ā„±#[*]

With respect to the robot start pose:Where is the robot now?

Two approaches ā€“ same result:

ā€¢ Geometry (easy in 2D)ā€¢ Transforms (better for 3D)

ā„±#[+] : The Frame of reference (the local coordinate system) of the Robot at the time X

Use of robot frames ā„±#[+]

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 17

y

x0 x

y

ā„±"

ā„±#[%]

ā„±#[']

ā„±#[(]

ā„±#[)]

ā„±#[*]

š’Ŗ# + : Origin of ā„±#[+](coordinates (0, 0)

š’Ŗ# + P : position vector from š’Ŗ# + to

point P -š‘„š‘¦

ā€¢ Object P is observed at times 0 to 4ā€¢ Object P is static (does not move)ā€¢ The Robot moves

(e.g. ā„±# ' ā‰  ā„±#[(] )ā€¢ => (x, y) coordinates of P are

different in all frames, for example:ā€¢ š’Ŗ# ' P ā‰  š’Ŗ# ( PP

Position, Orientation & Pose

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 18

x

y

ā„±#[']

ā„±#[(]

ā€¢ Position:ā€¢

š‘„š‘¦ coordinatesofanyobjectorpoint(oranotherframe)

ā€¢ withrespectto(wrt.)aspecifiedframe

ā€¢ Orientation:ā€¢ Ī˜ angleofanyorientedobject(oranother

frame)ā€¢ withrespectto(wrt.)aspecifiedframe

ā€¢ Pose:

ā€¢š‘„š‘¦Ī˜

positionandorientationofanyoriented

objectā€¢ withrespectto(wrt.)aspecifiedframe

š’Ŗ# (

š’Ŗ# '

š‘„š‘¦ ā‰ˆ 4.5

3.2

Ī˜ ā‰ˆ 30Ā°

1 5

1

5

Translation, Rotation & Transform

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 19

ā€¢ Translation:ā€¢

š‘„š‘¦ difference,change,motionfromonereferenceframetoanotherreferenceframe

ā€¢ Rotation:ā€¢ Ī˜ differenceinangle,rotationbetweenone

referenceframeandanotherreferenceframe

ā€¢ Transform:

ā€¢š‘„š‘¦Ī˜

difference,motionbetweenonereference

frameandanotherreferenceframe

x

y

ā„±#[']

ā„±#[(]

š’Ŗ# (

š’Ŗ# '

š‘”#[(]# ' ā‰ˆ 4.5

3.2

1 5

1

5

š‘…(Ī˜ ā‰ˆ 30Ā°)#[(]# '

Position & Translation, Orientation & Rotation

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 20

x

y

ā„±#[']

ā„±#[(]

ā€¢ ā„±#[+] :FrameofreferenceoftherobotattimeXā€¢ Whereisthatframeā„±#[+] ?

ā€¢ Canonlybeexpressedwithrespectto(wrt.)anotherframe(e.g.globalFrameā„±" )=>

ā€¢ Poseofā„±#[+] wrt.ā„±"

ā€¢ š’Ŗ# + : Origin of ā„±#[+]

ā€¢ š’Ŗ# + š’Ŗ# +`( :Position ofā„±#[+`(] wrt.ā„±#[+]

toš’Ŗ# +`( wrt.ā„±#[+]

ā‰œ š‘”#[+`(]# + :Translation

ā€¢ Theangleš›© betweenthex-Axes:ā€¢ Orientation ofā„±#[+`(] wrt.ā„±#[+]

ā‰œ š‘…#[+`(]# + :Rotation ofā„±#[+`(] wrt.ā„±#[+]

š’Ŗ# (

š’Ŗ# '

š‘”#[(]# ' ā‰ˆ 4.5

3.2

1 5

1

5

š‘…(Ī˜ ā‰ˆ 30Ā°)#[(]# '

Transform

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 21

x

y

ā„±#[']

ā„±#[(]

ā€¢ š‘”#[+`(]# + :Translation

ā€¢ Positionvector(x,y)ofš‘… š‘‹ + 1 wrt.š‘… š‘‹

ā€¢ š‘…#[+`(]# + :Rotation

ā€¢ Angle(š›©)ofš‘… š‘‹ + 1 wrt.š‘… š‘‹

ā€¢ Transfrom: T ā‰” š‘”#[+`(]

# +

š‘…#[+`(]# +#[+`(]

#[+]

š’Ŗ# (

š’Ŗ# '

š‘”#[(]# ' ā‰ˆ 4.5

3.2 š‘…(Ī˜ ā‰ˆ 30Ā°)#[(]# '

1 5

1

5

T#[(]# ' ā‰ˆ

4.53.230Ā°

Geometry approach to Odometry

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 22

We want to know:ā€¢ Position of the robot (x, y)ā€¢ Orientation of the robot (Ī˜)

ā€¢ => together: Pose š‘„š‘¦Ī˜

With respect to (wrt.) ā„±" : The global frame; global coordinate system

ā„±#['] = ā„±" ā‡’ ā„±#['] =000

"

ā„±#[(]" = T#[(]# ' ā‰ˆ

4.53.230Ā°

Blackboard: T#[%]# ( ā‰ˆ

2360Ā°

x

y

ā„±#[']

ā„±#[(]

š’Ŗ# '

š‘”#[(]# ' ā‰ˆ 4.5

3.2

1 5

1

5

T#[(]# ' ā‰ˆ

4.53.230Ā°

š‘…(Ī˜ ā‰ˆ 30Ā°)#[(]# '

š’Ŗ# (

something else...

ā€¢Good hardware for robotics is important

ā€¢Good software is also essential!

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 23

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 24

HW1

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 25

Mathematical approach: Transforms

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 26

y

x0 x

y

š“#[(]#[']

ā„±"

ā„±#[%]

ā„±#[']

ā„±#[(]

ā„±#[)]

ā„±#[*]

often: ā„±" =m ā„±#['] ā‡’ š“#[']" = š‘–š‘‘

š“#[%]#[(]

š“#[)]#[%]

š“#[*]#[)] ChainingofTransforms

š“ = š“#[+]" š“#[+`(]

#[+]#[+`(]

"

š“ =?#[*]"

Where is the Robot now?

The pose of ā„±#[+] with respect to ā„±"(usually = ā„±#[']) is the pose of the robot at time X.

This is equivalent to š“#[+]"

Affine Transformationā€¢ Function between affine spaces. Preserves:

ā€¢ points, ā€¢ straight linesā€¢ planesā€¢ sets of parallel lines remain parallel

ā€¢ Allows:ā€¢ Interesting for Robotics: translation, rotation, (scaling),

and chaining of thoseā€¢ Not so interesting for Robotics: reflection, shearing,

homothetic transforms

ā€¢ Rotation and Translation: cos šœƒ sinšœƒ š‘‹āˆ’sinšœƒ cos šœƒ š‘Œ0 0 1

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 27

Transform

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 28

Transform between two coordinate frames:

cosšœƒ āˆ’sin šœƒ tstu

sin šœƒ cosšœƒ tvtu

0 0 1

Transform: Operations

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 29

Transform between two coordinate frames (chaining, compounding):

Inverse of a Transform :

Relative (Difference) Transform :

See: Quick Reference to Geometric Transforms in Robotics by Kaustubh Pathak on the webpage!

Chaining :

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 30

š“ = š“#[+]" š“#[+`(]

#[+] ā‰” R# +

" š‘”# +`(# + + š‘”# +

"

R R# +`(# +

# +" =

š‘”#[+`(]"

R#[+`(]"#[+`(]

"

š‘”#[+`(]"w

š‘”#[+`(]"x

1=

cos šœƒ#[+]" āˆ’ sin šœƒ#[+]

" ts#[+]"

sin šœƒ#[+]" cos šœƒ#[+]

" tv#[+]"

0 0 1

ts#[+`(]#[+]

tx#[+`(]#[+]

1

In 2D Translation:

šœƒ#[+`(]" = šœƒ#[+]

" + šœƒ#[+`(]#[+]

R# +`(" =

cos šœƒ#[+`(]" āˆ’sin šœƒ#[+`(]

"

sin šœƒ#[+`(]" cos šœƒ#[+`(]

" =cos šœƒ#[+]

" āˆ’sin šœƒ#[+]"

sin šœƒ#[+]" cos šœƒ#[+]

"

cos šœƒ#[+`(]#[+] āˆ’sin šœƒ#[+`(]

#[+]

sin šœƒ#[+`(]#[+] cos šœƒ#[+`(]

#[+]

In 2D Rotation:

In 2D Rotation (simple):

In ROSā€¢ First Message at time 97 : Gā€¢ Message at time 103 : Xā€¢ Next Message at time 107 : X+1

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 31

š“ = š“#[+]" š“#[+`(]

#[+]#[+`(]

"

š‘”#[+`(]#[+]

x

š‘”#[+`(]#[+]

w

Ī˜#[+`(]#[+]

3D Rotationā€¢ Euler angles: Roll, Pitch, Yaw

ā€¢ L Singularities ā€¢ Quaternions:

ā€¢ Concatenating rotations is computationally faster and numerically more stable

ā€¢ Extracting the angle and axis of rotation is simpler

ā€¢ Interpolation is more straightforward ā€¢ Unit Quaternion: norm = 1ā€¢ Scalar (real) part: š‘ž' , sometimes š‘žzā€¢ Vector (imaginary) part: qā€¢ Over determined: 4 variables for 3 DoF

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 32

i2 = j2 = k2 = ijk = āˆ’1

Transform in 3D

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 33

š“š€u = Rtu ttu0(s) 1

= ttu

Ī˜tu=

ttu

q}tu

Rotation Matrix 3x3

yaw = Ī±, pitch = Ī², roll = Ī³

Ī˜ ā‰œ šœƒ~,šœƒļæ½, šœƒxļæ½

tu

Matrix Euler Quaternion

In ROS: Quaternions! (w, x, y, z) Uses Bullet library for Transforms

KINEMATICS

Mobile Robotics ShanghaiTech University - SIST - 24.11.2015 34

Wheel Kinematic Constraints: Assumptionsā€¢ Movement on a horizontal planeā€¢ Point contact of the wheelsā€¢ Wheels not deformableā€¢ Pure rolling

ā€¢ vc = 0 at contact pointā€¢ No slipping, skidding or sliding ā€¢ No friction for rotation around contact pointā€¢ Steering axes orthogonal to the surface ā€¢ Wheels connected by rigid frame (chassis)

Mobile Robotics

rā‹…Ļ•!

v

P

YR

XR

Īø

YI

XI

35ShanghaiTech University - SIST - 24.11.2015

Forward Kinematic Model: Geometric Approach

Mobile Robotics 36ShanghaiTech University - SIST - 24.11.2015

Inverse of R => Active and Passive Transform: http://en.wikipedia.org/wiki/Active_and_passive_transformation

Mobile Robot Kinematics: Non-Holonomic Systems

ā€¢ Non-holonomic systemsā€¢ differential equations are not integrable to the final position. ā€¢ the measure of the traveled distance of each wheel is not sufficient to

calculate the final position of the robot. One has also to know how this movement was executed as a function of time.

s1L s1R

s2L

s2R

yI

xI

x1, y1

x2, y2

s1

s2

s1=s2 ; s1R=s2R ; s1L=s2L

but: x1 ā‰  x2 ; y1 ā‰  y2

Mobile Robotics 37ShanghaiTech University - SIST - 24.11.2015