Quantcast

Failing to generate IKfast IK solver for 5DOF arm

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Failing to generate IKfast IK solver for 5DOF arm

Marcus Liebhardt
Hello list!
My attempts of generating an IK solver using IKFast have failed so far. I'm working with a custom 5 DOF arm of type rotation-prismatic-rotation-rotation-rotation. I have attached the DAE description.

My results so far:
Ray4D fails with the error: "__main__.CannotSolveError: 'failed to find a variable to solve'"
TranslationZAxisAngle4D fails with the error: "sympy.matrices.matrices.ShapeError". The same for the other angles.
TranslationDirection5D fails with the error: "ValueError: A Matrix must have non-zero determinant to invert."

For the 4D types I tried all available joints as "freeindex". The logs are added below.

I want to add that although my arm contains 5 joints, only 4 DOF can independently be set. I.e. I usually set the goal position in 3D plus an angle for the pitch, since yaw is determined by the first rotational joint and roll is fixed.

It's my first time using IKfast and so far I didn't get very familiar with it. My tests also included taking my arm apart to make the kinematics simpler, but so far I was only able to get a solver for Rotation3D generated.

My questions:
Why does generating solver code for the 4D and 5D IK types fail? And what can I do to get a valid IKfast IK solver?

I'm using openrave version 0.8 with IKfast version 61 (deb install). I intend to use the IKfast IK solver together with MoveIt. The DAE description was generated using MoveIt's tools (URDF to DAE and number rounding).

Every hint is highly appreciated!

Thanks,
Marcus



TranslationZAxisAngle4D:

$ python `openrave0.8-config --python-dir`/openravepy/_openravepy_0_8/ikfast.py --robot=korus_test_rounded.dae --iktype=translationzaxisangle4d --baselink=0 --eelink=10 --savefile=./test.cpp -d 1 --freeindex=1
[plugindatabase.h:392] /usr/share/openrave-0.8/plugins doesn't exist
[plugindatabase.h:573] Failed to create name ode, interface collisionchecker
[plugindatabase.h:573] Failed to create name bullet, interface collisionchecker
[plugindatabase.h:573] Failed to create name pqp, interface collisionchecker
[plugindatabase.h:573] Failed to create name IdealController, interface controller
/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide
  axisangle /= angle
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[0]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[2]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 90.000000, axis=[1.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[-1.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[4]: 90.000000, axis=[1.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[6]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[8]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
INFO: moved translation [0, 0, 0] to right end
INFO: moved translation [0, 0, 17/100] to left end
INFO: moved translation on intersecting axis [0, 0, 11/200] to left
INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 1023/2000]]
INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, -137/4000],[0, 1, 0, 1/100],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, j1]]
INFO: [[1, 0, 0, 329/4000],[0, 0, -1, -11/200],[0, 1, 0, 0]]
INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 283/1000],[0, 1, 0, 0],[0, 0, 1, 0]]
INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 191/500],[0, 1, 0, 0],[0, 0, 1, 0]]
INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -9/200]]
INFO: ikfast translation axis 4d, globaldir=[0]
[0]
[1], basedir=[1]
[0]
[0]: [j0, j2, j3, j4]
INFO: [j1] [j0, j2, j3, j4]
INFO: [j1, j0] [j2, j3, j4]
DEBUG: 'half-angle substitution for joint j0 failed, 1 equations examined'
INFO: [j1, j0, j2] [j3, j4]
DEBUG: j3 solution: atan2 check for joint
INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]
DEBUG: j3 solution: atan2 check for joint
INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]
DEBUG: j3 solution: atan2 check for joint
INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]
DEBUG: j3 solution: atan2 check for joint
INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]
INFO: [j1, j0, j2, j3] [j4]
DEBUG: 'half-angle substitution for joint j0 failed, 1 equations examined'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in <module>
    chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1641, in generateIkSolver
    chaintree.leftmultiply(Tleft=self.multiplyMatrix(LinksLeft), Tleftinv=self.multiplyMatrix(LinksLeftInv[::-1]))
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 965, in leftmultiply
    self.Pfk = Tleft[0:2,0:2]*self.Pfk+Tleft[0:2,3]
  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 409, in __mul__
    return matrix_multiply(self,a)
  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 2580, in matrix_multiply
    raise ShapeError()
sympy.matrices.matrices.ShapeError


Ray4D:

$ python `openrave0.8-config --python-dir`/openravepy/_openravepy_0_8/ikfast.py --robot=korus_test_rounded.dae --iktype=ray4d --baselink=0 --eelink=10 --savefile=./test.cpp -d 1 --freeindex=1
[plugindatabase.h:392] /usr/share/openrave-0.8/plugins doesn't exist
[plugindatabase.h:573] Failed to create name ode, interface collisionchecker
[plugindatabase.h:573] Failed to create name bullet, interface collisionchecker
[plugindatabase.h:573] Failed to create name pqp, interface collisionchecker
[plugindatabase.h:573] Failed to create name IdealController, interface controller
/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide
  axisangle /= angle
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[0]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[2]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 90.000000, axis=[1.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[-1.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[4]: 90.000000, axis=[1.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[6]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[8]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
INFO: moved translation [0, 0, 0] to right end
INFO: moved translation [0, 0, 17/100] to left end
INFO: moved translation on intersecting axis [0, 0, 11/200] to left
INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 1023/2000]]
INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, -137/4000],[0, 1, 0, 1/100],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, j1]]
INFO: [[1, 0, 0, 329/4000],[0, 0, -1, -11/200],[0, 1, 0, 0]]
INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 283/1000],[0, 1, 0, 0],[0, 0, 1, 0]]
INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 191/500],[0, 1, 0, 0],[0, 0, 1, 0]]
INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -9/200]]
INFO: ikfast ray4d: [j0, j2, j3, j4]
INFO: [j1] [j0, j2, j3, j4]
DEBUG: j0 solution: denominator is equal r00**2 + r01**2, doing a global substitution
INFO: j0 solution: equations used for atan2: [-r00*cos(j0) - r01*sin(j0), r00*sin(j0) - r01*cos(j0) - 1]
INFO: [j1, j0] [j2, j3, j4]
DEBUG: 'solveDialytically: more unknowns than equations 6>4'
DEBUG: 'solveDialytically: more unknowns than equations 6>4'
WARNING: 'solvePairVariablesHalfAngle: solve dialytically with 2 equations'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in <module>
    chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1639, in generateIkSolver
    chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1939, in solveFullIK_Ray4D
    tree = self.solveAllEquations(AllEquations,curvars=solvejointvars[:],othersolvedvars = self.freejointvars[:],solsubs = self.freevarsubs[:],endbranchtree=endbranchtree)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4264, in solveAllEquations
    return self.addSolution(solutions,AllEquations,curvars,othersolvedvars,solsubs,endbranchtree,currentcases=currentcases)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4487, in addSolution
    nextsolutions[var] = self.solveAllEquations(AllEquations,curvars=newvars,othersolvedvars=othersolvedvars+[var],solsubs=solsubs+self.Variable(var).subs,endbranchtree=endbranchtree,currentcases=currentcases)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4321, in solveAllEquations
    raise self.CannotSolveError('failed to find a variable to solve')
__main__.CannotSolveError: 'failed to find a variable to solve'


TranslationDirection5D:

$ python `openrave0.8-config --python-dir`/openravepy/_openravepy_0_8/ikfast.py --robot=korus_test_rounded.dae --iktype=translationdirection5d --baselink=1 --eelink=10 --savefile=./test2.cpp -d 1
[plugindatabase.h:392] /usr/share/openrave-0.8/plugins doesn't exist
[plugindatabase.h:573] Failed to create name ode, interface collisionchecker
[plugindatabase.h:573] Failed to create name bullet, interface collisionchecker
[plugindatabase.h:573] Failed to create name pqp, interface collisionchecker
[plugindatabase.h:573] Failed to create name IdealController, interface controller
/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide
  axisangle /= angle
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[0]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[2]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 90.000000, axis=[1.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[-1.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[4]: 90.000000, axis=[1.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[6]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle of Links[8]: 0.000000, axis=[0.000000,0.000000,0.000000]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]
INFO: moved translation [0, 0, 0] to right end
INFO: moved translation [0, 0, 17/100] to left end
INFO: moved translation on intersecting axis [0, 0, 11/200] to left
INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 873/2000]]
INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, -137/4000],[0, 1, 0, 1/100],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, j1]]
INFO: [[1, 0, 0, 329/4000],[0, 0, -1, -11/200],[0, 1, 0, 0]]
INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 283/1000],[0, 1, 0, 0],[0, 0, 1, 0]]
INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 191/500],[0, 1, 0, 0],[0, 0, 1, 0]]
INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]
INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -9/200]]
INFO: ikfast translation direction 5d: [j0, j1, j2, j3, j4]
INFO: attempting li/woernle/hiller general ik method
WARNING: 'Kohli/Osvatic method requires 3 unknown variables, has 2'
INFO: attempting li/woernle/hiller general ik method
WARNING: 'need exactly 8 equations of one variable'
INFO: attempting kohli/osvatic general ik method
WARNING: 'Kohli/Osvatic method requires 3 unknown variables'
INFO: attempting kohli/osvatic general ik method
WARNING: 'Kohli/Osvatic method requires 3 unknown variables'
INFO: attempting manocha/canny general ik method
INFO: solving for all pairwise variables in (cj2, sj2, cj3, sj3), number of symbol coeffs are 0
INFO: forcing matrix inverse (might take some time)
WARNING: 'failed to find 7 linearly independent equations'
INFO: solving for all pairwise variables in (cj0, sj0, j1), number of symbol coeffs are 44
INFO: forcing matrix inverse (might take some time)
INFO: solving simultaneously for symbols: (cj2, sj2, cj3, sj3)
WARNING: solveDialytically: polynomial Poly(-r02, htj2, htj3, domain='ZZ[r02]') degree is 0
WARNING: solveDialytically equations 12 > 4, should be equal...
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in <module>
    chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1639, in generateIkSolver
    chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 2033, in solveFullIK_TranslationDirection5D
    coupledsolutions,usedvars = solvemethod(rawpolyeqs2[index],solvejointvars,endbranchtree=[AST.SolverSequence([endbranchtree2])])
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 3280, in solveManochaCanny
    exportcoeffeqs,exportmonoms = self.solveDialytically(newreducedeqs,ileftvar,getsubs=getsubs)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4006, in solveDialytically
    subs = subsvals+getsubs(subsvals)
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 634, in getsubs
    Anew = self.A.subs(psubs).inv()
  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 739, in inv
    return self.inverse_GE(iszerofunc=iszerofunc)
  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 1926, in inverse_GE
    raise ValueError("A Matrix must have non-zero determinant to invert.")
ValueError: A Matrix must have non-zero determinant to invert.


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

korus_test_rounded.dae (43K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Failing to generate IKfast IK solver for 5DOF arm

baxelrod

Your error looks like the one I get when I try to generate an ikfast solution like so:

 

python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot=robot.xml --iktype=translationzaxisangle4d --savefile=robotik.cpp --baselink=2 --eelink=6

 

But I can generate a solution just fine if I call ikfast this way:

 

openrave.py --database inversekinematics --robot=robot.xml --iktype=TranslationZAxisAngle4D --manipname=manipulator

 

See (unanswered) post from 11/7/2013 titled “different ways to call ikfast” for more info.

-Ben

 

 

From: Marcus Liebhardt [mailto:[hidden email]]
Sent: Tuesday, December 03, 2013 4:19 AM
To: [hidden email]
Subject: [OpenRAVE-users] Failing to generate IKfast IK solver for 5DOF arm

 

Hello list!

My attempts of generating an IK solver using IKFast have failed so far. I'm working with a custom 5 DOF arm of type rotation-prismatic-rotation-rotation-rotation. I have attached the DAE description.

 

My results so far:

Ray4D fails with the error: "__main__.CannotSolveError: 'failed to find a variable to solve'"

TranslationZAxisAngle4D fails with the error: "sympy.matrices.matrices.ShapeError". The same for the other angles.

TranslationDirection5D fails with the error: "ValueError: A Matrix must have non-zero determinant to invert."

 

For the 4D types I tried all available joints as "freeindex". The logs are added below.

 

I want to add that although my arm contains 5 joints, only 4 DOF can independently be set. I.e. I usually set the goal position in 3D plus an angle for the pitch, since yaw is determined by the first rotational joint and roll is fixed.

 

It's my first time using IKfast and so far I didn't get very familiar with it. My tests also included taking my arm apart to make the kinematics simpler, but so far I was only able to get a solver for Rotation3D generated.

 

My questions:

Why does generating solver code for the 4D and 5D IK types fail? And what can I do to get a valid IKfast IK solver?

 

I'm using openrave version 0.8 with IKfast version 61 (deb install). I intend to use the IKfast IK solver together with MoveIt. The DAE description was generated using MoveIt's tools (URDF to DAE and number rounding).

 

Every hint is highly appreciated!

 

Thanks,

Marcus

 

 

 

TranslationZAxisAngle4D:

 

$ python `openrave0.8-config --python-dir`/openravepy/_openravepy_0_8/ikfast.py --robot=korus_test_rounded.dae --iktype=translationzaxisangle4d --baselink=0 --eelink=10 --savefile=./test.cpp -d 1 --freeindex=1

[plugindatabase.h:392] /usr/share/openrave-0.8/plugins doesn't exist

[plugindatabase.h:573] Failed to create name ode, interface collisionchecker

[plugindatabase.h:573] Failed to create name bullet, interface collisionchecker

[plugindatabase.h:573] Failed to create name pqp, interface collisionchecker

[plugindatabase.h:573] Failed to create name IdealController, interface controller

/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide

  axisangle /= angle

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[0]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[2]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[-1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[4]: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[6]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[8]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

INFO: moved translation [0, 0, 0] to right end

INFO: moved translation [0, 0, 17/100] to left end

INFO: moved translation on intersecting axis [0, 0, 11/200] to left

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 1023/2000]]

INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, -137/4000],[0, 1, 0, 1/100],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, j1]]

INFO: [[1, 0, 0, 329/4000],[0, 0, -1, -11/200],[0, 1, 0, 0]]

INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 283/1000],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 191/500],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -9/200]]

INFO: ikfast translation axis 4d, globaldir=[0]

[0]

[1], basedir=[1]

[0]

[0]: [j0, j2, j3, j4]

INFO: [j1] [j0, j2, j3, j4]

INFO: [j1, j0] [j2, j3, j4]

DEBUG: 'half-angle substitution for joint j0 failed, 1 equations examined'

INFO: [j1, j0, j2] [j3, j4]

DEBUG: j3 solution: atan2 check for joint

INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]

DEBUG: j3 solution: atan2 check for joint

INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]

DEBUG: j3 solution: atan2 check for joint

INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]

DEBUG: j3 solution: atan2 check for joint

INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]

INFO: [j1, j0, j2, j3] [j4]

DEBUG: 'half-angle substitution for joint j0 failed, 1 equations examined'

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in <module>

    chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1641, in generateIkSolver

    chaintree.leftmultiply(Tleft=self.multiplyMatrix(LinksLeft), Tleftinv=self.multiplyMatrix(LinksLeftInv[::-1]))

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 965, in leftmultiply

    self.Pfk = Tleft[0:2,0:2]*self.Pfk+Tleft[0:2,3]

  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 409, in __mul__

    return matrix_multiply(self,a)

  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 2580, in matrix_multiply

    raise ShapeError()

sympy.matrices.matrices.ShapeError

 

 

Ray4D:

 

$ python `openrave0.8-config --python-dir`/openravepy/_openravepy_0_8/ikfast.py --robot=korus_test_rounded.dae --iktype=ray4d --baselink=0 --eelink=10 --savefile=./test.cpp -d 1 --freeindex=1

[plugindatabase.h:392] /usr/share/openrave-0.8/plugins doesn't exist

[plugindatabase.h:573] Failed to create name ode, interface collisionchecker

[plugindatabase.h:573] Failed to create name bullet, interface collisionchecker

[plugindatabase.h:573] Failed to create name pqp, interface collisionchecker

[plugindatabase.h:573] Failed to create name IdealController, interface controller

/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide

  axisangle /= angle

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[0]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[2]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[-1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[4]: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[6]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[8]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

INFO: moved translation [0, 0, 0] to right end

INFO: moved translation [0, 0, 17/100] to left end

INFO: moved translation on intersecting axis [0, 0, 11/200] to left

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 1023/2000]]

INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, -137/4000],[0, 1, 0, 1/100],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, j1]]

INFO: [[1, 0, 0, 329/4000],[0, 0, -1, -11/200],[0, 1, 0, 0]]

INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 283/1000],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 191/500],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -9/200]]

INFO: ikfast ray4d: [j0, j2, j3, j4]

INFO: [j1] [j0, j2, j3, j4]

DEBUG: j0 solution: denominator is equal r00**2 + r01**2, doing a global substitution

INFO: j0 solution: equations used for atan2: [-r00*cos(j0) - r01*sin(j0), r00*sin(j0) - r01*cos(j0) - 1]

INFO: [j1, j0] [j2, j3, j4]

DEBUG: 'solveDialytically: more unknowns than equations 6>4'

DEBUG: 'solveDialytically: more unknowns than equations 6>4'

WARNING: 'solvePairVariablesHalfAngle: solve dialytically with 2 equations'

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in <module>

    chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1639, in generateIkSolver

    chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1939, in solveFullIK_Ray4D

    tree = self.solveAllEquations(AllEquations,curvars=solvejointvars[:],othersolvedvars = self.freejointvars[:],solsubs = self.freevarsubs[:],endbranchtree=endbranchtree)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4264, in solveAllEquations

    return self.addSolution(solutions,AllEquations,curvars,othersolvedvars,solsubs,endbranchtree,currentcases=currentcases)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4487, in addSolution

    nextsolutions[var] = self.solveAllEquations(AllEquations,curvars=newvars,othersolvedvars=othersolvedvars+[var],solsubs=solsubs+self.Variable(var).subs,endbranchtree=endbranchtree,currentcases=currentcases)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4321, in solveAllEquations

    raise self.CannotSolveError('failed to find a variable to solve')

__main__.CannotSolveError: 'failed to find a variable to solve'

 

 

TranslationDirection5D:

 

$ python `openrave0.8-config --python-dir`/openravepy/_openravepy_0_8/ikfast.py --robot=korus_test_rounded.dae --iktype=translationdirection5d --baselink=1 --eelink=10 --savefile=./test2.cpp -d 1

[plugindatabase.h:392] /usr/share/openrave-0.8/plugins doesn't exist

[plugindatabase.h:573] Failed to create name ode, interface collisionchecker

[plugindatabase.h:573] Failed to create name bullet, interface collisionchecker

[plugindatabase.h:573] Failed to create name pqp, interface collisionchecker

[plugindatabase.h:573] Failed to create name IdealController, interface controller

/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide

  axisangle /= angle

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[0]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[2]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[-1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[4]: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[6]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[8]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

INFO: moved translation [0, 0, 0] to right end

INFO: moved translation [0, 0, 17/100] to left end

INFO: moved translation on intersecting axis [0, 0, 11/200] to left

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 873/2000]]

INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, -137/4000],[0, 1, 0, 1/100],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, j1]]

INFO: [[1, 0, 0, 329/4000],[0, 0, -1, -11/200],[0, 1, 0, 0]]

INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 283/1000],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 191/500],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -9/200]]

INFO: ikfast translation direction 5d: [j0, j1, j2, j3, j4]

INFO: attempting li/woernle/hiller general ik method

WARNING: 'Kohli/Osvatic method requires 3 unknown variables, has 2'

INFO: attempting li/woernle/hiller general ik method

WARNING: 'need exactly 8 equations of one variable'

INFO: attempting kohli/osvatic general ik method

WARNING: 'Kohli/Osvatic method requires 3 unknown variables'

INFO: attempting kohli/osvatic general ik method

WARNING: 'Kohli/Osvatic method requires 3 unknown variables'

INFO: attempting manocha/canny general ik method

INFO: solving for all pairwise variables in (cj2, sj2, cj3, sj3), number of symbol coeffs are 0

INFO: forcing matrix inverse (might take some time)

WARNING: 'failed to find 7 linearly independent equations'

INFO: solving for all pairwise variables in (cj0, sj0, j1), number of symbol coeffs are 44

INFO: forcing matrix inverse (might take some time)

INFO: solving simultaneously for symbols: (cj2, sj2, cj3, sj3)

WARNING: solveDialytically: polynomial Poly(-r02, htj2, htj3, domain='ZZ[r02]') degree is 0

WARNING: solveDialytically equations 12 > 4, should be equal...

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in <module>

    chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1639, in generateIkSolver

    chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 2033, in solveFullIK_TranslationDirection5D

    coupledsolutions,usedvars = solvemethod(rawpolyeqs2[index],solvejointvars,endbranchtree=[AST.SolverSequence([endbranchtree2])])

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 3280, in solveManochaCanny

    exportcoeffeqs,exportmonoms = self.solveDialytically(newreducedeqs,ileftvar,getsubs=getsubs)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4006, in solveDialytically

    subs = subsvals+getsubs(subsvals)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 634, in getsubs

    Anew = self.A.subs(psubs).inv()

  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 739, in inv

    return self.inverse_GE(iszerofunc=iszerofunc)

  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 1926, in inverse_GE

    raise ValueError("A Matrix must have non-zero determinant to invert.")

ValueError: A Matrix must have non-zero determinant to invert.

 


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Failing to generate IKfast IK solver for 5DOF arm

Rosen Diankov
Administrator
i just added a manipulator tag to the robot and tried the following in openrave 0.9 (master branch):

openrave.py --database inversekinematics --robot=korus_test_rounded2.dae  --manipname=arm --iktype=TranslationXAxisAngleZNorm4D --iktests=100

and it worked.  unfortunately, translationdirection5d doesn't work



2013-12-03 23:03 GMT+09:00 Axelrod, Ben <[hidden email]>:

Your error looks like the one I get when I try to generate an ikfast solution like so:

 

python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot=robot.xml --iktype=translationzaxisangle4d --savefile=robotik.cpp --baselink=2 --eelink=6

 

But I can generate a solution just fine if I call ikfast this way:

 

openrave.py --database inversekinematics --robot=robot.xml --iktype=TranslationZAxisAngle4D --manipname=manipulator

 

See (unanswered) post from 11/7/2013 titled “different ways to call ikfast” for more info.

-Ben

 

 

From: Marcus Liebhardt [mailto:[hidden email]]
Sent: Tuesday, December 03, 2013 4:19 AM
To: [hidden email]
Subject: [OpenRAVE-users] Failing to generate IKfast IK solver for 5DOF arm

 

Hello list!

My attempts of generating an IK solver using IKFast have failed so far. I'm working with a custom 5 DOF arm of type rotation-prismatic-rotation-rotation-rotation. I have attached the DAE description.

 

My results so far:

Ray4D fails with the error: "__main__.CannotSolveError: 'failed to find a variable to solve'"

TranslationZAxisAngle4D fails with the error: "sympy.matrices.matrices.ShapeError". The same for the other angles.

TranslationDirection5D fails with the error: "ValueError: A Matrix must have non-zero determinant to invert."

 

For the 4D types I tried all available joints as "freeindex". The logs are added below.

 

I want to add that although my arm contains 5 joints, only 4 DOF can independently be set. I.e. I usually set the goal position in 3D plus an angle for the pitch, since yaw is determined by the first rotational joint and roll is fixed.

 

It's my first time using IKfast and so far I didn't get very familiar with it. My tests also included taking my arm apart to make the kinematics simpler, but so far I was only able to get a solver for Rotation3D generated.

 

My questions:

Why does generating solver code for the 4D and 5D IK types fail? And what can I do to get a valid IKfast IK solver?

 

I'm using openrave version 0.8 with IKfast version 61 (deb install). I intend to use the IKfast IK solver together with MoveIt. The DAE description was generated using MoveIt's tools (URDF to DAE and number rounding).

 

Every hint is highly appreciated!

 

Thanks,

Marcus

 

 

 

TranslationZAxisAngle4D:

 

$ python `openrave0.8-config --python-dir`/openravepy/_openravepy_0_8/ikfast.py --robot=korus_test_rounded.dae --iktype=translationzaxisangle4d --baselink=0 --eelink=10 --savefile=./test.cpp -d 1 --freeindex=1

[plugindatabase.h:392] /usr/share/openrave-0.8/plugins doesn't exist

[plugindatabase.h:573] Failed to create name ode, interface collisionchecker

[plugindatabase.h:573] Failed to create name bullet, interface collisionchecker

[plugindatabase.h:573] Failed to create name pqp, interface collisionchecker

[plugindatabase.h:573] Failed to create name IdealController, interface controller

/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide

  axisangle /= angle

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[0]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[2]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[-1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[4]: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[6]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[8]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

INFO: moved translation [0, 0, 0] to right end

INFO: moved translation [0, 0, 17/100] to left end

INFO: moved translation on intersecting axis [0, 0, 11/200] to left

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 1023/2000]]

INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, -137/4000],[0, 1, 0, 1/100],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, j1]]

INFO: [[1, 0, 0, 329/4000],[0, 0, -1, -11/200],[0, 1, 0, 0]]

INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 283/1000],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 191/500],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -9/200]]

INFO: ikfast translation axis 4d, globaldir=[0]

[0]

[1], basedir=[1]

[0]

[0]: [j0, j2, j3, j4]

INFO: [j1] [j0, j2, j3, j4]

INFO: [j1, j0] [j2, j3, j4]

DEBUG: 'half-angle substitution for joint j0 failed, 1 equations examined'

INFO: [j1, j0, j2] [j3, j4]

DEBUG: j3 solution: atan2 check for joint

INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]

DEBUG: j3 solution: atan2 check for joint

INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]

DEBUG: j3 solution: atan2 check for joint

INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]

DEBUG: j3 solution: atan2 check for joint

INFO: j3 solution: equations used for atan2: [cj0*px*sj2 + cj2*j1 - cj2*pz + py*sj0*sj2 - 6*sj2/125 + 191*sin(j3)/500, -cj0*cj2*px - cj2*py*sj0 + 6*cj2/125 + j1*sj2 - pz*sj2 + 191*cos(j3)/500 + 283/1000, cj0*cj2*px*sin(j3) + cj0*px*sj2*cos(j3) + cj2*j1*cos(j3) + cj2*py*sj0*sin(j3) - cj2*pz*cos(j3) - 6*cj2*sin(j3)/125 - j1*sj2*sin(j3) + py*sj0*sj2*cos(j3) + pz*sj2*sin(j3) - 6*sj2*cos(j3)/125 - 283*sin(j3)/1000, -cj0*cj2*px*cos(j3) + cj0*px*sj2*sin(j3) + cj2*j1*sin(j3) - cj2*py*sj0*cos(j3) - cj2*pz*sin(j3) + 6*cj2*cos(j3)/125 + j1*sj2*cos(j3) + py*sj0*sj2*sin(j3) - pz*sj2*cos(j3) - 6*sj2*sin(j3)/125 + 283*cos(j3)/1000 + 191/500]

INFO: [j1, j0, j2, j3] [j4]

DEBUG: 'half-angle substitution for joint j0 failed, 1 equations examined'

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in <module>

    chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1641, in generateIkSolver

    chaintree.leftmultiply(Tleft=self.multiplyMatrix(LinksLeft), Tleftinv=self.multiplyMatrix(LinksLeftInv[::-1]))

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 965, in leftmultiply

    self.Pfk = Tleft[0:2,0:2]*self.Pfk+Tleft[0:2,3]

  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 409, in __mul__

    return matrix_multiply(self,a)

  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 2580, in matrix_multiply

    raise ShapeError()

sympy.matrices.matrices.ShapeError

 

 

Ray4D:

 

$ python `openrave0.8-config --python-dir`/openravepy/_openravepy_0_8/ikfast.py --robot=korus_test_rounded.dae --iktype=ray4d --baselink=0 --eelink=10 --savefile=./test.cpp -d 1 --freeindex=1

[plugindatabase.h:392] /usr/share/openrave-0.8/plugins doesn't exist

[plugindatabase.h:573] Failed to create name ode, interface collisionchecker

[plugindatabase.h:573] Failed to create name bullet, interface collisionchecker

[plugindatabase.h:573] Failed to create name pqp, interface collisionchecker

[plugindatabase.h:573] Failed to create name IdealController, interface controller

/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide

  axisangle /= angle

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[0]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[2]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[-1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[4]: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[6]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[8]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

INFO: moved translation [0, 0, 0] to right end

INFO: moved translation [0, 0, 17/100] to left end

INFO: moved translation on intersecting axis [0, 0, 11/200] to left

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 1023/2000]]

INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, -137/4000],[0, 1, 0, 1/100],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, j1]]

INFO: [[1, 0, 0, 329/4000],[0, 0, -1, -11/200],[0, 1, 0, 0]]

INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 283/1000],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 191/500],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -9/200]]

INFO: ikfast ray4d: [j0, j2, j3, j4]

INFO: [j1] [j0, j2, j3, j4]

DEBUG: j0 solution: denominator is equal r00**2 + r01**2, doing a global substitution

INFO: j0 solution: equations used for atan2: [-r00*cos(j0) - r01*sin(j0), r00*sin(j0) - r01*cos(j0) - 1]

INFO: [j1, j0] [j2, j3, j4]

DEBUG: 'solveDialytically: more unknowns than equations 6>4'

DEBUG: 'solveDialytically: more unknowns than equations 6>4'

WARNING: 'solvePairVariablesHalfAngle: solve dialytically with 2 equations'

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in <module>

    chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1639, in generateIkSolver

    chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1939, in solveFullIK_Ray4D

    tree = self.solveAllEquations(AllEquations,curvars=solvejointvars[:],othersolvedvars = self.freejointvars[:],solsubs = self.freevarsubs[:],endbranchtree=endbranchtree)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4264, in solveAllEquations

    return self.addSolution(solutions,AllEquations,curvars,othersolvedvars,solsubs,endbranchtree,currentcases=currentcases)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4487, in addSolution

    nextsolutions[var] = self.solveAllEquations(AllEquations,curvars=newvars,othersolvedvars=othersolvedvars+[var],solsubs=solsubs+self.Variable(var).subs,endbranchtree=endbranchtree,currentcases=currentcases)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4321, in solveAllEquations

    raise self.CannotSolveError('failed to find a variable to solve')

__main__.CannotSolveError: 'failed to find a variable to solve'

 

 

TranslationDirection5D:

 

$ python `openrave0.8-config --python-dir`/openravepy/_openravepy_0_8/ikfast.py --robot=korus_test_rounded.dae --iktype=translationdirection5d --baselink=1 --eelink=10 --savefile=./test2.cpp -d 1

[plugindatabase.h:392] /usr/share/openrave-0.8/plugins doesn't exist

[plugindatabase.h:573] Failed to create name ode, interface collisionchecker

[plugindatabase.h:573] Failed to create name bullet, interface collisionchecker

[plugindatabase.h:573] Failed to create name pqp, interface collisionchecker

[plugindatabase.h:573] Failed to create name IdealController, interface controller

/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py:1122: RuntimeWarning: invalid value encountered in divide

  axisangle /= angle

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[0]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[2]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[-1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[4]: 90.000000, axis=[1.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[6]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle of Links[8]: 0.000000, axis=[0.000000,0.000000,0.000000]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

DEBUG: rotation angle: 0.000000, axis=[nan,nan,nan]

INFO: moved translation [0, 0, 0] to right end

INFO: moved translation [0, 0, 17/100] to left end

INFO: moved translation on intersecting axis [0, 0, 11/200] to left

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, 873/2000]]

INFO: [[cos(j0), -sin(j0), 0, 0],[sin(j0), cos(j0), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, -137/4000],[0, 1, 0, 1/100],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, j1]]

INFO: [[1, 0, 0, 329/4000],[0, 0, -1, -11/200],[0, 1, 0, 0]]

INFO: [[cos(j2), -sin(j2), 0, 0],[sin(j2), cos(j2), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 283/1000],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j3), -sin(j3), 0, 0],[sin(j3), cos(j3), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 191/500],[0, 1, 0, 0],[0, 0, 1, 0]]

INFO: [[cos(j4), -sin(j4), 0, 0],[sin(j4), cos(j4), 0, 0],[0, 0, 1, 0]]

INFO: [[1, 0, 0, 0],[0, 1, 0, 0],[0, 0, 1, -9/200]]

INFO: ikfast translation direction 5d: [j0, j1, j2, j3, j4]

INFO: attempting li/woernle/hiller general ik method

WARNING: 'Kohli/Osvatic method requires 3 unknown variables, has 2'

INFO: attempting li/woernle/hiller general ik method

WARNING: 'need exactly 8 equations of one variable'

INFO: attempting kohli/osvatic general ik method

WARNING: 'Kohli/Osvatic method requires 3 unknown variables'

INFO: attempting kohli/osvatic general ik method

WARNING: 'Kohli/Osvatic method requires 3 unknown variables'

INFO: attempting manocha/canny general ik method

INFO: solving for all pairwise variables in (cj2, sj2, cj3, sj3), number of symbol coeffs are 0

INFO: forcing matrix inverse (might take some time)

WARNING: 'failed to find 7 linearly independent equations'

INFO: solving for all pairwise variables in (cj0, sj0, j1), number of symbol coeffs are 44

INFO: forcing matrix inverse (might take some time)

INFO: solving simultaneously for symbols: (cj2, sj2, cj3, sj3)

WARNING: solveDialytically: polynomial Poly(-r02, htj2, htj3, domain='ZZ[r02]') degree is 0

WARNING: solveDialytically equations 12 > 4, should be equal...

Traceback (most recent call last):

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 6121, in <module>

    chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 1639, in generateIkSolver

    chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 2033, in solveFullIK_TranslationDirection5D

    coupledsolutions,usedvars = solvemethod(rawpolyeqs2[index],solvejointvars,endbranchtree=[AST.SolverSequence([endbranchtree2])])

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 3280, in solveManochaCanny

    exportcoeffeqs,exportmonoms = self.solveDialytically(newreducedeqs,ileftvar,getsubs=getsubs)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 4006, in solveDialytically

    subs = subsvals+getsubs(subsvals)

  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_0_8/ikfast.py", line 634, in getsubs

    Anew = self.A.subs(psubs).inv()

  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 739, in inv

    return self.inverse_GE(iszerofunc=iszerofunc)

  File "/usr/lib/python2.7/dist-packages/sympy/matrices/matrices.py", line 1926, in inverse_GE

    raise ValueError("A Matrix must have non-zero determinant to invert.")

ValueError: A Matrix must have non-zero determinant to invert.

 


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

korus_test_rounded2.dae (61K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Failing to generate IKfast IK solver for 5DOF arm

hcrobot
This post has NOT been accepted by the mailing list yet.
This post was updated on .
arm_basic.daeHi! I am facing a similar issue. I wonder how you add the manipulator tag to the dae file? Mine is a 6 DOF arm
Loading...