Not every sensor looks outward. A walking robot must know at every moment how its body is tilted and how its joints are bent. This is proprioception, the sense of the body itself.

Diagram of a four-legged robot with an IMU in its body and encoders at its joints, next to a GPS circle with a 4.9 meter radius.Swipe the diagram to see all of it.

The IMU: how the robot feels its tilt

An inertial measurement unit (IMU) is a small chip with two or three sensors inside. VectorNav, an IMU maker, lists them:

  • An accelerometer feels pushes and pulls, like the push you feel when a car speeds up.
  • A gyroscope feels how fast the robot turns.
  • Some IMUs also have a magnetometer. It feels the Earth's magnetic field, like a compass, to find the heading.

From these, the robot knows how it tilts and how it moves. This is the robot's sense of balance.

The limit: drift

An IMU measures changes. To know how far the robot has moved, the computer adds up all these small changes. Each reading has a tiny error, and the errors add up too. After some time, the estimate is wrong. This slow error is called drift. MathWorks explains that this kind of measurement can build up drift errors over time.

Picture a walking robot that adds up each small step to know how far it went. After a long walk, it believes it is somewhere it is not.

Use 1: a walking robot keeps its balance

A four-legged or humanoid robot must know its tilt all the time, or it falls. The Pronto system fuses the IMU with the joint sensors in the legs. Its authors note that, for very dynamic motion, even this estimate drifts too much. So they also add slower updates from cameras and LiDARs. DogLegs, another system, uses a trick: when a foot is on the ground and not slipping, its speed is zero. This known fact corrects the drift.

Use 2: a drone or a mobile robot between slow updates

A drone or a mobile robot often gets its position from slower sources, such as GPS, a camera or a LiDAR. The IMU reports much faster. In Pronto, the fast inner estimate runs all the time, and the slower camera and LiDAR updates correct it. MathWorks adds that when a GPS signal drops out, an inertial system can keep working alone from the last known position.

Use 3: a robot arm that shakes less

A fast arm can shake a little when it stops. Epson says its robots use gyro sensors to detect this vibration and correct it, so the arm does not need to wait for the shaking to stop. This is a manufacturer claim.

Encoders: where is each joint?

An encoder measures the angle of a rotating part, such as a joint. Renishaw explains that an encoder turns motion into an electrical signal with the position, speed and direction. A robot arm has an encoder in each joint. It knows the angle of every joint, so it knows where its hand is without seeing it. Adding up these joint angles to follow motion is part of odometry. Lesson 10 shows how other sensors correct its errors.

GPS: only a rough position

GPS gives a position on Earth. GPS.gov says its accuracy gets worse near buildings, bridges and trees. So robots use it outdoors, with other sensors.