Both sensors let a robot see obstacles, but they answer different questions. Here is how to choose — and when to use both.
Most small mobile robots start with one of two range sensors: a spinning 2D LiDAR or a stereo depth camera. Each has clear strengths.
What a 2D LiDAR does well
- 360° coverage in a single horizontal plane, ideal for mapping walls and corridors.
- Consistent range accuracy that does not depend on lighting or surface texture.
- Low compute cost — a scan is a few hundred points, easy for SLAM packages on modest hardware.
Its limitation is that it sees only one slice of the world. A table top above the scan plane or a cable on the floor below it is invisible.
What a depth camera does well
- Full 3D view of what is in front of the robot, including overhangs and low obstacles.
- Colour plus depth, enabling object detection and grasp planning.
The trade-offs are a narrower field of view, accuracy that falls off with distance, sensitivity to sunlight and reflective surfaces, and far more data to process.
A quick decision guide
| Goal | Start with |
|---|---|
| Indoor mapping and navigation | 2D LiDAR |
| Picking up or recognising objects | Depth camera |
| Avoiding low or overhanging obstacles | Depth camera |
| Long corridors, warehouses | 2D LiDAR |
| Robust autonomous platform | Both, fused |
Using both
Many capable platforms pair a LiDAR for localisation with a forward depth camera for close obstacles and manipulation. ROS 2 navigation stacks can combine both into one costmap, so the extra sensor adds safety without complicating the navigation code.