Skip to content

Perception: add preflight check for missing camera calibration files#15769

Open
ishitadatta wants to merge 1 commit intoApolloAuto:masterfrom
ishitadatta:fix-perception-preflight-intrinsics
Open

Perception: add preflight check for missing camera calibration files#15769
ishitadatta wants to merge 1 commit intoApolloAuto:masterfrom
ishitadatta:fix-perception-preflight-intrinsics

Conversation

@ishitadatta
Copy link

Summary

Add a perception preflight checker that fails fast when required camera calibration files are missing, instead of letting perception modules fail later at runtime.

Problem

Apollo perception startup repeatedly fails with errors like:

  • Failed to load camera intrinsic: ..._intrinsics.yaml

This pattern appears in multiple issues, including:

What this PR changes

  • Adds scripts/perception_preflight_check.py.
    • Resolves sensor_meta.pb.txt similarly to runtime config resolution via APOLLO_CONF_PATH.
    • Parses camera sensors from sensor meta.
    • Validates required {sensor}_intrinsics.yaml and {sensor}_extrinsics.yaml files.
    • Prints actionable missing-path diagnostics and returns non-zero on failure.
  • Updates scripts/perception.sh to run the preflight before launching perception.
    • Includes escape hatch: APOLLO_SKIP_PERCEPTION_PREFLIGHT=1.

Validation

  • Positive run against repository config:
    • preflight reports OK for configured camera sensors.
  • Negative run with synthetic missing sensor files:
    • preflight returns exit code 1 and prints missing file list.

Impact

This improves perception startup reliability and operator feedback by converting recurring runtime initialization failures into clear pre-launch validation errors.

@CLAassistant
Copy link

CLAassistant commented Mar 7, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants