RADU: Visual Sensor Overview
Tags: robotics
Published: 2022-02-14 06:27:32

A robot can move by processing movements commands, blindly executing them until it hits an obstacle. In contrast to this, navigation is the ability to make autonomous choices how to move to reach a goal. For this, a robot needs three distinct capabilities: First, to localize itself with respect to its surroundings. Second, to build and parse a map, an abstract representation of its environment. Third, the ability to devise and execute a path plan how to reach a designated target from its current location.

Robotics navigation is a broad field with different aspects to consider: The robots primary movement type and environment (ground, sea, air), its localization, visualization and distance sensors, and the concrete algorithms that access sensor data to govern navigation goals.

This article helps you in your search for effective navigation with ROS. In essence, you will learn about sensor types and technologies, then bridge this to the world of ROS with concrete libraries and algorithms. And form this, I will explain my methods how find a combination of sensor and library with which a robot can achieve simultaneous localization and mapping.

_This article originally appeared at my blog [admantium.com](https://admantium.com/blog/robo08_visual_sensors/)_

## Sensor Types

A robot’s sensors are the primary means with which to get any representation of its environments, and are therefore necessary to perform localization and navigation. The different sensors can be separated into 4 groups: location, vision, 2d distance, 3d distance.

### Location Sensors

Location sensor determine a robot’s absolute position. A very common one is [GPS](https://en.wikipedia.org/wiki/Global_Positioning_System) is a satellite-based localization system that determines the current position as a coordinate set of longitude and latitude values. When navigation happens inside buildings, it is common to add additional local data sources, for example RFID tags that are attached to the ceiling or the ground. Based on an absolute  point of reference, an [IMU](https://en.wikipedia.org/wiki/Inertial_measurement_unit) can be used to continuously update the current position. These systems combine accelerometers and gyroscopes. They report the devices current force, angular rate and sometimes the orientation.  IMUS are mostly used in aircraft and unmanned aerial vehicles. Recently, GPS with integrated IMU are produced to provide localization capabilities when GPS is not available.

### Vision Sensors

Vision sensors process the surroundings by measuring the visible or invisible light and forming graphical representation. The most common technology are [monocular cameras](https://en.wikipedia.org/wiki/Camera), the classical photography cameras that we all use on a daily basis with our smartphones. By combining two or more camera lenses, [stereo cameras](https://en.wikipedia.org/wiki/Stereo_camera) are create. They record images with a spherical distortion that the human observer - when watched from a very specific angle - sees as a 3-dimensional pictures. Concerning the viewpoint, [omni-directional cameras](https://en.wikipedia.org/wiki/Omnidirectional_(360-degree)_camera) have a 360-degree view range and capture it all in one 2D image. These cameras are often used in cars to provide superior image recording and sensing. When leaving the human visible light, [infrared cameras](https://en.wikipedia.org/wiki/Thermographic_camera) create infrared light to measure the surface temperature of objects, which is then captured as an image showing the heat distribution.

### Distance Sensors

The distance sensor category encompasses specific devices that are used in vehicles and robotics to obtain a constant representation of their environment. The basic types are [ultrasonic](https://en.wikipedia.org/wiki/Ultrasonic_transducer) and [sonar](https://en.wikipedia.org/wiki/Sonar). Both sensors emitted sound, receive the sounds reflection, and measure the distance to objects by interpolating the time it took between sending and receiving the signal. They differ in the medium: Ultrasonic travels through the air, while sonar is used only underwater. [Laser scanners](https://en.wikipedia.org/wiki/Laser_rangefinder), also called laser distance sensors, use laser signals to determine the distance to objects. There are three different techniques: _Time of flight_ measures the difference between the lasers sending and its reflection on an object, _multiple frequency phase shift_  sends multiple lasers at a time, determines their phase shift, and calculates the distance from all of these measurements, and _Interferometry_ that is used to track moving objects.

### 3D Sensors

The final sensor type is concerned with making 3D point clouds to represent the environment. These sensors are used in different fields, from autonomous cars to satellite images. [Lidar](https://en.wikipedia.org/wiki/Lidar) is based on lasers that are continuously scanning the environment and use similar techniques as laser scanners to measure the distance of all objects in their environment. [RGB-D](https://en.wikipedia.org/wiki/Range_imaging), also called depth cameras, use vision sensors and therefore light impulses to produce the 3D point clouds. The most common technique is stereo cameras because they do not need to add extra illumination to the observed environment. Other techniques are for example _structured light_, or _time-of-flight_ and _interferometry_ that are also used by laser scanners.

## 3D Sensor Hardware

In current robotic projects, navigation is enabled by 3D sensors. When making a selection and you know you want to work with ROS, then check this [list of 3D sensors](https://rosindustrial.org/3d-camera-survey)[^1]. The currently available ROS-supported 3D sensors are shown in the following table.

**Name**|**Type**|**ROS Lib**|**Price**
---|---|---|---
 Kinect v1 | RGB-D  | [libfreenect](http://wiki.ros.org/libfreenect)  |  $125 (used)
 Kinect v2  | RGB-D  | [libfreenect2](https://github.com/OpenKinect/libfreenect2#faq)  | $150 (used)
 Azure Kinect | RGB-D  | [Azure Kinect](https://github.com/microsoft/Azure\_Kinect\_ROS\_Driver)  | $280  
 RPLidar A1M8 | LIDAR  | [rplidar](http://wiki.ros.org/rplidar)  | $100  
 RPLidar A2 | LIDAR  | [rplidar](http://wiki.ros.org/rplidar)  |   $319
 RPLiDAR A1M8 360 | LIDAR  | [rplidar](http://wiki.ros.org/rplidar)  |   $109
 Real Sense D415 | RGB-D  | [RealSense](http://wiki.ros.org/RealSense) |  $175 (used)
 Real Sense D435 | RGB-D  | [RealSense](http://wiki.ros.org/RealSense)  |  $190 (used)
 Velodyne LP16  | LIDAR  |  [velodyne](https://wiki.ros.org/velodyne)  |  $2000(used)
 TFmini-s   | LIDAR  |  [TFmini-ROS](https://github.com/TFmini/TFmini-ROS)  |  $39(used)

## Conclusion

This article presented the landscape of localization and mapping sensors. We learned about the different groups of sensors - location, vision, 2D and 3D distance - and detailed sensor technologies. For navigating a robot, 3D sensors are state of the art. Therefore, I showed the currently available ROS-supported 3D sensor.

## Footnotes

[^1]: For all other sensors, check [ROS-supported sensors](http://wiki.ros.org/Sensors).