Two-link planar arm
A robot arm is a chain of rigid links connected by joints. Forward kinematics asks: given joint angles, where does the end-effector end up? Inverse kinematics asks the reverse — given a target point in space, what joint angles get the tip there? For a 2-link arm, IK has up to two solutions (the "elbow-up" and "elbow-down" configurations).
x = L₁·sinθ₁ + L₂·sin(θ₁+θ₂)y = −L₁·cosθ₁ − L₂·cos(θ₁+θ₂)
More joints, more reach — until you tangle
A rigid body in 3D has 6 degrees of freedom (3 translation + 3 rotation). A serial manipulator gains one DOF per joint. Add joints and the arm can hit a target from many directions — it becomes redundant. But every joint also adds inertia, cost, and singularities. The slider below adds links one at a time; watch the workspace fill in.
Where can the arm actually go?
The reachable workspace is the set of all points the end-effector can reach. For a planar 2-link arm with no joint limits it's an annulus — inner radius |L₁ − L₂|, outer radius L₁ + L₂. Add joint limits and the workspace becomes a curved slice. Singular points sit on the boundary, where the arm loses a degree of freedom.
Find the red ball
Robots see the world through cameras, but raw RGB pixels make it
hard to pick out "red things." Converting to HSV (Hue, Saturation, Value)
separates color from brightness, so a single hue range catches a red object
across lighting conditions. This is the same logic the lab's color_filtering.py
runs on ROS image topics.
Nodes, topics, messages
ROS isn't an OS. It's a message-passing layer. Each node is an independent process (a sensor driver, a planner, a vision pipeline). Nodes communicate by publishing or subscribing to topics. The animation below mirrors the camera → color-filter → motor-controller pipeline from the lab.
Closing the loop
A controller drives a system from its current state to a desired one. The PID controller is the workhorse of robotics: Proportional reacts to error now, Integral kills steady-state offset, Derivative damps oscillations. Drag the setpoint, tune the gains, see how the motor catches up.
From rotation to grasp
The lab's printable gripper turns a servo's rotation into the linear sliding
motion of two jaws using a pinion (gear) driving two opposing
racks (toothed bars). One motor, two jaws, perfectly symmetric closure.
The STL files in LAB/stl files gripper/ are this exact mechanism.
Layers, one at a time
Fused-deposition 3D printing builds a part by extruding plastic filament in horizontal slices. The slicer software takes an STL, computes the perimeter and infill for each layer, and the nozzle traces each slice while the bed (or nozzle) descends. Print the gripper, assemble with screws, mount on a servo.
V = I · R
The fundamental law of every circuit you build in the lab: V = I · R.
Tune the supply voltage and the resistor's value (using the colored bands)
and watch the current change. The LED brightness scales with current, and at
too-high current it burns out. The session-7 electronics lab is exactly this,
just on a real breadboard with a real LED.
Time-of-flight distance
An ultrasonic sensor (HC-SR04) emits a sound pulse and times the echo. Distance = (speed of sound × echo time) / 2. Move the obstacle around the sensor's cone — outside the beam, no echo returns. In the lab this feeds an Arduino, which speaks ROS over serial.
Two wheels, infinite paths
A differential-drive robot has two independently driven wheels. Set the
left and right wheel speeds (vL, vR) and the
robot's linear and angular velocity follow:
v = (vR + vL)/2,
ω = (vR − vL)/L.
Equal speeds → straight. Opposite signs → spin in place. The trail shows
pose history.
vL = -vR for a pure spin, then return to equal speeds to drive forward.Finding the shortest route
Given a start, a goal, and obstacles, A* finds the shortest path
by always expanding the node with the lowest
f = g + h (cost-so-far + heuristic-to-goal). The orange wave
is the frontier of explored cells. Add walls by clicking — A* re-plans
instantly.
The robot reads the room
Social and collaborative robots respond to people: where they stand, where they look, what they say. The research papers in this course span cyborgs, biological robotics, social robots in healthcare, and embodied cognition. This toy model shows a "robot" choosing between three behaviors based on the human's distance and gaze — the kind of reactive policy a real cobot scales up.