Pavel Trutman Globally Optimal Solution to Inverse Kinematics of - - PowerPoint PPT Presentation

pavel trutman
SMART_READER_LITE
LIVE PREVIEW

Pavel Trutman Globally Optimal Solution to Inverse Kinematics of - - PowerPoint PPT Presentation

LECTURE Pavel Trutman Globally Optimal Solution to Inverse Kinematics of 7DOF Serial Manipulator 14.1.2020, 13:45 Project name: Intelligent Machine Perception Project Registration Number: CZ.02.1.01/0.0/0.0/15_003/0000468 Venue: CIIRC, B-670,


slide-1
SLIDE 1

LECTURE

Pavel Trutman

Globally Optimal Solution to Inverse Kinematics of 7DOF Serial Manipulator

14.1.2020, 13:45

Project name: Intelligent Machine Perception Project Registration Number: CZ.02.1.01/0.0/0.0/15_003/0000468 Venue: CIIRC, B-670, Jugoslávských partyzánů 1580/3, Prague 6

slide-2
SLIDE 2

Globally Optimal Solution to Inverse Kinematics of 7DOF Serial Manipulator

Pavel Trutman1 Mohab Safey El Din2 Didier Henrion3 Tomas Pajdla1

1CIIRC CTU in Prague 2Sorbonne Universit´

e, Inria, LIP6 CNRS

3LAAS-CNRS, FEE CTU in Prague

January 14, 2020

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 1 / 16

slide-3
SLIDE 3

Problem formulation

Serial manipulator with 7 DOF

◮ 7 revolute joints → 7 DOF. ◮ i-th joint is parametrized by angle θi. ◮ Rigid body in space has 6 DOF → redundant manipulator. ◮ One DOF left → self-motion.

x y

  • α

θ1 θ2 θ3   x y α     θ1 θ2 θ3  

Forward kinematics Inverse kinematics

Figure: Example of planar manipulator.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 2 / 16

slide-4
SLIDE 4

Problem formulation

Denavit-Hartenberg convention

◮ Description of the manipulator by Denavit-Hartenberg (D-H) convention [HD55]. ◮ Parameters αi, di and ai are found (fixed for given manipulator). ◮ D-H transformation matrices Mi(θi) ∈ R4×4 from link i to i − 1.

Figure: DH convention.

Mi(θi) =

    

cos θi − sin θi sin θi cos θi 1 di 1

         

1 ai cos αi − sin αi sin αi cos αi 1

    

(1)

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 3 / 16

slide-5
SLIDE 5

Problem formulation

Forward kinematics

◮ Transformation M from the end effector coordinate system to the base coordinate system

7

  • i=1

Mi(θi) = M. (2) ◮ M represents the end effector pose w.r.t. the base coordinate system M =

  • R

t 1

  • , t ∈ R3 and R ∈ SO(3).

(3) ◮ Known joint angles θi → evaluation of Equation (2) gives the end effector pose M. ◮ Joint limits (i = 1, . . . , 7): θLow

i

≤ θi ≤ θHigh

i

. (4)

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 4 / 16

slide-6
SLIDE 6

Problem formulation

Inverse kinematics (IK) problem

◮ Known end effector pose M → joint angles θi. ◮ Solve 7

i=1 Mi(θi) = M for θi.

◮ For redundant manipulator there is an infinite number of solution. ◮ Let us introduce an objective function to choose an optimal solution. min

θ∈−π;π)7 7

max

i=1 θi

(5) ◮ Approximation by sum of squares. min

θ∈−π;π)7 7

  • i=1

θ2

i

(6)

Base X

  • r

θ1 θ2 θ3 θ4 θ′

1

θ′

2

θ′

3

θ′

4

Figure: Two configurations of a planar manipulator with different values of the

  • bjective function.
  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 5 / 16

slide-7
SLIDE 7

Problem formulation

Optimization problem

◮ Optimization problem: min

θ∈−π;π)7 7

  • i=1

θ2

i

s.t. 7

i=1 Mi(θi) = M

θLow

i

≤ θi ≤ θHigh

i

(i = 1, . . . , 7) (7) ◮ Not polynomial, contains trigonometric functions. ◮ We remove them by rewriting the problem in new variables c = [c1, . . . , c7]⊤ and s = [s1, . . . , s7]⊤, which represent the cosines and sines of the joint angles θ = [θ1, . . . , θ7]⊤ respectively. ◮ To preserve the structure, we need to add the trigonometric identities: qi(c, s) = c2

i + s2 i − 1 = 0, i = 1, . . . , 7.

(8)

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 6 / 16

slide-8
SLIDE 8

Problem formulation

Polynomial optimization problem

◮ Polynomial optimization problem equivalent to the original optimization problem: min

c∈−1,17, s∈−1,17 ||c − 1||2

s.t. pj(c, s) = 0 (j = 1, . . . , 12) qi(c, s) = 0 (i = 1, . . . , 7) −(ci + 1) tan θLow

i

2

+ si ≥ 0 (i = 1, . . . , 7) (ci + 1) tan θHigh

i

2

− si ≥ 0 (i = 1, . . . , 7) (9) ◮ In 14 variables (c and s). ◮ Contains polynomials up to degree four. ◮ When solved, θ are recovered from c and s by function atan2.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 7 / 16

slide-9
SLIDE 9

Polynomial optimization methods

Polynomial optimization methods

Polynomial problem: ◮ Objective function: polynomial. ◮ Constraints: polynomial inequalities and equations. ◮ Non-convex. Semidefinite program [Las01]: ◮ Each monomial is substituted by a new variable. ◮ Objective function: linear. ◮ Constraints: linear matrix inequalities, linear equations. ◮ Convex, but infinite-dimensional.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 8 / 16

slide-10
SLIDE 10

Polynomial optimization methods

Polynomial optimization methods

Polynomial problem: ◮ Objective function: polynomial. ◮ Constraints: polynomial inequalities and equations. ◮ Non-convex. Relaxed semidefinite program [Las01]: ◮ Limit the degree of substituted monomials by degree r ∈ N. ◮ Convex and finite-dimensional. ◮ Convergence is ensured. Implemented in Gloptipoly [HLL09]. p∗

r ≤ p∗ r+1 ≤ p∗

(10) lim

r→+∞ p∗ r = p∗

(11)

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 8 / 16

slide-11
SLIDE 11

Solving the IK problem

Direct application of polynomial solver

◮ Direct application of Lasserre hierarchies [Las01] on the problem. ◮ Second order relaxation

◮ 14 variables, monomials up to degree 4 → SDP program with 3060 variables. ◮ Computation time in seconds. ◮ Solution not obtained in many cases.

◮ Third order relaxation

◮ 14 variables, monomials up to degree 6 → SDP program with 38 760 variables. ◮ Computation time in hours.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 9 / 16

slide-12
SLIDE 12

Solving the IK problem

Symbolic reduction

Theorem

The ideal generated by the kinematics constraints pj for generic serial manipulator with seven revolute joints and for generic pose M with addition of the trigonometric identities qi can be generated by a set of degree two polynomials.

Proof.

The proof is computational. See the diagram.

Generic manipulator Generic pose M Polynomial constraints pj, qi G ← Gr¨

  • bner basis of pj, qi

S = {f ∈ G | deg(f) = 2} G′ ← Gr¨

  • bner basis of S

G = G′

  • pj, qi = S
  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 10 / 16

slide-13
SLIDE 13

Solving the IK problem

Solving the reduced polynomial optimization problem

Corollary

Polynomials pj and qi up to degree four in POP can be replaced by degree two polynomials. ◮ Application of Lasserre hierarchies [Las01] on the symbolically reduced problem with degree two polynomials. ◮ First order relaxation

◮ 14 variables, monomials up to degree 2 → SDP program with 120 variables. ◮ Solution typically not obtained.

◮ Second order relaxation

◮ 14 variables, monomials up to degree 4 → SDP program with 3060 variables. ◮ Computation time in seconds. ◮ Gives solution for almost all poses.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 11 / 16

slide-14
SLIDE 14

Experiments

Experiments with KUKA LBR iiwa

◮ Special structure: for fixed end effector pose the joint angle θ4 is constant. ◮ Previous work:

◮ Geometrical derivation of a closed form solution by Kuhlemann et al. [Kuh+16]; new parameter δ is introduced to fix the left DOF. ◮ Dai et al. [DIT17] proposed mix-integer convex relaxation of the non-convex rotational constraints; approximation introduces errors in units of centimeters and degrees.

◮ Synthetic dataset:

◮ 10 000 randomly chosen poses. ◮ From within and outside of the working space of the manipulator. Figure: Manipulator KUKA LBR iiwa.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 12 / 16

slide-15
SLIDE 15

Experiments

Degree four polynomials

◮ Solve the polynomial optimization problem with degree four polynomials. ◮ For relaxation order two. ◮ Using polynomial optimization toolbox GloptiPoly with MOSEK as the semidefinite problem solver. ◮ For 29.3 % poses we failed to compute the solution or report infeasibility.

  • 800-600-400-200 0 200 400 600 800-800
  • 600
  • 400
  • 200

200 400 600 800 100 200 300 400 500 600 700 800 900 1000 Feasible poses Infeasible poses Poses failed to compute x [mm] y [mm] z [mm]

Figure: Poses of the manipulator solved from degree four polynomials.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 13 / 16

slide-16
SLIDE 16

Experiments

Degree two polynomials

◮ Advantage of special structure of KUKA LBR: eliminate variables c4 and s4. ◮ Symbolically reduce the degree four polynomials to degree two polynomials (Maple). ◮ Solve for relaxation order two. ◮ Using polynomial optimization toolbox GloptiPoly with MOSEK as the semidefinite problem solver. ◮ For 0.1 % poses we failed to compute the solution

  • r report infeasibility.
  • 800-600-400-200 0 200 400 600 800-800
  • 600
  • 400
  • 200

200 400 600 800 100 200 300 400 500 600 700 800 900 1000 Feasible poses Infeasible poses Poses failed to compute x [mm] y [mm] z [mm]

Figure: Poses of the manipulator solved from degree two polynomials.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 14 / 16

slide-17
SLIDE 17

Experiments

Numerical stability and execution time evaluation

◮ End effector poses have been computed by direct kinematics from estimated θ. ◮ Pose error w.r.t. desired poses measured in 3D space.

100 101 102 103 104 10−6 10−5 10−4 10−3 10−2 10−1 100 Frequency Pose error Translation error [mm] Rotation error [deg]

Figure: Histogram of pose errors.

◮ Execution time of on-line phase of GloptiPoly and of the symbolic reduction

  • f the polynomials.

100 101 102 103 104 105 2 4 6 8 10 12 Frequency GloptiPoly execution time [s] 1.6 1.8 2 2.2 2.4 2.6 2.8 3 Maple execution time [s] Feasible poses Infeasible poses Poses failed to compute

Figure: Histograms of execution time.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 15 / 16

slide-18
SLIDE 18

Conclusions

Conclusions

◮ We proved that the variety of IK solutions of all generic 7DOF revolute serial manipulators can be generated by second degree polynomials only. ◮ We presented a practical method for globally solving 7DOF IK problem with polynomial

  • bjective function.

◮ Our solution is accurate and can solve/decide infeasibility in 99.9 % cases tested on KUKA LBR iiwa manipulator. ◮ The code is open-sourced at https://github.com/PavelTrutman/Global-7DOF-IKT.

Execution time [s] Median error % of failed poses Reduction step GloptiPoly Translation [mm] Rotation [deg]

  • Deg. 4 polynomials

— 18.4 2.12 · 10−4 3.32 · 10−5 29.3 %

  • Deg. 2 polynomials

2.3 5.5 6.28 · 10−5 5.57 · 10−3 0.1 %

Table: Overview of execution times and accuracy of the presented methods.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 16 / 16

slide-19
SLIDE 19

Acknowledgement

Acknowledgement

  • P. Trutman was supported by the EU Structural and Investment Funds, Operational Programe Research,

Development and Education under the project IMPACT (reg. no. CZ.02.1.01/0.0/0.0/15 003/0000468) and Grant Agency of the CTU Prague project SGS19/173/OHK3/3T/13.

  • T. Pajdla was suppoted by IMPACT Project CZ.02.1.01/0.0/0.0/15 003/0000468 & EU Structural and

Investment Funds, Operational Programe Research, Development and Education and ARtwin - An AR cloud and digital twins solution for industry and construction 4.0 (GA No 856994) H-2020 project.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 17 / 16

slide-20
SLIDE 20

Bibliography

Bibliography I

[DIT17] Hongkai Dai, Gregory Izatt, and Russ Tedrake. “Global inverse kinematics via mixed-integer convex optimization”. In: The International Journal of Robotics Research (2017), p. 0278364919846512. [HD55] Richard S. Hartenberg and Jacques Denavit. “A kinematic notation for lower pair mechanisms based on matrices”. In: Journal of applied mechanics 77.2 (1955),

  • pp. 215–221.

[HLL09] Didier Henrion, Jean-Bernard Lasserre, and Johan L¨

  • fberg. “GloptiPoly 3:

Moments, Optimization and Semidefinite Programming”. In: Optimization Methods Software 24.4–5 (Aug. 2009), pp. 761–779. url: http://dx.doi.org/10.1080/10556780802699201.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 18 / 16

slide-21
SLIDE 21

Bibliography

Bibliography II

[Kuh+16] Ivo Kuhlemann et al. “Robust inverse kinematics by configuration control for redundant manipulators with seven DoF”. In: 2016 2nd International Conference

  • n Control, Automation and Robotics (ICCAR). IEEE. 2016, pp. 49–55.

[Las01] Jean B. Lasserre. “Global Optimization with Polynomials and the Problem of Moments”. In: Society for Industrial and Applied Mathematics Journal on Optimization 11 (2001), pp. 796–817.

  • P. Trutman, M. Safey El Din, D. Henrion, T. Pajdla

Globally Optimal Solution to IK of 7DOF Manipulator IMPACT seminar 19 / 16