02 Sensing & Perception · #5 of 46

Proprioception vs. Exteroception

Knowing yourself versus knowing the world

Scanning electron micrograph of a MEMS gyroscope, showing the etched silicon comb fingers and vibrating proof mass at microscopic scale.
A MEMS gyroscope: a vibrating tuning fork smaller than a grain of sand, etched into silicon. It feels itself turn. · Minh Ngoc Nguyen et al., CC BY 4.0

Close your eyes and touch your nose. You just used a sense most people can't name, and it's the same sense a robot leans on when the lights go out.

That sense is proprioception: the awareness of your own body's motion and configuration without looking. Its opposite is exteroception: sensing the world out there. Every robot ever built navigates with exactly these two, borrowed straight from the neuroscience of animals. Master the difference and you understand why robots get lost, and how they find themselves again.

Proprioception: the robot feeling itself

A proprioceptive sensor never looks outside. It measures the robot's own state: how fast a wheel spun, how hard the body accelerated, how quickly it yawed. Wheel encoders count ticks. Accelerometers feel pushes. Gyroscopes feel rotation. None of them care what the world looks like; they only report what the body did.

The headline example is the MEMS gyroscope above: a microscopic tuning fork that vibrates millions of times a second. Spin it, and the Coriolis effect nudges the vibration sideways by a hair. That nudge is the turn rate. It is purely internal: a gyro on the Moon or at the bottom of the sea reads the same way, because it senses nothing but itself.

A 9-DoF IMU breakout board carrying an accelerometer, gyroscope, and magnetometer behind a row of solder pads.
A 9-DoF IMU packs an accelerometer, gyroscope, and magnetometer onto one fingertip-sized board, and every one of them reports the robot's own motion rather than anything in the world around it. · SparkFun, CC BY 2.0

The killer feature of proprioception is that it is always available. No landmark required, no clear line of sight, no good lighting. Just integrate your own motion forward in time. Sailors called this dead reckoning: take your speed, your heading, and the clock, and you can compute where you must be.

And here is the catch that haunts the rest of this course. Proprioception only ever tells you about change. To know where you are, you must add up every change since the start, and every measurement carries a sliver of error. Those slivers don't cancel. They accumulate. Dead reckoning uses proprioception alone, and so it drifts without bound: the longer you go unchecked, the more wrong you get, forever.

Why Gray code makes the glitch impossible

The problem with plain binary is that adjacent positions can differ in several bits at once, and physical contacts switch one at a time. Walk the boundary at 180 degrees in 3-bit binary:

position 3  ->  0 1 1
position 4  ->  1 0 0   (three bits change)

If contact 1 flips first, the reader briefly sees 1 1 1, which is position 7. The shaft "jumps" to 7, then settles back to 4. Gray code fixes this by guaranteeing that any two neighbouring codes differ in exactly one bit:

position 3  ->  0 1 0
position 4  ->  1 1 0   (one bit changes)

Now a boundary crossing can only ever toggle a single contact, so the worst a misaligned reader can do is lag between the old code and the new one. There is no third value to glitch into. You can even fold a Gray-coded disc down to a single ring read by offset sensors, the single-track Gray code, which is how a basic quadrature encoder gets away with two sensors on one track instead of a separate ring per bit.

The spherical Apollo guidance-and-navigation inertial measurement unit on museum display, its polished case ringed with connectors and wiring.
The Apollo inertial measurement unit: a roughly basketball-sized sphere of spinning gyros and pendulous accelerometers that felt every move the spacecraft made. It could not see the Moon, only sense how the ship had turned and accelerated, so the crew reset its drift with hand-aimed star sightings. · Daderot, CC0 (MIT Museum)

Exteroception: the robot seeing the world

The cure is to look outside. An exteroceptive sensor measures the world relative to the robot: a camera sees walls and signs, a lidar paints the room in millions of laser dots, sonar hears an echo bounce back. These sensors don't tell you what you did. They tell you where you are, by anchoring you to something real and external.

An HC-SR04 ultrasonic rangefinder with its two cylindrical transducers facing forward like a pair of eyes.
The HC-SR04 ultrasonic rangefinder pings the world with a burst of sound and times the returning echo, a few-dollar exteroceptive sensor that measures distance to whatever is out there. · SparkFun, CC BY 2.0
An Intel RealSense D435 stereo depth camera: a small bar with several lenses that measures distance to whatever is in front of it.
A depth camera is a pure exteroceptive sensor: it looks outward and measures the world directly, anchoring the robot to walls and objects it cannot fake. This is how a robot catches when its own dead reckoning has drifted. · Marc Auledas, CC BY-SA 4.0
The Apollo 11 laser ranging retroreflector, a suitcase-sized panel of mirrors, sitting on the grey lunar surface with the lunar module and astronaut bootprints behind it.
Apollo 11's laser ranging retroreflector, left on the Moon in 1969. Observatories still fire laser pulses at it and time the echo to measure the Earth-Moon distance to within millimetres, the same time-of-flight trick a self-driving car's lidar uses, just 384,000 km long. · NASA, public domain

Exteroception has the opposite personality of proprioception. Its error does not accumulate: recognise the same doorway twice and your position snaps back to truth, wiping out an hour of drift in a single frame. But it is not always available. Lidar struggles in heavy rain; cameras go blind in the dark or a featureless white corridor; a recognisable landmark might simply not be in view. And every exteroceptive reading is noisy and occasionally a flat lie: a reflection, a moving pedestrian, a mirror.

Why each one fails alone

Stack the two side by side and a painful symmetry appears:

Run a robot on proprioception alone and it confidently strolls off a cliff, certain it's still in the hallway. Run it on exteroception alone and it twitches: every noisy frame yanks the estimate around, and the instant a landmark vanishes, it's blind. Neither sense is sufficient. Each one's weakness is precisely the other's strength.

Watch the symmetry play out. The robot below drives a loop and tracks itself by dead reckoning alone, integrating noisy wheel odometry. Its belief (the solid track) peels away from the true path (dashed) and its uncertainty bubble swells, exactly the proprioceptive failure. The cure is a single exteroceptive fix: sighting a known landmark snaps the belief back onto truth and collapses the bubble in one frame. Crank the odometry noise and the drift accelerates; let the fixes lapse and it runs away again.

steps 0 · fixes 0 · position error 0.00 m · uncertainty σ 0.00 m

The robot drives a loop. The solid accent track and arrow are its dead-reckoning belief from noisy wheel odometry (proprioception), drifting away from the dashed true track while the uncertainty bubble swells. Sighting a known landmark (diamond) is an exteroceptive fix: it snaps the belief back onto truth and collapses the bubble. Turn on auto-fix to sight a landmark automatically when the robot drives near one, or hit Sight landmark yourself.

The whole game: fusing the two

So the answer is never to choose. The answer is to fuse them: to let smooth, always-on proprioception carry you between exteroceptive fixes, and let each external observation periodically snap the accumulated drift back to reality. Predict with your body's motion; correct with the world. That rhythm, repeated dozens of times a second, is the beating heart of every localization system ahead.

Why fusion is the only way: the bias-availability trade-off

Write the two sources in terms of their errors. A proprioceptive estimate integrates motion, so its variance grows roughly linearly with the number of steps nn:

σprop2(n)=nσstep2\sigma_{\text{prop}}^2(n) = n\,\sigma_{\text{step}}^2

It is dense in time (a reading every millisecond) but its uncertainty has no ceiling: it climbs forever.

An exteroceptive measurement has a fixed, bounded variance σext2\sigma_{\text{ext}}^2 that does not grow with time, but it arrives only when a landmark is visible, so it is sparse and sometimes absent entirely.

The optimal way to merge two independent estimates of the same quantity is the inverse-variance weighted average:

x^=σext2xprop+σprop2xextσprop2+σext2\hat{x} = \frac{\sigma_{\text{ext}}^2\,x_{\text{prop}} + \sigma_{\text{prop}}^2\,x_{\text{ext}}}{\sigma_{\text{prop}}^2 + \sigma_{\text{ext}}^2}

Notice what this does automatically. While drift is small, σprop2\sigma_{\text{prop}}^2 is tiny and the fusion trusts the body. As drift accumulates and σprop2\sigma_{\text{prop}}^2 swells, the same formula leans harder on the external fix, exactly when you need it most. This single equation, applied recursively over time, is the Kalman filter. The next chapter builds it.

Key takeaways

Two senses, two failure modes, one cure. The body that feels itself moving will always slowly lose the thread; the eye that reads the world can't see in the dark. But weave them together, feel between glances, glance to reset the feeling, and a machine can cross a city, a warehouse, or another planet without ever staying lost for long.

That weave has a name. We'll learn to spell it next: the filter.

full glossary →