Skip to content
Tactiverge

LABTactiverge Academy

The engineering lab.

Each explorer is a small, honest simulation: the maths is real, the assumptions are written down, and every control works with a keyboard.

Robotic kinematics

Move a planar arm's joints to see where the tip goes, then pick a target and solve for the joint angles that reach it.

Explorer 01 — Robotic kinematics

From joint angles to a position, and back again

Forward kinematics turns joint angles into an end-effector position. Inverse kinematics asks the harder question: which angles put the tip where I want it?

REACH 35.0 CMHOLE 5.0J1J2(15.1, 26.4)

Fig. — 2-link planar arm · units cm · y up

Mode

Joint angles (relative)

35 °
60 °

Arm geometry

Links
20.0 cm
15.0 cm
End x
15.1 cm
End y
26.4 cm
Distance r
30.4 cm
workspace 5.0–35.0 cm
|sin θ2|
0.87
well-conditioned
Tip angle φ
95.0°

State

Forward kinematics. Joint angles: joint 1 35°, joint 2 60°. End effector at x 15.1 cm, y 26.4 cm, 30.4 cm from the base. Elbow well-conditioned (|sin θ2| = 0.87).

Forward kinematics. Joint angles: joint 1 35°, joint 2 60°. End effector at x 15.1 cm, y 26.4 cm, 30.4 cm from the base. Elbow well-conditioned (|sin θ2| = 0.87).

How to read this

The base sits at the centre (grid squares are 10 cm). Each thick bar is a link; circles are joints J1, J2. The shaded ring is the workspace: every point the tip can reach with unlimited joint travel. Its outer edge is L1 + L2; the inner hole appears when one link is longer than the others combined.

Arcs show each joint angle. θ1 is measured from the dashed horizontal; θ2 from the dashed extension of link 1. In inverse mode the square is the target (dashed and labelled unreachable when outside the ring), and the arm is solved with the law of cosines. Most targets have two solutions: elbow-up and elbow-down.

Assumptions & limitations
  • Ideal rigid links and revolute joints with no mass, friction, backlash, or flex.
  • Joints may rotate a full ±180°; real joints have hard limits that shrink the workspace, and links cannot pass through each other or the floor.
  • Kinematics only: nothing here says whether the motors are strong or fast enough to hold or reach a pose (that is dynamics).
  • Three-link inverse kinematics is made solvable by fixing the tool angle φ; real controllers choose among redundant solutions with extra goals.
  • Unreachable targets are projected onto the nearest edge of the reachable ring for display; a real controller would refuse or plan around them.

Feedback control

Tune a P, PI or PID controller on a simulated plant and measure rise time, overshoot, settling time and steady-state error.

Explorer 02 — Feedback control

Measure, compare, correct

A controller compares the setpoint with what the sensor reports and pushes the plant to close the gap. Tune the gains and watch speed, overshoot and accuracy trade against each other.

OUTPUT y vs SETPOINT r0.00.51.0Ts 1.30sCONTROL EFFORT u0.02.0012345678910TIME (s)
  • Setpoint r = 1
  • Closed-loop output
  • Open loop (u = r/K)
  • ±2 % band
Controller

Gains

2.0
1.5
0.20

Applies the command the model says is right, u = r / K, without ever measuring.

Plant

Plant model

Like motor speed or an oven: τ·ẏ = −y + K·u. K = 1.

1.0 s

Real-world effects

0.000

Noise only affects the closed loop: the derivative term amplifies it.

Rise 10–90 %
0.72 s
Overshoot
0.0 %
Settling 2 %
1.30 s
Steady-state err
0.333
theory r/(1+Kp·K) = 0.333

State

P control, Kp 2.0 on a first-order plant with τ 1.0 s. Rise time 0.72 s, overshoot 0.0 %, 2 % settling 1.30 s, steady-state error 0.333 (theory for P: 0.333). Peak control effort 2.00. Open loop: steady-state error 0.000.

P control, Kp 2.0 on a first-order plant with τ 1.0 s. Rise time 0.72 s, overshoot 0.0 %, 2 % settling 1.30 s, steady-state error 0.333 (theory for P: 0.333). Peak control effort 2.00. Open loop: steady-state error 0.000.

How to read this

The top panel shows the setpoint (dashed line at 1) and the plant's true output after a step command at t = 0. The solid line is the controlled system; the dotted line is open loop. The bottom panel shows the control effort u the actuator is asked to deliver.

Rise time is how long the output takes to go from 10 % to 90 % of where it ends up. Overshoot is how far it passes that value. Settling time is when it stays inside ±2 % for good. Steady-state error is the gap left at the end: P control always leaves one on these plants; integral action removes it.

Assumptions & limitations
  • Linear plant models with known, constant parameters (K = 1). Real motors and heaters have friction, dead zones and parameters that drift with temperature and wear.
  • Controller runs every 10 ms and holds its output between samples; the plant is integrated with 4th-order Runge–Kutta at the same step. There is no transport delay, which real systems almost always have.
  • The derivative acts on the measurement (not the error) through a 50 ms low-pass filter, a common practical choice that avoids a spike when the setpoint jumps.
  • Sensor noise is white Gaussian and seeded for repeatability; it is added only to the measurement, never to the true output.
  • Metrics are computed on the true output up to the disturbance time (or 10 s); a response still moving at the end of the window is reported as not settled.
  • Open loop uses the exact plant gain to pick its command. That flatters it: any modelling error would show up as steady-state error.

Sensor fusion

Combine a camera that drops out with odometry that drifts, and compare each sensor's error with the fused estimate.

Explorer 03 — Sensor fusion

Two imperfect sensors, one better estimate

A camera gives absolute position but loses sight of the target; odometry never drops out but drifts. Combining them gives an estimate better than either alone.

POSITION (cm)NO VIEWNO VIEWNO VIEW-40-200204002468101214161820TIME (s)
  • True position
  • Camera reading
  • Odometry dead-reckoning
  • Fused (Kalman)
  • ±2σ uncertainty
  • Camera dropout

Camera · absolute, drops out

3.0 cm
25 %

Long-run share of time with no view, in bursts of about 1.2 s (occlusions).

Odometry · relative, drifts

4.0 cm/s
1.5 cm/s

A constant error in measured speed: its position estimate drifts by bias × time.

Fusion method

The Kalman filter weights each sensor by its stated noise, tracks its own uncertainty, and estimates the odometry bias while the camera can see.

Show

Root-mean-square error vs truth · lower is better

  • Camera aloneholds last reading in dropouts7.9 cm
  • Odometry alonedead reckoning from start15.1 cm
  • Kalman filterfused estimate0.9 cm
  • Fused, in dropoutsonly samples with no camera1.1 cm

Camera coverage 60 %. Camera error only over frames it saw: 2.9 cm (≈ its σ).

State

Seed 7. The camera saw the target 60 % of the time in 4 dropouts. Error (RMSE): camera alone 7.9 cm holding its last reading, odometry alone 15.1 cm, kalman filter 0.9 cm (1.1 cm during dropouts). Fusion is 88 % better than the better single sensor. Estimated odometry bias 1.53 cm/s (true 1.50).

Seed 7. The camera saw the target 60 % of the time in 4 dropouts. Error (RMSE): camera alone 7.9 cm holding its last reading, odometry alone 15.1 cm, kalman filter 0.9 cm (1.1 cm during dropouts). Fusion is 88 % better than the better single sensor. Estimated odometry bias 1.53 cm/s (true 1.50).

How to read this

Time runs left to right over 20 seconds. The thin solid line is where the object really is. Crosses are camera readings; hatched columns are dropouts where the camera sees nothing. The dashed line is odometry integrated from the start: smooth, but it wanders away as its bias accumulates. The thick line is the fused estimate, with a shaded ±2σ band showing how uncertain the Kalman filter believes it is. The band widens during each dropout and snaps back when the camera returns.

This mirrors Tactiverge's research question: when vision drops out, can local sensing such as force and joint feedback carry the estimate until it returns?

Assumptions & limitations
  • One dimension, a smooth known trajectory and a single object: real tracking is 3-D, with orientation, multiple objects and data association.
  • Noise is white Gaussian with the σ you set, and the Kalman filter is told the true σ values. Real filters must be tuned against noise they can only estimate.
  • Odometry error is a constant bias plus white noise; real drift also comes from slip, scale-factor error and temperature.
  • Dropouts are random bursts, independent of where the object is. Real occlusions often happen exactly when the task gets hard, for example when a gripper covers the object.
  • The camera has no latency and runs at the same 20 Hz as odometry; real cameras are slower and delayed, which the filter would have to compensate for.
  • Figures are from one seeded run of 401 samples; change the seed to see how much the numbers vary by chance.

Engineering constraints

Weigh cost, power, compute and accuracy for a small robot's perception stack, and see which designs are feasible and Pareto-optimal.

Explorer 04 — Engineering constraints

No design wins on everything

Choosing a robot's perception and compute stack means trading cost, power and capability. Set your priorities and limits, then see which options survive and which are simply worse than another.

EST. ACCURACY (%) vs COST (CU)406080050100150BUDGET 100AMICROCONTROLLER ONLYBMICROCONTROLLER + LOW-RES CAMERACSINGLE-BOARD COMPUTERDSBC + CAMERAE✕ SBC + CAMERA + ACCELERATORF✕ SBC + DEPTH CAMERACIRCLE AREA ∝ POWER
  • Meets limits
  • ✕ Violates a limit
  • Pareto frontier
  • Outside a limit

Limits

100 CU
8.0 W

Priorities (weights 0–10)

5

Cheaper is better

3

Lower draw means a smaller battery or longer run time

2

Headroom for heavier algorithms later

6

Estimated task success

0 %
Horizontal axis

Illustrative figures for teaching, not measured specifications

  1. BMicrocontroller + low-res cameraRank 1

    Microcontroller reading a small low-resolution camera for colour blobs.

    Cost
    30 CU
    Power
    0.9 W
    Compute
    3×
    Est. accuracy
    52 %

    ✓ Meets all limits · On the frontier

    Score58
  2. DSBC + cameraRank 2

    Single-board computer running classical vision on a standard camera.

    Cost
    80 CU
    Power
    5.5 W
    Compute
    25×
    Est. accuracy
    74 %

    ✓ Meets all limits · On the frontier

    Score57
  3. AMicrocontroller onlyRank 3

    Microcontroller with distance and contact sensors; no camera.

    Cost
    12 CU
    Power
    0.3 W
    Compute
    1×
    Est. accuracy
    35 %

    ✓ Meets all limits · On the frontier

    Score50
  4. CSingle-board computerRank 4

    General-purpose single-board computer with the same simple sensors, no camera.

    Cost
    55 CU
    Power
    4.0 W
    Compute
    25×
    Est. accuracy
    48 %

    ✓ Meets all limits · Dominated by B (no worse on cost or accuracy, better on one)

    Score46
  5. ESBC + camera + acceleratorExcluded

    Adds a neural-network accelerator for learned object detection.

    Cost
    150 CU
    Power
    10.0 W
    Compute
    120×
    Est. accuracy
    86 %

    ✕ over budget by 50 CU; over power limit by 2 W · On the frontier

    Score53
  6. FSBC + depth cameraExcluded

    Single-board computer with a depth camera; better 3-D estimates, costly sensor.

    Cost
    165 CU
    Power
    7.5 W
    Compute
    25×
    Est. accuracy
    82 %

    ✕ over budget by 65 CU · Dominated by E (no worse on cost or accuracy, better on one)

    Score42

State

4 of 6 options meet the limits (budget 100 CU, power 8.0 W). Highest weighted score: B, Microcontroller + low-res camera, 58 of 100, on the Pareto frontier. Frontier on cost versus accuracy: A, B, D, E.

4 of 6 options meet the limits (budget 100 CU, power 8.0 W). Highest weighted score: B, Microcontroller + low-res camera, 58 of 100, on the Pareto frontier. Frontier on cost versus accuracy: A, B, D, E.

How to read this

Each circle is a design option, placed by cost (left is better) and estimated accuracy (up is better); its area shows power. Filled circles meet every limit you set; dashed, hollow circles marked ✕ break at least one, and the hatched area shows where a limit rules options out.

The stepped line is the Pareto frontier: options for which nothing else is both cheaper (or lower-power) and more accurate. An option off the frontier is dominated, meaning another option beats it on both axes, whatever your priorities. The weighted score below is a different question: it depends entirely on the weights you chose, so two people can reasonably rank the frontier differently.

Assumptions & limitations
  • All figures are illustrative teaching values chosen to make trade-offs visible. They are not measured specifications, prices or benchmarks of any product.
  • Options are generic archetypes; real stacks vary widely in what each part costs, draws and achieves.
  • Scores use a weighted sum of min–max normalised criteria. Normalisation is relative to these six options, so adding or removing one changes every score.
  • A weighted sum hides trade-offs: a high score can come from one extreme strength. That is why the Pareto view is shown alongside it.
  • The frontier is computed on the two plotted criteria only; an option dominated here may still be the best on a criterion not plotted (for example F has lower power than E).
  • Accuracy is treated as a single fixed number. In practice it depends on lighting, the objects, the algorithm and integration effort, and is uncertain until tested.