The senses of a robot
Humans navigate the world with five senses. Robots, it turns out, need their own version of those senses — and the hardware that provides them is collectively called sensors. This week we are taking a whirlwind tour of the four sensor types you will encounter most often in robotics.
Cameras: the eyes
A camera gives your robot a rich, high-resolution view of its environment. Modern robotics cameras range from simple webcams to stereo pairs and depth cameras (like the Intel RealSense series). Cameras are great for object detection, lane following, and visual SLAM, but they struggle in low light and can be computationally expensive to process.
If you want to dig deeper, our Camera Basics lesson walks through how image data is structured and what "resolution" really means for a robot.
LiDAR: the laser ruler
LiDAR (Light Detection and Ranging) fires laser pulses and measures the time it takes for each pulse to bounce back. The result is a precise point cloud of distances. LiDAR excels at mapping and obstacle avoidance because it gives you accurate depth information regardless of lighting conditions. The trade-off is cost — though prices have dropped dramatically in recent years.
Check out LiDAR and Point Clouds for an interactive look at how point clouds work.
IMUs: the inner ear
An Inertial Measurement Unit combines accelerometers and gyroscopes (and sometimes magnetometers) to measure acceleration, angular velocity, and orientation. Think of it as the robot's sense of balance. IMUs are small, cheap, and fast, which makes them ideal for estimating orientation and short-term motion. They do drift over time, though, which is why they are almost always paired with another sensor.
Encoders: the odometer
Wheel encoders count how many times a wheel has rotated, letting you estimate how far the robot has traveled. They are the simplest sensor on this list and the most reliable for short distances. Over longer distances, wheel slip and surface irregularities cause the estimate to diverge from reality — a classic problem called odometry drift.
When to use what
No single sensor is perfect. In practice, most robots combine several sensors and fuse their data together to get a more accurate picture of the world. If that idea sounds interesting, head over to our new blog post on Sensor Fusion for Robots for a deep dive into how Kalman filters and complementary filters bring noisy data together.
Tip of the week: expect noise
Every sensor measurement contains noise. Temperatures shift, vibrations creep in, and electrical interference adds jitter. Before you do anything clever with sensor data, always characterize the noise first. Record a few seconds of data with the robot sitting still, plot it, and compute the standard deviation. That number tells you the floor of precision you can realistically achieve.
For a handy reference on the units each sensor uses (m/s squared for accelerometers, rad/s for gyroscopes, and so on), bookmark our Cheat Sheet. It saves a lot of time when you are switching between sensor types mid-project.
See you next issue!
-- The Robotics From Zero Team