Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics...

29
| | Autonomous Systems Lab 151-0851-00 V Lecture: Tuesday 10:15 – 12:00 CAB G11 Exercise: Tuesday 14:15 – 16:00 every 2nd week Marco Hutter, Michael Blösch, Roland Siegwart, Konrad Rudin and Thomas Stastny 13.10.2015 Marco Hutter Robot Dynamcis - Legged Robots 1 Robot Dynamics Legged Robotics

Transcript of Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics...

Page 1: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

151-0851-00 VLecture: Tuesday 10:15 – 12:00 CAB G11Exercise: Tuesday 14:15 – 16:00 every 2nd week

Marco Hutter, Michael Blösch, Roland Siegwart, Konrad Rudin and Thomas Stastny

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 1

Robot Dynamics Legged Robotics

Page 2: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Legged robot = dynamically unstable, highly non-linear and hybrid system Floating base unactuated coordinates (c.f. flying machine) Multiple legs and arms complex and redundant system properties Changing contacts constraints and impacts

Some examples of kinematics and dynamics as learned in previous lectures Estimate body posture (position and orientation) Foot placement (inverse kinematics problem) Contact force to adjust net force/torque on main body (“sort of” inverse dynamics)

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 4

Legged RoboticsApplication of kinematics and dynamics

Page 3: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Simple quadruped w/ point feet 3*4=12 joint actuators 6 unactuated base coordinates

Contact constraints Foot point is not allowed to move

Chose the joint speed such that this constraint is satisfied

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 5

Kinematic Structure of Mobile RobotsLegged robot

Generalized coordinates

b

r

Un-actuated base

Actuated joints

0F Fr J

F Fr J 0

0

FN

b

r

Page 4: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Forward instantaneous kinematics

Inverse instantaneous kinematics non-singular and non-redundant

Singular:

Redundant:

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 6

Null-Space KinematicsRecapitulation of singularity and redundancy

s sr J

s sr J

s srank length r length n J 1s s J J

1

2= minimizes T T

s s s s s sr J J J J J

1

2= minimizes while T T

s s s s s sr J J J J J

Page 5: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

In a redundant system, we can achieve multiple goals (instead of minimizing ) Use stacked Jacobian Task 1: end-effector velocity Task 2: end-effector rotation rate

Combined:

Inversion:

What happens if you choose too many tasks to be fulfilled?

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 7

Null-Space KinematicsHow to deal with redundancy

2

Pr J

R J

P

R

r

JJ

1 1

n n

x

x

J

J

11

n n

x

x

J

J

1 1

n n

x

x

J

J

P

R

r

JJ

Page 6: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

We can also achieve multiple tasks by successive null-space projection

Task 1: has the solution with N being the null-space projector of J : e.g.and an arbitrary vector that does not influence task 1

Proof:

Task 2: fulfill , while ensuring that task 1 is not violated

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 8

Null-Space KinematicsHow to deal with redundancy

1 1x J 1 1 1 0x J N

1 1 1 1, null N J J N 0 1 1 1 N I J J

0

1 1 1 1 1 1 0 1x x x J J J N

2 2x J

0 2 2chose to fulfill x J

2 2 2 1 1 1 0

0 2 1 2 2 1 1

1 1 1 2 1 2 2 1 1

x x

x x

x x x

J J J N

J N J J

J N J N J J

2

2 2

1 1

min

s.t. 0

x

x

J

J

=

Page 7: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Quadrupedal robot Static walking 3 legs in stance [NR 1,2,3] 1 in swing [NR 4]

9

Kinematics of Floating Base / Mobile Systems

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots

Page 8: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Quadrupedal robot Static walking 3 legs in stance [NR 1,2,3] 1 in swing [NR 4]

1. How many generalized coordinates?

2. How many base coordinates?3. How many actuated joint

coordinates?4. How many contact constraints?

10

Kinematics of Floating Base / Mobile Systems

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots

Page 9: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Quadrupedal robot Static walking 3 legs in stance [NR 1,2,3] 1 in swing [NR 4]

5. Write down the contact constraint6. How many DoFs remain

adjustable?7. Which DoFs remain adjustable?

11

Differential Kinematics

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots

Page 10: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Quadrupedal robot Static walking 3 legs in stance [NR 1,2,3] 1 in swing [NR 4]

8. Given a desired swing velocitywhat is the generalized velocity?

9. Is it unique?10. Is it possible to follow the desired

swing trajectory without moving the joints of leg 4? How?

12

Inverse Differential Kinematics

4F

desI OPr

4, desI OPf r

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots

Page 11: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

There exist different formulations for “moving the foot (task1) while keeping the base position and orientation (task2)”. Write down the solution for A and B!

What is the difference? What happens in singular configs?

Task 1: contact constraints foot motionTask 2: base position base orientation

A) Single Task

B) Null-space motion

13

Kinematic Singularity

1 1

2 2

xx

JJ

1

21 1

3

4 4

0

0,

0

I OP

I OP

I OP

desI OP I OP

x

r

JJ

JJJ

2 2

0,

0I OB

I BRot

x

JJ

J

1 1 1 0

2 2 1 1 1 0 2

0 2 1 2 2 1 1

x

x x

x x

J N

J J J N

J N J J

2min x J

2

1 1min x J 2

2 2

1 1

min

s.t.

x

x

J

J 0

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots

Page 12: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

EoM from last time

Not all joint are actuated

Selection matrix of actuated joints

Contact force acting on system

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 14

Dynamics of Mobile RobotsLegged robot

Generalized coordinates

b

r

b

r

Un-actuated base

Actuated joints

• Quaternions• Euler angles• …

r b g M

Tb g M S

6n n n S 0 I r S

sF

, exerted by robotTs s

TFb g JM S

Manipulator: interaction forces at end-effectorLegged robot: ground contact forcesUAV: lift force

, acting on systemT T

s sFb g JM S

Page 13: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Equation of motion without actuation

Add actuator for the pendulum Action on pendulum Reaction on cart

Add spring to the pendulum (world attachment point P, zero length 0, stiffness k) Action on pendulum

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 15

RecapitulationCart pendulum

2

2

0cos sin0

sincos 0c p p p

pp p p

gb

m m lm lmm gllm m l

M

g

,p pm

,c cm {I}

x

l 0 1Rp J

aa

p aF

c aF

0 0Rc J0T

a

F

J

,s sP x y

l 2 sinx sF k x l x

2 cosy sF k l y x

sy

FF

F

2 sin2 cos

1 2 cos0 2 sin

ss

x lr

l

lrl

J

2 cos sinxT

sx y

FF

l F F

J

Page 14: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Write down the equation of motion for an actuated cart pendulum

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 16

RecapitulationCart pendulum

g

,p pm

,c cm {I}

x

l

l

M

Page 15: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Write down the equation of motion for an actuated cart pendulum

Action on cart

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 17

RecapitulationCart pendulum

g

,p pm

,c cm {I}

x

lactF

c actF F

1 0Pc J0actT F

F

J

l

actF

Page 16: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

External forces from force elements or actuator

E.g. soft contact

Aerodynamics

External forces from constraints Equation of motion (1)

Contact constraint (2)

Substitute in (2) from (1) (3)

Solve (3) for contact force

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 18

External Forces Some notes

T Ts sb g F M J S

s p des dF k r r k r

12s v LF c Ac

0s s sr J J 0s sr J

1 0T Ts s s s sr b g F J M S J J

11 1T Ts s s s sF b g

J M J J M S J

Page 17: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Equation of motion (1) Cannot directly be used for control due to the occurrence of contact forces

Contact constraint

Contact force Back-substitute in (1),

replace and use support null-space projection

Support consistent dynamics

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 19

Support Consistent Dynamics

T Ts sb g F M J S

0s s sr J J

11 1T Ts s s s sF b g

J M J J M S J

11 1T Ts s s s s

N I M J J M J J

T T T TS S Sb g N M N N S

s s J N 0s s J J

Page 18: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Support Consistent Dynamics Goal: Keep feet in ground contact

Move the center of gravity

Desired acceleration given by

Necessary joint torque

Applying this torque to the robot will make the CoG move the desired way and ensure that the feet remain in ground contact

Inverse dynamics has an associated null-space projectorwhich allows to change the torque and ground reaction forces without changing the motion!

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 20

Inverse Dynamics for Floating Base RobotsBehavior as multi-task execution

T T T TS S Sb g N M N N S

!0s s sr J J

!

,CoG CoG CoG CoG desr r J J

,

0s sdes

CoG desCoG CoGr

J JJ J

ˆ ˆˆ ˆ ˆT T TS S des b g

N S N M

Expressed as one task, see previous slides for null-space projection

0ˆ T T

Snull N S

Page 19: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Floating base system with 12 actuated joint and 6 base coordinates (18DoF)

Generalized coordinates DON’T correspond to the degrees of freedom Contact constraints!

Minimal coordinates (= correspond to degrees of freedom) Require to switch the set of coordinates depending on contact state (=> never used)

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 21

Hybrid SystemDegrees of freedom and controllability

Total constraints

Internal constraints

Uncontrollable DoFs

0

0

6

3

0

3

6

1

1

9

3

0

12

6

0

Page 20: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

If a leg makes contact, it comes to immediate rest Consider the dynamics at a single point of time

Foot after contact is at rest

Impulse results to

Change in velocity

Post-impact velocity

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 22

Hybrid SystemImpulse

0{ }

T Ts s

t

b g F dt M J S 0T

s s M J F

0s sr J

11 Ts s s s

J M J J F s sr

Λ

1 Ts s s M J Λ J

1 Ts s s s I M J Λ J N

Page 21: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

151-0851-00 VLecture: Tuesday 10:15 – 12:00 CAB G11Exercise: Tuesday 14:15 – 16:00 every 2nd week

Marco Hutter, Michael Blösch, Roland Siegwart, Konrad Rudin and Thomas Stastny

13.10.2015Marco Hutter Robot Dynamcis - Legged Robots 23

Case StudyModeling and Control of StarlETH

Page 22: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Various Robust GaitsFrom careful static walk to dynamic run

static walk trotting over slippery obstacles

gait transition (walk to trot) running trot (flight phase)

Page 23: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Various Robust GaitsFrom careful static walk to dynamic run

bounding high jump

pronking long jump

Page 24: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

How to Control a (Legged) RobotOverview

Global Localization

Mapping

Terrain perceptionActuatorControlBehavior

GenerationBehaviorControl

Locomotion Controller

Where am I?What is my local environment?

How do I move?

How should I move the main body?Where should I step?

How can I avoid slippage?

How can I optimally achieve the desired behavior?

How do I control my actuator?

State estimation

Page 25: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Motion Generation

1. Stepping sequence (timing) defined by gait pattern

2. Main body motion Base position/velocity Attitude and rotation rates

3. Stepping location

Walk Trot Gallop

, ,12

FBF HC des st R HC des HC HCr r T k r r h

, b bt t , b br t r t

Page 26: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Kinematics and Dynamics in ControlInverse kinematics for swing leg control

Foot point in base frame

Expressed in world frame Expressed in body frame

=> inverse kinematics in body frame

{I}

* * *

estimated base configuration

,B OB Bx r

,

planned swing leg trajectory

I OF desr t

, ,*

OB B Os F desF der rr

,I BF I BF r br r

B BF B BF rr r

, , ,swing le*

g,*

I OFB BF des B BF desB OB B e rdBI srr r r R

Page 27: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Kinematics and Dynamics in Control(simple) whole body control

Adjust joint torques to track the swing leg

to move the base

ensure contact constraint

fully defines the motion of the system12 actuated + 6 unactuated = 18 DOF6 motion + 9 constraints + 3 swing leg = 18

Inverse dynamics control

{I}

* * *

estimated base configuration

,B OB Bx r

, , ,

target base configuration

( ) ( ), ( )B des OB des B desx t r t t

, ( )B desB B B x tx J J

0s s sr J J

,

planned swing leg trajectory

I OF desr t

, ( )OF desOF F F r tr J J

ˆ ˆˆ ˆ ˆT T TS S des b g

N S N M

1

0

( )( )

F

B

F

des B B

s s

OF

xr t

t

J JJ JJ J

If more tasks, use pseudo-inverse

Page 28: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

Locomotion as Optimization Problem

Write inverse dynamics as constraint (prioritized) optimization

Step 1: move bases.t.

Step 2: move swing leg

s.t.

Last step: minimize e.g torque or tangential contact forces s.t. all other task are still fulfilled

, , 2i is n s tF F , ,minis n nF F

Ts sb g F M J S

, (min )B des B Bx t

J J

<= equation of motion holds<= minimal normal contact force<= contact force in friction cone

, (min )OF des F Fr t

J J

Ts sb g F M J S

, ,minis n nF F

, , 2i is n s tF F

1 , ( )B des B Bc x t J J <= higher priority task is not influenced<= equation of motion holds<= minimal normal contact force<= contact force in friction cone

min ,minis tF

Page 29: Robot Dynamics - ETH Z...Marco Hutter Robot Dynamcis - Legged Robots 113.10.2015 Robot Dynamics Legged Robotics Autonomous Systems Lab | | Legged robot = dynamically unstable, highly

||Autonomous Systems Lab

StarlETHExample: walking on uneven ground