Tactiverge Studios · Robotics
A robot arm on every screen.
No kit, no soldering, no motors to buy. Move joints, solve inverse kinematics, program sense-decide-act rules, tune PID control and run reproducible experiments, all in your browser.
Level 3 · Innovator mode · lesson setup: Inverse kinematics: elbow up or down
Quantify. Turn the geometry into equations, solve IK both ways, and measure how much error the hardware adds.
- solve IK by the law of cosines
- compare joint-space and straight-line paths
- measure positioning error vs encoder bits
Click here, then ←/→ turn joint 1, ↑/↓ pick a joint, Shift = big steps. Or drag the tip. Shaded = reachable within joint limits (sampled). Orange x / dashed blue y axes = coordinate frames.
State
2R arm: joint 1 at 35°, joint 2 at 60°. Tool tip at x 15.1 cm, y 26.4 cm, 30.4 cm from the base, pointing 95°. The star target is 12.5 cm from the tip.
2R arm: joint 1 at 35°, joint 2 at 60°. Tool tip at x 15.1 cm, y 26.4 cm, 30.4 cm from the base, pointing 95°. The star target is 12.5 cm from the tip.
Arm
Joints and setup
Links, limits, target and view
Real joints have end stops; the shaded workspace shrinks.
Coordinates
Sine and cosine components
Each link adds a horizontal part L·cos φ and a vertical part L·sin φ, where φ is the link's absolute angle (the joint angles added up).
x = 20.0·cos(θ₁) + 15.0·cos(θ₁+θ₂)
= 20.0·0.82 + 15.0·-0.09 = 15.08 cm
y = 20.0·sin(θ₁) + 15.0·sin(θ₁+θ₂)
= 20.0·0.57 + 15.0·1.00 = 26.41 cm
Absolute angles φ: 35.0°, 95.0°.
FK ⇄ IK
Inverse kinematics: one target, two answers
Forward kinematics goes angles → position. Inverse kinematics goes position → angles, and a 2-link arm usually has two answers: elbow-up and elbow-down (the dashed lavender ghost is the other one).
Elbow-up
θ1 = 68.8°, θ2 = -78.9°
reaches the target
Elbow-down
θ1 = 3.3°, θ2 = 78.9°
reaches the target
Distance to target
27.2 cm
Positioning error from the encoders
One step = 360°/2^8 = 1.41°.
The controller only knows the rounded readings (35.16°, 60.47°). Where it thinks the tip is differs from where it really is by 1.96 mm.
Trajectories
Joint-space vs straight-line motion
Pose A is the star, pose B the outlined star. Dashed amber: interpolate the joint angles. Solid lime: solve IK along the straight line. Same timing law s = 3τ² − 2τ³ for both.
Joint-space bulge
7.08 cm
max distance off the line
Straight-line error
0.00 cm
Path lengths
40.8 / 37.4 cm
chord 37.4 cm
Peak joint speed
1.01 / 1.34
rad/s, joint / straight
IK failures
0
line fully reachable
Uncertainty
How coarse encoders blur the tip
An n-bit encoder rounds each angle to a step q = 2π/2ⁿ, so it can be wrong by up to ±q/2. The orange ellipse on the arm is the 1σ spread of the tip (dashed: 2σ), drawn ×10 so you can see it.
Step q
1.406°
Worst case (linear)
0.55 cm
all joints off by q/2, worst signs
1σ ellipse (Jacobian)
2.337 × 0.558 mm
Tip distance from base
30.4 cm
a longer lever magnifies shoulder error
Guided challenges
Try these, then press Check
“Set up” puts the bench into the starting position for that challenge. Checks re-run the simulation on your current setup, so they test what the model actually does.
1Solve the elbow-up angle
auto-checkedFor the target (22, 16) cm with L1 = 20 cm and L2 = 15 cm, work out θ₂ for the elbow-UP solution with the law of cosines. Type it in degrees, then check it on the arm.
Hint
cos θ₂ = (x² + y² − L1² − L2²) / (2·L1·L2). Elbow-up takes the negative root here.
2Measure the worst-case tip error
auto-checkedStretch the arm straight out (θ₁ = 0°, θ₂ = 0°) with 6-bit encoders. Read the worst-case tip error from the uncertainty panel and type it.
Hint
Each joint can be wrong by half a step, q/2 = π/2⁶. The shoulder error is amplified by the whole arm length.
3Specify the encoders
auto-checkedWhat is the smallest encoder size (bits per turn) that keeps the worst-case tip error below 1 mm (0.1 cm) at full stretch?
Hint
Each extra bit halves the step. Work out the error for one size, then halve until it is under 0.1 cm.
4Make the path straight
auto-checkedChoose two poses where joint-space motion bulges more than 3 cm off the straight line, while the Cartesian (IK) path stays straight with no IK failures.
Hint
Long sweeps around the base bulge the most. Keep both poses inside the reachable ring.
Save
Keep your design
Designs stay on your device: saved in this browser or downloaded as a JSON file. Imported files are checked against the workbench schema before they load.
What this model assumes
This is a simplified educational model, not an engineering-grade simulator. Knowing what it leaves out is part of the lesson.
- Planar: every arm moves in one flat plane, seen from above.
- Rigid links and ideal joints: no bending, backlash or play.
- Ideal motors within their torque limit; each joint is controlled on its own (no gravity or coupling between joints).
- Collisions are simple geometric checks (links as thick lines, rocks as circles), not contact physics.
- Encoder rounding is uniform and independent between joints; sensor noise is seeded white Gaussian noise.
- Units: centimetres and degrees on the controls, radians inside the maths, SI units for dynamics.
Safety: the workbench never connects to real machinery. It uses no USB, serial or Bluetooth access, and everything runs on your own device.
Lesson setups
School lessons open the bench in one of these setups. You can open any of them yourself.
- Two-link forward kinematicsA 2R arm at 30° / 45°: change the joints, watch the tip.
- Three-link arm with a wristA 3R arm: the extra joint lets the tool point where you choose.
- Polar arm with a sliding boomA rotating base and a prismatic (sliding) joint.
- Reachable workspaceLimit the elbow to ±120° and see which places the arm can and cannot reach.
- Reach around an obstacleReach the star without touching the rock.
- Inverse kinematics: elbow up or downOne target, two solutions. Compare elbow-up and elbow-down.
- Joint-space vs straight-line motionMove between two poses two ways and compare the paths.
- Encoder resolution and tip uncertaintyCoarse 6-bit encoders: propagate their resolution to an error ellipse.
- Repeated distance measurementsA noisy range finder: mean, spread and a 95 % confidence interval.
- PID control of one jointA joint with inertia, damping and a torque limit: tune P, D and I.
- Bang-bang vs P vs PD vs PIDThe same joint under four strategies, side by side.
- Sense, decide, actWrite IF-THEN rules so the arm finds and grips the parcel.
- Debug a broken rule programThis program never grips. Find out why and fix it.
Content status: technically checked (automated tests of the maths against closed-form reference cases). Not yet reviewed by an educator.