Lesson 9 of 2255 minutes

Forward and Inverse Kinematics

Start with the lesson question, connect the representations, and test the model with evidence.

forward kinematicsinverse kinematicsjoint spacetask spacereachabilityjoint limits

Learning objectives

  • Represent position and orientation in named coordinate frames.
  • Relate velocity, acceleration, degrees of freedom, and constraints.
  • Apply simple forward and inverse kinematics.
Lesson flowHook, model, explanationShow guidance

Inspect the opening phenomenon

Predict what changes, then name the evidence.

Apply in the lab

Name the evidence before reading the answer.

Read only what helps

Then use the lab and recall check.

More when needed

Transcript and resources stay available below.

Course progress

AI & Robotics Foundations · Motion, Frames, and Kinematics · Lesson 9

Forward and Inverse Kinematics

In progress

Decision challenge

Observe the phenomenon. Then connect the representations.

Use the opening example to make a prediction, identify evidence, and explain which model supports it.

Does Inverse Kinematics Always Have One Answer?

Predict whether one hand target always implies one joint configuration.

Before

Predict whether one hand target always implies one joint configuration.

During

Track inputs, outputs, and solution counts for FK and IK.

After

Name three checks required after an IK solution.

Reference drawerTranscript, source notes, scripts, and package status stay tucked away until you need them.7 files

Lesson reading

live

55 min

Video script

draft

Transcript fallback

available

courses/ai-robotics/modules/03-motion-frames-and-kinematics/lessons/03-forward-and-inverse-kinematics/video-transcript.md

Two-Link Arm Kinematics Lab

draft

30 min

Mastery check

live

6 questions / 10 min

Book section:courses/ai-robotics/modules/03-motion-frames-and-kinematics/lessons/03-forward-and-inverse-kinematics/book-section.md
Transcript for accessibility and fallback

# Transcript Can one target point have two correct robot-arm solutions? Yes. Forward kinematics starts with joint angles and computes one end-effector pose. For two equal links, angle one zero degrees and angle two ninety degrees places the hand at one, one. Inverse kinematics asks the opposite question: which joint angles reach a desired pose? The answer can be elbow-up, elbow-down, one boundary solution, or no solution when the target is outside the workspace. Even a valid solution still needs joint-limit, collision, and continuity checks. Remember: inverse kinematics returns a pose candidate, not a safe path. Explore the full lesson on EduQuest.

Reading lab

Core explanation

Connect the lesson's words, diagrams, graphs, evidence, and equations.

Opening challenge: If a robot hand must reach one point, is there always exactly one set of joint angles that works?

Two Questions, Opposite Directions

Forward kinematics (FK) starts with joint configuration qq and computes an end-effector pose: X=fkin(q)X=f_{kin}(q). Inverse kinematics (IK) starts with a desired end-effector pose and searches for a configuration qq that satisfies it.

Forward kinematics maps two joint angles to one end-effector position; inverse kinematics may find elbow-up, elbow-down, or no solution

For a planar two-link arm with link lengths L1,L2L_1,L_2 and angles θ1,θ2\theta_1,\theta_2:

x=L1cosθ1+L2cos(θ1+θ2)x=L_1\cos\theta_1+L_2\cos(\theta_1+\theta_2)

y=L1sinθ1+L2sin(θ1+θ2)y=L_1\sin\theta_1+L_2\sin(\theta_1+\theta_2)

With L1=L2=1L_1=L_2=1, θ1=0\theta_1=0^\circ, and θ2=90\theta_2=90^\circ, FK gives (x,y)=(1,1)(x,y)=(1,1).

Why IK Is Not a Simple Reverse Button

The target (1,1)(1,1) can have an elbow-up and elbow-down solution. Some targets have one solution at a workspace boundary. Targets farther than L1+L2L_1+L_2 are unreachable. A numerical IK solver can also fail even when a geometric solution exists because of its seed, timeout, or local minimum.

A pose solution is not automatically a safe motion. Useful IK must consider:

  • joint limits and preferred posture;
  • collisions and clearance;
  • target position and orientation tolerances;
  • continuity from the current configuration;
  • solver timeout and failure handling.

Joint Space and Task Space

Joint space describes configurations such as (θ1,θ2)(\theta_1,\theta_2). Task space describes an outcome such as hand pose (x,y,ϕ)(x,y,\phi). FK maps joint space to task space. IK searches from a task-space request back to joint space. Redundant arms may have infinitely many configurations that satisfy a lower-dimensional task, so an objective such as staying near a comfortable posture selects among them.

Misconception Check

  • “IK always has one answer.” It may have many, one, or none.
  • “If IK succeeds, the motion is safe.” IK returns a configuration, not necessarily a collision-free trajectory.
  • “FK and IK are equally easy.” FK evaluation is normally direct; IK is a constrained search or optimization problem.

Retrieval Pause

  1. What information flows into and out of FK?
  2. Why can one target have elbow-up and elbow-down solutions?
  3. What three checks should follow an IK solution before execution?

Sources and Further Learning

Sources are linked and paraphrased. The visual is an original HH educational asset.

Practice labTwo-Link Arm Kinematics LabOpen this when you are ready to apply the model, collect evidence, and check your explanation.30 min

Objective

Compute FK and compare multiple IK candidates while checking reachability and constraints.

Setup

Use degrees consistently or convert to radians before calculator functions. No hardware is required.

Materials

  • paper or spreadsheet;
  • calculator with sine and cosine;
  • two equal-length paper strips or an on-screen sketch.

Steps

  1. Set L1=L2=1L_1=L_2=1.
  2. Compute FK for (θ1,θ2)=(0,90)(\theta_1,\theta_2)=(0^\circ,90^\circ).
  3. Draw the arm and confirm the hand reaches (1,1)(1,1).
  4. Find or sketch two configurations that reach (1,1)(1,1).
  5. Test targets (2,0)(2,0), (0,0)(0,0), and (3,0)(3,0) for reachability.
  6. Add joint limits 120θi120-120^\circ\leq\theta_i\leq120^\circ and reject invalid candidates.
  7. Add a rectangular obstacle and explain why a valid endpoint configuration does not prove a safe path.

Expected Result

FK for (0,90)(0^\circ,90^\circ) gives (1,1)(1,1). The target can admit multiple configurations. (3,0)(3,0) is unreachable because its distance from the base exceeds L1+L2=2L_1+L_2=2.

Troubleshooting

  • Check degree/radian mode.
  • Remember that link 2 uses the cumulative angle θ1+θ2\theta_1+\theta_2.
  • Separate endpoint reachability from collision-free motion.

Reflection Questions

  1. Why is IK not necessarily a function with one output?
  2. Which candidate would be preferable if the arm currently starts near one solution?
  3. What additional evidence is needed before commanding motion?

Extension Challenge

Score each valid solution by distance from the current joint configuration and obstacle clearance, then justify the selected posture.

Accessibility and Safety Fallback

Use a coordinate table instead of drawing. This simulation-first lab requires no moving hardware.