Skip to the report

Φferromotion · textbook · chapter 16 rust → wasm · on-device

Turning to fit

Modern robots increasingly see the world as a cloud of little 3D Gaussians, the native output of splat reconstruction. FOCI checks collision directly on that map: the overlap between two Gaussians has a closed form, and because the robot's own Gaussians rotate with it, an elongated body can turn to slip through a gap it would smash into head-on. This page runs that overlap-integral collision on your device.

01: the map is Gaussians

A 3D Gaussian-splat reconstruction represents a scene as thousands of small anisotropic blobs. Rather than meshing that into boxes and spheres, throwing away the very shape information the splats encode: FOCI keeps the Gaussians and asks a cleaner question: how much do two Gaussian density fields overlap? That overlap integral has an exact closed form, a single Gaussian in the separation of their means under their summed covariance. It is smooth, cheap, and, the key property: it knows about shape and orientation, not just distance between centers.

02: orientation is a control input

Below, two obstacle Gaussians wall off a corridor, leaving a narrow slot in the middle. The robot is a single Gaussian, deliberately long and thin. Drag it toward the slot and rotate it with the slider. Its colour is its collision cost, green is clear, red is jammed. Pushed in broadside, the long axis spans the walls and the cost flares red; rotate it to line up with the corridor and it threads through, green.

overlap collision cost
robot yaw
slot

a conservative box or sphere around this robot could never fit, only its true orientation-aware shape does

03: why a box would fail here

The usual shortcut is to wrap the robot in a bounding box or a sphere and keep that clear of obstacles. But a bounding box of a long thin robot is nearly as wide as it is long: it can never fit through a slot narrower than the robot's length, no matter how you turn it. The robot physically fits; the conservative model says it doesn't. FOCI avoids that by scoring the actual Gaussian overlap, so the planner is free to use orientation as a way through, exactly what lets a legged robot slip sideways between two rocks.

This is the whole point. Collision is not a property of a position alone; for a non-round body it is a property of a pose. A representation that forgets orientation forecloses solutions that exist. FOCI keeps orientation in the cost, analytically, differentiably, so turning-to-fit becomes just another direction the optimizer can descend.

04: the checkHead-on vs turned

On load, this page measured the collision cost of entering the slot broadside (yaw 0°) versus turned to align with it (yaw 90°), at the slot's center:

collision cost head-on (yaw 0°)
collision cost turned to align (yaw 90°)
turning cuts the cost by
verdict

Same position, same robot, same obstacles, only the orientation changed, and the collision cost collapsed. A model that scored collision from position alone would report the same value for both and never find the way through.

05: the pointCollision belongs to the pose

Keep the shape; let the body turn to fit.

Score collision as the overlap of the actual Gaussians, the map's and the robot's, and orientation stays in the cost where a planner can exploit it. A tight slot is not a wall; it is an invitation to rotate.

FOCI closes the geometry side of the book the way the planning chapters closed the optimization side: keep the real structure of the problem instead of a conservative surrogate, and the solutions hiding in that structure become reachable. On a real Gaussian-splat map of a room, the same overlap integral scores a whole robot against hundreds of thousands of splats, and the robot turns to fit.

What you just drove: the foci overlap-integral collision from ferromotion-core, compiled to WebAssembly, the same code the native tools link against. Every frame sums the closed-form overlap of the robot's Gaussian against each obstacle Gaussian at the current pose; nothing precomputed.

Verified in the library: the closed-form overlap integral matches Monte-Carlo integration of the product of the two Gaussian densities (rel err <1%); the kernel is 1 at coincident means and decays monotonically to ~0; its gradient matches finite differences; and turning an elongated robot to align with a slot cuts its collision cost to under a quarter of the head-on value. Each is a test in cargo test, not a claim in prose. See also ch.15, landing a rocket · the full textbook.

Institute for Physical AI · the Rust library · crates.io