-
Notifications
You must be signed in to change notification settings - Fork 566
Error while using ikine_min() #314
Copy link
Copy link
Closed
Description
Description
Trying to use URDF.UR10.ikine_min() resulted in division by zero error.
UR10.reach is zero when it should be arount 1.6
Using DH.UR10.ikine_min() does not produce this error, however, the IK solver hangs and never exits the function. This may be another issue entirely.
Version information
pip3: 20.0.2
roboticstoolbox-python: 1.0.1 (installed via pip3)
spatialmath-python: 1.0.0 (automatically installed when rtb was installed)
To Reproduce
Steps to reproduce the behavior:
import roboticstoolbox as rtb
from spatialmath import SE3
from math import pi
robot = rtb.models.URDF.UR10()
startingQ = [-pi / 2, -pi / 2, -pi / 2, -pi / 2, pi / 2, 0] # elbow up position
desiredPose = SE3(0, 0.5, 0.5) * SE3.Ry(pi) # well within reach of robot
solution = robot.ikine_min(desiredPose, q0=startingQ, qlim=True) # error occurs here
print(solution.q)Traceback (most recent call last):
File "/home/USERNAME/script.py", line 12, in <module>
solution = robot.ikine_min(desiredPose, q0=startingQ, qlim=True) # error occurs here
File "/home/USERNAME/.local/lib/python3.8/site-packages/roboticstoolbox/robot/IK.py", line 752, in ikine_min
wr = 1 / self.reach
ZeroDivisionError: division by zeroError points to this line: (from git master)
| wr = 1 / self.reach |
Expected behavior
Inverse Kinematics is solved and produces joint angle values
Environment
Python: 3.8.10
Ubuntu: 20.04
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels