Bart123456 / lasrobot_ws

1 stars 3 forks source link

ikfast: error when creating ikfast c++ code #4

Closed JeroenDM closed 7 years ago

JeroenDM commented 7 years ago

Using command: pythonopenrave-config --python-dir/openravepy/_openravepy_/ikfast.py --robot=robot_edit.dae --iktype=transform6d --baselink=0 --eelink=7 --savefile=robot_ikfast.cpp

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 9203, 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 2257, in generateIkSolver chaintree = solvefn(self, LinksRaw, jointvars, isolvejointvars) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 2851, in solveFullIK_6D tree = self.TestIntersectingAxes(solvejointvars,Links, LinksInv,endbranchtree) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 2939, in TestIntersectingAxes return self.solve6DIntersectingAxes(T0links,T1links,transvars,rotvars,solveRotationFirst=solveRotationFirst, endbranchtree=endbranchtree) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 3112, in solve6DIntersectingAxes transtree = self.SolveAllEquations(AllEquations,curvars=curvars,othersolvedvars=othersolvedvars[:],solsubs=solsubs,endbranchtree=newendbranchtree) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 6561, in SolveAllEquations return self.AddSolution(solutions,AllEquations,curvars,othersolvedvars,solsubs,endbranchtree,currentcases=currentcases, currentcasesubs=currentcasesubs, unknownvars=unknownvars) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 7222, in AddSolution newtree = self.SolveAllEquations(NewEquationsClean,curvars,othersolvedvars,solsubs,endbranchtree,currentcases=newcases, currentcasesubs=newcasesubs, unknownvars=unknownvars) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 6561, in SolveAllEquations return self.AddSolution(solutions,AllEquations,curvars,othersolvedvars,solsubs,endbranchtree,currentcases=currentcases, currentcasesubs=currentcasesubs, unknownvars=unknownvars) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 6660, in AddSolution return [solution[0].subs(solsubs)]+self.SolveAllEquations(AllEquations,curvars=newvars,othersolvedvars=othersolvedvars+[var],solsubs=solsubs+self.Variable(var).subs,endbranchtree=endbranchtree,currentcases=currentcases, currentcasesubs=currentcasesubs, unknownvars=unknownvars) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 6453, in SolveAllEquations return self.AddSolution(solutions,AllEquations,curvars,othersolvedvars,solsubs,endbranchtree,currentcases=currentcases, currentcasesubs=currentcasesubs, unknownvars=unknownvars) File "/usr/local/lib/python2.7/dist-packages/openravepy/openravepy/ikfast.py", line 6814, in AddSolution dictequations.append((sineq,self.SimplifyAtan2(sin(eq)))) File "/usr/lib/python2.7/dist-packages/sympy/core/cache.py", line 93, in wrapper r = func(*args, kw_args) File "/usr/lib/python2.7/dist-packages/sympy/core/function.py", line 280, in new result = super(Function, cls).new(cls, *args, *options) File "/usr/lib/python2.7/dist-packages/sympy/core/cache.py", line 93, in wrapper r = func(args, kw_args) File "/usr/lib/python2.7/dist-packages/sympy/core/function.py", line 126, in new evaluated = cls.eval(args) File "/usr/lib/python2.7/dist-packages/sympy/functions/elementary/trigonometric.py", line 191, in eval return -cls(-arg) File "/usr/lib/python2.7/dist-packages/sympy/core/cache.py", line 93, in wrapper r = func(args, kw_args) File "/usr/lib/python2.7/dist-packages/sympy/core/function.py", line 284, in new pr = max(cls._should_evalf(a) for a in result.args) File "/usr/lib/python2.7/dist-packages/sympy/core/function.py", line 284, in pr = max(cls._should_evalf(a) for a in result.args) File "/usr/lib/python2.7/dist-packages/sympy/core/function.py", line 303, in _should_evalf re, im = arg.as_real_imag() File "/usr/lib/python2.7/dist-packages/sympy/core/add.py", line 683, in as_real_imag re, im = term.as_real_imag(deep=deep) File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 1581, in as_real_imag return (C.re(self), C.im(self)) File "/usr/lib/python2.7/dist-packages/sympy/core/cache.py", line 93, in wrapper r = func(*args, *kw_args) File "/usr/lib/python2.7/dist-packages/sympy/core/function.py", line 280, in new result = super(Function, cls).new(cls, args, options) File "/usr/lib/python2.7/dist-packages/sympy/core/cache.py", line 93, in wrapper r = func(*args, *kw_args) File "/usr/lib/python2.7/dist-packages/sympy/core/function.py", line 126, in new evaluated = cls.eval(args) File "/usr/lib/python2.7/dist-packages/sympy/functions/elementary/complexes.py", line 53, in eval elif arg.is_real: File "/usr/lib/python2.7/dist-packages/sympy/core/relational.py", line 226, in nonzero raise TypeError("symbolic boolean expression has no truth value.") TypeError: symbolic boolean expression has no truth value.

Bart123456 commented 7 years ago

Getting the same error when trying to generate the file.

Bart123456 commented 7 years ago

Seems to work after downgrading sympy with the following command: pip install --upgrade --user sympy==0.7.1

Bart123456 commented 7 years ago

I succesfully generated the ikfast files for the kuka KR5 ARC robot.