Brief
A robot arm has motors at its joints, but what you care about is where its tip goes. Turning joint angles into a tip position is forward kinematics. The reverse, finding angles that put the tip on a target, is inverse kinematics, and robot arms solve it many times per second.
For a 2-link arm with lengths and , the tip is at
The Jacobian is the 2 × 2 matrix of partial derivatives , where . It says how the tip moves for a tiny change in each angle: . You build it with the chain rule. For example, the derivative of with respect to is times the derivative of the inside, which is 1.
Steering is then a loop. Measure the error from tip to target, find a small with , take it, repeat. Solve that linear system exactly and you have Newton's method. Step along instead and you have gradient descent on . Both struggle where is close to zero.
DATA · simulated arm
Objectives
Read-only. Log in to update progress.
VICTORY CONDITIONS
- All 1,000 random reachable targets are reached within 1 mm by your Jacobian-based solver, checked by running its angles through forward kinematics and against the closed-form solution. Record the worst error with `python tools/mlarena.py record BM-16 "<max error> mm"`.
- The solver never returns NaN or infinite angles, including for targets near the inner and outer edges of the reachable ring.
- The README has a recording of the click-to-reach demo.
Side quests
Terms in plain words
- Forward kinematics
- Joint angles in, tip position out. A bit of trigonometry.
- Inverse kinematics
- Target position in, joint angles out. The hard direction, and what this project solves.
- Jacobian
- The matrix of partial derivatives of every output with respect to every input. For this arm it is 2 × 2 and says how the tip moves for a small turn of each joint.
- Chain rule
- The derivative of a function of a function is the product of their derivatives. With several variables, the Jacobians multiply.
- Singularity
- A pose where det J = 0, so small joint moves can't push the tip in some direction. For this arm, that's fully straight or fully folded.