Design & Selection · Module 02
Radar, ultrasonic, encoders, force/torque, tactile, UWB and sonar
The supporting sensors: they cover what cameras and LiDAR cannot, in weather, near glass, at contact points and underwater.
Assumptions: Class-level tendencies of each sensor type, not product specifications. Ratings (good, degraded, poor) and classes (range, accuracy, rate) are coarse and exist to flag obvious mismatches; the datasheet and your own tests decide.
1. Engineering problem
These sensors rarely carry a robot alone but often decide whether it works in practice: radar in weather, ultrasonic near glass, encoders for odometry and joint control, force/torque and tactile for contact, UWB for indoor positioning and sonar underwater.
2. When is this needed?
- Choosing a sensor type for a new robot, or a replacement when one fails to meet a requirement.
- Explaining to a team why a sensor behaves differently in the field than on the bench.
- Writing the datasheet checklist before you buy.
3. Selection and design decisions
| Sensor type | Typical range class | Accuracy class | Rate class | Compute | Power | Cost |
|---|---|---|---|---|---|---|
| Radar (mmWave and automotive-class) | hundreds of metres | decimetre class | about 10s of Hz or less | low | low | medium |
| Ultrasonic range sensor | metres (up to ~10 m class) | decimetre class | about 10s of Hz or less | very low | very low | very low |
| Wheel / joint encoder | n/a | millimetre class | about 100 Hz and above | very low | very low | very low |
| Force/torque sensor | n/a | millimetre class | about 100 Hz and above | very low | very low | high |
| Tactile sensor | n/a | centimetre class | about 10s to 100 Hz | low | very low | high |
| UWB (ultra-wideband) ranging | tens of metres | centimetre class | about 10s to 100 Hz | very low | very low | low |
| Sonar (underwater acoustic) | tens of metres | decimetre class | about 10s of Hz or less | medium | low | high |
| Sensor type | darkness | direct sunlight | fog or smoke | rain or spray | dust | glass and mirrors |
|---|---|---|---|---|---|---|
| Radar (mmWave and automotive-class) | good | good | good | good | good | good |
| Ultrasonic range sensor | good | good | good | degraded | degraded | good |
| Wheel / joint encoder | good | good | good | good | degraded | good |
| Force/torque sensor | good | good | good | good | good | good |
| Tactile sensor | good | good | good | degraded | degraded | good |
| UWB (ultra-wideband) ranging | good | good | good | good | good | good |
| Sonar (underwater acoustic) | good | good | good | good | good | good |
Every sensor type below follows the same 18-point template, from what it measures to the alternatives. Use the interactive Sensor Comparison Tool to compare any of them side by side.
Radar (mmWave and automotive-class)
- What it measures: Range, radial velocity and angle of reflecting objects using radio waves.
- How it is used in robotics: see the application guides for the role in each robot type.
- Practical advantages: Works in rain, fog, dust, smoke and darkness; Direct radial velocity; long range for vehicles.
- Practical disadvantages: Coarse angular resolution and sparse returns; Multipath and ghost targets; clutter indoors; Weak at classifying small or non-metallic objects.
- What it does better than alternatives: Operation in rain, fog, dust and darkness, with direct radial velocity at long range.
- What it cannot reliably measure: Give fine shape or reliably detect low-reflectivity objects.
- Conditions that degrade it: none of the six common conditions in this guide; check temperature, vibration and electromagnetic interference.
- Typical failure scenarios: Ghost objects from multipath; Static objects suppressed by the firmware filter; Interference between radars; Missed detections of people at some angles.
- Most suitable applications: supporting roles; see the application guides.
- Datasheet specifications to check: Range, velocity and angular resolution/field of view; Update rate; Output type (raw point cloud vs tracked objects); Static-object handling in firmware; Frequency band and regulatory approval for your region.
- How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range hundreds of metres, best-case accuracy decimetre class, typical update rate about 10s of Hz or less.
- Mounting and placement: Behind radome material that is transparent to the band; Avoid metal in front; fix the mounting angle.
- Electrical and communication interfaces: typically CAN, CAN-FD, Ethernet, UART.
- ROS 2 integration: standard message type vendor-specific (often PointCloud2 or object lists). Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
- Calibration and synchronisation: Extrinsic and boresight alignment; time sync. Camera + LiDAR + radar for all-weather perception.
- Compute, power and cost (relative): compute low, power low, cost medium, calibration effort medium. Measure bandwidth and CPU on your own platform (see the throughput guide).
- Validation and troubleshooting: Place corner reflectors at known range and angle; check detection of a person and a static object; test next to metal.
- Alternative choices: 2D LiDAR (scanning), 3D LiDAR (mechanical, spinning), Non-spinning LiDAR (flash, MEMS, optical phased array, hybrid), FMCW LiDAR, Ultrasonic range sensor, Sonar (underwater acoustic).
Ultrasonic range sensor
- What it measures: Distance to the nearest echoing surface within a cone (time of flight of sound).
- How it is used in robotics: see the application guides for the role in each robot type.
- Practical advantages: Very cheap; detects glass and many surfaces optical sensors miss; Trivial to integrate.
- Practical disadvantages: Wide beam and short range; low resolution; Soft or angled surfaces absorb or deflect the echo; Crosstalk between units; temperature changes speed of sound.
- What it does better than alternatives: Detecting glass and other surfaces optical sensors miss, at very low cost.
- What it cannot reliably measure: Locate an obstacle within its beam angle, or detect soft, thin or steeply angled objects.
- Conditions that degrade it: rain or spray (degraded), dust (degraded).
- Typical failure scenarios: Crosstalk when several units fire together; Echoes from the floor at a steep mount angle; Dead zone at very short range.
- Most suitable applications: supporting roles; see the application guides.
- Datasheet specifications to check: Minimum and maximum range; Beam angle; Update rate and firing scheme; Operating temperature range and compensation; Interface (trigger/echo, UART, I2C).
- How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range metres (up to ~10 m class), best-case accuracy decimetre class, typical update rate about 10s of Hz or less.
- Mounting and placement: Pointed slightly up from the floor; arrange firing order to avoid crosstalk; Keep the body out of the cone.
- Electrical and communication interfaces: typically GPIO trigger/echo, UART, I2C, CAN.
- ROS 2 integration: standard message type sensor_msgs/Range. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
- Calibration and synchronisation: Mounting position; temperature compensation. Backup near-field sensor with LiDAR/camera.
- Compute, power and cost (relative): compute very low, power very low, cost very low, calibration effort very low. Measure bandwidth and CPU on your own platform (see the throughput guide).
- Validation and troubleshooting: Measure flat, soft and angled targets at known distances; check crosstalk with all units firing.
- Alternative choices: 2D LiDAR (scanning), 3D LiDAR (mechanical, spinning), Non-spinning LiDAR (flash, MEMS, optical phased array, hybrid), FMCW LiDAR, Radar (mmWave and automotive-class), Sonar (underwater acoustic).
Wheel / joint encoder
- What it measures: Rotation angle or velocity of a motor, wheel or joint.
- How it is used in robotics: a core sensor for Indoor autonomous mobile robot, Outdoor ground robot, Humanoid robot, Robotic manipulator, Warehouse robot; see the application guides for the role in each robot type.
- Practical advantages: Precise, high-rate proprioception; basis of odometry and joint control; Cheap and immune to the environment.
- Practical disadvantages: Odometry drifts from wheel slip and uncertain wheel radius/track; Measures the wheel, not the ground; Backlash and compliance between encoder and load.
- What it does better than alternatives: Precise, high-rate proprioception that the environment cannot disturb.
- What it cannot reliably measure: Detect slip or knowing where the robot really is.
- Conditions that degrade it: dust (degraded).
- Typical failure scenarios: Wheel slip on loose or wet ground; Count loss from noise or missed edges; Wrong wheel radius or wheel separation.
- Most suitable applications: Indoor autonomous mobile robot, Outdoor ground robot, Humanoid robot, Robotic manipulator, Warehouse robot.
- Datasheet specifications to check: Resolution (counts per revolution) and position accuracy; Absolute vs incremental and the interface (quadrature, SPI/SSI, CAN); Maximum speed and bandwidth; Ingress rating; Mounting: motor shaft vs output shaft.
- How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range does not measure range, best-case accuracy millimetre class, typical update rate about 100 Hz and above.
- Mounting and placement: Mount on the output side if backlash matters; Shield cables; keep quadrature lines away from motor power.
- Electrical and communication interfaces: typically Quadrature, SPI/SSI, CAN, EtherCAT.
- ROS 2 integration: standard message type sensor_msgs/JointState (through ros2_control); derived nav_msgs/Odometry. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
- Calibration and synchronisation: Wheel radius and separation; encoder zero offsets. Encoder + IMU for dead reckoning; fused with LiDAR/GNSS.
- Compute, power and cost (relative): compute very low, power very low, cost very low, calibration effort low. Measure bandwidth and CPU on your own platform (see the throughput guide).
- Validation and troubleshooting: Rotate the wheel a known number of turns and compare counts; drive a straight 10 m line and compare distance; check for missed counts under motor noise.
- Alternative choices: IMU (accelerometer + gyroscope), Barometer / pressure sensor, Magnetometer.
Force/torque sensor
- What it measures: Force and torque vector (six axes) at a joint, wrist or foot.
- How it is used in robotics: a core sensor for Humanoid robot, Robotic manipulator; see the application guides for the role in each robot type.
- Practical advantages: Direct contact-force measurement for compliant and safe interaction; Enables force control, insertion, contact detection.
- Practical disadvantages: Expensive and fragile against overload; Temperature drift and gravity/tool load must be compensated; Cross-coupling between axes.
- What it does better than alternatives: Direct measurement of contact forces and torques.
- What it cannot reliably measure: Distinguish where on the surface contact happens.
- Conditions that degrade it: none of the six common conditions in this guide; check temperature, vibration and electromagnetic interference.
- Typical failure scenarios: Overload damaging the sensor; Drift from temperature; Uncompensated tool weight and cable pull; Bias after remounting.
- Most suitable applications: Humanoid robot, Robotic manipulator.
- Datasheet specifications to check: Force and torque range and overload limit; Resolution and noise; Bandwidth and sample rate; Temperature compensation; Interface and mounting flange.
- How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range does not measure range, best-case accuracy millimetre class, typical update rate about 100 Hz and above.
- Mounting and placement: Between wrist and tool, with cable strain relief; Rigid, with no mechanical interference.
- Electrical and communication interfaces: typically Ethernet, EtherCAT, CAN, analog.
- ROS 2 integration: standard message type geometry_msgs/WrenchStamped. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
- Calibration and synchronisation: Bias (zeroing), tool mass and centre of mass; frame to the tool. Used with joint encoders and impedance/force control.
- Compute, power and cost (relative): compute very low, power very low, cost high, calibration effort medium. Measure bandwidth and CPU on your own platform (see the throughput guide).
- Validation and troubleshooting: Zero and apply known weights; check drift over time and after temperature change; check overload protection.
- Alternative choices: Tactile sensor.
Tactile sensor
- What it measures: Contact location, pressure distribution or slip at a fingertip or skin.
- How it is used in robotics: see the application guides for the role in each robot type.
- Practical advantages: Local contact information that cameras and force sensors miss; Slip and texture detection for dexterous grasping.
- Practical disadvantages: Fragile, wears out, with drift and hysteresis; Few standards; vendor-specific data and drivers; Calibration per unit.
- What it does better than alternatives: Local contact location and slip information at the fingertip.
- What it cannot reliably measure: Measure large forces or contact away from the sensor surface.
- Conditions that degrade it: rain or spray (degraded), dust (degraded).
- Typical failure scenarios: Wear and delamination; Hysteresis and drift; Cable fatigue at the finger.
- Most suitable applications: supporting roles; see the application guides.
- Datasheet specifications to check: Sensing area and spatial resolution; Force range and sensitivity; Bandwidth; Durability and lifetime; Interface and driver.
- How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range does not measure range, best-case accuracy centimetre class, typical update rate about 10s to 100 Hz.
- Mounting and placement: Integrated into fingertips; route cables to avoid flexing damage.
- Electrical and communication interfaces: typically I2C, SPI, USB, vendor bus.
- ROS 2 integration: standard message type vendor-specific. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
- Calibration and synchronisation: Per-sensor calibration against known loads. Tactile + force/torque + vision for manipulation.
- Compute, power and cost (relative): compute low, power very low, cost high, calibration effort high. Measure bandwidth and CPU on your own platform (see the throughput guide).
- Validation and troubleshooting: Press with known forces at known positions; check hysteresis and repeatability.
- Alternative choices: Force/torque sensor.
UWB (ultra-wideband) ranging
- What it measures: Distance to fixed or mobile radio tags (positioning by trilateration with several anchors).
- How it is used in robotics: see the application guides for the role in each robot type.
- Practical advantages: Works indoors and without a camera or LiDAR view; absolute position in a surveyed area; Good for tag or person following.
- Practical disadvantages: Needs infrastructure (anchors) and surveying; Non-line-of-sight and metal degrade accuracy; Anchor geometry controls accuracy.
- What it does better than alternatives: Infrastructure-based indoor positioning without a camera or LiDAR view.
- What it cannot reliably measure: Provide position without anchors in range.
- Conditions that degrade it: none of the six common conditions in this guide; check temperature, vibration and electromagnetic interference.
- Typical failure scenarios: Non-line-of-sight bias; Poor anchor geometry (dilution of precision); Multipath near metal.
- Most suitable applications: supporting roles; see the application guides.
- Datasheet specifications to check: Ranging accuracy and update rate; Range and number of anchors supported; Line-of-sight vs non-line-of-sight performance; Antenna delay calibration; Regulatory approval.
- How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range tens of metres, best-case accuracy centimetre class, typical update rate about 10s to 100 Hz.
- Mounting and placement: Anchors at known surveyed positions and varied heights; Keep antennas free of metal.
- Electrical and communication interfaces: typically SPI, UART, USB.
- ROS 2 integration: standard message type vendor-specific (no standard sensor_msgs type). Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
- Calibration and synchronisation: Anchor survey and antenna delays. UWB + IMU + odometry in GNSS-denied indoor areas.
- Compute, power and cost (relative): compute very low, power very low, cost low, calibration effort low. Measure bandwidth and CPU on your own platform (see the throughput guide).
- Validation and troubleshooting: Survey anchors; measure known points with line of sight and with an obstruction.
- Alternative choices: GNSS (multi-constellation), RTK GNSS, GNSS/INS (integrated unit).
Sonar (underwater acoustic)
- What it measures: Range and echo intensity using sound underwater (single-beam, imaging or scanning).
- How it is used in robotics: a core sensor for Underwater robot; see the application guides for the role in each robot type.
- Practical advantages: Works where light does not: turbid and dark water; Long range compared with underwater optical sensing.
- Practical disadvantages: Low resolution; the image is hard to interpret; Multipath, thermoclines and acoustic noise affect performance; Slow update rates.
- What it does better than alternatives: Sensing in dark, turbid water where light fails.
- What it cannot reliably measure: Give optical-detail imagery; operate in air.
- Conditions that degrade it: none of the six common conditions in this guide; check temperature, vibration and electromagnetic interference.
- Typical failure scenarios: Multipath near the surface or bottom; Acoustic interference from thrusters; Speed-of-sound error from temperature and salinity.
- Most suitable applications: Underwater robot.
- Datasheet specifications to check: Frequency and range; Beam width and resolution; Update rate; Depth rating; Interface and driver.
- How to select it: start from the failure case you must survive and the range, accuracy and rate you need, then compare these against the datasheet at the conditions you will actually run (not the headline figure). Class guidance: typical range tens of metres, best-case accuracy decimetre class, typical update rate about 10s of Hz or less.
- Mounting and placement: Clear acoustic path, away from thrusters; angle to the seabed or target.
- Electrical and communication interfaces: typically Ethernet, serial, RS-485.
- ROS 2 integration: standard message type sensor_msgs/Range or vendor-specific. Check that a maintained ROS 2 driver exists for your distribution (Jazzy) and that it publishes the standard message type, timestamps and covariance; test the driver, not only the sensor.
- Calibration and synchronisation: Speed of sound; mounting angle. Sonar + IMU + depth sensor (+ DVL where used).
- Compute, power and cost (relative): compute medium, power low, cost high, calibration effort medium. Measure bandwidth and CPU on your own platform (see the throughput guide).
- Validation and troubleshooting: Measure a known target at known range in the water you work in; check the speed-of-sound setting.
- Alternative choices: 2D LiDAR (scanning), 3D LiDAR (mechanical, spinning), Non-spinning LiDAR (flash, MEMS, optical phased array, hybrid), FMCW LiDAR, Radar (mmWave and automotive-class), Ultrasonic range sensor.
4. Advantages and disadvantages
- Radar vs LiDAR: radar works in rain and fog and measures velocity but is coarse; LiDAR is fine-grained but weather-limited.
- Ultrasonic: trivial and cheap, wide beam and short range.
- Encoders: excellent but measure the wheel, not the ground.
- Force/torque vs tactile: F/T measures total wrench; tactile measures local contact; both are expensive and fragile.
- UWB: needs anchors and surveying; accuracy depends on geometry.
5. Requirements and constraints
- Regulatory approval for radar and UWB frequency bands in your region.
- Mounting behind materials transparent to the band (radar) or with a clear acoustic path (ultrasonic, sonar).
- Cable strain relief at moving joints (F/T, tactile).
- Interfaces and driver availability: several have vendor-specific messages.
6. Architecture
Each sensor feeds the estimator or controller it supports: radar and ultrasonic into obstacle sensing, encoders into odometry and ros2_control, F/T and tactile into the manipulation controller, UWB and sonar into positioning.
7. Implementation
Turn the choice into a verified decision in five steps:
- Write the requirement as numbers: range, accuracy, rate, environment, failure case to survive.
- Shortlist with the Sensor Selection Calculator; read the cards’ “datasheet specifications to verify”.
- Read the datasheet for each shortlisted model at your operating conditions (target reflectivity, temperature, mode, interface).
- Check the interface, power and ROS 2 driver against the rest of the robot (the throughput and power guides).
- Buy one, test it against the validation step in its entry, and only then standardise.
ROS 2 range, joint and wrench messages: verified facts
Message definitions read from the jazzy branch of ros2/common_interfaces on 2026-11-05. geometry_msgs/WrenchStamped was read from the same branch of the geometry_msgs package.
sensor_msgs/Range: one reading from an active ranger (ultrasound or infrared radiation type), with field_of_view in radians (0 is the sensor x-axis), min_range, max_range and range in metres; values outside min and max are discarded. A fixed-distance (binary) ranger sets min_range = max_range and reports −Inf for a detection and +Inf for none (REP 117). It is not appropriate for laser scanners (use LaserScan).sensor_msgs/JointState: names with position (rad or m), velocity (rad/s or m/s) and effort (N·m or N); all arrays have the same size or are empty.geometry_msgs/WrenchStamped: a header and a wrench (force and torque); the header frame_id gives the reference frame, so the sensor frame must be defined in the ICD.- There is no sensor_msgs type for radar, UWB or tactile arrays in this package; drivers use vendor or other packages’ messages, so check the driver’s message definition.
import math
def read_range(r, lo, hi, fixed=False):
if fixed:
return "detection" if r == -math.inf else "no detection" if r == math.inf else "invalid"
return f"{r:.2f} m" if lo <= r <= hi else "discard (outside min/max)"
print(read_range(1.234, 0.02, 4.0))
print(read_range(5.0, 0.02, 4.0))
print(read_range(-math.inf, 0.3, 0.3, fixed=True))
print(read_range(math.inf, 0.3, 0.3, fixed=True))
js = {"name": ["j1", "j2"], "position": [0.1, 0.2], "velocity": [], "effort": [1.0]}
n = len(js["name"])
print({k: ("ok" if len(v) in (0, n) else f"size {len(v)} != {n}") for k, v in js.items() if k != "name"})Printed (checked by the site’s tests):
1.23 m
discard (outside min/max)
detection
no detection
{'position': 'ok', 'velocity': 'ok', 'effort': 'size 1 != 2'}Reading it: a reading outside min and max is dropped; a binary ranger returns −Inf for a detection and +Inf for none rather than a distance; and a JointState whose effort array has one element for two joints is malformed. Values are illustrative.
8. Real examples
Hospital robot: ultrasonic sensors at the front corners to see glass doors a LiDAR misses.,Rover in rain: radar keeps detecting obstacles when optical sensors degrade.,Arm: wrist force/torque sensor for contact detection; tactile fingertips for slip.9. Failure scenarios
- Radar (mmWave and automotive-class): Ghost objects from multipath.
- Ultrasonic range sensor: Crosstalk when several units fire together.
- Wheel / joint encoder: Wheel slip on loose or wet ground.
- Force/torque sensor: Overload damaging the sensor.
- Tactile sensor: Wear and delamination.
- UWB (ultra-wideband) ranging: Non-line-of-sight bias.
- Sonar (underwater acoustic): Multipath near the surface or bottom.
10. Troubleshooting
- Encoders: drive a known distance and compare; check for missed counts near motor cables.
- Ultrasonic: check crosstalk by firing one at a time.
- Radar: place a corner reflector at known range and angle; check for ghost targets near metal.
- F/T: re-zero and check drift with the tool at rest.
11. Validation
- Radar (mmWave and automotive-class): Place corner reflectors at known range and angle; check detection of a person and a static object; test next to metal.
- Ultrasonic range sensor: Measure flat, soft and angled targets at known distances; check crosstalk with all units firing.
- Wheel / joint encoder: Rotate the wheel a known number of turns and compare counts; drive a straight 10 m line and compare distance; check for missed counts under motor noise.
- Force/torque sensor: Zero and apply known weights; check drift over time and after temperature change; check overload protection.
- Tactile sensor: Press with known forces at known positions; check hysteresis and repeatability.
- UWB (ultra-wideband) ranging: Survey anchors; measure known points with line of sight and with an obstruction.
- Sonar (underwater acoustic): Measure a known target at known range in the water you work in; check the speed-of-sound setting.
12. Engineering checklist
13. Further references
- Class-level guidance written from general engineering knowledge; it contains no product specifications. Product-specific numbers must come from the manufacturer’s datasheet for the exact model and operating mode.
- ROS 2 message types: sensor_msgs (jazzy branch).
- ROS 2 message definitions (Jazzy): ros2/common_interfaces, sensor_msgs/msg, read 2026-11-05.
Related on FixTheRobot
- Complementary Strengths and Weaknesses of Cameras and LiDAR Perception · Lesson