Laboratory
Interactive robotics laboratory
47 experiments, from falling balls to a 45-dimensional policy observation. Each one lists what it demonstrates, the equations it integrates, its core source, and its limitations.
These are not MuJoCo. Three.js renders. It does not simulate. The physics here is integrated by small TypeScript models written for teaching, and every experiment says how faithful it is. Experiments labelled Real learning run an actual learning algorithm in your browser. Nothing is a pre-recorded animation or a made-up training curve.
01Physical AI
- Perception–action feedback loopHow sensing, observation, control, actuation and the physical environment form a closed loop, and what happens when the loop is broken, delayed or noisy.Numerical simulation
- The sim-to-real gapWhy a controller that works perfectly in simulation can overshoot, lag or oscillate on hardware when the simulator omits friction, mass errors, latency, saturation or noise.Illustrative
02Physics Engines
- Falling ball with adjustable gravityConstant acceleration under gravity, the exchange between potential and kinetic energy, and how a coefficient of restitution turns an impact into energy loss.Numerical simulation
- Force, mass and accelerationNewton's second law a = F/m, and Newton's first law: when the force stops, the velocity stays constant unless something (here, optional drag) removes it.Numerical simulation
- Static vs kinetic frictionFriction is not a fixed force. At rest it takes whatever value is needed to prevent motion, up to μs·N. Once the block slides, friction drops to μk·N and opposes the velocity.Numerical simulation
- Single-joint arm with a torque-limited motorRotational Newton's law I·α = Σ τ for a robot link. Gravity torque depends on angle, a motor has a torque limit, and a PD position controller droops under load or fails outright when the motor is too weak.Numerical simulation
- Nonlinear pendulum vs the small-angle approximationThe small-angle formula T = 2π√(L/g) is an approximation. At large amplitudes the true pendulum is slower, and an accurate integrator conserves energy when there is no damping.Numerical simulation
- Collision and contact: soft vs hardTwo ways a simulator can stop objects passing through each other: a stiff spring–damper that allows small penetration (penalty, soft contact), or an instantaneous velocity change plus position correction (impulse, hard contact). Also shows why stiff contact needs small timesteps.Numerical simulation
- Timestep and integrator accuracyThe same equations give different answers depending on the integrator and timestep. Explicit Euler steadily adds energy to an oscillator, semi-implicit Euler keeps energy bounded, and RK4 is far more accurate per step. Every method fails if the timestep is too large.Numerical simulation
03MuJoCo Internals
04Sensors & Data
- IMU orientation viewerHow roll, pitch and yaw define the orientation of an IMU's body frame relative to the world frame, and how the same orientation is written as a rotation matrix, a quaternion and a projected-gravity vector.Visualization
- Projected gravityThat projected gravity encodes roll and pitch but not yaw: turning in place leaves all three numbers unchanged, while nodding or swaying changes them.Visualization
- Angular velocity versus linear velocityWhy a gyroscope gives the body's angular velocity directly (the same at every point of a rigid body) while linear velocity depends on where you look (v = v_c + ω × r) and is not measured by an IMU at all.Numerical simulation
- Integrating an accelerometerWhy integrating acceleration to get velocity and position drifts: a constant bias b gives a velocity error b·t and a position error b·t²/2, white noise adds a random walk, and a small orientation error leaks gravity into the horizontal axis.Numerical simulation
- Real sensor data versus ideal simulation dataHow noise, constant bias, bias drift, quantization, a finite sampling frequency and latency each change the signal a controller receives, compared with the perfect value a simulator can provide.Illustrative
05Communication & Firmware
- Virtual CAN bus with motor controllersHow a single shared CAN bus carries commands to, and feedback from, several motor controllers, how bus load grows with motor count and control rate, and why motors with higher identifiers get their feedback later.Numerical simulation
- CAN arbitration and the frame on the wireBitwise, non-destructive arbitration: why the lowest identifier always wins; and what a real classical CAN frame looks like bit by bit, with CRC, stuff bits and the CAN_H/CAN_L differential voltages.Numerical simulation
- Binary and hexadecimal packet inspectorHow numbers become bytes: integer and IEEE 754 float layouts, little- versus big-endian byte order, fixed-point scaling with its resolution, range and saturation, and a complete binary IMU packet.Visualization
- Latency, jitter and stale observationsWhy the observation a controller uses is always older than the moment it is used, how fixed latency, jitter and the ratio between sensor and controller rates set that age, and how jitter can reorder packets.Numerical simulation
- UDP datagram flowWhat UDP does and does not guarantee: datagrams travel independently, can be lost or arrive out of order, and the receiver must use sequence numbers to detect and handle both.Illustrative
06Asimov Simulation
- Multi-rate timing: 200 Hz physics and IO, 50 Hz policyHow Asimov's documented rates fit together: physics and IO-side state handling every 5 ms, the policy every 20 ms, so each policy action is held for four physics steps.Visualization
- Timing lab: sensor latency, CAN timing groups and actuator delayObservation delay, timing skew between CAN timing groups, jitter and actuator delay on one timeline: how old each part of the policy's observation is, and when its command actually takes effect.Illustrative
- Ideal versus delayed feedbackWhy a controller that works with ideal, instantaneous observations can oscillate or fall when observations and actions are delayed, even with the same 200 Hz physics and 50 Hz control rates.Numerical simulation
- Serial versus parallel ankleHow a parallel ankle maps two actuator positions to ankle pitch and roll and back, why both actuators move for either motion, and how the Jacobian converts joint torques into actuator forces.Numerical simulation
- Passive toe during push-offHow a passive, spring-loaded toe deflects as the heel lifts during push-off, carries ground force without a motor, stores and returns elastic energy, and how the contact model's stiffness interacts with the toe spring.Illustrative
- Visual geometry versus collision geometryThe difference between the geometry a robot model renders and the simpler geometry the physics engine uses for contact, such as capsules on feet and toes.Visualization
07RL Fundamentals
- Grid-world Q-learningHow a tabular agent with no prior knowledge learns action values Q(s, a) from rewards alone, how its greedy policy emerges from those values, and how α, γ, ε, slip and the reward design change what it learns.Real learning
- Learning to balance a cart-poleAn untrained policy improving through repeated interaction with a simulated environment, the training curve that interaction produces, and the difference between random actions and the learned policy once training stops.Real learning
- Rewards, penalties and the discounted returnHow a per-step reward is built from several weighted terms, how the discount factor γ turns a sequence of rewards into the return G_t, and how the choice of γ can change which behaviour looks best.Numerical simulation
- Exploration versus exploitation: multi-armed banditWhy an agent must sometimes try actions that currently look worse, and how greedy, ε-greedy, UCB and Thompson sampling trade exploration against exploitation, measured by regret and by how often the best action is chosen.Real learning
08Locomotion Policy
- 45-dimensional observation inspectorExactly which 45 numbers Asimov's locomotion policy receives at each 50 Hz step, how they are grouped, where each comes from and what it means physically.Illustrative
- Movement command, IMU and joint signals (scripted gait)How the three command values enter the observation, and what base angular velocity, projected gravity and joint signals look like while a lower-body humanoid steps.Illustrative
- 3D humanoid joint explorerWhere the 12 actuated joints sit on a lower-body humanoid, how each moves the leg, and how posture becomes the joint-position block obs[9..20]. Passive toes are shown but are not actor inputs.Visualization
- Actor network forward pass (45 → 512 → 256 → 128 → 12)What a forward pass through Asimov's documented actor shape computes, how activations flow through three ELU hidden layers to 12 outputs, and where the 189,324 parameters live.Visualization
- ELU activation versus ReLUThe shape of the ELU activation used in Asimov's actor and critic, how α sets its negative saturation, and how its gradient differs from ReLU's.Visualization
- Running mean / std observation normalizationHow a running mean and variance turn observations with very different scales (a joint velocity of several rad/s, a gravity component near −0.98) into comparable, roughly zero-mean unit-variance inputs, and what happens if the data shift after the statistics are frozen.Illustrative
- Gaussian policy noise and explorationHow a stochastic policy samples actions around the network's mean, how the standard deviation controls exploration, and what Asimov's documented initial noise std of 1.0 means in practice.Numerical simulation
09Actor-Critic
- Actor versus critic observations (45 vs 64)Which inputs Asimov's actor and critic receive, which 19 are privileged (simulation-only), and why only the 45 hardware-compatible ones survive to deployment.Visualization
- Training versus deployment architectureWhich components exist only during training (critic, privileged observations, rewards, optimizer) and the much smaller pipeline that runs on the robot.Visualization
- Partial observability: two situations, one observationWhy a memoryless policy cannot act optimally when two physical situations produce identical observations, and why privileged information for the critic does not fix this for the actor.Numerical simulation
- Desired versus actual walking velocityThat the commanded velocity the actor receives is not the velocity the robot achieves, and that the achieved velocity, which a tracking reward and the critic need, is easy to read in simulation but not directly measurable on hardware.Illustrative
- Privileged information improves value estimationWith real TD(0) learning in the browser: a critic that also sees a privileged, simulation-only variable predicts returns more accurately, and produces lower-variance advantage estimates, than a critic limited to the actor's inputs.Real learning
10Observation Masking (proposed)
- Actor observation groups: 45 deployable + 19 privilegedHow a fixed 64-wide actor input can hold both the 45 hardware-compatible observations and the 19 simulator-only (privileged) observations, and what masking a group means for that input.Visualization
- Fixed progressive masking scheduleA time-based curriculum that removes privileged observation groups from the actor one after another, and the six training stages it produces.Visualization
- Adaptive masking scheduler with safeguardsA transparent, rule-based scheduler that paces observation masking by measured performance, holds or partially restores information on degradation, and is still guaranteed to finish with a hardware-compatible actor.Illustrative
- Baseline architectures: who sees whatWhat the actor, critic and (where present) teacher observe in each of the five proposed baselines, and that every baseline deploys an actor with the same 45 inputs.Visualization
- Experiment configuration and pending resultsHow the proposed protocol translates into a concrete, reviewable configuration, and what the result tables will contain once real experiments exist.Visualization