robotics-toolbox-python icon indicating copy to clipboard operation
robotics-toolbox-python copied to clipboard

Error while using ikine_LM

Open razoentaki opened this issue 2 years ago • 0 comments

I tried to give a target position which is out of the reach of robot Cobra600 to the ikine_LM function. However, the result show it is success = True. How to make the success of ikine_LM function return False if the target position is out of reach??

Cobra600 = rtb.models.DH.Cobra600() print(Cobra600) qe = [10,10,10,10] T = Cobra600.fkine(qe) sol = Cobra600.ikine_LM(T) print(sol) Cobra600.plot(sol.q, block=True)

IKsolution(q=array([ 1.69963067, 2.56637061, 10. , 0.54918659]), success=True, reason=None, iterations=12, residual=1.8233519592079866e-11)

Another problem is when i use the mask parameter in ikine_LM function. I always get this error. sol = Cobra600.ikine_LM(T, mask=[0,1,1,0,0,0]) How to solve this error?? Traceback (most recent call last): raise LinAlgError("Singular matrix") numpy.linalg.LinAlgError: Singular matrix

razoentaki avatar Aug 16 '22 03:08 razoentaki