SBRML Part1 Differential Geometry in Robotics

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Differential Geometry in

Robotics
Differential Geometric Concepts

• Motivation
• Manifolds
• Tangent vectors and tangential space
• Cotangent vectors and cotangent space
• Transformation of vectors and covectors
• Tensors
• Coordinate transformations for tensors

Sensor Based Manipulation and Locomotion


Motivation
First remove again all certainties…

What is a vector in robotics?


Usual understanding: an element of a metric Euclidian space

Example: joint position, joint velocity, and joint acceleration


joint torques
Cartesian positions, Cartesian velocities

Cartesian accelerations
Cartesian forces/torques

Sensor Based Manipulation and Locomotion


What's to object against?
1. All these "vector" quantities transform in different ways between
coordinate systems
x  ( x1, x 2 )
x  T (q ) T - Homogeneous q2 , q 2 , 2
transformation
x  J (q )q J - Jacobian matrix x
q1, q1,1
A F  ( Fx , Fy )
  J T ( q) F
J (q)
q x

Joint dynamics Cartesian dynamics


J T (q)
 F
Obviously, there is a richer structure behind, than vector spaces
A differential geometry perspective enables a deeper understanding
of these aspects
Sensor Based Manipulation and Locomotion
What's to object against?
2. The six-dimensional vector spaces of Cartesian velocities, rotational
velocities (twists) and of Cartesian forces and torques (wrench) are not
metric spaces!

Neither the scalar product y1T  y2 , nor the induced


vector norm y  yT  y
can be defined in a physically meaningful way, namely:
- independent of the choice of the coordinate system
- independent of the units

Sensor Based Manipulation and Locomotion


What's to object against?
Example:
x1  [1,1,1,2,2,2]T x2  [2,2,2,1,1,1]T  x1  x2  0
with velocity [m/s], angular velocity [rad/s]

but
with velocity [mm/s], angular velocity [rad/s]

x1  [1103 ,1 103 ,1 103 ,2,2,2]T


 x1  x2  0
x2  [2 103 ,2 103 ,2 103  1,1,1]T

 care is needed when generalizing the notion of orthogonality


(familiar from translations) to twist und wrenches

Sensor Based Manipulation and Locomotion


What's to object against?
3. Rotations in 3D are not described by a vector space
(in contrast to translations)
- for example, rotations are not comutative

Further care is therefore needed when generalizing the concepts of stiffness,


potentials, controller design etc. from translational to rotational case.

Sensor Based Manipulation and Locomotion


Manifolds
What is the space of all configurations of the robot tip?
A differential manifold is a topological space which is locally diffeomorphic
to the Euclidian space R m .
A diffeomorphism is a differentiable function which is invertible and whose
inverse is differentiable TCP

Example: x x
M x

x
R2
R 2 x x On which manifold does the
TCP of the following robot move?
And its joints?
why only locally?:

S2 T2
x
x
x
x
x x
Sensor Based Manipulation and Locomotion
Manifolds: Examples I
1. The earth
singularity at the poles manifold M
local
map
around x

local coordinate: x in the vicinity local (polar) local (conical)


Geogr. longitude and latitude of the south pole coordinates (r,) coordinates

Local coordinates: to each point x in M there exists one subset U in M


which contains x and a bijective mapping  mapping
 : U  U U  R n U map image
x  R n local coordinate

To describe a manifold one needs in general several, overlapping maps


=> Atlas
Change of coordinates: the maps (U ,  ) and (V ,  ) contain x x   ( 1 ( x ))

Sensor Based Manipulation and Locomotion


Chicago Cloud Gate

Sensor Based Manipulation and Locomotion


Embedded Manifolds
An embedded manifold is a subspace of R n , defined through
the solution set of a vector function h : R  R
n p

h1 ( x1 ,  , xn )  0
 (1) n p
h p ( x1 , , xn )  0
 (h1, , h p )
( x0 )
If there exist p coordinates, such that the Jacobian  ( x1,, x p ) in a point
x0  R n is invertible, then the manifold has the dimension m=n-p in the
vicinity of the point and (1) can be locally solved. (implicit function theorem)
x1  f1 ( x p 1 ,, xn )

x p  f p ( x p 1 ,, xn )
( x p 1 ,, xn  p m ) are then m local coordinates in the vicinity of x0

Sensor Based Manipulation and Locomotion


Embedded Manifolds: Examples
x2 R2
h1 ( x1 , x2 )  ax1  bx2    0
1
x1 - Local coordinates x2   (ax1   )
x1
b

x3 h1 ( x1 , x2 , x3 )  ax1  bx2  cx3    0


1
x1 , x2 - Local coordinates x3   (ax1  bx2   )
c
R ´3
x2
x1
x3 h1 ( x1 , x2 , x3 )  ax12  bx22  cx32  r  0
R3
E2 1
x1 , x2 - Local coordinates x3  (r  ax12  bx22 )
(e.g. for the northern c
x2 hemisphere)

x1
Sensor Based Manipulation and Locomotion
Manifold Examples: Examples II
2. Orientation of a rigid body
described by a rotation matrix R3x 3
properties: RT R  I - orthogonal
det( R)  1 - right-handed coordinate system
The configuration space is the set of all rotation matrices and is
denoted as SO(3) – Special Orthogonal Group
Exercise: check that SO(3) fulfills the group definition
(closure, associativity, identity element, inverse element)
however not the additional abelian group requirement (comutativity)
9
SO(3) is a 3 – dimensional manifold, embedded for example in R
which is isomorph to the set of all 3x3 matrices

Local coordinates:
- Euler angles () (in all alternatives)
- Axis-angle representation (r, )
- Roll-Pitch-Yaw angles ()

Smallest singularity-free representation: R 4, e.g. quaternions

Sensor Based Manipulation and Locomotion


Addition: Rotational Representations
(Repetition from "Grundlagen Intelligenter Roboter")
Roll-Pitch-Yaw

Axis-angle Representation  
 r11  r22  r33  1   k k 1
  cos 1 
 2 
r32  r23 
1   Singular for
k r  r
2 sin  
13 31 
 r21  r12 
  n !

Quaternions (Euler Parameter) not minimal, singularity-free, global


   
 
  0,1,2,3  cos , k sin 
 2 2
Sensor Based Manipulation and Locomotion
Manifolds: Examples III
3. Configuration of a rigid body in three-dimensional space
described by a homogeneous transformation T4x 4  R p
T  p position
01x 3 1 
The configuration space is the set of all homogeneous transformations and
is denoted as SE(3) –Special Euclidian Group (= SO(3)x R 3 )
6 – dimensional manifold
Local coordinates: x = (px,py,pz,) (with all alternatives)
4. configuration of a (6-dimensional) robot Q
joint angles q: R 6 - global map
Locally, in the vicinity of the point q0, the forward kinematics
x=f(q) can be regarded as a mapping between the coordinates
of two manifolds.

5. The configuration space and the workspace


of a non- planar, 2-joint robot with endless
turning joints is each a torus
Sensor Based Manipulation and Locomotion
Tangent Vectors and Tangential Space
(contravariant vectors or simply vectors)
x
Given an m - dimensional manifold M,
we define at each point x the tangent space
TxM as the m-dimensional vector space of all v1 v2
velocities passing through x (along the manifold).

Only these quantities are called "vectors" in differential geometry.


They are represented as column vectors.
Examples:  p x 
 q1   p 
  y
   p z 
q   qi  vector on Q x    vector on SE3
   x 
  y 
q n  vector on SO3
 
 z 
joint velocities in R n Cartesian velocities in SE3
Sensor Based Manipulation and Locomotion
Cotangent Vectors and Cotangent Space
(covectors, covector space)
The cotangent Space Tx*M at a point x of the manifold M is
the linear vector space of all linear functionals
 : Tx M  R
The elements  of the cotangent space are called covectors

If the manifold is m-dimensional, the cotanget space has also


dimension m.  fx 
  f 
Examples:  1   y
 f 
   i  f  z
   mx 
 m y 
 n   
 mz 
torque in joint space Cartesian wrench
 (q )   T  q  P f ( x )  f T  x  P
power
Sensor Based Manipulation and Locomotion
Transformation of Vectors and Covectors
Why is it important to distinguish between vectors and covectors?

Vectors and covectors transform in a different way between coordinate


systems or between manifolds.
Example:
The forward kinematics x=f(q) is a local mapping between Q und SE3
Velocity transformation:
df (q ) f (q )
x   q  J (q )q
dt q
Jacobian
Since the power P is independent of representation Pq  Px :
x
Px  f T x  f T J ( q ) q Pq Px
=>   J ( q ) f
T
Pq   T q
f
Remark: the product between vector and covector is thus well defined, i.e.
invariant with respect to the change of coordinates or to representation manifolds for a given physical system
Sensor Based Manipulation and Locomotion
Transformation of Vectors and Covectors
Why is it important to distinguish between vectors and covectors?

n
Generally, if  is a mapping between two manifolds M m and N with
m
x - coordinates of M y   ( x)
y - coordinates of N n

then the vectors transform in a contravariant manner:


y
y  x  J ( x) x
x
while the covectors transform covariantly:

 y 
T

 x     y  J T ( x) y
 x 

Sensor Based Manipulation and Locomotion


Tensors
What are the remaining quantities in robotics? How do they transform?

Robot dynamics:
M (q )q  c(q, q )  g (q )  
Simple PD controller with gravity compensation:
  g (qd )  K (qd  q )  D (q d  q )

A tensor of type (p,q) is a multilinear mapping (or operator)


A :T xM   T xM  Tx*M   Tx*M  R p times covariant
   q times contravariant
p q
Example:
1. A covector is a tensor of type (1,0), thus covariant
A   , v  Tx M  (v)   T v  i vi  R  (=P for    , v  q )
i
2. A vector is a tensor of type (0,1), thus contravariant
A  v ,   Tx*M v( )  vT  vii  R  (=P for    , v  q )
i
Sensor Based Manipulation and Locomotion
Tensors
What are the remaining quantities in robotics? How do they transform?
Example:
3. M, K, D are tensors of type (2,0), thus twice covariant
A  aij v v
1, 2  Tx M A ( v ,
1 2v )  v T
1 Av2  aij v1i v2 j  R 
1 i, j
- For A  M ( q ), v1 , v2  q
2 mass matrix
1 T
A(v1, v2 )  q M (q)q  T (q, q ) R
2 Kinetic energy
- For A  D, v1, v2  q damping matrix
Heat power dissipated
A( v1 , v2 )  q Dq  PD  R
T
by the viscous damper
1
- For A  K , v1, v2  q Stiffness matrix
2
1 T Potential energy of
A(v1, v2 )  q Kq  E p  R the (m-dim.) spring
2
Remark: q is only approximately (for very "small increments") in tangent space. A more precise definition of Ep will follow later.
Sensor Based Manipulation and Locomotion
Tensors
What are the remaining quantities in robotics? How do they transform?

Remark: from the definition it follows that, when applying a covariant


tensor on a vector, the result will be another covariant tensor, whose
order is reduced by 1

Example

 D  Dq
Remark: we see that formally, a scalar
E D   D q
T
is a tensor of order zero
(1,0) (2,0) (0,1) (0,0) (1,0) (0,1)

4. Tensors of type (1,1)


Why can x be regarded
- linear dynamical system: x  Ax as a vector for linear systems?

(0,1) (1,1) (0,1)

The system matrix in this case is of type (1,1)


- one time covariant, one time contravariant
Sensor Based Manipulation and Locomotion
Tensors
What are the remaining quantities in robotics? How do they transform?

Examples:
1
5. M , K 1 are tensors of type (0,2), thus two times contravariant
A  aij 1, 2  Tx*M A(1, 2 )  1T A 2   aij1i 2 j  R
i, j
1 1
- For A  M ( q ), 1, 2  p ( p  M ( q ) q ) :momentums
2
1 T 1 mobility matrix
A(1, 2 )  p M (q ) p  T (q, p ) R
2 kinetic energy

1 1
K , 1, 2   e
Elastic torque
- For A 
2 potential energy
1 T 1 of the (m-dim.) spring
A(1 , 2 )   e K  e  E p  R
2
compliance matrix

Sensor Based Manipulation and Locomotion


Supplemental Slide Tensors
Example:
6. Coriolis and centrifugal forces:
ck (q, q )   cijk qi q j
i, j

tensor of type (1,0) tensor of type (3,0)


(covector)

 mkj mki mij 


cijk  
1
   m-elements of the mass matrix
2  q q j qk 
 i

Sensor Based Manipulation and Locomotion


Tensor Coordinate Transformations
Why do we need to differentiate between tensor types?

m n
Generally, given a mapping  between the manifolds M and N with
m
x coordinates of M
y   (x)
y coordinates of N n

Basic idea: the scalar quantities from the tensor definition are always
conserved when performing coordinate transformations (energy, power, ... ).

1. Tensors of type (2,0)


E y  vTy Ay v y  vTx JT ( x) Ay J ( x)v x
=> Ax  JT ( x) Ay J ( x)
E x  vTx Ax v x
congruence-transformation
2. Tensors of type (1,1)
E y   Ty Ay v y   Tx J1 ( x) Ay J ( x)v x
Ax  J1 ( x) Ay J ( x)
E x   Tx Ax v x =>
similarity transformation

Sensor Based Manipulation and Locomotion


Scalar Products and Metrics
Vector product and vector norm in in Euclidian space
1
u, v  u v   ui vi
T
u  u, u 2
i

Generalization on manifolds
 u Mv   ui M ij vi
1
u, v M
T
u M
 u, u M
2
i, j

Therein, M is a (positive definite - p.d.) tensor (also called metric tensor) of


type (2,0) and must be transformed accordingly when changing coordinates!

Example: For velocity vectors q , when choosing the mass matrix M  12 M ( q)


2
as a metric, the norm q M represents the kinetic energy
(this also solves the problem of different units for the vectors)

Remark: remember that a vector cannot be applied directly on another vector,


but only on a covariant tensor.

Sensor Based Manipulation and Locomotion


Reciprocal Twists and Wrenches
Orthogonality between vectors
u  v   ui vi  0
i
is therefore not well defined in differential geometry,

We can talk instead in a consistent way only about a reciprocal relation of


vectors and a covectors:

A vector v and a covector  are called reciprocal, if:


 T v (   (v)  v( )  i vi )  0
i

Example: For   f , v  x : a wrench and a twist are reciprocal, if the power


transfered by the pair is zero.

Hybrid force/position control: One can control m linearly independent twists


and (6-m) wrenches, which are reciprocal to the m twists.
Sensor Based Manipulation and Locomotion
Tangent Bundle
(what is the state space of a mechanical system?)
n
q1
q coordinates of M , the configuration space of
a mechanical system
v1
q2
v2
the state w of the mechanical system
can be regarded as local coordinates
of a 2n manifold, the tangent bundle,
denoted by
So the tangent bundle is the union of the manifold M and
all tangent spaces at all points of the manifold
is a tangent vector at the point w on

Coordinate transformation: ,

,
0
,
Sensor Based Manipulation and Locomotion

You might also like