human body motion analysis
TRANSCRIPT
-
8/13/2019 Human Body Motion Analysis
1/70
Human Motion AnalysisLecture 2: Human Body Representations
Raquel Urtasun
TTI Chicago
March 1, 2010
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 1 / 65
-
8/13/2019 Human Body Motion Analysis
2/70
Contents of todays lecture
Useful definitions
Parameterizations of articulated figuresDirect kinematics
Inverse kinematics
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 2 / 65
-
8/13/2019 Human Body Motion Analysis
3/70
Materials used for this lecture
For the exponetial map, look at F. Grassia paper entitled PracticalParameterization of Rotations Using the Exponential Map. 1998.
For articulated chains and the inverse kinematics, these slides arestrongly based on Paolo Baerlocher thesis, EPFL 2383 (2001) entitledInverse kinematics techniques of the interactive posture control of
articulated figures. In particular chapter 4 and parts of chapter 5.Some slides are also based on Steve Rotenbergs course onOrientation and Quaternions at UCSD.
Some figures and slides are based on the book by A. Watt and M.
Watt entitled Advanced Animation and Rendering Techniques:Theory and practice.
For more information about quaternions see K. Shoemake tutorial atsiggraph 1985 entitled Animating Rotation with Quaternion Curves.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 3 / 65
-
8/13/2019 Human Body Motion Analysis
4/70
Some useful definitions: kinematics
Definition
Kinematicsis the study of motion independent of the underlying forcesthat produced that motion.
It includes position, velocity and acceleration...
... which are all geometrical and time-related properties of motion.
In contrast with dynamics, which specify the causes of motion.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 4 / 65
-
8/13/2019 Human Body Motion Analysis
5/70
Some useful definitions: articulated figure
Definition
Anarticulated figure is a structure that consists of a series of rigid linksconnected at joints.
Figure: (left) A simple 2 link structure. (right) Articulated human figure. [Watt]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 5 / 65
-
8/13/2019 Human Body Motion Analysis
6/70
Some useful definitions: DOF
Definition
The number ofdegrees of freedom (DOF) of an articulated structure isthe number of independent position variables necessary to specify the stateof the structure.
Figure: A manipulator with 3 degrees of freedom [Watt]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 6 / 65
-
8/13/2019 Human Body Motion Analysis
7/70
Some useful definitions: end effector
Definition
The free end of an open chain of links is called an end effector.
The head, hands and feet for example in a human.
Figure: Illustration of an end-effector. [Baerlocher01]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 7 / 65
-
8/13/2019 Human Body Motion Analysis
8/70
Some useful definitions: state vector
Definition
Thestate space of an articulated figure is the vector space of all possibleconfigurations.
A set of independent parameters defining the positions, orientationsand rotations of all the joints that form the articulated figure forms a
basis of the state space.The articulated figure configuration is described by the state vector
= (1, 2, , N)
where in this case the articulated figure has Ndegrees of freedom.The dimensions of the state space are usually the DOF of thearticulated figure.
Animating an articulated figure reduces to finding an N-dimensionalpath in its state space.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 8 / 65
-
8/13/2019 Human Body Motion Analysis
9/70
-
8/13/2019 Human Body Motion Analysis
10/70
Revolute joint
Simplest joint that allows rotational motion
Rotation occurs along a single axis: usually flexion or twist.
Parameterized in terms of a single DOF, , such that R()
Typically used for the interphalangeal joints of the hands
Figure: A simple revolute joint. [Baerlocher01]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 10 / 65
-
8/13/2019 Human Body Motion Analysis
11/70
Flexion/extension joints
Generalization of the revolute joint to 2 DOF.
Typically used for the elbow and knee joints.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 11 / 65
-
8/13/2019 Human Body Motion Analysis
12/70
Ball-and-socket joints
Consist on three DOF. Its the more mobile of the purely rotationaljoints
It has very different parameterizations
Figure: A Ball-and-socket joint. [Baerlocher01]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 12 / 65
-
8/13/2019 Human Body Motion Analysis
13/70
Parameterization of the ball-and-socket joint
Different types of parameterization
Euler angleAxis angles, also known as exponential map or versorSwing and twistQuaternions
No single parameterization is best.
It depends on the application, e.g., quaternions for interpolation, axisangles for inverse kinematics.
All three DOF parameterizations have at least one singularity.
Quaternions do not have at the cost of been a four DOFparameterization.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 13 / 65
-
8/13/2019 Human Body Motion Analysis
14/70
Euler angles: definition
The most popular parameterization of orientation space.
A general rotation is described as a sequence of rotations about threemutually orthogonal coordinate axes fixed in the space.
The rotations are applied to the space and not to the axis.
Figure: Principal rotation matrices: Rotation along the x-axis. [Watt]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 14 / 65
-
8/13/2019 Human Body Motion Analysis
15/70
Euler angles: definition
The most popular parameterization of orientation space.
A general rotation is described as a sequence of rotations about threemutually orthogonal coordinate axes fixed in the space.
The rotations are applied to the space and not to the axis.
Figure: Principal rotation matrices: Rotation along the y-axis. [Watt]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 14 / 65
-
8/13/2019 Human Body Motion Analysis
16/70
Euler angles: definition
The most popular parameterization of orientation space.
A general rotation is described as a sequence of rotations about threemutually orthogonal coordinate axes fixed in the space.
The rotations are applied to the space and not to the axis.
Figure: Principal rotation matrices: Rotation along the z-axis. [Watt]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 14 / 65
E l l i i
-
8/13/2019 Human Body Motion Analysis
17/70
Euler angles: composition
General rotations can be done by composing rotations over these axis.
For example, lets create a rotation matrix R(x, y, z) in terms of the jointangles x, y, z.
R(x, y, z) =Rx
Ry
Rz=
cycz cysz sy 0
sxsycz cxsz sxsysz+cxcz sxcy 0cxsycz+sxsz cxsysz sxcz cxcy 0
0 0 0 1
withsi= sin(i), and ci= cos(i).
Matrix multiplication is not conmutative, the order is important
Rx Ry Rz=Rz Ry Rx
Rotations are assumed to be relative to fixed world axes, rather than local tothe object
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 15 / 65
E l l d b k I
-
8/13/2019 Human Body Motion Analysis
18/70
Euler angles: drawbacks I
Gimbal lock: This results when two axes effectively line up, resulting in atemporary loss of a degree of freedom.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 16 / 65
E l l d b k I
-
8/13/2019 Human Body Motion Analysis
19/70
Euler angles: drawbacks I
Gimbal lock: This results when two axes effectively line up, resulting in atemporary loss of a degree of freedom. This is a singularity in the
parameterization. 1 and 3 become associated with the same DOF.
R(1,
2, 3) =
0 0 1 0sin(1 3) cos(1 3) 0 0cos(1 3) sin(1 3) 0 0
0 0 0 1
Figure: Singular locations of the Euler angles parametrization (at =/2)
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 16 / 65
E l l d b k II
-
8/13/2019 Human Body Motion Analysis
20/70
Euler angles: drawbacks II
The parameterization is non-linear.The parameterization is modular R() =R(+ 2n), with n
Z.
The parameterization is not unique
[4, 5, 6] such that R(1, 2, 3) =R(4, 5, 6)with i=3+i for all i {1, 2, 3}.
Figure: Example of two routes for the animation of the block letter R [Watt]Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 17 / 65
E l Th
-
8/13/2019 Human Body Motion Analysis
21/70
Euler s Theorem
TheoremEulers theorem: Any two independent orthonormal coordinate framescan be related by a sequence of rotations (not more than three) aboutcoordinate axes, where no two successive rotations may be about the sameaxis.
This means that we can represent an arbitrary orientation as arotation about some unit axis by some angle (4 numbers) (Axis/Angleform).
Alternately, we can scale the axis by the angle and compact it downto a single 3D vector (Rotation vector)
Quaternions and axis angles are possible parameterizations.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 18 / 65
Angular displacement
-
8/13/2019 Human Body Motion Analysis
22/70
Angular displacement
We define the concept ofangular displacement given by R(, n). This is arotation of along the n axis.
Figure: Angular displacement (, n) [Watt]Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 19 / 65
Quaternions
-
8/13/2019 Human Body Motion Analysis
23/70
Quaternions
Quaternions were invented by W.R.Hamilton in 1843.
A quaternion has 4 components
q= [qw, qx, qy, qz]T
They are extensions of complex numbers a+ ibto a 3D imaginaryspace, ijk.
q=qw+qxi +qyj +qzkWith the additional properties
i2 =j2 =ijk =1i=jk =
kj, j=ki =
ik, k= ij =
ji
To represent rotations, only unit length quaternions are used
|q|2 =
q2w+q2x+q
2y+q
2z
This forms the surface of a 4D hypersphere of radius 1.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 20 / 65
Quaternions
-
8/13/2019 Human Body Motion Analysis
24/70
Quaternions
Quaternions form a group whose underlying set is the four
dimensional vector space R4, with a multiplication operatorthatcombines both the dot product and cross product of vectors
The identity rotation is encoded as q= [1, 0, 0, 0]T.
The quaternion q= [qw, qx, qy, qz]T encodes a rotation of
= 2 cos1(qw) along the unit axisv= [qx, qy, qz].Also a quaternion can represent a rotation by an angle around thevaxis as
q= [cos
2, sin
2v]
withv= v|v| .
Ifv is unit length, then q will also be.
Proof: Exercises.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 21 / 65
Quaternion to rotational matrix
-
8/13/2019 Human Body Motion Analysis
25/70
Quaternion to rotational matrix
To convert a quaternion q= [qw, qx, qy, qz] to a rotational matrixsimply compute
1
2q2y
2q2z 2qxqy+ 2qwqz 2qxqz
2qwqy 0
2qxqy 2qwqz 1 2q2x 2q2z 2qyqz+ 2qwqx 02qxqz+ 2qwqy 2qyqz 2qwqx 1 2q2x 2q2y 0
0 0 0 1
A matrix can also easily be converted to quaternion. See references
for the exact algorithm.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 22 / 65
Interpretation of quaternions
-
8/13/2019 Human Body Motion Analysis
26/70
Interpretation of quaternions
Any incremental movement along one of the orthogonal axes in curved space
corresponds to an incremental rotation along an axis in real space (distancesalong the hypersphere correspond to angles in 3D space)
Moving in some arbitrary direction corresponds to rotating around somearbitrary axis
If you move too far in one direction, you come back to where you started
(corresponding to rotating 360 degrees around any one axis)
A distance of x along the surface of the hypersphere corresponds to arotation of angle 2x radians
This means that moving along a 90 degree arc on the hypersphere
corresponds to rotating an object by 180 degrees
Traveling 180 degrees corresponds to a 360 degree rotation, thus getting youback to where you started
This implies that q and -q correspond to the same orientation
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 23 / 65
Quaternion operations: dot product
-
8/13/2019 Human Body Motion Analysis
27/70
Quaternion operations: dot product
The dot product of quaternions is simple their vector dot product
p q=pwqw+ pxqx+ pyqy+ pzqz=|p||q| cos The angle between two quaternions in 4D space is half the angle onewould need to rotate from one orientation to the other in 3D space.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 24 / 65
Quaternion operations: multiplication
-
8/13/2019 Human Body Motion Analysis
28/70
Quaternion operations: multiplication
Multiplicationon quaternions can be done by expanding them intocomplex numbers
pq =
where p= [s, v]T
, and q= [t, w].Ifp represents a rotation and q represents a rotation, thenpqrepresentsp rotated by q.
Note that two unit quaternions multiplied together will result inanother unit quaternion.
Quaternions extend the planar rotations of complex numbers to 3Drotations in space
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 25 / 65
Quaternion operations: others
-
8/13/2019 Human Body Motion Analysis
29/70
Quaternion operations: others
Inverse of a quaternion q= [s, v]T
q1 = 1
|q|2
[s,
v]T
Any multiple of a quaternion gives the same rotation because theeffects of the magnitude are divided out.
Very good for interpolation, Slerp. We will see this later in the class.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 26 / 65
Exponential map or axis-angle
-
8/13/2019 Human Body Motion Analysis
30/70
Exponential map or axis angle
The exponential map maps a vector in3
describing the axis andmagnitude of a three DOF rotation to the corresponding rotation
There are different parameterizations of the exponential map.
We can formulate an exponential map from3 to S3 as follows:
exp(v) =
[0, 0, 0, 1]T ifv= 0;infm=0(
12 v
m) = [sin( 12 )v, cos(12 )]
T ifv= 0.
where =|v|, andv=v/|v|.
This maps v to the union quaternion representing a rotation ofabout v.
The singularity of this parameterization is when v0.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 27 / 65
Robust exponential maps
-
8/13/2019 Human Body Motion Analysis
31/70
Robust exponential maps
The singularity of this parameterization is when v0.
q= exp(v) = [sin( 12 )v, cos( 12 )]T
By arranging the terms we can write
q= exp(v) = [sin(1
2
)v
, cos(1
2
)]T = [sin( 12 )
v, cos(1
2
)]T
This is the sinc function
sin( 12 )
=sinc(
1
2)
Use tailor expansion to compute it if not in standard math libraries
sin( 12 )
1
2+
2
48
4
25 5!+
Good exercise to compute it
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 28 / 65
Axis-angle to matrix
-
8/13/2019 Human Body Motion Analysis
32/70
g
To generate a matrix as a rotation around an arbitrary unit axis v:
v2x +c(1 v2x) vxvy(1 c) + vzs vxvz(1 c) vys 0vxvy(1 c) vzS v2y+c(1 v2y) vyvz(1 c) + vxs 0vxvz(1
c) + vys vyvz(1
c)
vxs v
2z +c(1
v2z) 0
0 0 0 1
where c = cos(), and s = sin().
We can now easily apply rotations to vectors
In the case of the scaled axis-angle, one has to first extract the magnitudeand then rotate along the normalized axis.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 29 / 65
Redundancy of the parameterizations
-
8/13/2019 Human Body Motion Analysis
33/70
y p
The parameterizations that we have seen:Rotational matrix: 9 DOF. It has 6 extra DOF.Axis angles: 3 DOF for the scaled version and 4 DOF for thenon-scaled. The latter has one extra DOF.Quaternions: 4 DOF, 1 extra DOF.
From the Euler theorem we know that an arbitrary rotation can bedescribed with only 3 DOF, so those parameters extra are redundant.
For rotational matrix, we can impose additional constraints if thematrix represent a rigid transform
|a|=|b|=|c|= 1a=b c, b=c a, c=a b
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 30 / 65
Encoding translation
-
8/13/2019 Human Body Motion Analysis
34/70
g
We are using 4 4 matrices since those can also do translation.
cycz cysz sy tx
sxsycz cxsz sxsysz+cxcz sxcy tycxsycz+sxsz cxsysz sxcz cxcy tz
0 0 0 1
with si= sin(i), and ci= cos(i), and t= [tx, ty, tz]T a translation
vector.
Translation can also be encoded in quaternions.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 31 / 65
-
8/13/2019 Human Body Motion Analysis
35/70
Hierarchical representation
-
8/13/2019 Human Body Motion Analysis
36/70
An open-chain structure can be represented by a hierarchy (or tree) ofnodes, that represent either a joint or a segment.
Figure: Human hierarchy. [Baerlocher01]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 33 / 65
Hierarchical representation
-
8/13/2019 Human Body Motion Analysis
37/70
An open-chain structure can be represented by a hierarchy (or tree) of
nodes, that represent either a joint or a segment.
This introduces a parent-child relationship among the nodes, whereeach node has a single parent, except the ancestor of all other nodes,which is the root of the hierarchy.
Each node is placed with respect to its parent node by a localtransformation.
The root is fixed with respect to a global reference frame, but can bepositioned at will in order to place the figure in the world (globalmotion)
In a human model, the pelvis is typically chosen as the root node butsometimes this may be inappropriate and the hierarchy must bere-rooted.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 33 / 65
Types of animation
-
8/13/2019 Human Body Motion Analysis
38/70
Kinematic methods: which describes the motion but not the causes
Direct kinematics: specify trajectories along time
inverse kinematics: specify goals and or end-effectors
Dynamic methods: specify the causes, e.g., laws of physics
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 34 / 65
Direct kinematics
-
8/13/2019 Human Body Motion Analysis
39/70
The advantage of a tree structure is that the direct kinematicsproblem is very easily solved by a recursive traversal of the tree,starting from the root, and evaluating and concatenating the localtransformation matrices.
The body posture can be modified simply by changing the localtransformation matrix of each joint node.
This allows any posture to be set for the articulated figure, evenunfeasible ones since arbitrary rotations and translations can bespecified.
We will see later on the course how to express and enforce joint limits
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 35 / 65
Direct kinematics
-
8/13/2019 Human Body Motion Analysis
40/70
Consider an articulated chain consisting ofn links connected by n
1
joints.
The aim ofdirect kinematics is to determine the end-effectorposition and orientation as a function of the joint variables (i.e.,rotation and translation).
The Denavit-Hartenberg convention allows constructing directkinematics by composing the transformations into one homogeneoustransformation matrix.
T0n =A01
A12
A23
An1n
where Ai1i is the local transformation from joint i 1 to joint i.This can be applied to any open kinematic chain.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 36 / 65
Illustration of direct kinematics
-
8/13/2019 Human Body Motion Analysis
41/70
Figure: Direct kinematics with T0n =A01 A12 A23 An1n in (a) planar case, (b)3D world.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 37 / 65
Inverse kinematics
-
8/13/2019 Human Body Motion Analysis
42/70
Given articulated structure represented with the state vector q, the inversekinematic problem is to determine a solution to the following non-linear
equationx(q) =g
where x(q) and g arem-dimensional vectors expressed in the so-called taskspace.
This expression can integrate as many equations as you want just bystacking them together.
Typicallyx(q) represents the position and orientation of an end-effectorframe, while g is the goal to be reached.
Since a single solution might not necessary exist, we reformulate the problem
as minimizing the following residual errore(q) =||x(q) g||2
Since x(q) is generally non linear, it cannot be solved in general by inversionofx(q).
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 38 / 65
Iterative solution: Newton-Raphon method
-
8/13/2019 Human Body Motion Analysis
43/70
Problem formulationminq
e(q) =||x(q) g||2
Is an iterative procedure based on a linearization of the constraint equationabout an initial point qo, that results in a Jacobian matrix.
By inverting the Jacobian, the resulting set of linear equations can be solvedfor an increment q.
A step on that direction is taken to a new configuration qi that approachesthe solution of the task equation.
By iteratively repeating this process, the system converges towards a localsolution of the residual error.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 39 / 65
Linearization of the task equation
-
8/13/2019 Human Body Motion Analysis
44/70
At iteration i, a first-order linear approximation of the task function usingTaylor series expansion around the current configuration is computed
x(qi + q) =x(qi) + J(qi)q + where J(q) is the m n Jacobian matrix ofx(q)Keeping only the linear terms
x
J(qi)q
where x= g x(qi) is a known desired task increment, and q is theunknown increment in the joints.
Then the next configuration is computed as
qi+1 =qi + q
Because of the non-linearity of the task function, the approximation onlyholds for small task increments.
The error introduce is error= x x(qi+1) x(qi) If the error is too large, the path will be erraticUse line search.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 40 / 65
Computing the Jacobian
-
8/13/2019 Human Body Motion Analysis
45/70
The Jacobian is a multi-dimensional form of the derivative, that maps smallchanges of
qto small changes of the task coordinates
xdx= J(q)dq
The (i,j) component can be computed as
J(q)i,j= xi(q)qj
This can be computed analytically or by finite differences
xi(q)
qj = xi(q + qj)
xi(q)
qj
When the number of joints and tasks is high, the analytic determination ofthe Jacobian is a tedious task.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 41 / 65
Examples of tasks: position of end-effector
-
8/13/2019 Human Body Motion Analysis
46/70
Position control of an end-effector.
It has a translation Jacobian JT(q)
dxT =JT(q)dq
If the end-effector belongs to a particular subtree, the position will beindepedent of other subtrees and the partial derivatives with respect to thosewill be independent.
Figure: Absolute position control of the origin and an end-effector frame.[Baerlocher01]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 42 / 65
Examples of tasks: orientation of end-effector
-
8/13/2019 Human Body Motion Analysis
47/70
The orientation of an end-effector can also be controlled.
Multiple choices for the parameterization.
One solution is to solve it at the differential level, without relying in aparticular parameterization of orientation.
The infinitesimal variation of rotation
dxR=dt,
where t is the time and is the velocity vector.
The rotation Jacobian is then
dxR=JR(q)dq
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 43 / 65
-
8/13/2019 Human Body Motion Analysis
48/70
Examples of tasks: task for loops
-
8/13/2019 Human Body Motion Analysis
49/70
Figure: Joining two end-effectors E1 andE2. [Baerlocher01]
The Jacobian for this task isJT1 JT2
An analogous task can be formulated between the orientation of twoend-effectors.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 45 / 65
Examples of tasks: control center of mass
-
8/13/2019 Human Body Motion Analysis
50/70
Provided that the mass properties are known for each segment of thearticulated figure, the position xGof its center of mass Gtotcan be
constrained as another end-effector.
dxG =JG(q)dq
Figure: Constraining the center of mass. [Baerlocher01]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 46 / 65
Rank of the Jacobian
-
8/13/2019 Human Body Motion Analysis
51/70
An important characteristic of a Jacobian is its rank.
The rankof a matrix is the number of linearly independent rows or columns.
It can also be computed as the number of singular values that are differentfrom zero.
The rank can be reduced by parametric singularities, e.g., gimbal lock.
Singularities can also occur when the end-effector reaches the limits of itsworkspace. The Jacobian becomes singular as the end-effector cannot moveanymore in the direction normal to the boundary.
This last singularity cannot be removed since its inherent to the problem.
Singularities complicate the inversion process.
One useful tool is the Singular Value Decomposition (SVD) since it providesorthonormal bases for the fundamental subspace of a matrix.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 47 / 65
A bit of algebra: fundamental subspaces
-
8/13/2019 Human Body Motion Analysis
52/70
Let Jbe a m
n matrix. We can associate its range R(J) and its null space
N(J) defined by
R(J) = {v m | w n, J w=v}N(J) = {v n | J v= 0}
The rangeis the subspace that can be reached by applying J, and itsdimension is called the rank.
The null space is the subspace that maps to the null vector, its dimensionis call the nullity.
N(J) =R(JT), R(J) =N(JT)
where R(J) and N(J) are the orthogonal complements.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 48 / 65
Singular value decomposition (SVD)
-
8/13/2019 Human Body Motion Analysis
53/70
The SVD of an m
n matrix J with rank r is defined as
J= UVT
where U= [u1, , um] is an m m orthogonal matrix of left singularvectors,V= [v1, , vm] is an n n orthogonal matrix of right singularvectors, and is an m n matrix
=
1 0 00
. . . 0 00 r 00 0 0
withi the i-th singular value, which is always positive.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 49 / 65
Singular value decomposition (SVD)
-
8/13/2019 Human Body Motion Analysis
54/70
The columns of matrices U andV span the four fundamental subspaces
associated with matrix J.
BR(J) = [u1, , ur]BR(J) = [ur+1, , um]BN(J) = [v1,
, vr]
BN(J) = [vr+1, , vn]
The Jacobian can also be written as
J= BR(J
)DBT
N(J) =
r
i=1
iuivT
i
withD=diag([1, , r]).
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 50 / 65
-
8/13/2019 Human Body Motion Analysis
55/70
A least-squares solution
-
8/13/2019 Human Body Motion Analysis
56/70
The solution can be partitioned into two orthogonal subspaces: N(J), thatprovides the set of solutions that do not contribute to the problem x, and
its orthogonal complement N(J) that does.
A general solution is composed of two terms: a particular solution + anhomogeneous solution that can be used to satisfy other criteria.
q= qls+ qhomo
The particular solution can be obtained by least-squares as
qls=Jx
where J
= is the pseudo-inverse.The least square solution is the solution of
min ||Jq x||2
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 52 / 65
The homogeneous solution
-
8/13/2019 Human Body Motion Analysis
57/70
In the case of and under-constrained problem, its orthogonal complementN(J) contains additional components that by definition do not affect thesatisfaction of the task.
The homogeneous solution is then
qhomo=PN(J)z= (In JJ)z
where PN(J) is the n n orthogonal projection operator on N(J), andz n is an arbitrary vector.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 53 / 65
The general solution
-
8/13/2019 Human Body Motion Analysis
58/70
The general solution can be written as
q= Jx + PN(J)z
Figure: The two components of the general solution. [Baerlocher01]
The vectorzcan be exploited to satisfy another criteria h(q) and when linear
z= h(q)with >0 a positive scalar.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 54 / 65
The need for regularization
-
8/13/2019 Human Body Motion Analysis
59/70
The major drawback of least-squares is that in the proximity of a singularitythe problem is ill-posed. The norm of the resulting solution may tend toinfinity.
Once solution is to use regularization.
There exist many other techniques, we will focus on the simple dampedleast-squares.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 55 / 65
-
8/13/2019 Human Body Motion Analysis
60/70
Damped least-squares
-
8/13/2019 Human Body Motion Analysis
61/70
Figure: Comparison of the least-squares and damped least-squares function as afunction of the scalar value . The least-squares function is discontinuous at thesingularity = 0, while the damped least-squares is not. [Baerlocher01]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 57 / 65
Enforcing different priorities
-
8/13/2019 Human Body Motion Analysis
62/70
In general conflicts arise and not all the constraints can be simultaneouslysatisfied.
Two strategies:
Find a compromise solution according to weights assigned to each task
in order to represent their importance.Arbitrate a conflict on the basis of a predefined priority order, creatinga hierarchical relation between tasks.
We define the ptasks, each with its goal gi as
xi(q) =gi, i= 1, , p
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 58 / 65
Dealing with multiple tasks
-
8/13/2019 Human Body Motion Analysis
63/70
Let the different task be
x(q) = x1(q)
xp(q)
and g= g1
gp
then we can define the Jacobian
J= J1
Jp
with x=
x1 xp
where Ji=dxi(q)/dq, and xi=gi xi(q)The least squares is the the minimizer of
e(q) =||x(q) g||2 = p
i=1
ei(q)2
withei(q) =||xi(q) gi||2 the residual error of the i-th task.Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 59 / 65
Weighting the residuals
W i h l h l l i b i l di
-
8/13/2019 Human Body Motion Analysis
64/70
We can improve the control over the least square solution by including aweighting
e(q) = p
i=1
wiei(q)2
where wi>0 is the scalar weight associated with the i-th task.
This can be solved similarly by transforming:
Ji = wiJi
xi =
wixi
Ideally one would like to have the weights related to the residual errors suchthat
wjej(q) =wkek(q)
but this is not possible in general.
Simple weighting doesnt allow for a clear prioritizationNo task issatisfied.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 60 / 65
Strategies for task-priority
-
8/13/2019 Human Body Motion Analysis
65/70
Partitioning: is a simple but crude approach that allocates each joint solely
to teh task with highest priority among those depending on that joint. Badresults when the number of joints shared by several tasks is high.
Figure: Partitioning strategy [Baerlocher01]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 61 / 65
Strategies for task-priority
-
8/13/2019 Human Body Motion Analysis
66/70
Partitioning: is a simple but crude approach that allocates each joint solelyto teh task with highest priority among those depending on that joint. Bad
results when the number of joints shared by several tasks is high.Priority: When all the task can be satisfied they are. Otherwise the toppriority task reaches its goal without being perturbed, while the residualerror on the other task is minimize.
Figure: Priority strategy [Baerlocher01]
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 61 / 65
Formulation for the task-priority
Th diff t i iti b hi d b tti
-
8/13/2019 Human Body Motion Analysis
67/70
The different priorities can be achieved by setting
q= J
1
x1+ PN(J1)z
where we set z to satisfy the other priorities.
z= (J2PN(J1))(x2 J2J1x1)
This is known asconstrained least-squares solution.
This can be rewritten as
q= J1x1+J2
x2
where
J2 = J2PN(J1)
x2 = x2 J2J1x1This formulation has problems with singularities.
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 62 / 65
A more stable formulation
-
8/13/2019 Human Body Motion Analysis
68/70
This new formulation is to avoid singularities
The secondary solution J2x2 is first evaluated separately, and thenprojected into N(J1) to remove the components that would interfere withthe high priority task
q= J1x1+ PN(J1)(J2x2)
This scheme is called Cascaded control, and can be further extended toadd additional constraints
q= J
1x1+ PN(J1)(J
2x2+ PN(J2)z)
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 63 / 65
Comparison of priority strategies
-
8/13/2019 Human Body Motion Analysis
69/70
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 64 / 65
More?
-
8/13/2019 Human Body Motion Analysis
70/70
If you want to learn more, look at the additional material
Otherwise, do the research project on this topic!
Next week we will do machine learning to learn useful low-dimensionalrepresentations
Raquel Urtasun (TTI-C) Human Body Representations March 1, 2010 65 / 65