🦿 RoboticsRobotik

What is Inverse Kinematics? (And Why It Makes Your Robot Arm Smart)Was ist inverse Kinematik? (Und warum macht sie Ihren Roboterarm intelligent?)

When you reach out and pick up a glass of water, your brain doesn't think: "shoulder joint 37°, elbow joint 45°, wrist joint 12°." It thinks: "glass is there — go get it." Your nervous system works out the joint angles automatically. That's exactly what inverse kinematics (IK) does for a robot arm. Wenn Sie eine Hand ausstrecken und ein Glas Wasser aufnehmen, denkt Ihr Gehirn nicht: "Schultergelenk 37°, Ellbogengelenk 45°, Handgelenkgelenk 12°." Es denkt: "Das Glas ist dort — hol es." Ihr Nervensystem berechnet die Gelenkwinkel automatisch. Genau das macht inverse Kinematik (IK) für einen Roboterarm.

Forward vs. Inverse KinematicsVorwärts- vs. inverse Kinematik

There are two ways to think about a robot arm's motion:Es gibt zwei Arten, die Bewegung eines Roboterarms zu betrachten:

Forward KinematicsVorwärtskinematik
"Given these joint angles, where does the gripper end up?"
Input: angles → Output: position
"Gegeben diese Gelenkwinkel, wo landet der Greifer?"
Eingabe: Winkel → Ausgabe: Position
Inverse KinematicsInverse Kinematik
"Given a target position, what angles do I need?"
Input: position → Output: angles
"Gegeben eine Zielposition, welche Winkel brauche ich?"
Eingabe: Position → Ausgabe: Winkel

Forward kinematics is straightforward maths — just apply rotation matrices in sequence. Inverse kinematics is the hard problem: it's often non-linear, may have multiple solutions (or none), and requires either analytical closed-form solutions or iterative numerical methods. Vorwärtskinematik ist einfache Mathematik — Rotationsmatrizen sequenziell anwenden. Inverse Kinematik ist das schwierige Problem: oft nichtlinear, mit möglicherweise mehreren Lösungen (oder keiner), und erfordert entweder analytische Lösungen oder iterative numerische Methoden.

The 2-Link Arm: Simplest CaseDer 2-Gelenk-Arm: Einfachster Fall

Our 4-DOF Robotic Arm project introduces IK starting with the simplest possible case: a 2-link planar arm. Think of it as a shoulder and elbow — two segments, two angles, constrained to move in a plane. The maths here has a clean analytical solution using the law of cosines. Unser 4-DOF-Roboterarm-Projekt führt IK mit dem einfachsten möglichen Fall ein: einem 2-Gelenk-Planararm. Stellen Sie sich Schulter und Ellbogen vor — zwei Segmente, zwei Winkel, auf eine Ebene beschränkt. Die Mathematik hat hier eine saubere analytische Lösung mit dem Kosinussatz.

Python · 2-Link IK (closed-form analytical solution)2-Gelenk IK (analytische Lösung)
import numpy as np def ik_2link(x, y, L1=15.0, L2=12.0): # Solve IK for 2-link planar arm. L1, L2: link lengths in cm # x, y: target position. Returns: (shoulder_angle, elbow_angle) in degrees D = (x**2 + y**2 - L1**2 - L2**2) / (2 * L1 * L2) D = np.clip(D, -1, 1) # prevent domain errors theta2 = np.arccos(D) # elbow angle theta1 = np.arctan2(y, x) - np.arctan2( L2 * np.sin(theta2), L1 + L2 * np.cos(theta2)) # shoulder angle return np.degrees(theta1), np.degrees(theta2) # Example: reach to position (20cm, 10cm) shoulder, elbow = ik_2link(20, 10) print(f"Shoulder: {shoulder:.1f}°, Elbow: {elbow:.1f}°")

Multiple Solutions — The "Elbow Up / Elbow Down" ProblemMehrere Lösungen — das "Ellbogen oben / Ellbogen unten"-Problem

A key insight students discover: for most reachable points, there are two valid IK solutions — elbow-up and elbow-down. Your arm can reach a point on a table with your elbow pointing up or down. Both configurations put your hand at the same position. The robot must choose — typically by picking the solution closest to the current pose to avoid unnecessary joint movement. Eine wichtige Erkenntnis: Für die meisten erreichbaren Punkte gibt es zwei gültige IK-Lösungen — Ellbogen oben und Ellbogen unten. Der Roboter muss wählen — typischerweise die Lösung, die der aktuellen Pose am nächsten liegt, um unnötige Gelenkbewegungen zu vermeiden.

From Angles to Servo CommandsVon Winkeln zu Servo-Befehlen

Python · Convert IK angles to servo PWMIK-Winkel in Servo-PWM umwandeln
import RPi.GPIO as GPIO def angle_to_duty(angle): # Convert 0-180 deg angle to PWM duty cycle (2.5 to 12.5%) return 2.5 + (angle / 180.0) * 10.0 def move_arm(target_x, target_y): s_angle, e_angle = ik_2link(target_x, target_y) shoulder_pwm.ChangeDutyCycle(angle_to_duty(s_angle)) elbow_pwm.ChangeDutyCycle(angle_to_duty(e_angle))
🎓 What Students LearnWas Schüler lernen

By implementing IK themselves (not using a library), Grade 9–10 students apply: trigonometry, NumPy matrix operations, physical systems thinking, and the engineering concept of working in joint space vs. task space. These concepts appear directly in university-level robotics courses — students leave with a genuine head start. Durch die eigene Implementierung (ohne Bibliothek) wenden Schüler der Klassen 9–10 Trigonometrie, NumPy-Matrixoperationen, physikalisches Systemdenken und das Ingenieurkonzept des Arbeitens im Gelenk- vs. Aufgabenraum an. Diese Konzepte erscheinen direkt in universitären Robotikkursen.

Want to build this yourself?Selbst bauen?

Join a MINT Yantra Labs session and turn theory into a working project.Nehmen Sie an einer Session teil und machen Sie Theorie zum Projekt.

🔬 See Programs🔬 Programme✉️ Get in Touch✉️ Kontakt