THREE.IK icon indicating copy to clipboard operation
THREE.IK copied to clipboard

Iterations and simulated annealing

Open jsantell opened this issue 6 years ago • 2 comments

This article by Jonathan Blow describes a way of finding constraints similarly to the FABRIK paper -- as a valid ellipsoidal area infront of the joint. But since both CCD and FABRIK both are iterative solvers, there could be a point where the local maxima does not reach the target in a chain, however there's still a valid solution if the base joint was rotated on a different axis, for example.

The article covers simulated annealing, or as I understand it, try a second iteration from a different valid base joint rotation and see if it results in an end effector closer to the target than the original base joint rotation. I can try and post an example sketch if this needs further explanation.

jsantell avatar Apr 23 '18 05:04 jsantell

Alternatively, you can try to anneal through the non-convexities by doing a few iterations with the rotation-limits disabled (allowing joints to rotate past their limits). Then, a few more iterations with the limits on. Some of the joints may "pop" to the other side of their limit, thus "teleporting" the chain to a configuration that can easily converge on the target. (This will not always work, but it's free)

zalo avatar Apr 24 '18 04:04 zalo

I believe my earlier attempt did not disable the rotation limits, I wonder if that'd be the key to prevent the non-stop "popping", but it was a quick and crude attempt that probably needed to prioritize the current pose if the "popped"/different pose did not result in a significantly closer solution

jsantell avatar Apr 26 '18 19:04 jsantell