1

i'm trying to do this kind of robotic arm with IK. I have followed this simple FABRIK tutorial and currently figured out as follow (calculating the node positions without any constraint):

for (int j = 0; j < iterationCount; j++) {
    // Backward
    nodePositions[nodeCount - 1] = targetPos;
    for (int i = nodeCount - 2; i >= 0; i--) {
        dir = (nodePositions[i] - nodePositions[i + 1]).normalized;
        nodePositions[i] = nodePositions[i + 1] + dir * arms[i].Length;
    }
    // Forward
    nodePositions[0] = rootNodePos;
    for (int i = 1; i < nodeCount; i++) {
        dir = (nodePositions[i] - nodePositions[i - 1]).normalized;
        nodePositions[i] = nodePositions[i - 1] + dir * arms[i - 1].Length;
    }
}

But how do i implement angular limits on joints? Like arm_0[min-max], arm_1[min-max] . . .

Reference image: https://i.stack.imgur.com/KamBO.png

Munkhuu G
  • 11
  • 1
  • Joint limits are the hardest part of the FABRIK. Because they were developed based on some advanced geometric concepts. The only implementation of FABRIK that I know which implemented the joint constraints is this library in python: https://github.com/Atiehmerikh/FABRIK_Full_Body You might use it to get some idea how to implement the joint constraints though. – OmG Jul 06 '22 at 13:15
  • Here is the specific file which implemented the constraints: https://github.com/Atiehmerikh/FABRIK_Full_Body/blob/master/fabrik_full_body/constraints.py – OmG Jul 06 '22 at 13:16

0 Answers0