Ten times a second the demo renders a depth image from the robot's head, degrades it the way a real sensor would, and fuses it into a voxel map. Once a second it projects that map onto the floor and plans a path to the nearest place it has not seen. This page goes through each step and the three failures that shaped the rules.
The loop

The split in the figure is the main design choice. Everything that decides what the map looks like takes two inputs, a depth image and a camera pose, and has no dependency on the browser. The browser adds the part that needs a GPU: producing the depth image from a mesh, and drawing the result.
The depth camera
The camera sits 0.35 m above the floor at the front of the robot and looks straight ahead. It has a vertical field of view of 58 degrees, which at 16:9 is about 89 degrees across, and returns depth between 0.3 and 6 m.
The house is drawn twice from that camera into small off-screen images of 160 × 90 pixels. The first pass is the ordinary colour render. The second replaces every material with one that writes the distance along the view axis, packed into the three colour channels as a 24-bit fraction of the far plane. Reading the pixels back gives a depth image and a colour image that line up pixel for pixel. The camera pose is built by the same function the map uses to turn pixels back into points, so the render and the map cannot disagree about where the camera is.
The sensor model
A rendered depth image is perfect, and a real one is not. The sensor switch applies the model from the Depth page, a low-resolution map with added noise:
\[D_{\text{LR}} = \downarrow(D_{\text{GT}}) + \eta, \qquad \eta \sim \mathcal{N}\!\left(0,\ (\sigma_1 z^2)^2\right)\]The downsample keeps one sample per block of pixels and repeats it across the block. The noise grows with the square of the depth $z$, which is how the error of a stereo depth camera behaves, and $\sigma_1$ is its size at one metre. A share of the low-resolution pixels returns nothing.
| Setting | Downsample | Noise at 1 m | Dropout | Trusted range |
|---|---|---|---|---|
| Clean | none | 0 | 0 | 6.0 m |
| Noisy | none | 5 mm | 0 | 3.2 m |
| Low-res + noisy | 4 × 4 blocks | 20 mm | 5% | 1.6 m |
The voxel map
The map is a grid of 5 cm voxels covering the house, 384 × 64 × 234 of them. Each voxel holds one signed byte of evidence and a colour.
- A voxel in which a ray ends gains 2. A voxel a ray passes through loses 1. The value is clamped between −6 and 10.
- A voxel counts as occupied from 3 up, so one hit is never enough and two are.
- A voxel changes at most once per scan, however many of the 14,400 rays touch it.
- Hits are applied before free space, and a voxel that received a hit in a scan is not cleared by another ray of the same scan.
- Free space is traced with a voxel traversal along every second ray in each direction, from the camera towards the hit.
The compact list of occupied voxels is kept up to date as values cross the threshold, and that list is what the right half of the demo draws, one square per voxel.
The floor grid and the planner
The planner works on a 2D grid derived from the voxels between 13 and 50 cm above the floor, the heights a quadruped’s body would hit. A cell is occupied if any voxel in that band is, free if the band was seen and is empty, and unknown otherwise.
A frontier is a free cell next to unknown cells. The planner inflates obstacles by a little more than the robot’s radius, runs a breadth-first search over free cells from the robot, and takes the first frontier it reaches. The robot follows the path by steering at a point half a metre ahead, replans every second, and turns a full circle on arrival, because a camera 89 degrees wide sees a quarter of the room at a time. When no frontier can be reached, exploration is finished.
The real floor plan is used for one thing, stopping the robot when it would walk into something. The planner never reads it.
Three failures that shaped the rules
The floor erased itself. A ray that reaches the floor two metres ahead arrives at a shallow angle and runs inside the floor’s own voxel layer for its last stretch. Carving free space all the way to the hit cleared floor voxels that other, sparser rays had marked. In a test where the robot walks two metres towards a wall, 770 of 1,053 observed floor voxels stayed occupied. Stopping the carve five voxels before the end of each ray kept 982.
Low-resolution depth built steps on the floor. Repeating one depth value across a 4 × 4 block puts sixteen pixels on a patch that faces the camera. On a floor seen at a shallow angle the top of each patch floats a few centimetres above the ground. With the body-height band starting at 6 cm those patches counted as obstacles, the robot believed it was fenced in, and exploration stopped after four seconds. The band now starts at 13 cm, which a quadruped steps over.
Noise at range filled the room with walls. Noise of 20 mm at one metre is 0.7 m at six. Fusing every return put occupied voxels well in front of and behind each wall. The map now counts a return as a hit only up to the distance where the noise equals one voxel, $\sqrt{0.05 / \sigma_1}$ metres. Beyond that distance a ray still clears free space, up to that distance. The Results page has the numbers with and without this rule.
