Quantcast

different ways to call ikfast

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

different ways to call ikfast

baxelrod

What is the difference between these two calls?

 

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

 

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

 

because the first works fine for me, but the second crashes.  When I try both with a different iktype (lookat3d), they both succeed.  However, the generated file is slightly different. 

 

I am using openrave version 0.8.2.  this issue happens on both Ubuntu 10.04 and 12.04. 

 

The console output from the crash: 

 

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

[xmlreaders-core.cpp:975] link world has no geometry attached!

[xmlreaders-core.cpp:2929] sensor args has been deprecated.

[kinbodyjoint.cpp:1181] SetMimicEquations: missing variable GripperClose from partial derivatives of joint __gripMimic!

[kinbodyjoint.cpp:1181] SetMimicEquations: missing variable GripperClose from partial derivatives of joint __gripMimic!

[kinbody.cpp:1152] dof 6 value is not in limits -3.141593e+00<-1.745329e-01

[robot.cpp:1731] robot robot has a sensor with no name, setting to sensor0

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: 90.000000, axis=[-1.000000,0.000000,0.000000]

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

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

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

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

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

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

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

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

INFO: moved translation [0, 0, 49/1000] to right end

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

INFO: moved translation on intersecting axis [0, 0, -13/250] to left

INFO: [[1, 0, 0, 193/1000],[0, 1, 0, 0],[0, 0, 1, 9/100]]

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

INFO: [[1, 0, 0, 0],[0, 0, 1, -29/250],[0, -1, 0, 0]]

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

INFO: [[1, 0, 0, 57/100],[0, 1, 0, 0],[0, 0, 1, 0]]

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

INFO: [[1, 0, 0, 161/250],[0, 1, 0, -13/1000],[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, 0],[0, 0, -1, 0],[0, 1, 0, 49/1000]]

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

[0]

[1], basedir=[1]

[0]

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

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

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

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

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

DEBUG: j2 solution: atan2 check for joint

INFO: j2 solution: equations used for atan2: [cj0*px*sj1 + cj1*pz + py*sj0*sj1 + 161*sin(j2)/250 - 13*cos(j2)/1000, -cj0*cj1*px - cj1*py*sj0 + pz*sj1 + 13*sin(j2)/1000 + 161*cos(j2)/250 + 57/100, cj0*cj1*px*sin(j2) + cj0*px*sj1*cos(j2) + cj1*py*sj0*sin(j2) + cj1*pz*cos(j2) + py*sj0*sj1*cos(j2) - pz*sj1*sin(j2) - 57*sin(j2)/100 - 13/1000, -cj0*cj1*px*cos(j2) + cj0*px*sj1*sin(j2) - cj1*py*sj0*cos(j2) + cj1*pz*sin(j2) + py*sj0*sj1*sin(j2) + pz*sj1*cos(j2) + 57*cos(j2)/100 + 161/250]

DEBUG: j2 solution: atan2 check for joint

INFO: j2 solution: equations used for atan2: [cj0*px*sj1 + cj1*pz + py*sj0*sj1 + 161*sin(j2)/250 - 13*cos(j2)/1000, -cj0*cj1*px - cj1*py*sj0 + pz*sj1 + 13*sin(j2)/1000 + 161*cos(j2)/250 + 57/100, cj0*cj1*px*sin(j2) + cj0*px*sj1*cos(j2) + cj1*py*sj0*sin(j2) + cj1*pz*cos(j2) + py*sj0*sj1*cos(j2) - pz*sj1*sin(j2) - 57*sin(j2)/100 - 13/1000, -cj0*cj1*px*cos(j2) + cj0*px*sj1*sin(j2) - cj1*py*sj0*cos(j2) + cj1*pz*sin(j2) + py*sj0*sj1*sin(j2) + pz*sj1*cos(j2) + 57*cos(j2)/100 + 161/250]

DEBUG: j2 solution: atan2 check for joint

INFO: j2 solution: equations used for atan2: [cj0*px*sj1 + cj1*pz + py*sj0*sj1 + 161*sin(j2)/250 - 13*cos(j2)/1000, -cj0*cj1*px - cj1*py*sj0 + pz*sj1 + 13*sin(j2)/1000 + 161*cos(j2)/250 + 57/100, cj0*cj1*px*sin(j2) + cj0*px*sj1*cos(j2) + cj1*py*sj0*sin(j2) + cj1*pz*cos(j2) + py*sj0*sj1*cos(j2) - pz*sj1*sin(j2) - 57*sin(j2)/100 - 13/1000, -cj0*cj1*px*cos(j2) + cj0*px*sj1*sin(j2) - cj1*py*sj0*cos(j2) + cj1*pz*sin(j2) + py*sj0*sj1*sin(j2) + pz*sj1*cos(j2) + 57*cos(j2)/100 + 161/250]

DEBUG: j2 solution: atan2 check for joint

INFO: j2 solution: equations used for atan2: [cj0*px*sj1 + cj1*pz + py*sj0*sj1 + 161*sin(j2)/250 - 13*cos(j2)/1000, -cj0*cj1*px - cj1*py*sj0 + pz*sj1 + 13*sin(j2)/1000 + 161*cos(j2)/250 + 57/100, cj0*cj1*px*sin(j2) + cj0*px*sj1*cos(j2) + cj1*py*sj0*sin(j2) + cj1*pz*cos(j2) + py*sj0*sj1*cos(j2) - pz*sj1*sin(j2) - 57*sin(j2)/100 - 13/1000, -cj0*cj1*px*cos(j2) + cj0*px*sj1*sin(j2) - cj1*py*sj0*cos(j2) + cj1*pz*sin(j2) + py*sj0*sj1*sin(j2) + pz*sj1*cos(j2) + 57*cos(j2)/100 + 161/250]

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

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

Traceback (most recent call last):

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

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

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

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

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

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

  File "/usr/local/lib/python2.6/dist-packages/sympy/matrices/matrices.py", line 404, in __mul__

    return matrix_multiply(self,a)

  File "/usr/local/lib/python2.6/dist-packages/sympy/matrices/matrices.py", line 2458, in matrix_multiply

    raise ShapeError()

sympy.matrices.matrices.ShapeError

 

I see that it has nans for the axis of some joints.  I don’t know why that is.  All my joints have axes properly specified.

 

Also, FYI, this is a 5 DOF arm.  I don’t think I can make the xml available because it is ITAR controlled.  But I might be able to make a cleaned up copy.

 

Thanks,

Ben

 

Ben Axelrod

Sr. Robotics Software Engineer

iRobot Corporation

8 Crosby Drive, M/S 8-1

Bedford, MA 01730

(781) 430-3315

[hidden email]

 


------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&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: different ways to call ikfast

basix86
Hello, I have the same problem.
This works:
$ openrave.py --database inversekinematics --robot=../robot/crustcrawler_five_kit3.xml --iktype=TranslationZAxisAngle4D --manipname=arm
...
...
openravepy.databases.inversekinematics: save, inversekinematics generation is done, compiled shared object: /home/marco/.openrave/kinematics.16e60a46a7ceb2f180a25f403dcf1565/ikfast61.TranslationZAxisAngle4D.i686.0_2_3_4_f5.so

And this doesn't works:
$ python `openrave-config --python-dir`/openravepy/_openravepy_/ikfast.py --robot=../robot/crustcrawler_five_kit3.xml --baselink=0 --eelink=6 --freeindex=4 --savefile=ik.cpp --iktype=translationxaxisangle4d
...
...
WARNING: checkforzero too big (137): cj2**2*cj3**2*sj4**2 + cj2**2*cj3**2 + 2*cj2**2*cj3*sj3*sj4**2 - 2*cj2**2*cj3*sj3 + cj2**2*sj3**2*sj4**2 + cj2**2*sj3**2 + 2*cj2*cj3**2*sj2*sj4**2 - 2*cj2*cj3**2*sj2 - 2*cj2*sj2*sj3**2*sj4**2 + 2*cj2*sj2*sj3**2 + cj3**2*sj2**2*sj4**2 + cj3**2*sj2**2 - 2*cj3*sj2**2*sj3*sj4**2 + 2*cj3*sj2**2*sj3 + sj2**2*sj3**2*sj4**2 + sj2**2*sj3**2
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openravepy/_openravepy_/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_/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_/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

My xml robot file:crustcrawler_five_kit3.xml

Can you help me?
Where I wrong?
Loading...