Learn AI.
Build AI Systems · ORIGINAL LEARN AI LESSON

Turn a target into motion.

Find alternative target-reaching postures and separate geometric reach, joint limits and obstacle contact.

By the end: Solve a planar position target, compare alternative postures, reject limit/contact violations and distinguish final geometry from feasible motion.

01 · TRY

Start with something concrete.

Reach toward the same point with your elbow on different sides. The hand target alone does not specify the posture—or whether the route is clear.

Try the interactive model ↓
02 · PREDICT
Before you experiment

Two inverse-kinematics branches reach the same target. One crosses an obstacle and the other does not. What should the final-posture check do?

Two inverse-kinematics branches reach the same target. One crosses an obstacle and the other does not. What should the final-posture check do?
03 · EXPERIMENT

Change one thing. Watch what follows.

  1. Inspect both elbow branches at one position target.
  2. Tighten shoulder and elbow limits independently.
  3. Reject a branch whose link interior touches the disk.
  4. Compare exterior and inner-hole unreachable targets.
  5. Inspect a folded equal-link family without treating four samples as exhaustive.
  6. Export a report separating final posture, path and dynamics.

Loading this browser experiment…

04 · UNDERSTAND

Work backward from a target

Forward kinematics starts with joint angles and calculates a tool position. Inverse kinematics, or IK, starts with the desired tool position and asks which angles produce it. An answer may not exist; a target can also have several answers. This lesson finds final postures for a two-link planar arm before asking whether those postures meet additional constraints.

The base is fixed at the world origin. The first joint angle is measured from world x. The elbow angle is relative to the first link, not another world angle. We request the tool origin’s x/y position, without prescribing orientation. This makes the contract precise: reaching the position does not mean the tool points in a chosen direction.

First ask whether the lengths can reach

Two freely rotating links of lengths L₁ and L₂ reach distances from |L₁−L₂| to L₁+L₂. The outer radius comes from stretching them straight. The inner radius comes from folding one back along the other. Unequal links therefore leave an unreachable hole around the base.

The annulus is only an initial geometry test. It ignores joint limits and obstacles. A target inside the annulus may still have no acceptable posture once those constraints apply. A target outside it must be rejected rather than silently moved to its boundary.

A triangle gives two branches

Join the base, elbow and target into a triangle. Its sides are the two links and the target’s distance from the base. The cosine rule gives the elbow angle. Reflecting the triangle across the base-to-target line produces the other elbow branch, generally with a different shoulder angle.

The equation, with each term explained

Let d² = x²+y² be the squared target distance. Then cos(q₂) = (d²−L₁²−L₂²)/(2L₁L₂). The inverse cosine, acos, returns an angle whose cosine has that value. Taking the positive and negative angle yields the two elbow branches. The shoulder angle is atan2(y,x) − atan2(L₂ sin(q₂), L₁+L₂ cos(q₂)). The two-input atan2 function preserves quadrant information, unlike dividing y by x.

Calculations use radians; displayed angles use degrees. The solver tests reach first, then clamps only boundary roundoff before calling acos. It checks every computed answer by forwarding the joint angles back to an endpoint.

At straight or fully folded boundaries, two branches can describe the same posture, so they are deduplicated. Equal links folded exactly to the base are a special case: any shoulder angle leaves the endpoint at the origin. The lab shows four members of that continuous family. They do not exhaust it, and failure of every displayed sample is not a proof that the whole family is infeasible.

A solution is a candidate, not automatic acceptance

A joint limit constrains angle values. The lab uses closed symmetric shoulder and elbow ranges around zero, expressed in canonical −180° to 180° coordinates. Every candidate retains separate position, shoulder-limit and elbow-limit results. This makes a rejected answer explainable: it might reach accurately but require an unavailable joint angle.

Obstacle checks examine the entire link segment, including its interior. A link is modeled as a capsule: a line segment thickened by a radius of 0.05 m. The obstacle is a disk. The shortest distance from the disk center to the segment, minus both radii, is signed clearance. Positive clearance means separation; zero is tangency and counts as contact; negative means overlap. The numerical contact tolerance is displayed.

The two branches may pass different checks even though they have the same endpoint. Disabling the obstacle check changes which constraints are enforced; it does not remove the obstacle from a real scene. The result explicitly says when this check is disabled.

Final-posture geometry is not motion planning

A selected candidate is a static drawing. The lab does not command or animate a route from a starting posture. Intermediate arm positions can hit an obstacle even when both endpoints are clear. Establishing a collision-free trajectory needs checks over the swept motion and the actual robot geometry.

The simplified checker also omits self-collision, ground contact and other bodies. Fully folded samples can overlap their own links. Keep the claim limited to the disk and joint constraints actually modeled here.

Kinematics concerns positions and their changes. Dynamics concerns how forces, torques and inertia produce those changes. A geometrically valid posture says nothing by itself about motor torque, acceleration, balance or control stability. These need their own models and evidence.

Produce an auditable reachability decision

For guided practice, capture two branches, a joint-limit rejection and an obstacle rejection. Explain why the endpoint alone cannot decide. For implementation practice, independently replay the forward equations, test tangent and interior-segment contacts, and include inner/outer reach boundaries and the equal-link origin case.

For a decision brief, separate “outside geometric reach,” “all finite analytic branches violate modeled constraints,” and “no displayed sample in a continuous family passed.” Then list the missing path, self-collision and dynamics checks. Three temporary captures support comparison; independent implementation review and learner pilots remain pending.

05 · APPLY
Check your understanding

A final posture reaches the target, respects joint limits and avoids the modeled disk. What is established?

A final posture reaches the target, respects joint limits and avoids the modeled disk. What is established?
06 · CONTINUE

Take this idea with you.

Inverse kinematics can give zero, one, several or infinitely many postures. Check each constraint explicitly; a valid final posture does not establish a feasible motion.

My work
Learn AI · Understand by doing.Loading local progress…Copyright (c) 2026 Mobi Weave, Inc. All rights reserved