Software version:5.6
Robot generation: E-series (not tested on CB-series)
Steps to reproduce:
We have identified a bug that makes it almost impossible to run our program properly on physical robots.
The documentation about is_within_safety_limits says “If a solution is found when applying the inverse kinematics to the given target TCP pose, this pose is considered reachable.”
However, it seems that is_within_safety_limits does NOT use the actual calibration data, while get_inverse_kin does . The attached example throws an exception popup when running on a physical robot, but it runs smoothly on a simulator. In the example I have attached the calibration data of a real robot of a customer, and also the contents of the same folder (.urcontrol) from my simulator. You can test the two different behaviours by simply replacing the .urcontrol folder on the simulator, and restart.
BugReportInverseKinematics.zip (292.2 KB)
set_tcp(p[0.1035,-0.045,0.185,0.0,0.0,1.1606439525762293])
epos= p[1.12704,0.197468,-0.493055,-2.22135,-2.22143,8.76663e-05]
if (is_within_safety_limits(epos)):
ikin = get_inverse_kin(epos)
textmsg("inverse kinematics: ", ikin)
# todo add project-specific calculations here
else:
textmsg(“out of reach”)
# skip calculations, point is out of reach
end
We run a lot of calculations in our program and use get_inverse_kinematics intensively. A calculation must not stop the robot with an exception popup at the customer in any circumstances, therefore we protect all these function calls with is_within_safety_limits. But the behaviour of these two functions are completely unpredictable, and the same program runs on one robot but not on another. We cannot guarantee that our program will run on a specific robot!
As a quick workaround, we have reduced the robot reach by stretching every pose by 2% before passing them to is_within_safety_limits:
if (is_within_safety_limits(stretch_by_2pct(target_pos)):
get_inverse_kin(target_pos)
…
This seems to work so far, but we need a solution that is 100% safe. A random exception popup at some customers is not acceptable.
Expected behavior:
expected a text message either “inverse kinematics: […]” or “out of reach” on the physical robot as well
Actual behavior:
the program throws an exception and opens a popup saying Script function get_inverse_kin unable to find a solution"