Quantcast

ikfast requires intersecting axes?

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

ikfast requires intersecting axes?

baxelrod

I recently performed kinematic calibration on my robot which very slightly changed my link transforms and joint axes.  Now, ikfast will not generate files for me.  This is the error I get:

 

Traceback (most recent call last):

  File "/usr/local/bin/openrave.py", line 126, in <module>

    database.run(args=args)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1126, in run

    InverseKinematicsModel.RunFromParser(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1091, in RunFromParser

    model = DatabaseGenerator.RunFromParser(Model=Model,parser=parser,robotatts=robotatts,args=args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/__init__.py", line 262, in RunFromParser

    model.autogenerate(options=options)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 661, in autogenerate

    self.generate(iktype=iktype,freejoints=freejoints,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang,ipython=ipython,ikfastmaxcasedepth=ikfastmaxcasedepth)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 887, in generate

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2262, in generateIkSolver

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 754, in solveFullIK_6D

    return self.ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2856, in solveFullIK_6D

    tree = self.TestIntersectingAxes(solvejointvars,Links, LinksInv,endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2942, in TestIntersectingAxes

    for T0links,T1links,transvars,rotvars,solveRotationFirst in self.iterateThreeIntersectingAxes(solvejointvars,Links, LinksInv):

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2999, in iterateThreeIntersectingAxes

    translationeqs = [self.RoundEquationTerms(eq.expand()) for eq in T0[:3,3]]

  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/expr.py", line 2870, in expand

    expr, hit = Expr._expand_hint(expr, hint, deep=deep, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2803, in _expand_hint

    arg, arghit = Expr._expand_hint(arg, hint, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2811, in _expand_hint

    newexpr = getattr(expr, hint)(**hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 748, in _eval_expand_mul

    terms = self.func._expandsums(sums)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 714, in _expandsums

    terms = [Mul(a, b) for a in left for b in right]

  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/operations.py", line 40, in __new__

   c_part, nc_part, order_symbols = cls.flatten(args)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 475, in flatten

    obj = Pow(bi, ei)

  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/power.py", line 119, in __new__

    obj = b._eval_power(e)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1752, in _eval_power

    dict = Integer(self).factors(limit=2**15)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1375, in factors

    verbose=verbose).copy()

  File "/usr/lib/python2.7/dist-packages/sympy/ntheory/factor_.py", line 1065, in factorint

    b, fermat = integer_nthroot(b2, 2)

  File "/usr/lib/python2.7/dist-packages/sympy/core/power.py", line 35, in integer_nthroot

    raise ValueError("y must be nonnegative")

ValueError: y must be nonnegative

 

This is an 8 DOF robot, and I am trying to generate Transform6D code.  I am using the master branch pulled today (November 17, 2015).  I have tried many different free joints with no success. 

 

Any ideas?

 

Thanks,

Ben

 

 

Ben Axelrod
Sr. Robotics Software Engineer
Technology Organization


iRobot
8 Crosby Drive 8-1
Bedford, MA 01730
t: 781.430.3315
[hidden email]

 


------------------------------------------------------------------------------
Give your users amazing mobile app experiences with Intel XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2-D/3-D games for multiple OSs.
Then get your creation into app stores sooner, with many ways to monetize.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
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: ikfast requires intersecting axes?

Rosen Diankov
Administrator
dear ben,

you probably have axes and offsets that are 7+ digits long, i don't think ikfast can handle that. try reducing the precision...
ikfast also has a --precision setting, have you played around with it?

best,

2015-11-18 6:50 GMT+09:00 Axelrod, Ben <[hidden email]>:

I recently performed kinematic calibration on my robot which very slightly changed my link transforms and joint axes.  Now, ikfast will not generate files for me.  This is the error I get:

 

Traceback (most recent call last):

  File "/usr/local/bin/openrave.py", line 126, in <module>

    database.run(args=args)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1126, in run

    InverseKinematicsModel.RunFromParser(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1091, in RunFromParser

    model = DatabaseGenerator.RunFromParser(Model=Model,parser=parser,robotatts=robotatts,args=args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/__init__.py", line 262, in RunFromParser

    model.autogenerate(options=options)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 661, in autogenerate

    self.generate(iktype=iktype,freejoints=freejoints,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang,ipython=ipython,ikfastmaxcasedepth=ikfastmaxcasedepth)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 887, in generate

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2262, in generateIkSolver

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 754, in solveFullIK_6D

    return self.ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2856, in solveFullIK_6D

    tree = self.TestIntersectingAxes(solvejointvars,Links, LinksInv,endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2942, in TestIntersectingAxes

    for T0links,T1links,transvars,rotvars,solveRotationFirst in self.iterateThreeIntersectingAxes(solvejointvars,Links, LinksInv):

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2999, in iterateThreeIntersectingAxes

    translationeqs = [self.RoundEquationTerms(eq.expand()) for eq in T0[:3,3]]

  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/expr.py", line 2870, in expand

    expr, hit = Expr._expand_hint(expr, hint, deep=deep, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2803, in _expand_hint

    arg, arghit = Expr._expand_hint(arg, hint, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2811, in _expand_hint

    newexpr = getattr(expr, hint)(**hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 748, in _eval_expand_mul

    terms = self.func._expandsums(sums)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 714, in _expandsums

    terms = [Mul(a, b) for a in left for b in right]

  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/operations.py", line 40, in __new__

   c_part, nc_part, order_symbols = cls.flatten(args)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 475, in flatten

    obj = Pow(bi, ei)

  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/power.py", line 119, in __new__

    obj = b._eval_power(e)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1752, in _eval_power

    dict = Integer(self).factors(limit=2**15)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1375, in factors

    verbose=verbose).copy()

  File "/usr/lib/python2.7/dist-packages/sympy/ntheory/factor_.py", line 1065, in factorint

    b, fermat = integer_nthroot(b2, 2)

  File "/usr/lib/python2.7/dist-packages/sympy/core/power.py", line 35, in integer_nthroot

    raise ValueError("y must be nonnegative")

ValueError: y must be nonnegative

 

This is an 8 DOF robot, and I am trying to generate Transform6D code.  I am using the master branch pulled today (November 17, 2015).  I have tried many different free joints with no success. 

 

Any ideas?

 

Thanks,

Ben

 

 

Ben Axelrod
Sr. Robotics Software Engineer
Technology Organization


iRobot
8 Crosby Drive 8-1
Bedford, MA 01730
t: <a href="tel:781.430.3315" value="+17814303315" target="_blank">781.430.3315
[hidden email]

 


------------------------------------------------------------------------------
Give your users amazing mobile app experiences with Intel XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2-D/3-D games for multiple OSs.
Then get your creation into app stores sooner, with many ways to monetize.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users



------------------------------------------------------------------------------

_______________________________________________
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: ikfast requires intersecting axes?

baxelrod

Ah, good catch.  I set “--precision=5” and it got farther, but still did not finish.  I actually have 2 differently calibrated robot XML files, and interestingly they each failed in a different way.  (The files differ only in some minor link transforms).

 

The first failed deep within sympy when trying to “solveDialytically”.   (I am using sympy version '0.7.4.1').  Here is the backtrace:

 

openravepy.ikfast: AddSolution, depth=2, c=60, iter=0/1, starting newcases: set([new_r02, new_r22, new_r12])

openravepy.ikfast: SolveAllEquations, depth=3 c=67, [j12, j13, j14, j0, j15] [j16, j17, j18]: cases=set([new_r02, new_r22, new_r12])

/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py:296: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

  if man < 0:

Traceback (most recent call last):

  File "/usr/local/bin/openrave.py", line 126, in <module>

    database.run(args=args)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1126, in run

    InverseKinematicsModel.RunFromParser(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1091, in RunFromParser

    model = DatabaseGenerator.RunFromParser(Model=Model,parser=parser,robotatts=robotatts,args=args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/__init__.py", line 262, in RunFromParser

    model.autogenerate(options=options)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 661, in autogenerate

    self.generate(iktype=iktype,freejoints=freejoints,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang,ipython=ipython,ikfastmaxcasedepth=ikfastmaxcasedepth)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 887, in generate

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2264, in generateIkSolver

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 754, in solveFullIK_6D

    return self.ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2858, in solveFullIK_6D

    tree = self.TestIntersectingAxes(solvejointvars,Links, LinksInv,endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2946, in TestIntersectingAxes

    return self.solve6DIntersectingAxes(T0links,T1links,transvars,rotvars,solveRotationFirst=solveRotationFirst, endbranchtree=endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 3141, in solve6DIntersectingAxes

    rottree += self.SolveAllEquations(AllEquations,curvars=currotvars,othersolvedvars=othersolvedvars,solsubs=self.freevarsubs[:],endbranchtree=storesolutiontree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 6622, 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_0_9/ikfast.py", line 7283, 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_0_9/ikfast.py", line 6511, 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_0_9/ikfast.py", line 7283, 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_0_9/ikfast.py", line 6602, in SolveAllEquations

    rawsolutions=self.SolvePairVariables(raweqns,var0,var1,othersolvedvars,unknownvars=curvars+unknownvars)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 8579, in SolvePairVariables

    return self.SolvePairVariablesHalfAngle(raweqns,var0,var1,othersolvedvars)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 7584, in SolvePairVariablesHalfAngle

    Mall, allmonoms = self.solveDialytically(newreducedeqs,ileftvar,returnmatrix=True)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 6017, in solveDialytically

    Anumpy = numpy.array(numpy.array(A), numpy.float64)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 276, in __float__

    return mlib.to_float(self._as_mpf_val(53))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1515, in _as_mpf_val

    return mlib.from_int(self.p, prec)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 336, in from_int

    return from_man_exp(n, 0, prec, rnd)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 296, in from_man_exp

    if man < 0:

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 276, in __float__

    return mlib.to_float(self._as_mpf_val(53))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1515, in _as_mpf_val

    return mlib.from_int(self.p, prec)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 336, in from_int

    return from_man_exp(n, 0, prec, rnd)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 296, in from_man_exp

    if man < 0:

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

   prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 276, in __float__

    return mlib.to_float(self._as_mpf_val(53))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1515, in _as_mpf_val

    return mlib.from_int(self.p, prec)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 336, in from_int

    return from_man_exp(n, 0, prec, rnd)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 296, in from_man_exp

    if man < 0:

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 207, in __float__

    raise TypeError("can't convert expression to float")

TypeError: can't convert expression to float

 

 

The second failed with a memory error, (also inside sympy), when trying to “SolvePairVariables”.  I tried seeing “--maxcasedepth=1” but that did not help.  Here is the backtrace:

 

openravepy.ikfast: SolveAllEquations, depth=0 c=1, [j0, j15] [j12, j13, j14]: cases=None

openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00

openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00

openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00

openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00

openravepy.ikfast: SolvePairVariables, CannotSolveError: SolvePairVariablesHalfAngle: failed to solve dialytically with 2 equations

openravepy.ikfast: SolvePairVariables, solving separated equations with linear terms

Traceback (most recent call last):

  File "/usr/local/bin/openrave.py", line 126, in <module>

    database.run(args=args)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1126, in run

    InverseKinematicsModel.RunFromParser(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1091, in RunFromParser

    model = DatabaseGenerator.RunFromParser(Model=Model,parser=parser,robotatts=robotatts,args=args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/__init__.py", line 262, in RunFromParser

    model.autogenerate(options=options)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 661, in autogenerate

    self.generate(iktype=iktype,freejoints=freejoints,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang,ipython=ipython,ikfastmaxcasedepth=ikfastmaxcasedepth)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 887, in generate

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2264, in generateIkSolver

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 754, in solveFullIK_6D

    return self.ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2858, in solveFullIK_6D

    tree = self.TestIntersectingAxes(solvejointvars,Links, LinksInv,endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2946, in TestIntersectingAxes

    return self.solve6DIntersectingAxes(T0links,T1links,transvars,rotvars,solveRotationFirst=solveRotationFirst, endbranchtree=endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 3119, in solve6DIntersectingAxes

    transtree = self.SolveAllEquations(AllEquations,curvars=curvars,othersolvedvars=othersolvedvars[:],solsubs=solsubs,endbranchtree=newendbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 6602, in SolveAllEquations

    rawsolutions=self.SolvePairVariables(raweqns,var0,var1,othersolvedvars,unknownvars=curvars+unknownvars)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 8623, in SolvePairVariables

    finaleq = (ptotal_cos.as_expr()**2 - (1-polysymbols[0]**2)*ptotal_sin.as_expr()**2).expand()

  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/expr.py", line 2870, in expand

    expr, hit = Expr._expand_hint(expr, hint, deep=deep, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2803, in _expand_hint

    arg, arghit = Expr._expand_hint(arg, hint, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2811, in _expand_hint

    newexpr = getattr(expr, hint)(**hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/power.py", line 590, in _eval_expand_multinomial

    expansion_dict = multinomial_coefficients(len(p), n)

  File "/usr/lib/python2.7/dist-packages/sympy/ntheory/multinomial.py", line 145, in multinomial_coefficients

    return dict(multinomial_coefficients_iterator(m, n))

  File "/usr/lib/python2.7/dist-packages/sympy/ntheory/multinomial.py", line 238, in multinomial_coefficients_iterator

    b = _tuple(filter(None, t1))

MemoryError

 

 

I can try reducing the precision of the numbers in the XML file by hand.  Will this get any different results than using the --precision flag?

 

Thanks,

Ben

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Rosen Diankov
Sent: Tuesday, November 17, 2015 8:55 PM
To: Axelrod, Ben
Cc: [hidden email]
Subject: Re: [OpenRAVE-users] ikfast requires intersecting axes?

 

dear ben,

you probably have axes and offsets that are 7+ digits long, i don't think ikfast can handle that. try reducing the precision...

ikfast also has a --precision setting, have you played around with it?

best,

 

2015-11-18 6:50 GMT+09:00 Axelrod, Ben <[hidden email]>:

I recently performed kinematic calibration on my robot which very slightly changed my link transforms and joint axes.  Now, ikfast will not generate files for me.  This is the error I get:

 

Traceback (most recent call last):

  File "/usr/local/bin/openrave.py", line 126, in <module>

    database.run(args=args)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1126, in run

    InverseKinematicsModel.RunFromParser(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1091, in RunFromParser

    model = DatabaseGenerator.RunFromParser(Model=Model,parser=parser,robotatts=robotatts,args=args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/__init__.py", line 262, in RunFromParser

    model.autogenerate(options=options)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 661, in autogenerate

    self.generate(iktype=iktype,freejoints=freejoints,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang,ipython=ipython,ikfastmaxcasedepth=ikfastmaxcasedepth)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 887, in generate

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2262, in generateIkSolver

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 754, in solveFullIK_6D

    return self.ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2856, in solveFullIK_6D

    tree = self.TestIntersectingAxes(solvejointvars,Links, LinksInv,endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2942, in TestIntersectingAxes

    for T0links,T1links,transvars,rotvars,solveRotationFirst in self.iterateThreeIntersectingAxes(solvejointvars,Links, LinksInv):

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2999, in iterateThreeIntersectingAxes

    translationeqs = [self.RoundEquationTerms(eq.expand()) for eq in T0[:3,3]]

  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/expr.py", line 2870, in expand

    expr, hit = Expr._expand_hint(expr, hint, deep=deep, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2803, in _expand_hint

    arg, arghit = Expr._expand_hint(arg, hint, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2811, in _expand_hint

    newexpr = getattr(expr, hint)(**hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 748, in _eval_expand_mul

    terms = self.func._expandsums(sums)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 714, in _expandsums

    terms = [Mul(a, b) for a in left for b in right]

  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/operations.py", line 40, in __new__

   c_part, nc_part, order_symbols = cls.flatten(args)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 475, in flatten

    obj = Pow(bi, ei)

  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/power.py", line 119, in __new__

    obj = b._eval_power(e)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1752, in _eval_power

    dict = Integer(self).factors(limit=2**15)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1375, in factors

    verbose=verbose).copy()

  File "/usr/lib/python2.7/dist-packages/sympy/ntheory/factor_.py", line 1065, in factorint

    b, fermat = integer_nthroot(b2, 2)

  File "/usr/lib/python2.7/dist-packages/sympy/core/power.py", line 35, in integer_nthroot

    raise ValueError("y must be nonnegative")

ValueError: y must be nonnegative

 

This is an 8 DOF robot, and I am trying to generate Transform6D code.  I am using the master branch pulled today (November 17, 2015).  I have tried many different free joints with no success. 

 

Any ideas?

 

Thanks,

Ben

 

 

Ben Axelrod
Sr. Robotics Software Engineer
Technology Organization


iRobot
8 Crosby Drive 8-1
Bedford, MA 01730
t: <a href="tel:781.430.3315" target="_blank">781.430.3315
[hidden email]

 


------------------------------------------------------------------------------
Give your users amazing mobile app experiences with Intel XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2-D/3-D games for multiple OSs.
Then get your creation into app stores sooner, with many ways to monetize.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

 


------------------------------------------------------------------------------

_______________________________________________
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: ikfast requires intersecting axes?

Rosen Diankov
Administrator
can you try sympy 0.7.1?
sympy changes so fast and i've stopped trying to keep up with their versioning and froze the version to 0.7.1

nevertheless, i just pushed some ikfast changes to master, can you try them?

thanks


2015-11-19 3:20 GMT+09:00 Axelrod, Ben <[hidden email]>:

Ah, good catch.  I set “--precision=5” and it got farther, but still did not finish.  I actually have 2 differently calibrated robot XML files, and interestingly they each failed in a different way.  (The files differ only in some minor link transforms).

 

The first failed deep within sympy when trying to “solveDialytically”.   (I am using sympy version '0.7.4.1').  Here is the backtrace:

 

openravepy.ikfast: AddSolution, depth=2, c=60, iter=0/1, starting newcases: set([new_r02, new_r22, new_r12])

openravepy.ikfast: SolveAllEquations, depth=3 c=67, [j12, j13, j14, j0, j15] [j16, j17, j18]: cases=set([new_r02, new_r22, new_r12])

/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py:296: RuntimeWarning: tp_compare didn't return -1 or -2 for exception

  if man < 0:

Traceback (most recent call last):

  File "/usr/local/bin/openrave.py", line 126, in <module>

    database.run(args=args)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1126, in run

    InverseKinematicsModel.RunFromParser(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1091, in RunFromParser

    model = DatabaseGenerator.RunFromParser(Model=Model,parser=parser,robotatts=robotatts,args=args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/__init__.py", line 262, in RunFromParser

    model.autogenerate(options=options)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 661, in autogenerate

    self.generate(iktype=iktype,freejoints=freejoints,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang,ipython=ipython,ikfastmaxcasedepth=ikfastmaxcasedepth)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 887, in generate

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2264, in generateIkSolver

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 754, in solveFullIK_6D

    return self.ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2858, in solveFullIK_6D

    tree = self.TestIntersectingAxes(solvejointvars,Links, LinksInv,endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2946, in TestIntersectingAxes

    return self.solve6DIntersectingAxes(T0links,T1links,transvars,rotvars,solveRotationFirst=solveRotationFirst, endbranchtree=endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 3141, in solve6DIntersectingAxes

    rottree += self.SolveAllEquations(AllEquations,curvars=currotvars,othersolvedvars=othersolvedvars,solsubs=self.freevarsubs[:],endbranchtree=storesolutiontree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 6622, 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_0_9/ikfast.py", line 7283, 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_0_9/ikfast.py", line 6511, 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_0_9/ikfast.py", line 7283, 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_0_9/ikfast.py", line 6602, in SolveAllEquations

    rawsolutions=self.SolvePairVariables(raweqns,var0,var1,othersolvedvars,unknownvars=curvars+unknownvars)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 8579, in SolvePairVariables

    return self.SolvePairVariablesHalfAngle(raweqns,var0,var1,othersolvedvars)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 7584, in SolvePairVariablesHalfAngle

    Mall, allmonoms = self.solveDialytically(newreducedeqs,ileftvar,returnmatrix=True)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 6017, in solveDialytically

    Anumpy = numpy.array(numpy.array(A), numpy.float64)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 276, in __float__

    return mlib.to_float(self._as_mpf_val(53))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1515, in _as_mpf_val

    return mlib.from_int(self.p, prec)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 336, in from_int

    return from_man_exp(n, 0, prec, rnd)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 296, in from_man_exp

    if man < 0:

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 276, in __float__

    return mlib.to_float(self._as_mpf_val(53))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1515, in _as_mpf_val

    return mlib.from_int(self.p, prec)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 336, in from_int

    return from_man_exp(n, 0, prec, rnd)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 296, in from_man_exp

    if man < 0:

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

   prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 276, in __float__

    return mlib.to_float(self._as_mpf_val(53))

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1515, in _as_mpf_val

    return mlib.from_int(self.p, prec)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 336, in from_int

    return from_man_exp(n, 0, prec, rnd)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 296, in from_man_exp

    if man < 0:

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 202, in __float__

    result = self.evalf()

  File "/usr/lib/python2.7/dist-packages/sympy/core/evalf.py", line 1276, in evalf

    prec = dps_to_prec(n)

  File "/usr/lib/python2.7/dist-packages/sympy/mpmath/libmp/libmpf.py", line 67, in dps_to_prec

    return max(1, int(round((int(n)+1)*3.3219280948873626)))

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 207, in __float__

    raise TypeError("can't convert expression to float")

TypeError: can't convert expression to float

 

 

The second failed with a memory error, (also inside sympy), when trying to “SolvePairVariables”.  I tried seeing “--maxcasedepth=1” but that did not help.  Here is the backtrace:

 

openravepy.ikfast: SolveAllEquations, depth=0 c=1, [j0, j15] [j12, j13, j14]: cases=None

openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00

openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00

openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00

openravepy.ikfast: solveDialytically, not all eigenvalues are > 0. min is 0.000000e+00

openravepy.ikfast: SolvePairVariables, CannotSolveError: SolvePairVariablesHalfAngle: failed to solve dialytically with 2 equations

openravepy.ikfast: SolvePairVariables, solving separated equations with linear terms

Traceback (most recent call last):

  File "/usr/local/bin/openrave.py", line 126, in <module>

    database.run(args=args)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1126, in run

    InverseKinematicsModel.RunFromParser(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1091, in RunFromParser

    model = DatabaseGenerator.RunFromParser(Model=Model,parser=parser,robotatts=robotatts,args=args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/__init__.py", line 262, in RunFromParser

    model.autogenerate(options=options)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 661, in autogenerate

    self.generate(iktype=iktype,freejoints=freejoints,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang,ipython=ipython,ikfastmaxcasedepth=ikfastmaxcasedepth)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 887, in generate

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2264, in generateIkSolver

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 754, in solveFullIK_6D

    return self.ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2858, in solveFullIK_6D

    tree = self.TestIntersectingAxes(solvejointvars,Links, LinksInv,endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2946, in TestIntersectingAxes

    return self.solve6DIntersectingAxes(T0links,T1links,transvars,rotvars,solveRotationFirst=solveRotationFirst, endbranchtree=endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 3119, in solve6DIntersectingAxes

    transtree = self.SolveAllEquations(AllEquations,curvars=curvars,othersolvedvars=othersolvedvars[:],solsubs=solsubs,endbranchtree=newendbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 6602, in SolveAllEquations

    rawsolutions=self.SolvePairVariables(raweqns,var0,var1,othersolvedvars,unknownvars=curvars+unknownvars)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 8623, in SolvePairVariables

    finaleq = (ptotal_cos.as_expr()**2 - (1-polysymbols[0]**2)*ptotal_sin.as_expr()**2).expand()

  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/expr.py", line 2870, in expand

    expr, hit = Expr._expand_hint(expr, hint, deep=deep, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2803, in _expand_hint

    arg, arghit = Expr._expand_hint(arg, hint, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2811, in _expand_hint

    newexpr = getattr(expr, hint)(**hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/power.py", line 590, in _eval_expand_multinomial

    expansion_dict = multinomial_coefficients(len(p), n)

  File "/usr/lib/python2.7/dist-packages/sympy/ntheory/multinomial.py", line 145, in multinomial_coefficients

    return dict(multinomial_coefficients_iterator(m, n))

  File "/usr/lib/python2.7/dist-packages/sympy/ntheory/multinomial.py", line 238, in multinomial_coefficients_iterator

    b = _tuple(filter(None, t1))

MemoryError

 

 

I can try reducing the precision of the numbers in the XML file by hand.  Will this get any different results than using the --precision flag?

 

Thanks,

Ben

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Rosen Diankov
Sent: Tuesday, November 17, 2015 8:55 PM
To: Axelrod, Ben
Cc: [hidden email]
Subject: Re: [OpenRAVE-users] ikfast requires intersecting axes?

 

dear ben,

you probably have axes and offsets that are 7+ digits long, i don't think ikfast can handle that. try reducing the precision...

ikfast also has a --precision setting, have you played around with it?

best,

 

2015-11-18 6:50 GMT+09:00 Axelrod, Ben <[hidden email]>:

I recently performed kinematic calibration on my robot which very slightly changed my link transforms and joint axes.  Now, ikfast will not generate files for me.  This is the error I get:

 

Traceback (most recent call last):

  File "/usr/local/bin/openrave.py", line 126, in <module>

    database.run(args=args)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1126, in run

    InverseKinematicsModel.RunFromParser(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 1091, in RunFromParser

    model = DatabaseGenerator.RunFromParser(Model=Model,parser=parser,robotatts=robotatts,args=args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/__init__.py", line 262, in RunFromParser

    model.autogenerate(options=options)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 661, in autogenerate

    self.generate(iktype=iktype,freejoints=freejoints,precision=precision,forceikbuild=forceikbuild,outputlang=outputlang,ipython=ipython,ikfastmaxcasedepth=ikfastmaxcasedepth)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 887, in generate

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2262, in generateIkSolver

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

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/databases/inversekinematics.py", line 754, in solveFullIK_6D

    return self.ikfast.IKFastSolver.solveFullIK_6D(*args,**kwargs)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2856, in solveFullIK_6D

    tree = self.TestIntersectingAxes(solvejointvars,Links, LinksInv,endbranchtree)

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2942, in TestIntersectingAxes

    for T0links,T1links,transvars,rotvars,solveRotationFirst in self.iterateThreeIntersectingAxes(solvejointvars,Links, LinksInv):

  File "/usr/local/lib/python2.7/dist-packages/openravepy/_openravepy_0_9/ikfast.py", line 2999, in iterateThreeIntersectingAxes

    translationeqs = [self.RoundEquationTerms(eq.expand()) for eq in T0[:3,3]]

  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/expr.py", line 2870, in expand

    expr, hit = Expr._expand_hint(expr, hint, deep=deep, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2803, in _expand_hint

    arg, arghit = Expr._expand_hint(arg, hint, **hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/expr.py", line 2811, in _expand_hint

    newexpr = getattr(expr, hint)(**hints)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 748, in _eval_expand_mul

    terms = self.func._expandsums(sums)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 714, in _expandsums

    terms = [Mul(a, b) for a in left for b in right]

  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/operations.py", line 40, in __new__

   c_part, nc_part, order_symbols = cls.flatten(args)

  File "/usr/lib/python2.7/dist-packages/sympy/core/mul.py", line 475, in flatten

    obj = Pow(bi, ei)

  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/power.py", line 119, in __new__

    obj = b._eval_power(e)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1752, in _eval_power

    dict = Integer(self).factors(limit=2**15)

  File "/usr/lib/python2.7/dist-packages/sympy/core/numbers.py", line 1375, in factors

    verbose=verbose).copy()

  File "/usr/lib/python2.7/dist-packages/sympy/ntheory/factor_.py", line 1065, in factorint

    b, fermat = integer_nthroot(b2, 2)

  File "/usr/lib/python2.7/dist-packages/sympy/core/power.py", line 35, in integer_nthroot

    raise ValueError("y must be nonnegative")

ValueError: y must be nonnegative

 

This is an 8 DOF robot, and I am trying to generate Transform6D code.  I am using the master branch pulled today (November 17, 2015).  I have tried many different free joints with no success. 

 

Any ideas?

 

Thanks,

Ben

 

 

Ben Axelrod
Sr. Robotics Software Engineer
Technology Organization


iRobot
8 Crosby Drive 8-1
Bedford, MA 01730
t: <a href="tel:781.430.3315" target="_blank">781.430.3315
[hidden email]

 


------------------------------------------------------------------------------
Give your users amazing mobile app experiences with Intel XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2-D/3-D games for multiple OSs.
Then get your creation into app stores sooner, with many ways to monetize.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140
_______________________________________________
Openrave-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openrave-users

 



------------------------------------------------------------------------------

_______________________________________________
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: ikfast requires intersecting axes?

lee520
In reply to this post by baxelrod
<P></P>
<P>An additional feral particular date, <STRONG>Trx Suspension</STRONG> Delivery to M1 puzzle(Masna 1) <STRONG>Trx Uk</STRONG> Fo you to have hipper other instead of thou as <STRONG>Trx Xmount</STRONG> well as glass drinks and mix with the options as well as also program person pack from the do better than the actual Arctic Monkeys. Closer than you think is the commercial hunting Roxy(Dlouha 33, Praha 1) Which you could on the table many absina moreover groove away to accommodate music just up until <STRONG>Trx Strap</STRONG> early schedule. Using vacations and also quality, With an incredible consider related with Wenceslas sq. </P>
<P></P>
Loading...