The document discusses various topics related to time-varying pose in robotics, including:
1. Generating smooth trajectories between an initial and final pose using polynomial functions of time.
2. Representing rotational motion using angular velocity and relating it to the derivative of rotation matrices.
3. Computing incremental motion from small changes in pose using the derivative and exponential map.
1. SBE 403 B: Bioelectronic Systems (Biomedical Robotics)
Lecture 04
Time and Motion
Muhammad Rushdi
mrushdi@eng1.cu.edu.eg
2. Main Problems in Robotics
• What are the basic issues to be resolved and what must we
learn in order to be able to program a robot to perform its
tasks?
• Problem 1: Forward Kinematics
• Problem 2: Inverse Kinematics
• Problem 3: Velocity Kinematics Represent time-varying• Problem 3: Velocity Kinematics
• Problem 4: Path Planning
• Problem 5: Vision
• Problem 6: Dynamics
• Problem 7: Position Control
• Problem 8: Force Control
2
position and orientation of
objects in an environment.
3. Textbook
• Ch. 3 Time and
Motion
Peter Corke:
Robotics, Vision and
Peter Corke:
Robotics, Vision and
Control - Fundamental
Algorithms in MATLAB®.
http://www.petercorke.com/R
VC/
3
4. Two Problems of Time-Varying Pose
• How to generate a temporal sequence of poses,
a trajectory, that smoothly changes from an initial
pose to a final pose.
• The concept of rate of change of pose, its
temporal derivative, and how that relates to
concepts from mechanics such as velocity and
angular velocity. This allows us to solve the inverse
problem – given measurements from velocity and
angular velocity sensors how do we update the
estimate of pose for a moving object. This is the
principle underlying inertial navigation.
4
5. Trajectories
• A path is a spatial construct – a locus in
space that leads from an initial pose to a final
pose.
• A trajectory is a path with specified timing.• A trajectory is a path with specified timing.
• Example: There is a path from A to B, but
there is a trajectory from A to B in 10 s or at
2 ms–1.
• An important characteristic of a trajectory is
that is smooth – position and orientation
vary smoothly with time. 5
6. Smooth One-Dimensional Trajectories
• A trajectory is given by a scalar function of time f(t)
• Important characteristics of this function are:
its initial and final value are specified and that
it is smooth (First few temporal derivatives are
continuous:
∈ C1),
∈ C
continuous:
- Velocity (1st derivative continuous: f ∈ C1),
- Acceleration (2nd derivative continuous: f ∈ C2),
- Jerk (3rd derivative continuous: f ∈ C3)).
6
7. Smooth One-Dimensional Trajectories
• Examples for such a function? A polynomial
function of time:
simple to compute
can easily provide the required smoothness and
boundary conditionsboundary conditions
• Example 1: A quintic (5th order) polynomial
7The first- and second-derivatives are also
smooth polynomials.
A smooth polynomial, t ∈[0,T]
8. Smooth One-Dimensional Trajectories
• Example 1: A quintic (5th order) polynomial
• The trajectory has defined boundary conditions for
position, velocity and acceleration:
8
9. Smooth One-Dimensional Trajectories
• Example 1: A quintic (5th order) polynomial
• Writing Eq. 3.1 to Eq. 3.3 for the boundary• Writing Eq. 3.1 to Eq. 3.3 for the boundary
conditions t = 0 and t = T gives six equations:
9
This is the reason for choice
of quintic polynomial. It has
six coefficients that enable it
to meet the six boundary
conditions on initial and final
position, velocity and
acceleration.
10. Smooth One-Dimensional Trajectories
• Example 1: A quintic (5th order) polynomial
• In MATLAB:
[s,sd,sdd] = tpoly(0, 1, 50, 0.5, 0);
Position values range
from 0 to 1
Initial and final
velocities
[s,sd,sdd] = tpoly(0, 1, 50, 0.5, 0);
10
Position, velocity, and
acceleration
50 time steps
11. Smooth One-Dimensional Trajectories
• Example 1: A quintic (5th order) polynomial
The non-zero
initial velocity
causes
the polynomial
to overshoot the
terminal value –
it peaks at 5 on
a trajectory from
11
a trajectory from
0 to 1.
12. Smooth One-Dimensional Trajectories
• Example 1: A quintic (5th order) polynomial
The velocity peaks
at t =25 which
means that for most
of the time
the velocity is far
12
the velocity is far
less than the
maximum. The
mean velocity is
only 52% of the
peak.
13. Smooth One-Dimensional Trajectories
• Example 1: A quintic (5th order) polynomial
A real robot joint has a
well defined maximum
velocity and for
minimum-time motion
and we want to be
operating at that
maximum for as much
13
maximum for as much
of the time as
possible. We would
like the velocity curve
to be flatter on top.
14. Smooth One-Dimensional Trajectories
• Example 2: Linear-segment (constant-velocity) with
parabolic-blend (LSPB) polynomial
A hybrid trajectory which has
a constant velocity segment
with polynomial segments
for acceleration and
deceleration.
14
deceleration.
15. Smooth One-Dimensional Trajectories
• Example 2: Linear-segment (constant-velocity) with
parabolic-blend (LSPB) polynomial
The trajectory is called
trapezoidal due to the shape
of the velocity curve versus
time.
15
The trapezoidal trajectory is
smooth in
velocity, but not in
acceleration.
16. Smooth One-Dimensional Trajectories
• Example 2: Linear-segment (constant-velocity) with
parabolic-blend (LSPB) polynomial
The velocity cannot be
chosen arbitrarily, too high or
too low a value for the
maximum velocity will result
in an infeasible trajectory
16
in an infeasible trajectory
and the function returns an
error. The system is over-
constrained, having five
constraints (total time, initial
and final position and
velocity) but six degrees of
freedom (blend time, three
parabolic coefficients and
two linear coefficients).
17. Smooth One-Dimensional Trajectories
• Example 2: Linear-segment (constant-velocity) with
parabolic-blend (LSPB) polynomial
Blend times
17
Complete LSPB trajectory
(Spong et al., pp. 186-189)
18. Multi-Dimensional Trajectories
• Most useful robots have more than one axis of
motion or degree of freedom. We represent this in
vector form as x ∈ RM where M is the number of
degrees of freedom.
• Example 1: A wheeled mobile robot is
∈
• Example 1: A wheeled mobile robot is
characterized by its position (x, y) or pose (x, y, θ).
• Example 2: The tool of an arm robot has position
(x, y, z), orientation (θr, θp, θy) or pose (x, y, z, θr,
θp, θy).
• We therefore require smooth multi-dimensional
motion from an initial vector to a final vector.
18
20. Multi-Segment Trajectories
• In robotics applications there is often a need to
move smoothly along a path through one or more
intermediate (via, knot, or interpolation) points
without stopping.
• This might be to avoid obstacles in the workplace,• This might be to avoid obstacles in the workplace,
or to perform a task that involves following a
piecewise continuous trajectory such as applying a
bead of sealant in a manufacturing application.
20
21. Multi-Segment Trajectories
• The trajectory is defined by N points xk, k ∈ [1, N] and there are N−1
motion segments, xk∈ RM is a vector representation of pose.
• The robot starts from x1 at rest and finishes at xN at rest, but moves
through (or close to) the intermediate points without stopping.
• The problem is over-constrained and in order to attain continuous
velocity we surrender the ability to reach each intermediate point.
21
22. Multi-Segment Trajectories
No acceleration time.
22
Acceleration time of 1 s. The trajectory
becomes more rounded as the polynomial
blending functions do their work, and the
trajectory takes more time to complete.
23. Interpolation of Orientation in 3D
• In robotics we often need to interpolate orientation,
for example, we require the end-effector of a robot
to smoothly change from orientation ξ0 to ξ1.
• Using the notation from Chap. 2, we require some
function ξ(s) = σ(ξ , ξ , s) where s ∈ [0, 1] whichfunction ξ(s) = σ(ξ0, ξ1, s) where s ∈ [0, 1] which
has the boundary conditions σ(ξ0, ξ1, 0) =ξ0 and
σ(ξ0, ξ1, 1) =ξ1 and where σ(ξ0, ξ1, s) varies
smoothly for intermediate values of s.
• How we implement this depends very much on our
concrete representation of ξ.
23
24. Interpolation of Orientation in 3D
• Using orthonormal rotation matrix, ξ ∼R ∈∈∈∈ SO(3):
This is not, in general, a valid orthonormal matrix
which has strict column norm and inter-column
orthogonality constraints. Not Suitable!orthogonality constraints. Not Suitable!
24
25. Interpolation of Orientation in 3D
• Using a 3-angle representation (e.g. Euler or roll-
pitch-yaw angles), ξ∼Γ∈S3 :
• For large orientation changes we see that the axis• For large orientation changes we see that the axis
around which the coordinate frame rotates changes
along the trajectory. The motion, while smooth,
sometimes looks uncoordinated.
• There will also be problems if either ξ0 or ξ1 is close
to a singularity in the particular 3-angle system
being used. 25
26. Interpolation of Orientation in 3D
• Using unit quaternions:
• Interpolation of unit-quaternions is only a little more
complex than for 3-angle vectors and produces a
change in orientation that is a rotation around a
fixed axis in space.fixed axis in space.
• Quaternion interpolation is achieved using
spherical linear interpolation (slerp) in which the
unit quaternions follow a great circle path on a 4-
dimensional hypersphere. The result in 3-
dimensions is rotation about a fixed axis in space.
26
28. Interpolation of Pose in 3D
• Interpolation of pose (Cartesian motion)
requires a smooth path between two poses
in SE(3) which involves change in position as
well as in orientation:
1. Represent the initial and final poses as
homogeneous transformations.
2. Interpolate the translational component
linearly and the rotation spherically using the
quaternion interpolation.
28
29. Interpolation of Pose in 3D
The position coordinates vary
smoothly and linearly with time.
29
The roll-pitch-yaw angles vary smoothly but not linearly
with time because they represent a non-linear
transformation of the linearly varying quaternion.
Discontinuities are due to angle wrapping and
singularity of the RPY representation.
30. Interpolation of Pose in 3D
The translational motion has a velocity and acceleration discontinuity at the first and
last points. The problem is that while the trajectory is smooth in space the distance
s along the trajectory is not smooth in time. Speed along the path jumps from zero
to some finite value and then drops to zero at the end – there is no initial acceleration
or final deceleration.
30
31. Interpolation of Pose in 3D
The polynomial and LSPB scalar functions can be used to generate the path s so
that motion along the path is smooth. The trajectory is unchanged but the
coordinate frame now accelerates to a constant speed along the path and then
decelerates and this is reflected in smoother curves for the translational
components of the trajectory.
31
32. Time Varying Coordinate Frames
• So far, we discussed the generation of
coordinate frame motion which has a
translational and rotational velocity
component.
• The translational velocity is the rate of
change of the position of the origin of the
coordinate frame.
• Rotational velocity is a little more complex.
32
33. Rotating Coordinate Frame
• A body rotating in 3-dimensional space has an
angular velocity which is a vector quantity ω =(ωx,
ωy, ωz).
• The direction of this vector defines the
instantaneous axis of rotation, that is, the axisinstantaneous axis of rotation, that is, the axis
about which the coordinate frame is rotating at a
particular instant of time. In general this axis
changes with time.
• The magnitude of the vector is the rate of rotation
about the axis – in this respect it is similar to the
angle-axis representation for rotation.
33
34. Rotating Coordinate Frame
• The derivative of a time-varying rotation matrix:
where R∈∈∈∈ SO(2) or SO(3) and S(·) is a skew-
symmetric matrix that, for the 3-dimensional case,
How the rotation matrix changes as
the body rotates about ω
∈∈∈∈
symmetric matrix that, for the 3-dimensional case,
has the form
34
35. Rotating Coordinate Frame
• What does the derivative of R mean?
• Consider the approximation to the derivative
which we rearrange as
and substituting Eq. 3.4 we obtain
35
How the
orthnormal rotation
matrix changes as
a function of
angular velocity
36. Incremental Motion
• Consider a coordinate frame that undergoes
a small rotation from R0 to R1. We can write
Eq. 3.7 as
and rearrange it as
and then apply the vex operator, the inverse
of S(·), to both sides
36
A 3-vector with units of angle that represents an infinitesimal rotation about
the world x-, y- and z-axes. While rotation composition is non-commutative
in general, it’s commutative for infinitesimal angular changes.
37. Incremental Motion from Pose
• Given two poses ξ0 and ξ1 that differ infinitesimally
we can represent the difference between them as a
6-vector
comprising the incremental displacement and the
incremental rotation. If the poses are represented in
homogeneous transformation form
37
38. Pose from Incremental Motion
• The inverse operation is
and for homogenous transformation representation
isis
38
39. Inertial Navigation Systems
• An inertial navigation system is a “black box” that
estimates its velocity, orientation and position with
respect to the inertial reference frame (the
universe).
• Importantly, it has no external inputs such as radio• Importantly, it has no external inputs such as radio
signals from satellites and this makes it well suited
to applications such as submarine, spacecraft and
missile guidance.
• An inertial navigation system works by measuring
accelerations and angular velocities and integrating
them over time.
39
40. Inertial Navigation Systems
• http://www.globalspec.com/learnmore/sensors_transducers_detectors/tilt_sensing/inertial_gyros
40