Você está na página 1de 21

Time and Motion

Groups
( a construct in Linear System Theory)

• A group is a set G together with an operation ● that combines two


elements a and b in G to form another element a ● b. To form a group, (G,
●) must satisfy the following axioms (properties)
• Closure
• For all a, b in G, a ● b is also in G
• Associativity
• For all a, b, c in G, (a ● b) ● c = a ● (b ● c)
• Identity
• There exists an element e in G s.t. a ● e = e ● a = a
• Inverse
• For each a in G, there exists an element b in G s.t. a ● b = e
Hierarchy of Transformation Groups
• Translation

• Rigid Body Transformation

• Similarity

• Each higher group completely contains the lower


group
Hierarchy of 2D Transformations

Length Ratios

Length Ratios along a line

Length Cross-Ratios along a line


Singular Value Decomposition
• Implication: We can take the multiplicative part of any transform and
describe it as a sequence of a rotation, scaling and another rotation
• 2D Example: Decomposing an Affine Transformation
M = 0.95 0.49 0.46 >> [U, S, V] = svd(M(1:2, 1:2))
0.23 0.89 0.02
0 0 1 U=
-0.78156 -0.62384
-0.62384 0.78156
>> U * S * V' Interpretation
S=
in terms of
1.2904 0
ans =
0 0.56789 angles?

0.95 0.49
V=
0.23 0.89
-0.68658 -0.72705
-0.72705 0.68658
Singular Value Decomposition
• Implications: Even a simple shear can be written as a
rotationscalingrotation
• Try visualizing it to
understand how… [Exercise]
Parameter Optimization:
Least Squared Error Solutions
• Let us first consider the ‘simpler’ problem of fitting a line to a set of data
points… x y
1.3 5.7
2.4 7.3
3.4 10.5
4.6 11.8
5.3 13.9
6.6 16.3
6.4 15.3
8.0 17.9
8.9 20.8
9.2 20.9

• Equation of best fit line ?


Line Fitting: Least Squared Error Solution
• Step 1: Identify the model
• Equation of line: y = mx + c
• Step 2: Set up an error term which will give the goodness of every
point with respect to the (unknown) model
• Error induced by ith point:
• ei = mxi + c - yi
• Error for whole data: E = i ei2
• E = i (mxi + c – yi)2
• Step 3: Differentiate Error w.r.t. parameters, put equal to zero and
solve for minimum point
Line Fitting: Least Squared Error Solution
x y
E   mxi  c  yi 
2 1.3 5.7
i
2.4 7.3
3.4 10.5
E 4.6 11.8
  mxi  c  yi xi  0 5.3 13.9
m i 6.6 16.3
E
  mxi  c  yi   0
6.4 15.3
c 8.0 17.9
i
8.9 20.8
 xi2  x  m  x y 
i i i
9.2 20.9
 i i
 i
 
 xi
 i
1   c    y 

i i
i
380.63 56.1 m 914.68
= 140.4
56.1 10 c

Solution: m = 1.9274 c = 3.227


Line Fitting: Least Squared Error Solution
Time and Motion
• Poses that changes w.r.t time

• Introduces the derivative of time-varying position, orientation and


pose and relates that to concepts from mechanics such as linear
velocity and angular velocity

• Introduces the dynamics of objects moving under the influence of


forces and torques and discusses the important difference between
inertial and non-inertial reference frames.
Time and Motion
• Discusses how to generate a temporal sequence of poses, a
trajectory, that smoothly changes from an initial pose to a final pose.

• Introduces three common types of inertial sensor and learn how to


how to use their measurements to update the estimate of pose for a
moving object such as a robot.
Time-varying poses
• Pose of a body for a particular instance of time is represented by its
orientation and position
• We have seen many ways to represent orientation in the previous
chapter
• Euler representation i.e. RxRyRx = R
• Two vector representation i.e. approach vector, orientation and normal
• Vector and angle representation =
• sk = skew( unit(v) );
• R = eye(3,3) + sin(theta)*sk + (1-cos(theta))*sk^2;
• Matrix Exponential: expm(A) = V*diag(exp(diag(D)))/V.
Time-varying poses
• Matrix Exponential:
• expm(A) = V*diag(exp(diag(D)))/V.

• Unit Quaternion
• q = cos (theta/2) < v sin(theta/2)>
• q = s <vx, vy, vz> such that s^2+vx^2+vy^2+vz^2 = 1
Time-varying poses
• The exponential form representation:
• where the rotation is described by a rotational axis
• At an instant in time t we will assume that the axis has a fixed
direction and the frame is rotating around the axis

• Angular velocity w.r.t to frame A


• That defines the instantaneous axis and rate of rotation
• Similarly derivative of rotation in frame B is :
Time varying poses
• Also the derivative of a unit quaternion :

• Now, representing pose in homogenous system and taking derivative


w.r.t. time:

• The spatial velocity vector than has two components linear velocity
and angular velocity:
Time and poses
• The velocity of a moving body can be expressed with respect to a
world reference frame {A} or the moving body frame {B} as shown in
Fig. 3.1. The spatial velocities are linearly related by
Time and poses
• For example:
• >> TB = SE3(1, 2, 0) * SE3.Rz(pi/2);
• >> vb = [0.2 0.3 0 0 0 0.5]’;
• >> va = TB.velxform * vb;
• For the case where frame {C} is also on the moving body the
transformation becomes
Incremental rotation
• Consider the first order approx. of the derivative of Rotation:
• We know that derivative of R :

• Now, consider an object whose body frames {B} at two consecutive


timesteps are related by a small rotation
• Substituting in the above equations to find delta R

• Rearranging the above equation given the angular velocities


Incremental Rotation
• Alternatively if the angular velocities are known than we can compute
update the rotation matrix

• The above computation is easier and cheap to compute if we assume


the sampling frequency is high and delta is very small. It is a key to
inertial navigation system

• For quaternions it will be:


Incremental Rigid body motion
• Now consider two poses which differs infinitesimally and are related
• In homogenous transformation matrix form it will be:

• TD = inv(T0) * T1;

• delta = [transl(TD); vex(t2r(TD) - eye(3,3))];

Você também pode gostar