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 2 · Builder mode · lesson setup: Debug a broken rule program
Sense → decide → act. A robot does not ‘see’ the parcel: it reads a number and follows rules. When it goes wrong, read the trace.
- write IF-THEN rules
- run, scrub and debug the trace
- make the program robust to noise
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 15.3 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 15.3 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°.
Sense → decide → act
Program the arm with IF-THEN rules
Every tick the robot senses (a range finder on the base looks along the arm), decides (rules are checked from the top; the first true one wins) and acts. It does not know where the parcel is.
- Rule 1
ALWAYS THEN rotate base +4°
- Rule 2
IF distance < 26 cm THEN close gripper
- Rule 3
IF base angle > 180° THEN stop
Debug
Run it and read the trace
Outcome
Ran out of time (never gripped)
Final angle
360.0°
Pointing error
-62.0°
tolerance ±2°
Ticks
200
| tick | angle ° | reading cm | rule | action |
|---|---|---|---|---|
| 169 | 360.0 | 60.00 | #1 | rotate |
| 170 | 360.0 | 60.00 | #1 | rotate |
| 171 | 360.0 | 60.00 | #1 | rotate |
| 172 | 360.0 | 60.00 | #1 | rotate |
| 173 | 360.0 | 60.00 | #1 | rotate |
| 174 | 360.0 | 60.00 | #1 | rotate |
| 175 | 360.0 | 60.00 | #1 | rotate |
| 176 | 360.0 | 60.00 | #1 | rotate |
| 177 | 360.0 | 60.00 | #1 | rotate |
| 178 | 360.0 | 60.00 | #1 | rotate |
| 179 | 360.0 | 60.00 | #1 | rotate |
| 180 | 360.0 | 60.00 | #1 | rotate |
| 181 | 360.0 | 60.00 | #1 | rotate |
| 182 | 360.0 | 60.00 | #1 | rotate |
| 183 | 360.0 | 60.00 | #1 | rotate |
| 184 | 360.0 | 60.00 | #1 | rotate |
| 185 | 360.0 | 60.00 | #1 | rotate |
| 186 | 360.0 | 60.00 | #1 | rotate |
| 187 | 360.0 | 60.00 | #1 | rotate |
| 188 | 360.0 | 60.00 | #1 | rotate |
| 189 | 360.0 | 60.00 | #1 | rotate |
| 190 | 360.0 | 60.00 | #1 | rotate |
| 191 | 360.0 | 60.00 | #1 | rotate |
| 192 | 360.0 | 60.00 | #1 | rotate |
| 193 | 360.0 | 60.00 | #1 | rotate |
| 194 | 360.0 | 60.00 | #1 | rotate |
| 195 | 360.0 | 60.00 | #1 | rotate |
| 196 | 360.0 | 60.00 | #1 | rotate |
| 197 | 360.0 | 60.00 | #1 | rotate |
| 198 | 360.0 | 60.00 | #1 | rotate |
| 199 | 360.0 | 60.00 | #1 | rotate |
The table shows up to 30 ticks before the scrub position. Clue for debugging: if one rule fires on every single tick, nothing below it can ever run.
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.
1First catch
auto-checkedRun the starter program. Make the robot close its gripper while it is pointing somewhere on the parcel.
Hint
The parcel is about 6° wide either side of its centre. The starter program grips as soon as anything is in range.
2Grip the middle, wherever it is
auto-checkedChange thresholds, step sizes or add rules so the gripper closes within 2° of the parcel's centre, for the parcel at 62° AND at 115°.
Hint
The distance reading is smallest at the centre of the parcel. A smaller step near the parcel helps: IF distance < 30 THEN rotate +1°.
3Debug the broken program
auto-checkedLoad the broken program. It never grips. Use the trace to find out which rule fires every tick, then fix it.
Hint
Rules are checked from the top; the first one that is true wins. What does ALWAYS do at the top?
4Survive a noisy sensor
auto-checkedTurn sensor noise up to 0.5 cm. Your program must still grip within 2° on five different seeds.
Hint
One noisy reading can trigger the grip too early. Try the “average distance” sensor (a moving-average filter of the last 4 readings) and slow down near the parcel.
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.