rdiankov / openrave

Open Robotics Automation Virtual Environment: An environment for testing, developing, and deploying robotics motion planning algorithms.
http://www.openrave.org
Other
714 stars 342 forks source link

ScaraRobot: ikfast.py failed to generate .cpp file for scararobot.dae (ubuntu 16.04) #880

Open beifengyanyan opened 4 years ago

beifengyanyan commented 4 years ago

Recently, I try using IKfast to generate .cpp file for Scara Robot. I install Openrave by the website: https://scaron.info/teaching/installing-openrave-on-ubuntu-16.04.html I take step by the website: http://docs.ros.org/kinetic/api/moveit_tutorials/html/doc/ikfast/ikfast_tutorial.html. I use TranslationXAxisAngleZNorm4D as IKtype for Scara. http://openrave.org/docs/latest_stable/openravepy/ikfast/#ik-types The information of my scararobot.dae is that:

name index parents base_link 0
Link1 1 base_link Link2 2 Link1
Link3 3 Link2
Link4 4 Link3

When I run the command as fallow:

python openrave-config --python-dir/openravepy/openravepy/ikfast.py --robot="$MYROBOT_NAME".dae --iktype=translationxaxisangleznorm4d --baselink="$BASE_LINK" --eelink="$EEF_LINK" --savefile="$IKFAST_OUTPUT_PATH"

The error appears:

… INFO: depth=0, c=4, iter=0/2, starting newcases: set([py, px]) INFO: depth=2 c=14, [j2] [j0, j1, j3]: cases=set([py, px]) INFO: depth=2 c=16, [j2, j1] [j0, j3]: cases=set([py, px]) INFO: trying to guess variable from [j0, j3] INFO: depth=0, c=4, iter=1/2, starting newcases: set([Abs(px) + Abs(py)]) INFO: depth=1 c=17, [j2] [j0, j1, j3]: cases=set([Abs(px) + Abs(py)]) INFO: depth=1 c=19, [j2, j1] [j0, j3]: cases=set([Abs(px) + Abs(py)]) INFO: trying to guess variable from [j0, j3] Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 9521, in chaintree = solver.generateIkSolver(options.baselink,options.eelink,options.freeindices,solvefn=solvefn) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 2283, in generateIkSolver chaintree.leftmultiply(Tleft=self.multiplyMatrix(LinksLeft), Tleftinv=self.multiplyMatrix(LinksLeftInv[::-1])) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 1119, in leftmultiply self.Pfk = Tleft[0:2,0:2]*self.Pfk+Tleft[0:2,3] File "/home/liu/.local/lib/python2.7/site-packages/sympy/matrices/matrices.py", line 409, in mul return matrix_multiply(self,a) File "/home/liu/.local/lib/python2.7/site-packages/sympy/matrices/matrices.py", line 2580, in matrix_multiply raise ShapeError() sympy.matrices.matrices.ShapeError

Have anybody meet such a problem? I know that it is some errors about matrices, but I don’t know how to deal with it. Is my robot model false? Or IKfast isn’t suitable to Scara robot? Any suggestion is appreciated. Thank you very much.

ElcarimQAQ commented 1 year ago

hello, have you solved problem?

lxd551326 commented 5 months ago

hello, have you solved problem?