Robotics1 20.02.12
Robotics1 20.02.12
Exercise 1
Consider the 4-dof manipulator in Fig. 1. The robot has the first joint prismatic and the other
three revolute. Determine a frame assignment and the associated table of parameters following
the Denavit-Hartenberg (DH) convention. Assign the given geometric data lA and lB to the
corresponding constant DH parameters. The origin of the first DH frame RF0 is already specified,
while the origin of the last frame RF4 should be placed in P . Use the provided Extra Sheet #1 to
draw the frames, and complete the DH table there. Add your name on the sheet and return it.
lA
q4 lB
q2 F
q3
P
q1
y0
x0
Exercise 2
1
Exercise 3
Consider the 3-dof, planar PPR robot in Fig. 2, with a third link of length L > 0. The robot
end-effector should move at a constant speed v > 0, tracing counterclockwise a full circle of radius
R > 0 centered in P c , and keep its end-effector always aligned with the normal to the surface,
pointing toward the circle center. Neglect for simplicity any possible collision between the robot
body and the circle (e.g., they may live on two parallel, but different horizontal planes). At time
t = 0, the robot end-effector is correctly at the initial point A with the right orientation. Suppose
that the two prismatic joints have a (common) maximum velocity limit |q̇i | ≤ V , i = 1, 2, while
the revolute joint velocity is limited by |q̇3 | ≤ Ω, with V > 0 and Ω > 0. Similarly, for the joint
accelerations, there are the bounds |q̈i | ≤ A, i = 1, 2, and |q̈3 | ≤ Ψ, with A > 0 and Ψ > 0.
a) Provide the expressions of the time evolution of the end-effector position p ∈ R2 , velocity ṗ and
acceleration p̈, possibly using separation in space and time, when the given task is perfectly
executed. Similarly, provide the expressions of the time evolution of the end-effector absolute
orientation angle φ ∈ R and of its derivatives φ̇ and φ̈. Sketch qualitative plots of all these
quantities (keep symbolic values).
b) Provide the associated expressions of the time evolution of the joint position q ∈ R3 , velocity
q̇ and acceleration q̈. Sketch qualitative plots also of these quantities.
c) Determine, as a function of the parametric data, the expression of the maximum constant
speed v at which the task can be completed without violating any of the physical limits of the
robot. Accordingly, give the minimum time T for completing one full round of the circle while
remaining feasible.
yw
v
Pc
A
L R
q3
q1
q2
xw
Figure 2: The planar PPR robot and the Cartesian task to be executed.
Exercise 4
A number of questions and statements are reported on the Extra Sheet #2. Fill in your answers
on the same sheet, providing also a short motivation/explanation for each item. Add your name
on the sheet and return it.
2
Solution
February 12, 2020
Exercise 1
A possible Denavit-Hartenberg frame assignment for the 4-dof PRRR manipulator of Fig. 1 is
shown in Fig. 3, with the associated parameters reported in Tab. 1. In the shown picture, the
robot is in a configuration with a (generic) q1 > 0, q2 = 0, q3 = 0, and q4 > 0 (about 70◦ ).
d3 = lA
z1 z3 a4 = lB
O1 = O2 O3
z4
x1 z2
x3 x4
x2 q4 = q4 O4
q3 = q3 (> 0) (= P)
q2 = q2 (= 0)
(= 0)
z0
q1 = d1
(> 0) y0
O0
x0
Figure 3: Assignment of DH frames for a PRRR robot.
i αi ai di θi
1 0 0 q1 0
2 −π/2 0 0 q2
3 π/2 0 lA > 0 q3
4 0 lB > 0 0 q4
Exercise 2
Based on Tab. 1, in order to determine the position p of point P , i.e., the position of the origin
O4 , we need the following DH homogenous transformation matrices:
1 0 0 0 c2 0 −s2 0 !
1
0
0 1 0 0 1
s2 0 c2 0 R2 (q2 ) 0
A1 (q1 ) = , A2 (q2 ) = = ,
0 0 1 q1 0 −1 0 0 0T 1
0 0 0 1 0 0 0 1
3
c3 0 s3 0 !
2
2
s3 0 −c3 0 R3 (q3 ) 2 p3
A3 (q3 ) =
= ,
0 1 0 lA 0T 1
0 0 0 1
c4 −s4 0 lB c 4 !
3
3
s4 c4 0 lB s4 R4 (q4 ) 3 p4 (q4 )
A4 (q4 ) =
= ,
0 0 1 0 0T 1
0 0 0 1
where the shorthand notations si = sin qi , ci = cos qi have been used.
The position p is computed from
p 0 1 2 3 0
pH = = A1 (q1 ) A2 (q2 ) A3 (q3 ) A4 (q4 ) ,
1 1
giving
−lA s2 − lB s2 s4 + lB c2 c3 c4
p = f (q) = lA c2 + lB c2 s4 + lB s2 c3 c4 . (1)
q1 − lB s3 c4
Using the numerical values lA = 0.5 and lB = 0.75, we evaluate (1) in the two configurations
T
q I = 0 and q II = 1 0 −π/2 π/2 yielding
0.75 0
pI = f (q I ) = 0.5 [m], pII = f (q II ) = 1.25 [m].
0 1
For the force balancing problem in static conditions, we need the joint torque
0
τ = −J TL (q)F , with F = 0 , fz < 0.
fz
Because of the structure of the Cartesian force F , we just have to compute the last row in the
3 × 4 Jacobian matrix J L ,
∂p1(q)
∗ ∗ ∗ ∗
∂q
∂p(q) ∂p (q)
∂q = ∗ ∗ ∗ ∗
2
J L (q) = = ,
∂q
∂p3(q) 1 0 −lB c3 c4 lB s3 s4
∂q
and thus
1
0
τ = −J TL (q)F =
−lB c3 c4 |fz |. (2)
lB s3 s4
Evaluating numerically (2) as before yields
1 1
0 0
τ I = τ |q=qI =
−0.75 |fz |,
τ II = τ |q=qII 0 |fz |.
=
0 −0.75
4
The angular part of the geometric Jacobian is computed as
! !
J A (q) = 0 z1 z2 z3 = 0 0R1 1 z 1 0
R1 1R2 (q2 ) 2 z 2 0
R1 1R2 (q2 ) 2R3 (q1 ) 3 z 3
(3)
0 0 −s2 c2 s3
= 0 0 c2 s2 s3 .
0 1 0 c3
T
being iz i = 0 0 1 , for all i, and 0R1 = I 3×3 . It follows from (3) that the rank of matrix
J A (q) is equal to 3, except for sin q3 = 0, or q3 = {0, π} [rad]. When the matrix is singular, it
becomes then
0 0 −s2 0
J A (q2 )|q3 ={0,π} = 0 0 c2 0 , (4)
0 1 0 ±1
which has always rank equal to 2, for all q2 . Therefore, its null space (i.e., all vectors q̇ ∈ R4 such
that ω = J A (q2 )|q3 ={0,π} q̇ = 0) is spanned by a two-dimensional basis, e.g., by
1 0
0 −1
N J A (q2 )|q3 ={0,π} = span ,
0 0
.
0 ±1
Exercise 3
We first describe the Cartesian task in terms of absolute position p ∈ R2 , relative to the world
frame RFw , and orientation angle φ ∈ R, defined w.r.t. the xw axis. For this, we use separation in
space1 and time:
cos s
p(s) = Pc + R , φ(s) = π + s, s = [0, 2π]; s = s(t), t = [0, T ].
sin s
Note that the angle φ(s) can also be evaluated modulo 2π (if we don’t care, as here, about the
number of rounds traced on the circle). Taking into account that motion along the circle should
be performed at a constant speed v, the time derivative of the above quantities is given by
dp ds 0 − sin s v
ṗ(t) = · = p (s) ṡ(t) = R ṡ ⇒ ṡ = (constant, and so s̈ = 0),
ds dt cos s R
and
v
φ̇(t) = ṡ =
.
R
As a consequence, s(t) = (v/R) t, and the time for completing a full circle will be T = 2πR/v. So,
the choice of a maximum speed v that satisfies the robot motion constraints will provide also the
minimum feasible time T . Differentiating further w.r.t. time gives
cos s v 2
0 00 2
p̈(t) = p (s) s̈(t) + p (s) ṡ (t) = − , φ̈(t) = 0.
sin s R
1 The used parametrization specifies s as an angle (in [rad]). One could have used equally well a parametrization
in terms of the arc length σ = s/R ∈ [0, 2πR], in [m], as the argument of the trigonometric functions. The
modifications that would follow are trivial, e.g., ṡ = v (in [m/s]).
5
Note that kp̈(t)k = v 2/R, ∀t ∈ [0, T ].
With reference to Fig. 2, we have for the direct kinematics of the PPR robot
! q1 + L cos q3
p
= f (q) = q2 + L sin q3 . (5)
φ
q3
Accordingly, the first- and second-order differential maps are
! 1 0 −L sin q3
ṗ ∂f (q)
= q̇ = J (q)q̇ = 0 1 L cos q3 q̇, (6)
φ̇ ∂q
0 0 1
and
−L sin q3
2
1 0 L cos q3
! q̇3
p̈ L · R(q3 )
L cos q3 q̈ − L sin q3 q̇32 = q̈ −
= J (q)q̈ + J̇ (q)q̇ = 0 1 q̈3 ,
φ̈
0 0 1 0 0
(7)
where R(q3 ) is the 2 × 2 planar rotation matrix by an angle q3 .
Equation (5) can be easily inverted. Taking into account the parametrization of the task, we have:
q1 (t) px (t) − L cos φ(t) Pc,x + R cos s(t) − L cos (π + s(t))
q(t) = q2 (t) = py (t) − L sin φ(t) = Pc,y + R sin s(t) − L sin (π + s(t))
q3 (t) φ(t) π + s(t)
(8)
Pc,x + (R + L) cos s(t)
= Pc,y + (R + L) sin s(t) .
π + s(t)
Equation (8) shows that the tip of the second link (viz., the base of the third link) of the PPR
robot should trace a circle of large radius R + L.
Taking into account the timing law, we can invert also eq. (6) as
! − (R + L) sin s(t)
ṗ(t) v
q̇(t) = J −1 (q(t)) = (R + L) cos s(t) .
φ̇(t) R
1
Therefore, a first upper bound on v follows from the joint velocity limits:
VR
|q̇1 | ≤ V, |q̇2 | ≤ V, |q̇3 | ≤ Ω ⇒ v ≤ vv = min , ΩR .
R+L
Finally, inversion of eq. (7) yields for the acceleration of the third joint
q̈3 (t) = φ̈(t) = 0,
and thus, as a whole
(R + L) cos s(t)
v 2
q̈(t) = − (R + L) sin s(t) .
R
0
6
A second upper bound on v follows then from the joint acceleration limits:
r
AR2
|q̈1 | ≤ A, |q̈2 | ≤ A, |q̈3 | ≤ Ψ ⇒ v ≤ va = .
R+L
Accordingly, the maximum (constant) speed of feasible execution of the task and the associated
minimum time will be
( r )
VR AR2 2πR
vmax = min {vv , va } = min , ΩR, , Tmin = .
R+L R+L vmax
Note that the limit Ψ on the acceleration of joint 3 plays no role for the considered task.
In the following figures, we plot the time evolution of all requested quantities in the Cartesian and
in the joint space of the PPR robot. In Matlab, the following data were used:
2
L = 1.5 [m], Pc = [m], R = 0.5 [m], V = 2 [m/s], Ω = 2 [rad/s], A = 6 [m/s2 ].
3
7
Cartesian end-effector position and orientation
10
1
0 1 2 3 4 5 6 7
time [s]
Figure 4: Cartesian position p(t) (px (t) [red], py (t) [red, dashed]) and angle φ(t) [blue].
0.5
-0.5
0 1 2 3 4 5 6 7
time [s]
Figure 5: Cartesian linear velocity ṗ(t) (vx (t) [red], vy (t) [red, dashed]) and angular speed φ̇(t)
[blue].
0.4
0.3
ax , a y [m/s 2]; d 2phi/dt 2 [rad/s 2]
0.2
0.1
-0.1
-0.2
-0.3
-0.4
-0.5
0 1 2 3 4 5 6 7
time [s]
Figure 6: Cartesian linear acceleration p̈(t) (ax (t) [red], ay (t) [red, dashed]) and angular accelera-
tion φ̈(t) [blue].
8
Joint position
10
q 1, q 2 [m]; q 3 [rad]
6
0
0 1 2 3 4 5 6 7
time [s]
Figure 7: Joint position q(t): q1 (t) [red], q2 (t) [red, dashed], q3 (t) [blue].
Joint velocity (bounds: V = 2 [m/s], Omega = 2 [rad/s])
2
1.5
1
dq 1/dt, dq 2/dt [m/s]; dq 3/dt [rad/s]
0.5
-0.5
-1
-1.5
-2
0 1 2 3 4 5 6 7
time [s]
Figure 8: Joint velocity q̇(t): q̇1 (t) [red], q̇2 (t) [red, dashed], q̇3 (t) [blue].
Joint acceleration (bounds: A = 6 [m/s2], Psi [rad/s 2] inactive)
2
1.5
d 2q 1/dt, d 2q 2/dt [m/s 2]; d 2q 3/dt [rad/s 2]
0.5
-0.5
-1
-1.5
-2
0 1 2 3 4 5 6 7
time [s]
Figure 9: Joint acceleration q̈(t): q̈1 (t) [red], q̈2 (t) [red, dashed], q̈3 (t) [blue].
9
Exercise 4
Answer to the questions or reply/comment on/complete the statements, providing a short motivation/expla-
nation for each of the following 8 items.
1. Order the three classes of infrared, laser, and ultrasound proximity sensors in terms of their typical
range of measurement.
A: In terms of increasing distance covered: infrared < ultrasound < laser.
2. Order infrared, laser, and ultrasound sensors in terms of their typical angular resolution.
A: In terms of angular resolution at the same distance: laser is better than infrared, which is in general
better than ultrasound.
3. Compare the motor-side position resolution of an incremental encoder with 512 pulses per revolution
(PPR) and quadrature electronics mounted on the motor with that of an absolute encoder with 16 bits
mounted on the link, when the transmission has reduction ratio nr = 20, Which one is better?
A: The incremental encoder has resolution rIE = 360◦ /(512 · 4) = 0.18◦ (as evaluated on the motor side).
The resolution of the absolute encoder mounted on the link side, once reflected back to the motor side,
is rAE = (360◦ /2nbit ) · nr = (360◦ /216 ) · 20 = 0.11◦ . Thus, the absolute encoder has a (almost twice)
better resolution.
4. Given a desired end-effector position for a planar PPR robot, the gradient method will always provide a
solution to the inverse kinematics problem without need of restarting procedures. True or false? Why?
A: True. The 2 × 3 Jacobian of this robot has the structure J (q) = I 2×2 j 3 (q3 ) , and is in fact always
T
full rank. So, being N J (q) = 0, the iterations of the gradient method will always and only end with
a zero end-effector position error, in one of the ∞1 possible configurations that are solutions to the given
inverse kinematic problem.
5. What is the so-called overfly in trajectory planning and which are its pros and cons? Can this concept
be applied equally well at the joint level and at the Cartesian level or not? Why?
A: When a sequence of position/orientation knots is assigned (equally well in the Cartesian or in the joint
space), performing overfly of a knot allows the robot to getting close to it, yet without passing through
it. Continuity of motion is typically gained at the expense of accurate interpolation. If the interpolating
path between knots were made of linear segments, passing through the knots would typically require to
stop to avoid velocity discontinuity, whereas overfly allows to keep the same motion speed.
6. We have four positional knots to be interpolated in the 3D Cartesian space, plus a number of boundary
conditions and continuity requirements. Should we use 4-3-4 polynomials or cubic splines? If both can
be used, which choice is better and why?
A: Both classes of functions have sufficient parameters to satisfy the boundary conditions and continuity
requirements. The 4-3-4 polynomial asks for an initial and final specification of the second derivative
(in space or in time, i.e., acceleration). The cubic splines can be suitably modified to handle also this
case. However, cubic splines are the functions providing the minimum total curvature among all possible
interpolating functions in space.
7. For a single robot joint, we have computed a spline trajectory interpolating n = 10 given knots at some
assigned instants of time t1 < t2 < · · · < t10 . If we modify only one of such time instants, but still
satisfying the sequential order —e.g., the kth instant tk becomes a new t0k ∈ (tk−1 , tk+1 ), and then redo
the computations, will the trajectory change or not? Why?
A: Yes, it will change. The modification of any single or multiple data (time intervals, knot positions)
affects the entire trajectory.
8. A robot commanded at the joint velocity level has initially zero position and orientation errors with
respect to a desired end-effector trajectory, except along the z-component in position. If we apply a
Cartesian kinematic control law, the robot will move so that . . .
10
A: . . . the initial error on the z-component of the Cartesian position is recovered at an exponential rate,
while the errors on all other components remain always zero (at least in nominal conditions). This is
thanks to the decoupling and exact linearization properties of the Cartesian error components achieved
when using a Cartesian kinematic control law. The same is not true if the kinematic control law is
defined on the trajectory errors in the joint space.
∗∗∗∗∗
11