Skip to main content

Data QC

Data QC scans the structured report of each MCAP recording against rules, returns a pass or fail verdict for the dataset, and aggregates the conclusion on the dataset. Rules come in two levels, project and global. A verdict can be overridden manually, and the conclusion drives system tags and export blocking.

Data QC targets ROS recordings, currently MCAP.

Prerequisites​

ItemDetails
Menu entryData → Quality Control
RoutesRule list /qc/rules; run logs /qc/logs; dataset QC detail /qc/dataset/{id}
Required permissionView QC
Related permissionsRun QC (writes back the run result), QC Rule Management, Dataset Compute / Preprocess (manual QC from the dataset side)
DependenciesThe dataset is MCAP; the algorithm selected by a rule is registered and declares a non-empty metric schema
Effective rulesAdministrators are exempt from module permissions; other roles follow the default role template, and a user-level override takes precedence over the role default

Module permissions are configured as described in Module Permissions. Default module levels by role:

RoleView QCRun QCQC Rule Management
Project ManagerRead OnlyRead & writeRead & write
CollectorRead OnlyRead & writeDeny
AnnotatorDenyDenyDeny
AuditorDenyDenyDeny

Rules and Metrics​

Roles and Rule Maintenance Scope​

OperationAdministratorProject ManagerOther roles
View rules and run logsAllowedAllowed, limited to the project data scopeRequires View QC
Maintain project rulesAllowedAllowed, limited to own projectsDeny
Maintain global rulesAllowedDenyDeny
Override run resultsAllowedAllowed, limited to datasets in own projectsDeny

Only administrators can create, edit, delete, and copy global rules. Non-administrators can see global rules in the list but cannot modify them.

QC Rules​

A rule binds one QC algorithm, one scope, and a set of assertions.

QC rule list

FieldTypeRequiredDefaultValuesNotes
Rule NameTextYes—Up to 200 charactersRule identifier
Rule descriptionTextNoEmptyUp to 500 charactersNote on the rule's purpose
ScopeOptionYesProjectGlobal, ProjectA global rule applies to MCAP data platform-wide; a project rule applies only to the selected project
Match data nameTextNo*glob, supports * and ?Matches the dataset name; leave empty to cover all data names in the scope
QC AlgorithmOptionYes—Algorithms that are registered and declare a metric schemaDetermines the source of the report metrics
EnableToggleYesEnableEnable, InactiveAn inactive rule takes no part in matching or automatic queuing
PriorityIntegerYes100Integer; a smaller value ranks higherDetermines list and run order; matched rules are evaluated independently
AssertionsListNoEmpty—See "Assertions"

A dataset that belongs to a project matches both global rules and its project's rules, and the two levels produce separate run records.

Create or edit a QC rule

Assertions​

An assertion is a condition inside a rule. There are three assertion types.

TypeEvaluated againstRule
Numeric thresholdReport metricCompared with the threshold through an operator, such as frame_rate >= 20
Required TopicTopic list of the whole fileThe report must contain the given Topic
Forbidden TopicTopic list of the whole fileThe report must not contain the given Topic

A numeric assertion carries an operator, a threshold, severity, and a range:

AttributeValuesNotes
Operator<=, >=, <, >, ==, !=Compared with the threshold
SeverityBlocking (error), Warning (warning)If any blocking assertion fails, the run is marked failed; a warning is only recorded
RangeAll, By topic (glob), By schemaA global metric supports only All; a per-topic metric requires By topic (glob) or By schema

The range determines where the metric value comes from. With the All range, the platform reads the whole-file metric. With the By topic (glob) or By schema range, it compares each matched topic row independently, and the assertion fails if any row fails. Before a By schema comparison, the platform normalizes the message type name to lowercase and removes /msg/.

warning

Global metrics and per-topic metrics do not share the same set of ranges. An invalid combination fails the assertion outright, and the failure detail marks a configuration error. When a By topic (glob) or By schema pattern matches no Topic, the assertion fails.

Detection Metrics​

QC runs in two layers, the algorithm container and the platform. The container scans the MCAP file and emits a structured report, and the platform evaluates the report fields one by one against the assertions in the rule.

Global Metrics​

Global metrics come from the whole-file scalars in the report. When a numeric assertion uses one, its range must be All.

UI name (unit)Metric keyDirectionWhat it detectsHow it is computedSuggested default
Recording duration (s)record_duration_secHigher is betterEffective recording time is too shortThe largest topic time span in the file minus the smallest>= 3
Timestamp regression counttimestamp_monotonic_violationsLower is betterTimestamps are non-monotonic or written out of orderSum over topics of the count of t[i] < t[i-1]<= 0
Reference topic frame rate (Hz)frame_rateHigher is betterThe average publish rate of the main data stream is lowMessage count on the reference topic divided by the file time span>= 20
Frame gap median (ms)frame_gap_median_msLower is betterThe baseline gap of the main data stream is largeMedian of the adjacent-time-difference series on the reference topic<= 50
Frame gap P95 (ms)frame_gap_p95_msLower is betterIntermittent publish delays95th percentile of the same series<= 200
Frame gap P99 (ms)frame_gap_p99_msLower is betterOccasional long gaps99th percentile of the same series<= 500
Frame gap max (ms)frame_gap_max_msLower is betterThe single longest publish gapMaximum of the same series<= 1000
Drop frame countdrop_frame_countLower is betterGaps that are abnormally long relative to the normal rhythmNumber of adjacent gaps on the reference topic greater than 1.5 times the median gap<= 0
Cross-topic sync P95 (ms)cross_topic_sync_p95_msLower is betterTime-alignment error across channelsThe maximum, over non-reference topics, of the P95 nearest-neighbor difference from the reference topic<= 50
Cross-topic sync P99 (ms)cross_topic_sync_p99_msLower is betterThe tail of the cross-channel alignment error99th percentile of the pooled nearest-neighbor differences<= 100
Cross-topic sync max (ms)cross_topic_sync_max_msLower is betterThe single largest alignment deviationMaximum of the pooled nearest-neighbor differences<= 200
Leading joint still duration (s)leading_joint_still_secLower is betterNo motion for a long time after the recording startsTime from the file start until the first valid motion of any joint<= 3
Trailing joint still duration (s)trailing_joint_still_secLower is betterRecording continues long after the task endsTime from the last valid motion to the file end<= 3
Image sharpness P90blur_score_p90Higher is betterOverall image sharpness is low90th percentile of the Laplacian variance of sampled frames>= 40
Exposure outlier ratioexposure_outlier_ratioLower is betterThe share of frames with abnormal brightness is highRatio of frames whose brightness deviates from the mean by 2 standard deviations to the sampled frames<= 0.05

Reference topic: exclude topics whose names contain /tf, /tf_static, /rosout, /parameter_events, or /clock, then take the remaining topic with the most messages. Frame rate, frame gap, dropped frames, and cross-topic sync all use this topic as the baseline. Image and joint metrics are emitted only when the report contains the corresponding topic. When a rule references a missing field, the assertion fails because the actual value is empty.

Per-topic Metrics​

Per-topic metrics come from each topic row in the report. When a numeric assertion uses one, its range must be By topic (glob) or By schema.

UI name (unit)Metric keyDirectionWhat it detectsHow it is computedSuggested default
Per-topic Message Frequency (Hz)frequency_hzHigher is betterThe publish rate of a given channel is lowMessage count divided by the span from first to last; 0 if there is at most 1 message or the span is 0>= 10
Max Frame Gap (per topic) (ms)topic_frame_gap_max_msLower is betterThe single longest publish gap of a given channelMaximum adjacent-message time difference; 0 if fewer than 2 messages<= 500
Message Count (per topic)message_countHigher is betterA channel has no valid dataTotal message count for the topic>= 1
Time Span (per topic) (s)duration_secHigher is betterA channel drops out mid-stream or its valid window is too shortDifference between the last and first message times>= 0.1
First Message Time (per topic) (s)first_ts_secDefined by the taskWhen a channel startsTime of the first messageDefined by the task
Last Message Time (per topic) (s)last_ts_secDefined by the taskWhen a channel endsTime of the last messageDefined by the task

The suggested defaults in the table come from the platform's built-in metric presets and must be adjusted to the on-site collection setup.

Runs and Results​

Trigger Methods​

Trigger methodWhen it firesNotes
Automatic runAfter MCAP preprocessing succeedsDatasets that match an enabled rule are queued automatically, with no need to start them one by one
Manual runFrom the dataset QC detail or dataset operationsQueues the rules matched by the current dataset, optionally limited to a subset; requires Dataset Compute / Preprocess
Rule backfillAfter a rule is created or enabledAsynchronously reruns historical matches; datasets that already have a queued or running record are not queued again
Full backfillStarted by an administratorReruns all enabled rules; only an administrator can start it, and with a large volume the tasks run through the queue

Both automatic queuing and backfill are scoped to MCAP data; non-MCAP data does not enter the QC queue.

Viewing Results​

Run Status​

Status values for a single run:

StatusMeaning
QueuedQueued and waiting to run
RunningRunning, with a progress percentage
CompletedThe run finished and all assertions passed
Completed (with non-passing items)The run finished and at least one blocking assertion failed
Runtime errorThe run raised an error, with an error description
CanceledThe run was terminated
Not runThe rule has no run record yet

Where to View​

Entry pointContents
QC Logs /qc/logsSearch run records by dataset, rule, status, effective result, override state, and time range; open the detail of a single run
QC Detail /qc/dataset/{id}Show the effective result, non-passing items, all metrics, topic list, and run information for each matched rule, and rerun one rule or all rules
Dataset list and detailShow the number of rules the dataset matches and the totals for pass, fail, and running

Aggregation Rules​

The dataset summary counts matched rules, takes the latest run of each rule, and uses the effective result as the verdict:

CountDefinition
Matched rulesNumber of enabled rules the dataset matches
PassNumber of rules whose effective result is pass
FailNumber of rules whose effective result is fail
RunningNumber of rules whose latest run is queued or running
Not startedNumber of rules with no run record
OverriddenNumber of rules with a manual override

The effective result is effective_pass = override_pass ?? pass: when a manual override exists, it takes the override value, and otherwise it takes the run verdict. A failing rule also writes the system tag qc:failed, which is added or removed as the verdict changes.

Manual Override​

The latest run of a rule can be overridden manually with a value of Pass, Fail, or Clear override. An override requires a reason of up to 500 characters; the reason, the person who overrode, and the override time appear in the QC detail and run history.

An override immediately affects the summary counts, the qc:failed system tag, and export blocking. Clearing the override restores the run verdict.

Relation to Export and Training​

The pre-export quality gate is controlled by Block export for QC-failed datasets in System Settings and is enabled by default:

Switch stateBehavior
EnabledA dataset that matches a QC rule and whose effective result is fail cannot be selected in the export UI, and the backend rejects such export requests
DisabledDatasets can be exported whether they passed or failed

Rules that have not finished running (queued or running) do not block export on their own. For the export flow, see Data Export; for preparing training data, see Model Training.

Constraints and Limits​

ItemValueNotes
Data formatMCAPNon-MCAP data does not enter the QC queue
Global rule write accessAdministrators onlyA project manager cannot create, edit, or delete global rules
Override reason lengthUp to 500 charactersLonger text is truncated
Rule priorityA smaller value ranks higherMatched rules are judged independently and do not override each other
Backfill deduplicationDatasets that already have a queued or running record are not queued againDeduplicated by rule and dataset
Per-topic metric rangeBy topic (glob) or By schemaCombining it with the All range fails the assertion
Missing metricThe field does not exist in the reportWhen a rule references a missing metric, the assertion fails because the actual value is empty
Result of a single runOnly the latest run is aggregatedHistory stays in QC Logs

Troubleshooting​

SymptomPossible causeResolutionOwner
The dataset does not enter the QC queueThe data is not MCAP, no enabled rule matches it, or preprocessing is not finishedConfirm the data format and the rule's match data name; retry after preprocessing finishesProject Manager, Collector
The run status is Runtime errorThe data is missing a download URL, the container failed, or the report was not generatedCheck the error description in the run detail; confirm the file is downloadable and rerunProject Manager, Administrator
An assertion fails with a configuration errorThe metric and range combination does not matchAdjust the assertion range to the metric typeProject Manager, Administrator
An assertion fails with no matching TopicThe range pattern matched no TopicCorrect the Topic or schema pattern, or switch to a Required Topic assertionProject Manager, Administrator
The rule cannot be savedNo project or algorithm is selected, or the algorithm declares no metric schemaSelect a project and an algorithm usable for QCProject Manager, Administrator
A global rule cannot be editedThe account is not an administratorHave an administrator maintain global rulesAdministrator
Export is rejectedThe dataset's effective result is fail and export blocking is enabledFix the data and rerun QC, or make a manual override after reviewProject Manager, Administrator
Historical data has no verdict after a rule changeThe backfill has not finishedWait for the backfill to run through the queue, or rerun from the dataset QC detailProject Manager, Administrator
PagePurpose
Data ManagementDataset search, preview, and batch operations
Data ExportApply the QC gate before export
Model TrainingTrain on data that passed QC
Module PermissionsConfigure permissions for the QC module
System SettingsSystem switches such as QC export blocking