Skip to content
Tactiverge

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
-40-30-20-1010203040x₀y₀x₁y₁xₜyₜJ1J2(15.1, 26.4)grid = 10 cm · base at (0, 0)

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

Arm
35 °
60 °
Links, limits, target and view
20 cm
15 cm
180 ± °

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.

  1. Rule 1

    ALWAYS THEN rotate base +4°

  2. Rule 2

    IF distance < 26 cm THEN close gripper

  3. Rule 3

    IF base angle > 180° THEN stop

62 °
0 cm
2 °

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 199
3040050100150tickcm
distance readingaverage of last 4rule threshold 26 cm
Rule trace: what the robot sensed, which rule fired and what it did
tickangle °reading cmruleaction
169360.060.00#1rotate
170360.060.00#1rotate
171360.060.00#1rotate
172360.060.00#1rotate
173360.060.00#1rotate
174360.060.00#1rotate
175360.060.00#1rotate
176360.060.00#1rotate
177360.060.00#1rotate
178360.060.00#1rotate
179360.060.00#1rotate
180360.060.00#1rotate
181360.060.00#1rotate
182360.060.00#1rotate
183360.060.00#1rotate
184360.060.00#1rotate
185360.060.00#1rotate
186360.060.00#1rotate
187360.060.00#1rotate
188360.060.00#1rotate
189360.060.00#1rotate
190360.060.00#1rotate
191360.060.00#1rotate
192360.060.00#1rotate
193360.060.00#1rotate
194360.060.00#1rotate
195360.060.00#1rotate
196360.060.00#1rotate
197360.060.00#1rotate
198360.060.00#1rotate
199360.060.00#1rotate

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.

  1. 1First catch

    auto-checked

    Run 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.

  2. 2Grip the middle, wherever it is

    auto-checked

    Change 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°.

  3. 3Debug the broken program

    auto-checked

    Load 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?

  4. 4Survive a noisy sensor

    auto-checked

    Turn 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.

Content status: technically checked (automated tests of the maths against closed-form reference cases). Not yet reviewed by an educator.