A Careful Control Loop
What sensors provide and what they cost is one lens on sensors, perception hardware, and state estimation. We study it because an embodied agent needs decisions that survive contact with noisy sensors, delayed effects, and changing environments.
This section develops the technical contract for What sensors provide and what they cost into a usable mental model. First we define the object of study, then we connect it to the agent loop, then we test it with a compact implementation.
The key question in What sensors provide and what they cost is practical: what must the agent know, what can it observe, what action is available, and what evidence shows that the action worked under the stated conditions?
A representation earns its place when it changes the measurable action interface. In What sensors provide and what they cost, the reader should keep asking which decision becomes easier, safer, or more reliable.
Theory
For What sensors provide and what they cost, the practical design rule is to make the interface inspectable before optimization begins: inputs, outputs, units, latency, bounds, and failure labels should all be visible in the saved artifact.
The mechanism in What sensors provide and what they cost is the contract between representation and action. Name what enters the module, what leaves it, which assumptions make that transformation valid, and which log would reveal a bad handoff.
Worked Example: Noise, Quantization, and SNR
Every sensor reading is signal plus corruption. Two corruptions dominate. The first is additive Gaussian noise: thermal and electronic effects perturb each reading by a zero-mean draw with standard deviation $\sigma$, so a reading of a true value $s$ is $z = s + v$ with $v \sim \mathcal{N}(0, \sigma^2)$. The second is quantization: the analog-to-digital converter rounds the reading to the nearest step $q$, which adds an error bounded by $q/2$ and (for fine steps) behaves like uniform noise with variance $q^2/12$. A standard summary of how badly noise corrupts a reading is the signal-to-noise ratio, in decibels $\text{SNR}_{\text{dB}} = 10\log_{10}(P_{\text{signal}}/P_{\text{noise}})$, where the powers are mean-square values. Higher is better; a 40 dB sensor has roughly 100 times more signal power than noise power.
# Simulate noisy, quantized readings of a fixed range target, then estimate SNR.
import numpy as np
rng = np.random.default_rng(0)
true_distance = 2.000 # meters, a static target
sigma = 0.02 # 2 cm Gaussian sensor noise (1 sigma)
quantum = 0.01 # 1 cm ADC quantization step
analog = true_distance + rng.normal(0.0, sigma, size=1000)
readings = np.round(analog / quantum) * quantum # quantization
bias = readings.mean() - true_distance
noise_std = readings.std()
signal_power = true_distance ** 2
noise_power = noise_std ** 2
snr_db = 10.0 * np.log10(signal_power / noise_power)
print(f"empirical bias = {bias*1000:+.2f} mm")
print(f"empirical sigma = {noise_std*1000:.2f} mm")
print(f"SNR = {snr_db:.1f} dB")
The runnable fragment should expose one measurement with units, timestamp, frame, covariance, and consumer. OpenCV, ROS 2 bags, robot_localization, and vendor SDKs become useful when this measurement contract is explicit.
Practical Recipe
- Write the observation, action, and success metric before choosing a model.
- Build a baseline that is simple enough to debug by inspection.
- Add the library implementation only after the baseline behavior is understood.
- Record failures as structured cases: perception error, state error, planning error, control error, or evaluation error.
- Run at least one perturbation test before trusting the result.
The common mistake in What sensors provide and what they cost is to celebrate the component score before checking the closed-loop handoff. The failure usually appears at the boundary: stale state, wrong frame, delayed action, saturated actuator, or metric that ignores the real task cost.
A robotics team using What sensors provide and what they cost should log not only final success, but intermediate observations, chosen actions, controller status, and recovery events. The logs reveal whether the method is solving the task or merely passing the easiest episodes.
When what sensors provide and what they cost feels abstract, ask what would be different in the next frame of video, the next robot state, or the next safety margin.
For What sensors provide and what they cost, treat frontier claims as hypotheses until they expose enough detail to reproduce the result: data boundary, embodiment, controller interface, evaluation panel, and failure cases.
Can you name the observation, state estimate, action, success metric, and most likely failure mode for What sensors provide and what they cost? If not, the system boundary is still too vague.
Production Pattern
What sensors provide and what they cost sits inside the Part II robotics contract: geometry defines where things are, kinematics defines what motion is possible, dynamics defines what motion costs, control defines how errors are corrected, and sensing defines what the agent can know on time.
Every sensor has a cost profile: money, bandwidth, latency, calibration burden, failure mode, and compute. This makes the section useful to students, builders, and researchers at the same time: the idea has an intuitive role, a formal interface, a runnable check, and a failure mode that can be reproduced.
For What sensors provide and what they cost, state estimation converts imperfect observations into a belief usable by control. Preserve calibration, covariance, timestamp, frame, dropout behavior, and latency.
| Tool or Library | What It Handles | Verification Check |
|---|---|---|
| OpenCV | handles camera models, calibration, projection, and vision preprocessing | Verify intrinsics, distortion, image timestamp, and frame-to-camera transform. |
| ROS 2 robot_localization | fuses odometry, IMU, GPS, pose, and twist streams through ROS estimation nodes | Verify covariance, frame IDs, timestamps, and rejected measurement counts. |
| FilterPy | teaches and prototypes Kalman, extended Kalman, unscented, and particle filters | Verify process noise, measurement noise, innovation, and covariance growth. |
| Kalibr | supports practical work on What sensors provide and what they cost | Verify the library output against the hand-built baseline on one small case. |
| Open3D | supports practical work on What sensors provide and what they cost | Verify the library output against the hand-built baseline on one small case. |
Use this recipe when turning What sensors provide and what they cost into code, a simulator experiment, or a robot diagnostic. The point is not to use every library. The point is to keep the hand-built baseline and the maintained-tool path comparable.
- Define each sensor message with units, frame, timestamp source, calibration file, and covariance meaning.
- Run a static test, a slow-motion test, and a dropout test before fusing streams.
- Compare the hand filter with FilterPy or ROS 2 robot_localization using identical measurements and noise settings.
- Log innovation, covariance, delayed messages, rejected measurements, and downstream control effect.
- Treat perception output as a belief with uncertainty, not as ground truth handed to the controller.
For What sensors provide and what they cost, compare methods only through one saved artifact that preserves the inputs, outputs, units, timestamps, latency budget, configuration, seed, metric definition, and failure labels relevant to this section. The comparison is meaningful only when the same script evaluates the same panel.
Extend the section exercise by adding one perturbation specific to What sensors provide and what they cost and one latency or uncertainty check. Save the result in the EvidenceRecord schema, then explain which library output you trust and why.
A sensor choice is a budget trade: field of view, range, bandwidth, latency, noise, power, calibration burden, and failure mode. Before changing a planner, verify that the chosen sensors can observe the state variable the planner is expected to use.
Technical Core
What sensors provide and what they cost is the sensor-selection contract for the rest of the chapter. A sensor does not merely add data. It changes what state can be estimated, how quickly the estimate arrives, how much uncertainty remains, and what maintenance burden the robot inherits. Figure 8.1.T summarizes the chain this section must preserve when moving from a teaching example to a real embodied system.
A useful first model is $z_t=h(x_t,\theta,c_t)+v_t$, with latency $\ell_t=t_{\text{available}}-t_{\text{exposure}}$ and cost vector $c=(\text{price},\text{bandwidth},\text{power},\text{compute},\text{calibration})$. Here $x_t$ is the world state, $\theta$ is calibration, $c_t$ is context such as lighting or contact, and $v_t$ is sensor noise. The design question is whether the reduced posterior uncertainty is worth the added latency and operational cost.
- Name the state variable the sensor observes directly, indirectly, or not at all.
- Write the measurement model, units, frame, timestamp source, and calibration parameters.
- Estimate the noise, dropout, latency, bandwidth, power, and compute budget before integration.
- Run one closed-loop task with and without the sensor, using the same metric and the same episodes.
- Keep the sensor only if it improves a named action decision under realistic perturbations.
| Contract Field | What To Specify | Why It Matters |
|---|---|---|
| Observed quantity | Position, velocity, contact, surface normal, temperature, force, or semantic class. | Separates useful observability from more raw data. |
| Hidden assumption | Lighting, reflectivity, wheel traction, texture, contact patch, or rigid mounting. | Names the environmental condition that can invalidate the measurement. |
| Timing cost | Exposure time, transport delay, processing time, update rate, and jitter. | A precise measurement that arrives too late can destabilize a controller. |
| Operational cost | Power, heat, bandwidth, calibration time, cleaning, and replacement risk. | Turns sensor choice into a system design decision rather than a shopping list. |
| Diagnostic evidence | Before-and-after task trace, innovation plot, latency histogram, and failure labels. | Shows whether the sensor changed the robot's decision, not only the perception score. |
Expected output is a decision trace that changes only when the new sensor reduces uncertainty in a decision-relevant variable. If success improves but latency also rises, inspect whether the controller still has enough time margin to use the new estimate safely.
A sensor choice fails when it improves an offline perception score while making the closed-loop action later, heavier, harder to calibrate, or less robust under the perturbation that motivated it.
Section References
Core references for What sensors provide and what they cost: Modern Robotics; Murray, Li, and Sastry; Siciliano et al.; LaValle; and official documentation for Drake, MuJoCo, Pinocchio, CasADi, python-control, GTSAM, ROS 2, and OpenCV as applicable.
Use these references to check notation, frame conventions, units, solver assumptions, and maintained-library behavior.
What sensors provide and what they cost is useful when it makes the perception-action loop more reliable, not when it merely adds a more impressive model name.
Design a method-matched experiment for What sensors provide and what they cost. Specify the environment, observations, actions, metric, one perturbation, and the library output you would compare against the hand-built baseline.