I have a problem with simIK. I link the target with tip. If I set the 1st joint of UR5 to 45, the simIK worked well and nothing happen. However, when I set 90, the simIK failed to solve.
For more detail I put the video here: https://youtu.be/g-Xe4eikivo
And my scene file here: https://drive.google.com/file/d/1hV3qJh ... drive_link
Please help me.
Thank you.
SimIK Solver Failed with 6DOF robot (UR5)
-
- Posts: 14
- Joined: 25 May 2024, 01:58
SimIK Solver Failed with 6DOF robot (UR5)
Last edited by gplminhduc147 on 02 Jul 2024, 04:19, edited 1 time in total.
Re: SimIK Solver Failed with 6DOF robot (UR5)
You can get an explanation of the reason(s) IK solver failed by checking the second return value:
or you can check for individual failure codes, e.g.:
Code: Select all
local r, fc = simIK.applyIkEnvironmentToScene(ikEnv,ikGroup_undamped,true)
if r == simIK.result_fail then
-- ...
sim.addLog(sim.verbosity_scriptwarnings, "IK solver failed: " .. simIK.getFailureDescription(fc))
end
Code: Select all
if fc & simIK.calc_limithit > 0 then
print('a joint limit was hit')
elseif fc & simIK.calc_notwithintolerance > 0 then
print('not within tolerance')
-- elseif ...
-- ...
end
-
- Posts: 14
- Joined: 25 May 2024, 01:58
Re: SimIK Solver Failed with 6DOF robot (UR5)
Hi. I added and run again. And the warning: "IK solver failed: {notwithintolerance, stepstoobig, limithit}"fferri wrote: ↑01 Jul 2024, 09:41 You can get an explanation of the reason(s) IK solver failed by checking the second return value:
or you can check for individual failure codes, e.g.:Code: Select all
local r, fc = simIK.applyIkEnvironmentToScene(ikEnv,ikGroup_undamped,true) if r == simIK.result_fail then -- ... sim.addLog(sim.verbosity_scriptwarnings, "IK solver failed: " .. simIK.getFailureDescription(fc)) end
Code: Select all
if fc & simIK.calc_limithit > 0 then print('a joint limit was hit') elseif fc & simIK.calc_notwithintolerance > 0 then print('not within tolerance') -- elseif ... -- ... end
How can I fix these errors please? Thank you
Re: SimIK Solver Failed with 6DOF robot (UR5)
I think that means the tip/target distance was too large or something like that.
Also, a joint limit was hit, and that also cause to trigger an error condition.
You can try to use simIK.setElementPrecision, simIK.setGroupFlags, simIK.setJointLimitMargin, simIK.setJointMaxStepSize or option
Also, a joint limit was hit, and that also cause to trigger an error condition.
You can try to use simIK.setElementPrecision, simIK.setGroupFlags, simIK.setJointLimitMargin, simIK.setJointMaxStepSize or option
{allowError=true}
to simIK.handleGroups.