rdiankov / openrave

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

Relax mpmath eps #1392

Closed cielavenir closed 3 months ago

cielavenir commented 3 months ago

sometimes mpmath.polyroots does not converge well, so I relax the threshold.

lib/python3.9/site-packages/mpmath/calculus/polynomials.py in polyroots(ctx, coeffs, maxsteps, cleanup, extraprec, error)
    185                 err[i] = abs(x)
    186         if abs(max(err)) >= tol:
--> 187             raise ctx.NoConvergence("Didn't converge in maxsteps=%d steps." \
    188                     % maxsteps)
    189         # Remove small real or imaginary parts

NoConvergence: Didn't converge in maxsteps=50 steps.

with this patch, I locally confirm that m____c50h iksolver can be generated with sympy 1.11.1. Also I checked some ikparams can be solved.

cc @ntohge


as side-effect, https://github.com/roboticsleeds/ur5controller/issues/7 and https://github.com/andyzeng/ikfastpy/issues/2 and https://github.com/rdiankov/openrave/issues/578 will be solved positively (if threshold is alright).

rdiankov commented 3 months ago

Thanks~