Professional Documents
Culture Documents
Trajectory Planning in Cartesian Space: Robotics 1
Trajectory Planning in Cartesian Space: Robotics 1
Trajectory planning
in Cartesian space
Prof. Alessandro De Luca
Robotics 1 1
Trajectories in Cartesian space
! in general, the trajectory planning methods proposed in the
joint space can be applied also in the Cartesian space
! consider independently each component of the task vector (i.e., a
position or an angle of a minimal representation of orientation)
! however, when planning a trajectory for the three
orientation angles, the resulting global motion cannot be
intuitively visualized in advance
! if possible, we still prefer to plan Cartesian trajectories
separately for position and orientation
! the number of knots to be interpolated in the Cartesian
space is typically low (e.g., 2 knots for a PTP motion, 3 if a
“via point” is added) ⇒ use simple interpolating paths, such
as straight lines, arc of circles, …
Robotics 1 2
Planning a linear Cartesian path
(position only)
pi GIVEN
L pi, pf, vmax, amax
vi, vf (typically = 0)
pf
L = !pf - pi!
path parameterization pf - pi
= unit vector of directional
p(s) = pi + s (pf - pi) !pf - pi! cosines of the line
. dp . . .. d2p . 2 dp .. ..
p(s) = s = (pf - pi) s p(s) = s + s = (pf - pi) s
ds ds2 ds
pf - pi . pf - pi ..
= " = "
L L
Robotics 1 3
Timing law with trapezoidal speed -1
.. amax
"(t) amax t2/2 t ! [0,Ts]
t
vmax2
"(t) = vmax t- t ! [Ts,T-Ts]
. 2 amax
"(t) vmax
vmax2
t - amax (t-T)2/2 + vmax T-
amax
L t ! [T-Ts,T]
"(t)
t can be used also
Ts T-Ts T
in the joint space!
Robotics 1 5
Concatenation of linear paths
no need to pass
z B =“via point” (and stop!) there B- A
= KAB
C’ !B - A!
unit vectors of
A’ over-fly C direction cosines
C- B
= KBC
y !C - B!
A
given: constant speeds v1 on linear path AB
x v2 on linear path BC
desired transition: with constant acceleration for a time #T
x(t)
p(t) = y(t) t ! [0, #T] (transition starts at t = 0)
z(t)
note: during over-fly, the path remains always in the plane specified
by the two lines intersecting at B (in essence, it is a planar problem)
Robotics 1 6
Time profiles on components
.. .
x(t) x(t)
v2 KBC,x
v1 KAB,x
.. #T t . t
y(t) y(t)
v2 KBC,y
v1 KAB,y t
.. t .
z(t) z(t)
v1 KAB,z
t v2 KBC,z
#T t
Robotics 1 7
Timing law during transition
z B B- A
= KAB
C’ !B - A!
A’ unit vectors of
C direction cosines
C- B
= KBC
A y !C - B!
x(t)
x t ! [0, #T] (transition starts at t = 0)
p(t) = y(t)
z(t)
.. .
p(t) = (v2 KBC - v1 KAB)/#T p(t) = v1 KAB + (v2 KBC - v1 KAB) t/#T
$
%
$
%
thus, we obtain a
parabolic blending
p(t) = A’ + v1 KAB t + (v2 KBC - v1 KAB) t2/(2#T) (see textbook
for this same approach
in the joint space)
Robotics 1 8
Solution
(various options)
B d2 B - A’= d1 KAB
d1 1
C’ C’ - B = d2 KBC
A’ C p(t) = A’ + v1 KAB t + (v2 KBC - v1 KAB)t2/(2#T)
d1 = v1 #T/2 d2 = v2 #T/2
by choosing, e.g., d1
#T = 2d1/v1 d2 = d1 v2/v1
(namely A’)
Robotics 1 9
A numerical example
! transition from A=(3,3) to C=(8,9) via B=(1,9), with speed from v1=1 to v2=2
! exploiting two options for solution (resulting in different paths!)
! assign transition time: #T=4 (we re-center it here for t ! [-#T/2, #T/2])
! assign distance from B for departing: d1=3 (assign d2 for landing is handled similarly)
B C B C
A’
A A
#T=4 d1=3
Robotics 1 10
A numerical example (cont’d)
first option: #T=4 (resulting in d1=2, d2=4)
actually, the same vel/acc profiles only with a different time scale!!
Robotics 1 11
Alternative solution
(imposing acceleration)
B ..
p(t) = 1/#T (v2 KBC - v1 KAB)
C’
A’ C
v1 = v2 = vmax (for simplicity)
A ..
!p(t)! = amax
Robotics 1 12
Application example
plan a Cartesian trajectory from A to C (rest-to-rest)
that avoids the obstacle O, with a ' amax and v ' vmax
add a via point B
B “sufficiently far” from O
C”
A” C’
A’ C
O
Robotics 1 13
Other Cartesian paths
! circular path through 3 points in 3D (often built-in feature)
! linear path for the end-effector with constant orientation
! in robots with spherical wrist: planning may be decomposed into a path
for wrist center and one for E-E orientation, with a common timing law
! though more complex in general, it is often convenient to parameterize
the Cartesian geometric path p(s) in terms of its arc length (e.g., with
s = R) for circular paths), so that
! velocity: dp/dt = dp/ds ! ds/dt
! dp/ds = unit vector (!!!=1) tangent to the path: tangent direction t(s)
Robotics 1 14
Definition of Frenet frame
! For a generic (smooth) path p(s) in R3, parameterized by s (not
necessarily its arc length), one can define a reference frame as in figure
Robotics 1 15
Optimal trajectories
! for Cartesian robots (e.g., PPP joints)
1. the straight line joining two position points in the Cartesian space is one path
that can be executed in minimum time under velocity/acceleration constraints
(but other such paths may exist, if (joint) motion can also be not coordinated)
2. the optimal timing law is of the bang-coast-bang type in acceleration (in this
special case, also in terms of actuator torques)
! for articulated robots (with at least a R joint)
! 1. e 2. are no longer true in general in the Cartesian space, but time-optimality
still holds in the joint space when assuming bounds on joint velocity/acceleration
! straight line paths in the joint space do not correspond to straight line paths
Robotics 1 16
Planning orientation trajectories
zA
zB
xA
A B
xB
yA yB
Robotics 1 17
A complete position/orientation
Cartesian trajectory
T x(0)!
" initial given configuration q(0) = (0 " /2 0 0 0 0)
T
" initial end-effector position p(0) = (0.540 0 1.515) y(0)!
" initial orientation
! # 0 0 1&
R(0) = % 0 "1 0(
! %
1 0 0
( zw!
$ '
T = 5.52 T = 5.52
actual joint angles
2.5
1.5
by inversion of the geometric Jacobian
actual 1
" a user program, via KUKA RSI interface
joint at Tc = 12 ms sampling time (one-way
[rad]
motion communication)
0.5
−1
0 1 2 3 4
time [s]
5 6 7 8
kinematic control loop (at task level)
T = 5.52
Robotics 1 20
Comparison of orientation trajectories
Euler angles vs. axis-angle method
T
" initial configuration q(0) = (0 " /2 " /2 0 #" /2 0)
T
" initial end-effector position p(0) = (0.115 0 1.720)
" initial orientation
.
z(T)! p(T)! x(0)!
.
! # 0 0 1&
R(0) = % 0 "1 0( p(0)!
! % (
$ 1 0 0' z(0)!
T x(T)!
" initial Euler ZYZ angles " ZYZ (0) = (0 # /2 #)
# 0 0 "1&
R final = % 0 "1 0 (
! % ( !
$ "1 0 0 '
# "+ &
) * ZYZ , final = % + /2(
%
$ 0 '
( zw!
yw! xw!
!
video video
using ZYZ Euler angles using axis-angle method
Robotics 1 22
Comparison of orientation trajectories
Euler angles vs. axis-angle method
end−effector position end−effector position
1.8 1.8
x=
1.6 1.6
y=
1.4 1.4
1.2 1.2
z= 1
1
linear motion
[m]
[m]
0.8 0.8
0.2 0.2
planned 0 0
Cartesian −0.2
0 1 2 3 4 5 6 7 8
−0.2
0 1 2 3 4 5 6 7 8
components
time [s] time [s]
T ! 7.2 s! T ! 6 s!
of position
end−effector velocity end−effector velocity
0 0
−0.03 −0.04
faster motion
time with the
axis-angle method
−0.04
[m/s]
[m/s]
−0.06
−0.05 (imposed by the
−0.06 −0.08 previous bounds
on angular motion)
−0.07
−0.1
−0.08
−0.09 −0.12
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
time [s] time [s]
2= 3 3 1 = 0 (singularity of
1= 2 2 the representation)
0= 1 1
[rad]
[rad]
0 0
orientation −1 −1
in terms of ZYZ −2 −2
T ! 7.2 s! T ! 6 s!
actual joint angles actual joint angles
2 3
1.5 2.5
1 2
actual
0.5 1.5
joint
0 1
[rad]
[rad]
motion
−0.5 0.5
−1 0 only three
−1.5 −0.5
joints move
−2 −1
−2.5 −1.5
−3 −2
0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
time [s] time [s]
Robotics 1 25
Numerical example -1
p1
path length L=2.0518 [m]
q0 zero initial and
final speed
p0
s=s(t) non-zero
(symmetric)
acceleration
T=1
Robotics 1 26
Numerical example -2
! violation of both joint velocity and acceleration bounds with T=1 [s]
! max relative violation of joint velocities: kvel = 2.898
! max relative violation of joint accelerations: kacc = 6.2567
! minimum uniform time scaling of Cartesian trajectory to recover feasibility
k = max {1, kvel , $kacc} = 2.898 ⇒ Tscaled = kT = 2.898 > T
kacc
kvel
= joint 1 = joint 2
Robotics 1 27
Numerical example -3
! scaled trajectory with Tscaled = 2.898 [s]
! speed [acceleration] on path and joint velocities [accelerations] scale linearly [quadratically]