{"abstract":"The step length is tuned to a vector that is not the predicted task-space motion.","category":"Inverse kinematics solvers","checks":7,"contract":"Input [l1,l2,q1,q2,tx,ty]: one Jacobian-transpose step for a planar 2R arm with the error-optimal gain alpha = <e, J J^T e> / <J J^T e, J J^T e>, dq = alpha J^T e. When <J J^T e, J J^T e> < 1e-15 return [\"stationary\", q1, q2]. Otherwise return [\"step\", alpha (6 decimals), q1 and q2 updated in degrees (4 decimals)].","contract_signature":"x","evaluation_group":"w2-inverse_kinematics_solvers-jacobian-transpose-adaptive","failed_approach":"Transposing only the first component still mixes joint and task indices.","family":"w2-inverse_kinematics_solvers-jacobian-transpose-adaptive-task-space-image","id":"FA-88326","implementations":{"attempt":{"sha256":"092a9c48a2ebab5861d35732a0aa24dd7327c88f0c5a0e5f8a9608c5aaced58b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    l1,l2,q1,q2,tx,ty=x\n    a=math.radians(q1)\n    b=math.radians(q1+q2)\n    ex=tx-(l1*math.cos(a)+l2*math.cos(b))\n    ey=ty-(l1*math.sin(a)+l2*math.sin(b))\n    j11=-l1*math.sin(a)-l2*math.sin(b)\n    j12=-l2*math.sin(b)\n    j21=l1*math.cos(a)+l2*math.cos(b)\n    j22=l2*math.cos(b)\n    g1=j11*ex+j21*ey\n    g2=j12*ex+j22*ey\n    h1=j11*g1+j12*g2\n    h2=j12*g1+j22*g2\n    den=h1*h1+h2*h2\n    if den<1e-15: return ['stationary',q1,q2]\n    alpha=(ex*h1+ey*h2)/den\n    return ['step',round(alpha,6),round(q1+math.degrees(alpha*g1),4),round(q2+math.degrees(alpha*g2),4)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]], [['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]]]\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":"7b840f18fd46d053dd067dc18639374c45fb8ec0ea52abf960891b35f74b8c20","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    l1,l2,q1,q2,tx,ty=x\n    a=math.radians(q1)\n    b=math.radians(q1+q2)\n    ex=tx-(l1*math.cos(a)+l2*math.cos(b))\n    ey=ty-(l1*math.sin(a)+l2*math.sin(b))\n    j11=-l1*math.sin(a)-l2*math.sin(b)\n    j12=-l2*math.sin(b)\n    j21=l1*math.cos(a)+l2*math.cos(b)\n    j22=l2*math.cos(b)\n    g1=j11*ex+j21*ey\n    g2=j12*ex+j22*ey\n    h1=j11*g1+j21*g2\n    h2=j12*g1+j22*g2\n    den=h1*h1+h2*h2\n    if den<1e-15: return ['stationary',q1,q2]\n    alpha=(ex*h1+ey*h2)/den\n    return ['step',round(alpha,6),round(q1+math.degrees(alpha*g1),4),round(q2+math.degrees(alpha*g2),4)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]], [['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['large error', [[1, 1, 0, 45, -1.5, 0.2]], ['step', 0.287793, 23.1194, 76.4812]], ['unequal links', [[2, 1, 20, -40, 1.5, 2.0]], ['step', 0.11371, 53.3906, -32.7888]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]]], [['moderate error', [[1, 1, 30, 60, 0.5, 1.6]], ['step', 0.263207, 39.5859, 65.5199]], ['at target', [[1, 1, 0, 90, 1, 1]], ['stationary', 0, 90]], ['negative angles', [[1.5, 1, -30, -60, 0.8, -2]], ['step', 0.183895, -42.6234, -65.2581]], ['behind base', [[1, 1, 120, 30, -1, -1]], ['step', 0.217338, 154.0209, 53.2367]], ['small error', [[1, 1, 10, 10, 1.9, 0.6]], ['step', 0.201469, 12.0193, 11.0115]], ['long forearm', [[0.5, 2, 70, -20, -0.5, 2.2]], ['step', 0.098879, 93.8254, -1.5747]], ['straight arm radial error', [[1, 1, 0, 0, 1.5, 0]], ['stationary', 0, 0]]]]\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-jacobian-transpose-adaptive-task-space-image","generated_at":"2026-09-29T14:51:07.144645+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.","root_cause":"The second product applies the transpose again when forming the predicted end-effector motion.","sha256":"1c66566d80b06a3b0313bf84e978addafbb9ea4fe313b6dfbda1f0c0bb6f1074","title":"Adaptive gain uses J^T J^T e instead of J J^T e · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":39.338,"exit_code":1,"observations":[{"actual":["step",0.195518,37.1207,64.1003],"check":"moderate error","expected":["step",0.263207,39.5859,65.5199],"passed":false},{"actual":["stationary",0,90],"check":"at target","expected":["stationary",0,90],"passed":true},{"actual":["step",1.305929,104.9097,187.8536],"check":"large error","expected":["step",0.287793,23.1194,76.4812],"passed":false},{"actual":["step",0.665001,215.2762,2.1725],"check":"unequal links","expected":["step",0.11371,53.3906,-32.7888],"passed":false},{"actual":["step",0.19514,-43.3953,-65.5796],"check":"negative angles","expected":["step",0.183895,-42.6234,-65.2581],"passed":false},{"actual":["step",0.174458,147.3087,48.6522],"check":"behind base","expected":["step",0.217338,154.0209,53.2367],"passed":false},{"actual":["step",0.323953,13.2469,11.6264],"check":"small error","expected":["step",0.201469,12.0193,11.0115],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"moderate error\", \"actual\": [\"step\", 0.195518, 37.1207, 64.1003], \"expected\": [\"step\", 0.263207, 39.5859, 65.5199], \"passed\": false}, {\"check\": \"at target\", \"actual\": [\"stationary\", 0, 90], \"expected\": [\"stationary\", 0, 90], \"passed\": true}, {\"check\": \"large error\", \"actual\": [\"step\", 1.305929, 104.9097, 187.8536], \"expected\": [\"step\", 0.287793, 23.1194, 76.4812], \"passed\": false}, {\"check\": \"unequal links\", \"actual\": [\"step\", 0.665001, 215.2762, 2.1725], \"expected\": [\"step\", 0.11371, 53.3906, -32.7888], \"passed\": false}, {\"check\": \"negative angles\", \"actual\": [\"step\", 0.19514, -43.3953, -65.5796], \"expected\": [\"step\", 0.183895, -42.6234, -65.2581], \"passed\": false}, {\"check\": \"behind base\", \"actual\": [\"step\", 0.174458, 147.3087, 48.6522], \"expected\": [\"step\", 0.217338, 154.0209, 53.2367], \"passed\": false}, {\"check\": \"small error\", \"actual\": [\"step\", 0.323953, 13.2469, 11.6264], \"expected\": [\"step\", 0.201469, 12.0193, 11.0115], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.184,"exit_code":1,"observations":[{"actual":["step",0.20936,37.6248,64.3906],"check":"moderate error","expected":["step",0.263207,39.5859,65.5199],"passed":false},{"actual":["stationary",0,90],"check":"at target","expected":["stationary",0,90],"passed":true},{"actual":["step",-1.414214,-113.6085,-109.6986],"check":"large error","expected":["step",0.287793,23.1194,76.4812],"passed":false},{"actual":["step",0.292337,105.8443,-21.4608],"check":"unequal links","expected":["step",0.11371,53.3906,-32.7888],"passed":false},{"actual":["step",0.186104,-42.7751,-65.3212],"check":"negative angles","expected":["step",0.183895,-42.6234,-65.2581],"passed":false},{"actual":["step",0.098389,135.4013,40.5193],"check":"behind base","expected":["step",0.217338,154.0209,53.2367],"passed":false},{"actual":["step",-0.003474,9.9652,9.9826],"check":"small error","expected":["step",0.201469,12.0193,11.0115],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"moderate error\", \"actual\": [\"step\", 0.20936, 37.6248, 64.3906], \"expected\": [\"step\", 0.263207, 39.5859, 65.5199], \"passed\": false}, {\"check\": \"at target\", \"actual\": [\"stationary\", 0, 90], \"expected\": [\"stationary\", 0, 90], \"passed\": true}, {\"check\": \"large error\", \"actual\": [\"step\", -1.414214, -113.6085, -109.6986], \"expected\": [\"step\", 0.287793, 23.1194, 76.4812], \"passed\": false}, {\"check\": \"unequal links\", \"actual\": [\"step\", 0.292337, 105.8443, -21.4608], \"expected\": [\"step\", 0.11371, 53.3906, -32.7888], \"passed\": false}, {\"check\": \"negative angles\", \"actual\": [\"step\", 0.186104, -42.7751, -65.3212], \"expected\": [\"step\", 0.183895, -42.6234, -65.2581], \"passed\": false}, {\"check\": \"behind base\", \"actual\": [\"step\", 0.098389, 135.4013, 40.5193], \"expected\": [\"step\", 0.217338, 154.0209, 53.2367], \"passed\": false}, {\"check\": \"small error\", \"actual\": [\"step\", -0.003474, 9.9652, 9.9826], \"expected\": [\"step\", 0.201469, 12.0193, 11.0115], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}