AISR Sim Lab
CSAI4014 · Algorithms for Intelligent Systems and Robotics

See the algorithms think.

Six hands-on simulations covering estimation, kinematics and control. Drag, slide and step through each one, and watch the maths update with you.

Unit IV · Simultaneous Localization and Mapping

EKF-SLAM: map the world while finding yourself in it

The navy robot is the truth. The teal robot and landmarks are the EKF-SLAM estimate with 2σ ellipses. The orange ghost uses odometry alone. Watch the ellipses grow as the robot explores, then shrink when it sees the start again (loop closure).

TrueEKF-SLAMOdometry onlySensor
Position error over timeEKF-SLAMOdometry

1 · Predict

Each step the robot moves with noisy wheels. The EKF pushes the pose through the motion model and adds process noise, so the robot ellipse grows.

2 · Observe

Landmarks within range return a noisy range and bearing. A new landmark is added to the state vector with its uncertainty, which is tied to the robot's.

3 · Update

Known landmarks correct the robot and every correlated landmark. When an old landmark is seen again, the whole map snaps tighter: loop closure.

Unit IV · State estimation

Kalman filter: one step, then tracking

A Kalman filter keeps a Gaussian belief. Predict moves it and makes it wider; update blends it with a measurement and makes it narrower. The defaults below are the worked example from the slides.

PriorPrediction x⁻Measurement zPosterior x
trust model
trust sensor
Tracking a moving target

Constant-velocity Kalman filter

Orange dots are noisy position readings. The teal line is the filter's estimate, with a shaded 2σ band. Raise Q to make the filter trust motion less and react faster; raise R to make it smooth harder.

True positionMeasurementsKF estimate ± 2σ
Unit IV · Particle filters

Monte Carlo localization in a corridor

Each particle is a guess of where the robot is. Particles that explain the sensor reading well get more weight, then resampling copies the good ones and drops the bad ones.

Problem. Wall at x = 5 m. Particles at x = 1, 2, 3, 4 m. Range sensor reads z = 2.5 m. Likelihood: p(z | x) = 0.8 if |z − ẑ| ≤ 0.5; 0.2 if 0.5 < |z − ẑ| ≤ 1.5; 0.05 otherwise, with ẑ = 5 − x.
Unit I · Joint-link transformations

Denavit–Hartenberg: build a link in four moves

ⁱ⁻¹Tᵢ = Rot(z, θ) · Trans(z, d) · Trans(x, a) · Rot(x, α). Scrub the build slider to apply the four operations one at a time, and drag to orbit the 3-D view.

xyzLink aFaded frames: intermediate steps
Numeric ⁱ⁻¹Tᵢ

General form
cθ−sθ·cαsθ·sαa·cθ
sθcθ·cα−cθ·sαa·sθ
0sαcαd
0001

Top-left 3×3 block: rotation, whose columns are the new x, y, z axes written in the old frame. Last column: position of the new origin.

Unit I · Forward and inverse kinematics

Two-link planar arm

Move the sliders for forward kinematics, or drag the orange gripper for inverse kinematics. The shaded ring is the reachable workspace.

Unit II · Stability

Routh–Hurwitz stability checker

Enter a characteristic polynomial. The Routh array, every calculation, and the root locations update live. Each sign change in the first column is one root in the right half-plane.

Presets:
Routh array
Working
Unit II · Time-domain performance

Second-order response of a robot joint

T(s) = ωn² / (s² + 2ζωn·s + ωn²). Drag the poles in the s-plane or use the sliders. The default is Q6: T(s) = 25 / (s² + 6s + 25).

y(t)Set-point±2% bandEnvelope
s-plane: drag a pole
Robot joint following y(t)