Documente Academic
Documente Profesional
Documente Cultură
Inverse kinematics
Prof. Alessandro De Luca
Robotics 1 1
Inverse kinematics
what are we looking for?
! WS2 # WS1
Robotics 1 4
Workspace of Fanuc R-2000i/165F
section for a
constant angle $1
WS1⊂R3
(! WS2 for spherical wrist
without joint limits)
rotating the
base joint angle $1
Robotics 1 5
Workspace of planar 2R arm
2 orientations
l1+l2
y if p ! int(WS1)
• p = WS1- (WS1
l2
q2
|l1-l2|
l1
q1 (WS1
inner and outer
x boundaries 1 orientation
! if l1 % l2
! WS1 = {p ! R2: |l1-l2| & !p!& l1+l2} ⊂ R2
! WS2 = '
! if l1 = l2 = "
! WS1 = {p ! R2: !p!& 2"} ⊂ R2
! WS2 = {p = 0} (infinite number of feasible orientations at the origin)
Robotics 1 6
Wrist position and E-E pose
inverse solutions for an articulated 6R robot
LEFT DOWN Unimation PUMA 560 RIGHT DOWN
4 inverse solutions
out of singularities
(for the position of
the wrist center only)
Robotics 1 7
Counting and visualizing the 8 solutions
to the inverse kinematics of a Unimation Puma 560
RIGHT UP
RIGHT DOWN
LEFT UP
LEFT DOWN
Robotics 1 8
Inverse kinematic solutions of UR10
6-dof Universal Robot UR10, with non-spherical wrist
video (slow motion)
desired pose
# "0.2373& # 3 /2 0.5 0&
p = % "0.0832( R = % "0.5 3 /2 0(
% ( % (
$ 1.3224 ' $ 0 0 1'
[m]
!
configuration at start
! T
q = ( " /3 #2" /3 " /6 0 " /2 0)
[rad]
Robotics 1 9
The 8 inverse kinematic solutions of UR10
! ! ! !
Robotics 1 10
! ! ! !
Multiplicity of solutions
some examples
⇒ lmin = l3 = 0.3
⇒
Rin = 0,
Robotics 1 13
Multiplicity of solutions
summary of the general cases
! if m = n
! ! solutions
! a finite number of solutions (regular/generic case)
! “degenerate” solutions: infinite or finite set, but anyway
different in number from the generic case (singularity)
! if m < n (robot is redundant for the kinematic task)
! ! solutions
! )n-m solutions (regular/generic case)
! a finite or infinite number of singular solutions
! use of the term singularity will become clearer when dealing
with differential kinematics
! instantaneous velocity mapping from joint to task velocity
! lack of full rank of the associated m"n Jacobian matrix J(q)
Robotics 1 14
Dexter robot (8R arm)
! m = 6 (position and orientation of E-E)
! n = 8 (all revolute joints)
! )2 inverse kinematic solutions (redundancy degree = n-m = 2)
video
c2 = (px2 + py2 - l12 - l22)/ 2 l1 l2, s2 = ±-1 - c22 q2 = ATAN2 {s2, c2}
q1 *
px x
2 solutions
q1 = ATAN2 {py, px} - ATAN2 {l2 s2 , l1 + l2 c2}
(one for each value of s2)
note: difference of ATAN2 needs
to be re-expressed in (-+ , +]!
q2’’
• p
{q1,q2}UP/LEFT q2’ {q1,q2}DOWN/RIGHT
l1 + l2c2 - l2s2 c1 px
=
l2s2 l1 + l2c2 s1 py
q3
q2
L3
d1 pz
{f, b} = facing, backing
the point p=(px,py,pz) py
px = c1 (L2c2+ L3c23)
direct four regular inverse
py = s1 (L2c2+ L3c23)
kinematics kinematics solutions in WS1
pz = d1+ L2s2+ L3s23
Note: more details (e.g., full handling of
WS1={spherical shell centered at (0,0,d1), with outer singular cases) can be found in the solution
radius Rout=#L22+L32 and inner radius Rin=|L2-L3|} of the Robotics 1 written exam of 11.04.2017
Robotics 1 21
Inverse kinematics of 3R elbow-type arm
L2
q3 px = c1 (L2c2+ L3c23)
q2 py = s1 (L2c2+ L3c23) direct
L3 kinematics
d1 pz pz = d1+ L2s2+ L3s23
py
q1
px
px2 + py2 + (pz-d1)2 = c12 (L2c2+ L3c23)2 + s12 (L2c2+ L3c23)2 + (L2s2+ L3s23)2
= ... = L22 + L32 + 2L2L3 (c2c23+s2s23) = L22 + L32 + 2L2L3 c3
c3 = (px2 + py2 + (pz-d1)2 - L22 - L32) / 2L2L3 ∈ [-1,1] (else, p is out of workspace!)
q3{+} = ATAN2{s3, c3}
±s3 = ±-1 - c3 two solutions
q3{-} = ATAN2{-s3, c3} = - q3{+}
Robotics 1 22
Inverse kinematics of 3R elbow-type arm
L2
q3 px = c1 (L2c2+ L3c23)
q2 py = s1 (L2c2+ L3c23) direct
L3 kinematics
d1 pz pz = d1+ L2s2+ L3s23
py
q1
px (being px2 + py2 = (L2c2+ L3c23)2 > 0)
Robotics 1 23
Inverse kinematics of 3R elbow-type arm
from the first two equations in the
L2
direct kinematics
q3 c1px + s1py = L2c2 + L3c23
q2
L3 = (L2+L3c3) c2 – L3s3 s2
d1 pz pz – d1 = L2s2+ L3s23
py = L3s3 c2 + (L2+L3c3) s2
z0 j5 d6
j4
find q1, …, q6 from the input data:
y0
• p (origin O6)
x0 j1 • R = [n s a] (orientation of RF6)
spherical n = 0x6(q)
wrist
s = 0y6(q)
a function of
q1, q2, q3 only!
a = 0z6(q)
p = 06(q)
Robotics 1 27
Operation of Newton method
! in the scalar case, also known as “method of the tangent”
! for a differentiable function f(x), find a root of f(x*)=0 by iterating as
f(x k )
x k+1 = xk "
f'(x k )
an approximating sequence
! {x , x , x , x , x ,...}
1 2 3 4 5
" x*
! animation from
http://en.wikipedia.org/wiki/File:NewtonIteration_Ani.gif
Robotics 1 28
Numerical solution of
inverse kinematics problems (cont’d)
Robotics 1 29
Revisited as a “feedback” scheme
q(0)
.
rd + e q 2 q rd = cost
Jr T(q)
3
-
r (* = 1)
fr(q)
. dt
V = 0 4 e ! Ker(JrT) in particular e = 0
asymptotic stability
Robotics 1 30
Properties of Gradient method
! computationally simpler: Jacobian transpose, rather than its
(pseudo)-inverse
! direct use also for robots that are redundant for the task
! may not converge to a solution, but it never diverges
! the discrete-time evolution of the continuous scheme
Robotics 1 31
A case study
analytic expressions of Newton and gradient iterations
k+1 k
1 "1 - (c1 + c12 )%
q =q + • $1 - (s + s )'
!# # 12 &
-(s1 + s12 ) c1 + c12 & 1 q=q k
" % (
$ -s 12 c12 ' q=q k
! !
!
Robotics 1
Jr T (qk ) 32
! !
Error function
! 2R robot with l1=l2=1, desired end-effector position pd = (1,1)
e = pd - fr(q)
start
one solution
.
local maximum
.
saddle point
(stop if this is the initial guess) (stop after some iterations)
another start...
Robotics 1 e ! Ker(JrT) ! 34
Convergence analysis
when does the gradient method get stuck?
pd e 䌝 Ker(JrT) !!
e ! Ker(JrT) the algorithm will
proceed in this case,
moving out of
p the singularity
p (q1,q2)max =(-3!/4,0) (q1,q2) =(!/9,0)
Robotics 1 35
Issues in implementation
! initial guess q0
! only one inverse solution is generated for each guess
! multiple initializations for obtaining other solutions
! optimal step size * in Gradient method
! a constant step may work good initially, but not close to the
solution (or vice versa)
! an adaptive one-dimensional line search (e.g., Armijo’s rule) could
be used to choose the best * at each iteration
! stopping criteria
Cartesian error algorithm
(possibly, separate for !rd - f(qk)! %# increment !qk+1-qk! % #q
position and orientation)
! understanding closeness to singularities
numerical conditioning
$min{J(qk)} & $0 of Jacobian matrix (SVD)
(or a simpler test on its determinant, for m=n)
Robotics 1 36
Numerical tests on RRP robot
! RRP/polar robot: desired E-E position rd = pd = (1, 1 ,1)
—see slide 20, with d1=0.5
! the two (known) analytical solutions, with q3 & 0, are:
q* = (0.7854, 0.3398, 1.5)
q** = (q1*- +, + - q2*, q3*) = (-2.3562, 2.8018, 1.5)
! norms # = 10-5 (max Cartesian error), #q =10-6 (min joint increment)
! kmax=15 (max # iterations), |det(Jr)| % 10-4 (closeness to singularity)
! numerical performance of Gradient (with different steps *) vs. Newton
! test 1: q0 = (0, 0, 1) as initial guess
! test 2: q0 = (-+/4, +/2, 1) —”singular” start, since c2=0 (see slide 20)
! test 3: q0 = (0, +/2, 0) —”double singular” start, since also q3=0
! solution and plots with Matlab code
Robotics 1 37
Numerical test -1
! test 1: q0 = (0, 0, 1) as initial guess; evolution of error norm
0.57䏙10-5
Newton
ex
Cartesian errors
component-wise
very fast, converges
in 5 iterations ey
ez
Robotics 1 0.15䏙10-8 38
Numerical test -1
without check:
it diverges!
Gradient
* = 0.7
!!
starts toward
solution, but
joint variables
slowly stops
(in singularity):
when Cartesian error
vector e ∈ Ker(JrT)
Robotics 1 40
Numerical test -3
! test 3: q0 = (0, +/2, 0): “double” singular start
joint variables
䙷
Robotics 1 41
Final remarks
! an efficient iterative scheme can be devised by combining
! initial iterations using Gradient (“sure but slow”, linear convergence rate)
! switch then to Newton method (quadratic terminal convergence rate)
! joint range limits are considered only at the end
! check if the solution found is feasible, as for analytical methods
! in alternative, an optimization criterion can be included in the search
! driving iterations toward an inverse kinematic solution with nicer properties
! if the problem has to be solved on-line
! execute iterations and associate an actual robot motion: repeat steps at
times t0, t1=t0+T, ..., tk=tk-1+T (e.g., every T=40 ms)
! the “good” choice for the initial guess q0 at tk is the solution of the previous
problem at tk-1 (provides continuity, needs only 1-2 Newton iterations)
! crossing of singularities/handling of joint range limits need special care
! Jacobian-based inversion schemes are used also for kinematic control,
along a continuous task trajectory rd(t)
Robotics 1 42