{"abstract":"Self-motion increases the distance to the preferred configuration.","category":"Inverse kinematics solvers","checks":7,"contract":"Input [lengths(3), q(3 deg), target, qc(3 deg), k]: planar 3R arm, position task only. One step dq = J+ e + (I - J+ J) z, J+ = J^T (J J^T)^-1, e = target - fk(q), z = k*(qc-q) in radians. Return the updated q in degrees rounded to 4, or \"singular\" when |det(J J^T)|<1e-12.","evaluation_group":"w2-inverse_kinematics_solvers-null-space-redundancy","failed_approach":"Leaving the difference in degrees overshoots the centering by a factor of 57.","family":"w2-inverse_kinematics_solvers-null-space-redundancy-centering-gradient-direction","id":"FA-88186","implementations":{"attempt":{"sha256":"dcac3818c9a475e2c364e3f94723ebbbe77cfbc31a47abe9950967f699f6bc93","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    ls,q,t,qc,k=x\n    qr=[math.radians(v) for v in q]\n    cum=[sum(qr[:i+1]) for i in range(3)]\n    px=sum(ls[i]*math.cos(cum[i]) for i in range(3))\n    py=sum(ls[i]*math.sin(cum[i]) for i in range(3))\n    J=[[-sum(ls[j]*math.sin(cum[j]) for j in range(i,3)) for i in range(3)],\n       [sum(ls[j]*math.cos(cum[j]) for j in range(i,3)) for i in range(3)]]\n    a=sum(v*v for v in J[0])\n    b=sum(J[0][i]*J[1][i] for i in range(3))\n    c=sum(v*v for v in J[1])\n    det=a*c-b*b\n    if abs(det)<1e-12: return 'singular'\n    inv=[[c/det,-b/det],[-b/det,a/det]]\n    P=[[J[0][i]*inv[0][0]+J[1][i]*inv[1][0],J[0][i]*inv[0][1]+J[1][i]*inv[1][1]] for i in range(3)]\n    e=[t[0]-px,t[1]-py]\n    z=[k*(qc[i]-q[i]) for i in range(3)]\n    N=[[(1.0 if i==j else 0.0)-sum(P[i][r]*J[r][j] for r in range(2)) for j in range(3)] for i in range(3)]\n    dq=[P[i][0]*e[0]+P[i][1]*e[1]+sum(N[i][j]*z[j] for j in range(3)) for i in range(3)]\n    return [round(q[i]+math.degrees(dq[i]),4) for i in range(3)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['task only', [[[1, 1, 1], [20, 30, 40], [1.5, 1.5], [20, 30, 40], 0.0]], [-9.6761, 48.859, 73.9791]], ['centering only', [[[1, 1, 1], [20, 30, 40], [1.0911, 2.3209], [0, 0, 0], 0.5]], [23.38, 40.6501, 42.2202]], ['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['straight arm singular', [[[1, 1, 1], [0, 0, 0], [2, 1], [0, 0, 0], 0.5]], 'singular'], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]]], [['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]], ['behind base', [[[1, 1, 1], [120, 30, 20], [-2, 0.5], [90, 0, 0], 0.4]], [75.3463, 86.5441, 80.8124]], ['small error', [[[1.2, 0.8, 0.5], [45, -30, 15], [1.6, 1.1], [45, -30, 15], 0.0]], [102.7802, -138.4201, 15.5818]], ['asymmetric centre', [[[1, 1, 1], [5, 80, -40], [1.2, 1.9], [10, 20, 30], 0.8]], [-22.1921, 110.3115, 3.6813]]], [['task only', [[[1, 1, 1], [20, 30, 40], [1.5, 1.5], [20, 30, 40], 0.0]], [-9.6761, 48.859, 73.9791]], ['centering only', [[[1, 1, 1], [20, 30, 40], [1.0911, 2.3209], [0, 0, 0], 0.5]], [23.38, 40.6501, 42.2202]], ['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['behind base', [[[1, 1, 1], [120, 30, 20], [-2, 0.5], [90, 0, 0], 0.4]], [75.3463, 86.5441, 80.8124]], ['small error', [[[1.2, 0.8, 0.5], [45, -30, 15], [1.6, 1.1], [45, -30, 15], 0.0]], [102.7802, -138.4201, 15.5818]], ['asymmetric centre', [[[1, 1, 1], [5, 80, -40], [1.2, 1.9], [10, 20, 30], 0.8]], [-22.1921, 110.3115, 3.6813]]], [['task only', [[[1, 1, 1], [20, 30, 40], [1.5, 1.5], [20, 30, 40], 0.0]], [-9.6761, 48.859, 73.9791]], ['centering only', [[[1, 1, 1], [20, 30, 40], [1.0911, 2.3209], [0, 0, 0], 0.5]], [23.38, 40.6501, 42.2202]], ['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['straight arm singular', [[[1, 1, 1], [0, 0, 0], [2, 1], [0, 0, 0], 0.5]], 'singular'], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]]], [['straight arm singular', [[[1, 1, 1], [0, 0, 0], [2, 1], [0, 0, 0], 0.5]], 'singular'], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]], ['behind base', [[[1, 1, 1], [120, 30, 20], [-2, 0.5], [90, 0, 0], 0.4]], [75.3463, 86.5441, 80.8124]], ['small error', [[[1.2, 0.8, 0.5], [45, -30, 15], [1.6, 1.1], [45, -30, 15], 0.0]], [102.7802, -138.4201, 15.5818]], ['asymmetric centre', [[[1, 1, 1], [5, 80, -40], [1.2, 1.9], [10, 20, 30], 0.8]], [-22.1921, 110.3115, 3.6813]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"4d76157c752c791c2ab9c8ad08d723cafdae0a5b7235fb375fe716ee78b67549","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    ls,q,t,qc,k=x\n    qr=[math.radians(v) for v in q]\n    cum=[sum(qr[:i+1]) for i in range(3)]\n    px=sum(ls[i]*math.cos(cum[i]) for i in range(3))\n    py=sum(ls[i]*math.sin(cum[i]) for i in range(3))\n    J=[[-sum(ls[j]*math.sin(cum[j]) for j in range(i,3)) for i in range(3)],\n       [sum(ls[j]*math.cos(cum[j]) for j in range(i,3)) for i in range(3)]]\n    a=sum(v*v for v in J[0])\n    b=sum(J[0][i]*J[1][i] for i in range(3))\n    c=sum(v*v for v in J[1])\n    det=a*c-b*b\n    if abs(det)<1e-12: return 'singular'\n    inv=[[c/det,-b/det],[-b/det,a/det]]\n    P=[[J[0][i]*inv[0][0]+J[1][i]*inv[1][0],J[0][i]*inv[0][1]+J[1][i]*inv[1][1]] for i in range(3)]\n    e=[t[0]-px,t[1]-py]\n    z=[k*math.radians(q[i]-qc[i]) for i in range(3)]\n    N=[[(1.0 if i==j else 0.0)-sum(P[i][r]*J[r][j] for r in range(2)) for j in range(3)] for i in range(3)]\n    dq=[P[i][0]*e[0]+P[i][1]*e[1]+sum(N[i][j]*z[j] for j in range(3)) for i in range(3)]\n    return [round(q[i]+math.degrees(dq[i]),4) for i in range(3)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['task only', [[[1, 1, 1], [20, 30, 40], [1.5, 1.5], [20, 30, 40], 0.0]], [-9.6761, 48.859, 73.9791]], ['centering only', [[[1, 1, 1], [20, 30, 40], [1.0911, 2.3209], [0, 0, 0], 0.5]], [23.38, 40.6501, 42.2202]], ['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['straight arm singular', [[[1, 1, 1], [0, 0, 0], [2, 1], [0, 0, 0], 0.5]], 'singular'], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]]], [['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]], ['behind base', [[[1, 1, 1], [120, 30, 20], [-2, 0.5], [90, 0, 0], 0.4]], [75.3463, 86.5441, 80.8124]], ['small error', [[[1.2, 0.8, 0.5], [45, -30, 15], [1.6, 1.1], [45, -30, 15], 0.0]], [102.7802, -138.4201, 15.5818]], ['asymmetric centre', [[[1, 1, 1], [5, 80, -40], [1.2, 1.9], [10, 20, 30], 0.8]], [-22.1921, 110.3115, 3.6813]]], [['task only', [[[1, 1, 1], [20, 30, 40], [1.5, 1.5], [20, 30, 40], 0.0]], [-9.6761, 48.859, 73.9791]], ['centering only', [[[1, 1, 1], [20, 30, 40], [1.0911, 2.3209], [0, 0, 0], 0.5]], [23.38, 40.6501, 42.2202]], ['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['behind base', [[[1, 1, 1], [120, 30, 20], [-2, 0.5], [90, 0, 0], 0.4]], [75.3463, 86.5441, 80.8124]], ['small error', [[[1.2, 0.8, 0.5], [45, -30, 15], [1.6, 1.1], [45, -30, 15], 0.0]], [102.7802, -138.4201, 15.5818]], ['asymmetric centre', [[[1, 1, 1], [5, 80, -40], [1.2, 1.9], [10, 20, 30], 0.8]], [-22.1921, 110.3115, 3.6813]]], [['task only', [[[1, 1, 1], [20, 30, 40], [1.5, 1.5], [20, 30, 40], 0.0]], [-9.6761, 48.859, 73.9791]], ['centering only', [[[1, 1, 1], [20, 30, 40], [1.0911, 2.3209], [0, 0, 0], 0.5]], [23.38, 40.6501, 42.2202]], ['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['straight arm singular', [[[1, 1, 1], [0, 0, 0], [2, 1], [0, 0, 0], 0.5]], 'singular'], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]]], [['straight arm singular', [[[1, 1, 1], [0, 0, 0], [2, 1], [0, 0, 0], 0.5]], 'singular'], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]], ['behind base', [[[1, 1, 1], [120, 30, 20], [-2, 0.5], [90, 0, 0], 0.4]], [75.3463, 86.5441, 80.8124]], ['small error', [[[1.2, 0.8, 0.5], [45, -30, 15], [1.6, 1.1], [45, -30, 15], 0.0]], [102.7802, -138.4201, 15.5818]], ['asymmetric centre', [[[1, 1, 1], [5, 80, -40], [1.2, 1.9], [10, 20, 30], 0.8]], [-22.1921, 110.3115, 3.6813]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"e88d9b16de1ec44666b8df86c1843a3f1ee82f6ab5aaa6e40105ef9a09a38dbb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    ls,q,t,qc,k=x\n    qr=[math.radians(v) for v in q]\n    cum=[sum(qr[:i+1]) for i in range(3)]\n    px=sum(ls[i]*math.cos(cum[i]) for i in range(3))\n    py=sum(ls[i]*math.sin(cum[i]) for i in range(3))\n    J=[[-sum(ls[j]*math.sin(cum[j]) for j in range(i,3)) for i in range(3)],\n       [sum(ls[j]*math.cos(cum[j]) for j in range(i,3)) for i in range(3)]]\n    a=sum(v*v for v in J[0])\n    b=sum(J[0][i]*J[1][i] for i in range(3))\n    c=sum(v*v for v in J[1])\n    det=a*c-b*b\n    if abs(det)<1e-12: return 'singular'\n    inv=[[c/det,-b/det],[-b/det,a/det]]\n    P=[[J[0][i]*inv[0][0]+J[1][i]*inv[1][0],J[0][i]*inv[0][1]+J[1][i]*inv[1][1]] for i in range(3)]\n    e=[t[0]-px,t[1]-py]\n    z=[k*math.radians(qc[i]-q[i]) for i in range(3)]\n    N=[[(1.0 if i==j else 0.0)-sum(P[i][r]*J[r][j] for r in range(2)) for j in range(3)] for i in range(3)]\n    dq=[P[i][0]*e[0]+P[i][1]*e[1]+sum(N[i][j]*z[j] for j in range(3)) for i in range(3)]\n    return [round(q[i]+math.degrees(dq[i]),4) for i in range(3)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['task only', [[[1, 1, 1], [20, 30, 40], [1.5, 1.5], [20, 30, 40], 0.0]], [-9.6761, 48.859, 73.9791]], ['centering only', [[[1, 1, 1], [20, 30, 40], [1.0911, 2.3209], [0, 0, 0], 0.5]], [23.38, 40.6501, 42.2202]], ['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['straight arm singular', [[[1, 1, 1], [0, 0, 0], [2, 1], [0, 0, 0], 0.5]], 'singular'], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]]], [['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]], ['behind base', [[[1, 1, 1], [120, 30, 20], [-2, 0.5], [90, 0, 0], 0.4]], [75.3463, 86.5441, 80.8124]], ['small error', [[[1.2, 0.8, 0.5], [45, -30, 15], [1.6, 1.1], [45, -30, 15], 0.0]], [102.7802, -138.4201, 15.5818]], ['asymmetric centre', [[[1, 1, 1], [5, 80, -40], [1.2, 1.9], [10, 20, 30], 0.8]], [-22.1921, 110.3115, 3.6813]]], [['task only', [[[1, 1, 1], [20, 30, 40], [1.5, 1.5], [20, 30, 40], 0.0]], [-9.6761, 48.859, 73.9791]], ['centering only', [[[1, 1, 1], [20, 30, 40], [1.0911, 2.3209], [0, 0, 0], 0.5]], [23.38, 40.6501, 42.2202]], ['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['behind base', [[[1, 1, 1], [120, 30, 20], [-2, 0.5], [90, 0, 0], 0.4]], [75.3463, 86.5441, 80.8124]], ['small error', [[[1.2, 0.8, 0.5], [45, -30, 15], [1.6, 1.1], [45, -30, 15], 0.0]], [102.7802, -138.4201, 15.5818]], ['asymmetric centre', [[[1, 1, 1], [5, 80, -40], [1.2, 1.9], [10, 20, 30], 0.8]], [-22.1921, 110.3115, 3.6813]]], [['task only', [[[1, 1, 1], [20, 30, 40], [1.5, 1.5], [20, 30, 40], 0.0]], [-9.6761, 48.859, 73.9791]], ['centering only', [[[1, 1, 1], [20, 30, 40], [1.0911, 2.3209], [0, 0, 0], 0.5]], [23.38, 40.6501, 42.2202]], ['task and centering', [[[1, 1, 1], [10, 40, -20], [2, 1], [0, 30, 30], 0.3]], [-62.5399, 148.4425, -29.151]], ['straight arm singular', [[[1, 1, 1], [0, 0, 0], [2, 1], [0, 0, 0], 0.5]], 'singular'], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]]], [['straight arm singular', [[[1, 1, 1], [0, 0, 0], [2, 1], [0, 0, 0], 0.5]], 'singular'], ['unequal links', [[[2, 1, 0.5], [30, -45, 60], [1.5, 1], [0, 0, 0], 0.2]], [87.5837, -214.0176, 178.4237]], ['negative config', [[[1, 1.5, 0.7], [-30, -20, -60], [1, -2], [0, 10, -10], 1.0]], [-7.4068, -55.9156, -92.0392]], ['strong centering', [[[1, 1, 1], [60, 60, 60], [-1, 1.5], [0, 0, 0], 2.0]], [43.7121, 92.5758, 40.7197]], ['behind base', [[[1, 1, 1], [120, 30, 20], [-2, 0.5], [90, 0, 0], 0.4]], [75.3463, 86.5441, 80.8124]], ['small error', [[[1.2, 0.8, 0.5], [45, -30, 15], [1.6, 1.1], [45, -30, 15], 0.0]], [102.7802, -138.4201, 15.5818]], ['asymmetric centre', [[[1, 1, 1], [5, 80, -40], [1.2, 1.9], [10, 20, 30], 0.8]], [-22.1921, 110.3115, 3.6813]]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Deterministic planar or low-dimensional teaching model with a stipulated convention; not a general robotics library. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-inverse_kinematics_solvers-null-space-redundancy-centering-gradient-direction","generated_at":"2026-09-29T14:51:05.826793+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Inverse kinematics code turns task-space goals into joint commands; a wrong branch, sign, limit or update order sends a real arm to the wrong pose.","repair":"Use z = k (qc - q).","root_cause":"The secondary velocity uses q - qc instead of qc - q.","sha256":"a598383589122f6b828b45c8995fb92e70612223fc3950bb42ef46958128c1e0","title":"Joint-centering objective pushes joints away from centre · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.33,"exit_code":1,"observations":[{"actual":[-9.6761,48.859,73.9791],"check":"task only","expected":[-9.6761,48.859,73.9791],"passed":true},{"actual":[-59.9006,245.6789,-144.3088],"check":"centering only","expected":[23.38,40.6501,42.2202],"passed":false},{"actual":[-342.4221,148.4425,776.7376],"check":"task and centering","expected":[-62.5399,148.4425,-29.151],"passed":false},{"actual":"singular","check":"straight arm singular","expected":"singular","passed":true},{"actual":[148.9825,-312.1156,14.595],"check":"unequal links","expected":[87.5837,-214.0176,178.4237],"passed":false},{"actual":[410.7241,-791.0337,460.852],"check":"negative config","expected":[-7.4068,-55.9156,-92.0392],"passed":false},{"actual":[-706.8983,1593.7966,-1460.501],"check":"strong centering","expected":[43.7121,92.5758,40.7197],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"task only\", \"actual\": [-9.6761, 48.859, 73.9791], \"expected\": [-9.6761, 48.859, 73.9791], \"passed\": true}, {\"check\": \"centering only\", \"actual\": [-59.9006, 245.6789, -144.3088], \"expected\": [23.38, 40.6501, 42.2202], \"passed\": false}, {\"check\": \"task and centering\", \"actual\": [-342.4221, 148.4425, 776.7376], \"expected\": [-62.5399, 148.4425, -29.151], \"passed\": false}, {\"check\": \"straight arm singular\", \"actual\": \"singular\", \"expected\": \"singular\", \"passed\": true}, {\"check\": \"unequal links\", \"actual\": [148.9825, -312.1156, 14.595], \"expected\": [87.5837, -214.0176, 178.4237], \"passed\": false}, {\"check\": \"negative config\", \"actual\": [410.7241, -791.0337, 460.852], \"expected\": [-7.4068, -55.9156, -92.0392], \"passed\": false}, {\"check\": \"strong centering\", \"actual\": [-706.8983, 1593.7966, -1460.501], \"expected\": [43.7121, 92.5758, 40.7197], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.468,"exit_code":1,"observations":[{"actual":[-9.6761,48.859,73.9791],"check":"task only","expected":[-9.6761,48.859,73.9791],"passed":true},{"actual":[26.3387,33.3661,48.8469],"check":"centering only","expected":[23.38,40.6501,42.2202],"passed":false},{"actual":[-52.5967,148.4425,-57.7815],"check":"task and centering","expected":[-62.5399,148.4425,-29.151],"passed":false},{"actual":"singular","check":"straight arm singular","expected":"singular","passed":true},{"actual":[85.4024,-210.5325,184.2439],"check":"unequal links","expected":[87.5837,-214.0176,178.4237],"passed":false},{"actual":[-22.2616,-29.7994,-111.6816],"check":"negative config","expected":[-7.4068,-55.9156,-92.0392],"passed":false},{"actual":[70.3788,39.2425,94.0531],"check":"strong centering","expected":[43.7121,92.5758,40.7197],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"task only\", \"actual\": [-9.6761, 48.859, 73.9791], \"expected\": [-9.6761, 48.859, 73.9791], \"passed\": true}, {\"check\": \"centering only\", \"actual\": [26.3387, 33.3661, 48.8469], \"expected\": [23.38, 40.6501, 42.2202], \"passed\": false}, {\"check\": \"task and centering\", \"actual\": [-52.5967, 148.4425, -57.7815], \"expected\": [-62.5399, 148.4425, -29.151], \"passed\": false}, {\"check\": \"straight arm singular\", \"actual\": \"singular\", \"expected\": \"singular\", \"passed\": true}, {\"check\": \"unequal links\", \"actual\": [85.4024, -210.5325, 184.2439], \"expected\": [87.5837, -214.0176, 178.4237], \"passed\": false}, {\"check\": \"negative config\", \"actual\": [-22.2616, -29.7994, -111.6816], \"expected\": [-7.4068, -55.9156, -92.0392], \"passed\": false}, {\"check\": \"strong centering\", \"actual\": [70.3788, 39.2425, 94.0531], \"expected\": [43.7121, 92.5758, 40.7197], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.098,"exit_code":0,"observations":[{"actual":[-9.6761,48.859,73.9791],"check":"task only","expected":[-9.6761,48.859,73.9791],"passed":true},{"actual":[23.38,40.6501,42.2202],"check":"centering only","expected":[23.38,40.6501,42.2202],"passed":true},{"actual":[-62.5399,148.4425,-29.151],"check":"task and centering","expected":[-62.5399,148.4425,-29.151],"passed":true},{"actual":"singular","check":"straight arm singular","expected":"singular","passed":true},{"actual":[87.5837,-214.0176,178.4237],"check":"unequal links","expected":[87.5837,-214.0176,178.4237],"passed":true},{"actual":[-7.4068,-55.9156,-92.0392],"check":"negative config","expected":[-7.4068,-55.9156,-92.0392],"passed":true},{"actual":[43.7121,92.5758,40.7197],"check":"strong centering","expected":[43.7121,92.5758,40.7197],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"task only\", \"actual\": [-9.6761, 48.859, 73.9791], \"expected\": [-9.6761, 48.859, 73.9791], \"passed\": true}, {\"check\": \"centering only\", \"actual\": [23.38, 40.6501, 42.2202], \"expected\": [23.38, 40.6501, 42.2202], \"passed\": true}, {\"check\": \"task and centering\", \"actual\": [-62.5399, 148.4425, -29.151], \"expected\": [-62.5399, 148.4425, -29.151], \"passed\": true}, {\"check\": \"straight arm singular\", \"actual\": \"singular\", \"expected\": \"singular\", \"passed\": true}, {\"check\": \"unequal links\", \"actual\": [87.5837, -214.0176, 178.4237], \"expected\": [87.5837, -214.0176, 178.4237], \"passed\": true}, {\"check\": \"negative config\", \"actual\": [-7.4068, -55.9156, -92.0392], \"expected\": [-7.4068, -55.9156, -92.0392], \"passed\": true}, {\"check\": \"strong centering\", \"actual\": [43.7121, 92.5758, 40.7197], \"expected\": [43.7121, 92.5758, 40.7197], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}