STATERA Library · Series 08 · Volume 08 · Chapter 12 · EN
Source: https://github.com/Statera-Library/08_Vol_08_Robot_Database_and_Storage/blob/main/Chapter_12_Database_Case_Studies/Chapter_12_Database_Case_Studies_EN.md
Volume 08 Robot Database and Storage
12. Database Case Studies
12.01 Indoor AMR Fleet PostgreSQL Operation Case
An indoor Autonomous Mobile Robot (AMR) fleet generates operational data continuously as robots receive missions, navigate through shared spaces, interact with stations, charge batteries, and report faults. PostgreSQL can serve as the central transactional database for this environment because fleet operations require structured relationships, reliable transactions, concurrent access, historical traceability, and consistent state management across many robots and services.
A typical deployment separates real-time robot control from persistent fleet data management. Motion controllers, obstacle avoidance, localization, and emergency responses remain inside the robot or edge computing layer, while PostgreSQL stores information that must survive process restarts and system failures. This includes robot identities, fleet membership, mission definitions, task assignments, charging records, station information, configuration versions, maintenance events, and summarized operational states.
The core relational model usually begins with tables representing robots, missions, tasks, stations, maps, users, and operational events. A robot record can contain a stable robot identifier, model type, software version, current lifecycle state, assigned map, and maintenance status. Mission and task tables reference these records through foreign keys, allowing the database to enforce relationships rather than relying entirely on application code to maintain consistency.
Mission execution illustrates why transaction support is important. When a dispatcher assigns a transport task, several database changes may need to occur together: the task changes from pending to assigned, the selected robot becomes reserved, an assignment record is created, and an operational event is recorded. PostgreSQL transactions allow these modifications to be committed atomically so that a partial application failure does not leave a robot reserved without a corresponding mission.
Concurrency becomes increasingly important as fleet size grows. Multiple scheduling workers, monitoring services, operator interfaces, and robot gateways may attempt to update related records simultaneously. PostgreSQL transaction isolation, row-level locking, constraints, and carefully designed update statements can prevent conflicting assignments. For example, a scheduler can lock an eligible task or robot record while completing an assignment, reducing the possibility that two workers allocate the same resource concurrently.
The database should not receive every high-frequency control signal generated by the robots. Wheel encoder samples, raw LiDAR packets, camera frames, and dense localization streams can overwhelm a transactional database and are generally better handled through dedicated telemetry, time-series, object-storage, or robotics data pipelines. PostgreSQL instead stores operationally meaningful state changes, references to large data objects, aggregated metrics, mission events, and information needed for fleet-level decisions.
Robot state is commonly represented through both current-state and historical-event models. A current-state table provides rapid access to information such as whether a robot is idle, executing a mission, charging, unavailable, or in an error state. A separate event table records transitions with timestamps and contextual information. This combination gives operators a fast fleet overview while preserving enough history to reconstruct what occurred during incidents or performance investigations.
JSONB is useful when AMR data contains structured attributes that vary among robot models or software versions. A conventional relational schema can preserve stable fields such as robot ID, task ID, timestamps, and status, while JSONB stores optional diagnostic parameters, navigation metadata, device-specific configuration, or extended event details. This hybrid approach avoids creating excessive nullable columns while retaining PostgreSQL indexing and query capabilities for frequently accessed JSON attributes.
Indoor AMR systems also depend strongly on spatial information. Robots operate on maps containing stations, charging points, restricted areas, corridors, intersections, elevators, and other operational landmarks. PostgreSQL can maintain map metadata and logical relationships, while PostGIS can extend the database with spatial geometry, coordinate queries, proximity operations, and spatial indexes when geometric processing is required. This connects fleet transactions with the spatial context of robot operations.
Database indexes must reflect actual fleet queries rather than simply indexing every column. Common access patterns include finding pending tasks by priority, retrieving active missions for a robot, examining recent faults, locating robots associated with a map, and reviewing events within a time interval. Composite indexes combining status, robot identifiers, priorities, and timestamps can substantially reduce query cost when their column order corresponds to frequent filtering and sorting patterns.
Operational event tables can become some of the largest relational structures in a long-running fleet. Time-based partitioning provides a practical way to organize mission history, alarms, state transitions, and audit records into manageable ranges. Recent partitions remain readily accessible for operational analysis, while older partitions can be compressed, archived, exported to analytical storage, or retained according to organizational policies without continuously enlarging the active working set.
Connection management becomes another concern when many fleet microservices communicate with PostgreSQL. Robot gateways, schedulers, dashboards, authentication services, monitoring applications, and reporting processes can collectively create more database sessions than expected. A connection pooler such as pgBouncer can reduce connection overhead and stabilize database resource consumption, especially when application instances scale dynamically or frequently establish short-lived database connections.
Maintenance is essential because frequent inserts and updates create dead tuples under PostgreSQL\'s Multi-Version Concurrency Control model. Autovacuum therefore needs to be monitored rather than treated as a background mechanism that never requires attention. Tables containing rapidly changing robot states or task queues may need different vacuum and analyze settings from mostly static map or configuration tables. Accurate statistics are equally important because query planners depend on them when selecting execution strategies.
Reliability architecture should assume that the fleet database can eventually experience hardware, operating-system, network, or database-process failures. PostgreSQL Write-Ahead Logging provides the foundation for durability and recovery, while streaming replication can maintain standby servers. In deployments requiring higher availability, automated failover frameworks can promote a healthy replica when the primary database becomes unavailable, reducing interruption to fleet-management services.
High availability does not eliminate the need for backups. Logical backups can protect selected schemas or configuration information, while physical base backups combined with archived WAL records support Point-in-Time Recovery. A practical AMR operation defines recovery objectives according to business impact and periodically verifies restoration procedures. A backup that has never been restored under controlled conditions should not be considered sufficient evidence that fleet operations can actually be recovered.
Database observability should be integrated with the wider robot operations platform. Administrators need visibility into connection counts, transaction rates, replication lag, lock waits, long-running queries, cache effectiveness, table growth, vacuum behavior, storage utilization, and query latency. These database metrics become more valuable when correlated with fleet indicators such as task throughput, robot availability, charging congestion, mission delays, and dispatch-service errors.
Security requires separation between application responsibilities. A fleet scheduler should receive only the privileges required for task and assignment operations, while monitoring software may need read-only access and administrative functions should use separate protected roles. Authentication, encrypted connections, role-based privileges, audit records, network segmentation, and controlled credential management reduce the possibility that compromise of one robot-facing service provides unrestricted access to the entire operational database.
An important operational principle is that PostgreSQL should represent authoritative fleet business state without becoming part of the robot\'s hard real-time control loop. A robot must remain capable of performing safety-critical responses even when the database or network is temporarily unavailable. Edge software can buffer selected events and synchronize them after connectivity returns, while the fleet system reconciles persistent task and robot states according to explicitly defined recovery rules.
During a network interruption, for example, the server may still regard a robot as executing a mission while the robot has locally completed or aborted it. Reconnection logic should therefore use identifiers, timestamps, mission sequence information, and idempotent updates to determine the valid state. Simply overwriting database records with the most recently received message can create inconsistencies when delayed messages arrive out of order or services retry previously executed operations.
A mature AMR PostgreSQL deployment consequently combines relational modeling, transaction discipline, selective JSONB flexibility, spatial extensions, indexing, partitioning, connection pooling, replication, backup, monitoring, and security. These mechanisms are most effective when database responsibilities are clearly separated from high-frequency sensor storage and deterministic robot control. The result is a persistent operational layer capable of supporting reliable coordination and long-term traceability across an expanding indoor robot fleet.
As the fleet grows from a small installation into multiple operational zones or facilities, database design should evolve through measured workload evidence rather than premature complexity. Query statistics, table growth, transaction contention, recovery tests, and service-level requirements can reveal when additional replicas, partitioning, archival pipelines, or distributed components are justified. PostgreSQL can therefore remain the transactional foundation while specialized storage systems handle data types whose scale or access patterns require different architectures.
12.02 Outdoor AMR HD Map Database Build Case
Outdoor Autonomous Mobile Robots (AMRs) operate across environments where localization, route planning, terrain interpretation, and safety decisions depend on persistent spatial knowledge. An HD map database provides this structured representation by combining geometric, semantic, topological, and operational information. Unlike a simple navigation map, it becomes a shared spatial reference connecting localization, planning, fleet management, monitoring, and long-term autonomous operation.
Building an outdoor AMR HD map begins with establishing a consistent coordinate framework. GNSS observations, LiDAR point clouds, camera measurements, IMU trajectories, wheel odometry, and surveyed landmarks may originate from different coordinate systems. The mapping pipeline must therefore define coordinate reference systems, transformations, origins, and frame relationships explicitly so that every stored spatial object can be interpreted consistently across robots, mapping sessions, and software versions.
The raw mapping layer commonly contains LiDAR scans, images, GNSS measurements, IMU data, and robot poses collected during surveying runs. These high-volume sensor datasets should normally remain in object storage, NAS, or specialized dataset repositories rather than being inserted directly into the relational database. The HD map database stores metadata, spatial indexes, acquisition references, processing status, timestamps, calibration identifiers, and links to the corresponding raw or processed files.
PostgreSQL with PostGIS can form the central structured database for an outdoor HD map system. PostgreSQL manages transactional consistency, metadata relationships, version information, and operational records, while PostGIS adds geometry types, coordinate reference system support, spatial functions, and spatial indexing. Together they allow map entities such as roads, lanes, boundaries, intersections, landmarks, charging locations, restricted zones, and operational areas to be represented as queryable spatial objects.
An HD map should separate geometric representation from semantic meaning. Geometry describes where an object exists through points, lines, polygons, or other spatial structures, while semantic attributes describe what the object means to the robot. A polygon may represent a drivable area, restricted region, loading zone, or charging area, while a line may represent a lane centerline, boundary, preferred route, or virtual safety constraint used by navigation software.
Topological information complements geometric information by describing connectivity. Outdoor AMRs need to understand not only where road segments are located but also how they connect and which transitions are operationally valid. Nodes can represent intersections, gates, stations, or decision points, while edges represent traversable connections. Attributes such as direction, maximum speed, vehicle class, terrain condition, and access restrictions can be associated with these graph elements.
Spatial indexing becomes essential as map coverage and object count increase. PostGIS commonly supports GiST and SP-GiST indexing strategies that accelerate spatial filtering and relationship queries. Instead of scanning every map feature, the database can rapidly identify objects intersecting a robot\'s operating region, landmarks within a defined distance, route segments near the current position, or restricted zones overlapping a planned trajectory. Index design should reflect actual navigation and fleet query patterns.
Outdoor operation introduces terrain properties that may not appear in conventional road maps. The database can associate traversable regions or route segments with slope, surface type, roughness, clearance requirements, expected traction, obstacle characteristics, and environmental constraints. These attributes allow planners to distinguish between geometrically possible paths and paths that are appropriate for a particular AMR\'s dimensions, payload, suspension capability, or operational mission.
GNSS-based localization can also be supported through map landmarks and reference information. Surveyed points, RTK reference coordinates, fiducial landmarks, LiDAR features, building boundaries, and other stable environmental references can be stored with accuracy or provenance metadata. Localization software can retrieve the appropriate reference features for a region while the database maintains information about when, how, and with which mapping process each reference was created.
Map versioning is critical because outdoor environments change over time. Construction work, relocated barriers, modified traffic routes, newly installed facilities, vegetation, or operational policy changes can invalidate existing map information. Each map release should therefore have an explicit version, creation time, validation state, geographic coverage, and relationship to previous versions. Robots must be able to determine which approved map version applies to their current operating area.
Updates should distinguish between temporary conditions and persistent map changes. A parked vehicle, temporary work zone, or short-term obstruction should not automatically rewrite the authoritative HD map. Such conditions can be represented as dynamic operational overlays with expiration times or confidence values. Persistent modifications can enter a controlled mapping and validation workflow before becoming part of the next authoritative map version distributed to the fleet.
A practical map-building pipeline moves data through several stages. Sensor recordings are first collected and registered, after which localization trajectories and point clouds are aligned. Relevant geometric features are extracted, semantic attributes are assigned, and topology is constructed. The resulting map objects are validated before publication. Database records can track this lifecycle so that draft, reviewed, approved, deployed, deprecated, and archived map states remain distinguishable.
Quality management requires more than verifying that spatial objects exist in the database. Map validation should examine coordinate consistency, geometry validity, topology connectivity, duplicate features, missing attributes, discontinuities, and relationships between overlapping objects. Operational tests can additionally verify whether generated routes are traversable and whether localization remains stable. Validation results should be associated with specific map versions so that deployment decisions remain traceable.
Map provenance provides another important layer of traceability. Each feature or map region can retain references to its source survey, acquisition date, processing software, calibration configuration, operator, automated extraction process, and validation result. When an unexpected navigation problem occurs, engineers can determine whether the relevant information came from an outdated survey, incorrect transformation, failed extraction process, or later manual modification.
Large outdoor deployments benefit from dividing maps into manageable geographic regions or tiles. Robots rarely require an entire facility or campus map simultaneously, so regional organization reduces transfer size and query workload. A database can maintain tile boundaries, map-layer identifiers, versions, and dependencies while object storage contains larger raster, point-cloud, or binary map artifacts. Robots then retrieve only the spatial resources needed for their current or anticipated operating region.
The HD map database should also integrate with mission and fleet systems. A mission may reference pickup and delivery stations, permitted operating zones, route classes, or geographic restrictions stored in the map database. Fleet services can query whether a robot is compatible with a particular route based on width, payload, terrain, access policy, or other constraints. Spatial information consequently becomes part of operational task allocation rather than remaining an isolated mapping resource.
Database transactions are valuable when publishing map updates because related spatial objects must remain mutually consistent. Changing a route may require simultaneous modifications to lane geometry, connectivity, speed constraints, and operational metadata. Transactional updates prevent clients from observing partially updated map states. For larger releases, a complete candidate version can be validated separately and activated only after all required consistency checks have succeeded.
Security and governance are important because unauthorized map modifications can directly affect robot behavior. Read and write privileges should therefore be separated among robots, fleet applications, mapping engineers, validation services, and administrators. Production robots generally require approved read access, while map modification should pass through controlled roles and workflows. Audit records can identify who changed map information, when the change occurred, and which map release incorporated it.
Availability requirements depend on how robots consume maps. Frequently used map regions may be cached on the robot or edge server so temporary database or network failures do not immediately stop autonomous operation. PostgreSQL replication and backup protect the authoritative metadata repository, while object-storage replication protects larger map artifacts. Local caching and version identifiers allow operation to continue using the last validated map until connectivity is restored.
Monitoring should cover both database health and map quality. Database metrics include query latency, connection utilization, storage growth, index efficiency, replication lag, and backup status. Map-oriented metrics include feature counts, geographic coverage, update frequency, validation failures, outdated regions, and deployed map versions. Combining these perspectives helps operators distinguish infrastructure problems from errors in the spatial information consumed by autonomous robots.
As an outdoor AMR deployment expands, the HD map database evolves from a navigation support component into a shared spatial knowledge layer. PostgreSQL and PostGIS can maintain authoritative structured geometry, semantics, topology, versions, and operational relationships, while object storage handles large point clouds, images, and map artifacts. This separation allows each storage technology to manage the data type for which it is best suited while preserving a consistent spatial reference.
A mature implementation ultimately treats the HD map as a governed, versioned, and continuously validated operational asset rather than a static file generated once during commissioning. Sensor surveys, database transactions, spatial indexing, semantic layers, topology, provenance, validation, caching, and controlled deployment form one lifecycle. Through this architecture, outdoor AMRs can share reliable spatial knowledge while adapting systematically to changing environments and expanding operational areas.
12.03 Manipulator Task History MongoDB Storage Case
Industrial manipulators generate a detailed operational history whenever they execute pick-and-place, assembly, inspection, packaging, machine-tending, or material-handling tasks. Unlike highly normalized business records, manipulator task data often contains variable structures describing robot states, trajectories, tool conditions, object information, perception results, execution parameters, and failure diagnostics. MongoDB provides a flexible document-oriented model suitable for storing this heterogeneous task history.
A practical storage architecture separates real-time robot control from historical task persistence. Joint servo control, trajectory interpolation, collision response, force control, and emergency functions remain inside the robot controller or edge control system. MongoDB receives task-level information after or during execution through an application or data pipeline, preserving records needed for traceability, production analysis, debugging, maintenance, and future AI-based optimization without becoming part of the deterministic control loop.
The central data object can be modeled as a task execution document. Each document may contain a task identifier, robot identifier, workcell identifier, task type, start and completion timestamps, execution result, software version, recipe version, and operator or production context. Nested structures can then represent motion stages, manipulated objects, tools, perception outputs, quality results, and errors while keeping all information associated with one execution logically grouped.
MongoDB\'s embedded document model is useful because manipulator tasks naturally form hierarchical structures. A single assembly operation may contain approach, grasp, transfer, insertion, verification, and retreat stages. Each stage can contain its own timestamps, target pose, actual pose, velocity parameters, force thresholds, execution result, and diagnostic information. Embedding these elements within one task document allows engineers to retrieve the complete execution context without reconstructing it from numerous relational tables.
Not every task requires the same attributes. A vacuum-gripper operation may record suction pressure and vacuum detection status, while an electric gripper records finger position, gripping force, and motor current. Welding, dispensing, fastening, or inspection tools introduce additional parameters. MongoDB permits these task-specific structures to coexist within the same collection while common identifiers and timestamps remain consistent across the overall operational history.
Robot motion information requires careful storage granularity. Storing every high-frequency joint position, torque, velocity, and Cartesian pose sample directly as ordinary MongoDB documents can create unnecessary database volume and write pressure. The task document should normally retain important trajectory summaries, commanded poses, critical waypoints, execution statistics, and references to detailed time-series or binary data stored in systems optimized for high-rate signals.
Perception information can also be represented as nested task context. A manipulation task may include detected object classes, object identifiers, estimated six-degree-of-freedom poses, confidence values, grasp candidates, selected grasp poses, and inspection results. Storing these outputs together with the executed robot action makes it possible to investigate whether a failure originated from perception, planning, grasp selection, motion execution, tooling, or interaction with the physical environment.
Task history becomes particularly valuable when failures occur. A failure document can preserve the execution stage, error code, controller message, retry count, robot state, tool state, object information, relevant sensor summaries, and recovery action. Rather than storing only a final status such as failed, the database should retain sufficient context to reconstruct the sequence leading to the event and compare it with successful executions of the same task.
MongoDB indexes should be designed around operational queries. Engineers commonly search task histories by robot ID, workcell, task type, execution result, error code, product identifier, or time range. Compound indexes combining robot identifiers, timestamps, and task status can accelerate frequently repeated investigations. Indexes should remain selective because excessive indexing increases storage requirements and adds write overhead to a database receiving continuous production records.
Time is a fundamental dimension of manipulator history. Every task should use a consistent timestamp policy so that records from robot controllers, vision systems, edge computers, and factory applications can be correlated. Start time, completion time, stage timestamps, and event times provide a common execution timeline. Where multiple computing systems participate, clock synchronization and explicit timestamp provenance become important for reconstructing the true order of closely spaced events.
Large binary artifacts should normally remain outside MongoDB task documents. Camera images, depth maps, point clouds, robot bag files, video, detailed force traces, and other large data objects can be stored in NAS or object storage. MongoDB then records object identifiers, storage locations, checksums, timestamps, acquisition context, and metadata. This keeps operational queries responsive while preserving a traceable connection between task records and supporting evidence.
Task documents should also preserve configuration provenance. Manipulator behavior can change when robot programs, motion parameters, tool calibration, perception models, grasp policies, or workcell configurations are updated. Recording software versions, model versions, calibration identifiers, recipe revisions, and configuration hashes allows engineers to determine exactly which system configuration produced a particular task result and compare performance before and after changes.
Schema flexibility does not mean that schema governance can be ignored. Uncontrolled field naming, inconsistent units, changing data types, or undocumented nested structures can make historical analysis difficult. A production MongoDB design should define stable naming conventions, required identifiers, timestamp formats, coordinate-frame conventions, physical units, and document version fields. Application-level validation or MongoDB schema validation can enforce essential rules while retaining flexibility for task-specific extensions.
Aggregation pipelines provide a useful mechanism for analyzing manipulator operations directly from stored documents. Task records can be grouped by robot, task type, product, shift, failure category, or software version to calculate execution counts, success rates, cycle-time distributions, retry frequencies, and error patterns. These results can support production dashboards and engineering investigations without requiring every analytical question to be implemented as a separate transactional data model.
Historical data can also support predictive maintenance. Repeated increases in cycle time, motor load summaries, gripping retries, force anomalies, tool errors, or calibration corrections may indicate gradual degradation. MongoDB can retain the task context surrounding these indicators, allowing maintenance systems or analytical pipelines to correlate mechanical symptoms with particular robots, joints, end effectors, products, or operating conditions rather than examining isolated alarm messages.
Replica sets can improve availability when the task-history database is operationally important. MongoDB replication maintains copies of data across multiple nodes and supports failover when the primary node becomes unavailable. This protects the persistence service from a single database-node failure, although robot controllers should still continue safe local behavior when database connectivity is interrupted. Historical recording must never become a dependency for emergency or deterministic motion control.
Sharding can be considered when task history grows beyond the practical capacity or throughput of a single replica set. Suitable shard-key selection depends on access patterns and data distribution, and a poorly selected key can create hotspots. Robot identifiers, time components, or carefully constructed compound strategies may be evaluated using measured workloads. Sharding should therefore be introduced because demonstrated scale requires it rather than as an automatic feature of the initial architecture.
Retention policies should distinguish operationally active history from long-term archives. Recent task documents may remain online for rapid troubleshooting and production analysis, while older records can be exported to a data lake or archival object storage. High-value failure cases, validation datasets, or records associated with safety and quality investigations may require longer retention than routine successful operations, depending on organizational and regulatory requirements.
Security requires separation of application privileges. Robot gateways may require permission to insert task records, production dashboards may require read access, analytics services may need aggregation privileges, and database administrators require separate management roles. Authentication, encrypted communication, network segmentation, credential management, role-based authorization, and audit logging reduce the risk that a compromised robot-facing service can alter or extract unrestricted historical information.
Observability should monitor both MongoDB infrastructure and the task-ingestion pipeline. Useful indicators include operation latency, write throughput, connection utilization, replication lag, storage growth, index usage, cache behavior, failed writes, and ingestion backlog. These database measurements should be correlated with manipulator metrics such as task throughput, cycle time, failure frequency, retry rate, and robot availability to determine whether production anomalies originate from robotics or data infrastructure.
The resulting architecture treats MongoDB as a flexible operational history repository rather than a substitute for every robot data store. Deterministic control remains on the robot, high-frequency signals and large artifacts use specialized storage, and MongoDB maintains task-oriented documents that connect execution context, perception, tooling, results, diagnostics, and configuration provenance. This division preserves query flexibility without forcing fundamentally different robot data types into a single persistence technology.
As manipulator fleets and Physical AI applications evolve, accumulated task histories can become valuable training and evaluation resources. Successful and failed executions can be selected using metadata queries, linked with sensor artifacts, transformed into learning datasets, and compared across software or policy versions. A well-governed MongoDB task history therefore supports not only production traceability but also the transition from conventional robot operation toward data-driven optimization and learning-based manipulation.
12.04 Robot Telemetry TimescaleDB Operation Case
Robot telemetry represents the continuous stream of time-stamped measurements describing the condition, behavior, and performance of a robotic system. Mobile robots, manipulators, autonomous vehicles, and Physical AI platforms can generate battery voltage, current, temperature, motor speed, torque, CPU and GPU utilization, network status, localization quality, velocity, mission state, and fault information. TimescaleDB provides a PostgreSQL-based time-series architecture for storing and analyzing this operational data.
A practical telemetry architecture separates deterministic robot control from telemetry persistence. Motor control, localization, obstacle avoidance, safety functions, and other latency-sensitive processes remain within the robot or edge computing environment. Telemetry collectors observe selected signals and asynchronously transmit them to the storage infrastructure. Consequently, temporary database or network failures should affect monitoring visibility rather than interrupt the robot\'s safety-critical control functions.
Telemetry data is fundamentally organized around time. Each record normally contains a timestamp together with identifiers such as robot ID, device ID, subsystem, sensor type, or operational context. Measurements can then contain values such as battery state of charge, motor temperature, velocity, CPU load, localization confidence, or communication latency. Consistent timestamps allow measurements originating from different robot subsystems to be correlated along a common operational timeline.
TimescaleDB extends PostgreSQL with capabilities designed for time-series workloads while preserving SQL and the PostgreSQL ecosystem. Robot telemetry can therefore coexist with relational metadata describing robots, models, fleets, missions, and facilities. Engineers can use familiar SQL operations while applying time-oriented storage and query mechanisms to continuously growing measurements, avoiding the need to separate operational metadata and time-series analysis into completely unrelated database environments.
A central TimescaleDB concept is the hypertable, which presents time-series information as a logical table while internally partitioning it into smaller chunks. Robot telemetry can be organized primarily by timestamp and, where appropriate, additional dimensions such as robot identity. New measurements are directed to relevant chunks automatically, allowing the database to manage continuously growing histories more efficiently than an unmanaged conventional table containing all telemetry records.
Telemetry ingestion should use a defined data model rather than accepting arbitrary signals without governance. Stable fields can identify timestamp, robot, subsystem, metric name, unit, and quality status, while measurement-specific values represent actual observations. Alternatively, frequently used telemetry categories can use dedicated tables with strongly typed columns. The appropriate design depends on signal diversity, query patterns, ingestion rate, and the degree of schema consistency required by the robot platform.
Sampling frequency has a direct impact on database scale. A fleet containing many robots can produce enormous record counts when every internal signal is transmitted at controller frequency. Telemetry architecture should therefore distinguish high-rate control data from operational monitoring data. Millisecond-level raw signals may remain in local files, MCAP, object storage, or specialized recording systems, while TimescaleDB receives downsampled, event-driven, or operationally meaningful measurements.
Batch insertion can improve ingestion efficiency when individual measurements do not require immediate persistence. An edge telemetry agent may temporarily buffer multiple samples and transmit them together, reducing transaction and network overhead. Buffering also supports intermittent connectivity because measurements can remain locally queued until communication returns. Each sample must retain its original acquisition timestamp so delayed transmission does not distort the historical sequence of robot behavior.
Time synchronization is essential when telemetry from multiple computers must be correlated. A robot may contain motor controllers, embedded computers, GPU systems, perception devices, and external fleet servers with independent clocks. Without synchronized time, an apparent relationship between localization loss, motor response, network delay, and safety events may be misleading. Telemetry records should therefore preserve acquisition time and, where necessary, information describing timestamp source or synchronization quality.
Indexes should correspond to the queries used by operators and engineers. Typical investigations retrieve measurements for a particular robot over a time interval, compare a metric across several robots, or examine subsystem behavior around a fault. Time-based organization combined with robot or device identifiers supports these access patterns. Excessive secondary indexing should be avoided because every additional index consumes storage and increases the cost of continuously inserting new telemetry records.
TimescaleDB continuous aggregates can transform high-resolution telemetry into operational summaries. Raw measurements collected every few seconds can be summarized into minute, hourly, or daily statistics such as average temperature, maximum motor current, battery consumption, network latency, or localization quality. Dashboards can query these precomputed summaries instead of repeatedly scanning large raw histories, improving responsiveness while preserving detailed data for investigations that require it.
Retention policies provide a systematic method for controlling long-term storage growth. High-resolution telemetry may be useful only for recent troubleshooting, while aggregated statistics can remain valuable for months or years. A system can therefore retain detailed measurements for a defined period and preserve lower-resolution summaries for longer-term analysis. Important fault windows or validation campaigns can be exported separately when engineering or compliance requirements demand extended retention.
Compression further reduces the storage cost of historical time-series information. Older telemetry chunks that are no longer receiving frequent updates can be compressed while recent chunks remain optimized for ingestion. Robot telemetry often contains repeated identifiers and measurements with temporal regularity, making historical data suitable for compression. The storage policy should balance compression efficiency, query requirements, retention duration, and the computational cost of accessing older information.
Operational dashboards are one of the primary consumers of telemetry. Fleet operators may need to observe robot availability, battery condition, charging status, temperatures, communication health, localization quality, mission progress, and active faults. Visualization systems can query TimescaleDB directly or through application services. Current measurements provide immediate fleet awareness, while historical queries allow operators to determine whether an abnormal condition appeared suddenly or developed gradually.
Telemetry is particularly useful for failure investigation because measurements from multiple subsystems can be aligned around an incident timestamp. Engineers can inspect battery voltage, motor current, CPU utilization, localization confidence, network latency, velocity, and temperature immediately before and after a fault. This temporal correlation can reveal whether an event was isolated or whether several indicators changed together, providing evidence for root-cause analysis rather than relying only on final error codes.
Long-term telemetry can also support predictive maintenance. Gradual increases in motor temperature, current consumption, vibration indicators, charging duration, or repeated communication errors may reveal degradation before a complete failure occurs. Analytical applications can calculate trends and compare similar robots under comparable workloads. TimescaleDB supplies the historical time-series foundation, while statistical or machine-learning systems perform higher-level anomaly detection and remaining-life analysis.
Robot telemetry becomes more informative when correlated with mission and operational metadata. A high motor temperature may have different meaning depending on payload, route, terrain, speed, or mission duration. Because TimescaleDB integrates with PostgreSQL, telemetry measurements can be associated with relational information describing robots, tasks, maps, facilities, and software versions. This combination supports analysis of not only what changed, but also under which operational conditions the change occurred.
Large binary sensor artifacts should remain outside the telemetry database. Camera recordings, LiDAR point clouds, raw audio, detailed ROS bags, MCAP files, and long high-frequency traces can be stored in NAS, object storage, or data lakes. TimescaleDB can retain timestamps, identifiers, event markers, checksums, and storage references that connect numerical telemetry with these artifacts, enabling engineers to locate detailed evidence associated with a particular time interval or failure.
High availability becomes important when telemetry supports production monitoring across a large robot fleet. PostgreSQL replication and appropriate high-availability mechanisms can reduce interruption caused by database-node failures. However, the robot itself should continue safe operation when telemetry infrastructure is unavailable. Edge buffering and retry mechanisms can preserve measurements during temporary outages, after which delayed records can be inserted using their original timestamps when connectivity is restored.
Security should separate telemetry producers, consumers, and administrators. Robot gateways may require write privileges, dashboards primarily require read access, analytics services may require broader historical queries, and administrators require controlled management permissions. Authentication, encrypted connections, role-based access control, network segmentation, and audit logging protect operational information while reducing the consequences of compromised robot-facing or monitoring services.
Database observability must monitor the telemetry platform itself. Important indicators include ingestion rate, query latency, connection utilization, chunk growth, disk consumption, replication lag, compression status, retention jobs, continuous aggregate refresh behavior, and failed inserts. These infrastructure metrics should be compared with expected fleet telemetry rates so that database saturation, communication problems, and genuine robot behavior changes are not confused with one another.
Scaling should be driven by measured workload characteristics such as fleet size, signal count, sampling rate, retention period, query concurrency, and aggregate complexity. Early deployments may operate effectively on a single well-designed TimescaleDB instance, while larger fleets may require additional storage resources, replicas, distributed processing, or archival pipelines. Capacity planning should therefore begin with an explicit calculation of telemetry volume rather than relying only on robot count.
A mature architecture treats TimescaleDB as the time-oriented operational memory of the robot fleet rather than as a universal repository for every generated byte. High-frequency control remains at the edge, large artifacts use object-oriented storage, relational systems preserve business and configuration context, and TimescaleDB maintains queryable numerical history. Clear boundaries among these storage responsibilities improve performance, reliability, scalability, and long-term data governance.
When combined with dashboards, alerting, fleet management, maintenance analytics, and AI pipelines, robot telemetry evolves from passive logging into an operational intelligence resource. Time-series history can explain failures, quantify fleet performance, identify degradation, compare software releases, and provide evidence for optimization. TimescaleDB therefore acts as a bridge between real-time robot operation and long-term data-driven improvement across increasingly large and heterogeneous robotic fleets.
12.05 Physical AI Training Dataset MCAP / MinIO Case
Physical AI training requires datasets that preserve not only images or individual sensor samples but also synchronized sequences describing perception, robot state, actions, environment context, and task outcomes. A practical storage architecture can combine MCAP as the multimodal recording format with MinIO as scalable object storage. MCAP organizes temporally aligned robot streams, while MinIO prov...
![Robot Database and Storage — Ch.12: Database Case Studies [EN]](https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fwgbhbwc9e027ebzuvzk5.png)



