$npx -y skills add matlab/matlab-agentic-toolkit --skill matlab-driving-data-importerImport recorded driving sensor data (GPS, camera, lidar, actor tracks, lanes) into scenariobuilder.* objects (GPSData, CameraData, LidarData, ActorTrackData, Trajectory, laneData) and run preprocessing — synchronize, offset correction, crop, normalizeTimestamps, convertTimestamps
| 1 | # Driving Data Importer |
| 2 | |
| 3 | This skill loads raw driving sensor data into `scenariobuilder.*` objects (`GPSData`, `CameraData`, `LidarData`, `ActorTrackData`, `Trajectory`, `laneData`) and provides the CLI for every preprocessing step DLA exposes (sync, crop, offset, normalize, convert timestamps). It also covers the `drivingLogAnalyzer` (DLA) app **as an opt-in inspection tool** — see *Rule 0* below; DLA is never a default step. |
| 4 | |
| 5 | After wrapping is done, the canonical next move is `matlab-scenario-builder` (trajectory smoothing, scene/scenario generation, lane localization, RoadRunner / drivingScenario / OpenSCENARIO / OpenDRIVE / OpenCRG / Unreal export). |
| 6 | |
| 7 | ## Rule 0 — DLA is opt-in only (HARD RULE, READ FIRST) |
| 8 | |
| 9 | **Never call `drivingLogAnalyzer` unless the user explicitly asks for it or has reported a sensor-data problem DLA is built to debug.** Auto-launching DLA after wrapping data is a first-attempt-success failure: it stalls the user (a UI app forces context-switch, scrub, click, confirm) and signals that the agent is not confident the import worked. |
| 10 | |
| 11 | **When DLA IS allowed — only these two cases:** |
| 12 | |
| 13 | 1. **Explicit user request** — user types `DLA`, `drivingLogAnalyzer`, "open in DLA", "inspect / visualize / explore / replay / analyze the recording", "open the driving log analyzer". |
| 14 | 2. **Reported sensor-data problem** that DLA is the right tool for: |
| 15 | - "the sensors look out of sync" |
| 16 | - "camera and lidar timestamps don't match" |
| 17 | - "actor cuboids float above the cars" (overlay alignment) |
| 18 | - "I see missing frames / a gap in the timeline" |
| 19 | - "the offset looks wrong / the timeline is shifted" |
| 20 | |
| 21 | **When DLA is NOT allowed (defaults — go straight to `matlab-scenario-builder`):** |
| 22 | |
| 23 | - "Virtualize this data", "build a scenario from this data", "generate a scene", "export to RoadRunner / drivingScenario / OpenSCENARIO / OpenDRIVE / OpenCRG / Unreal", "simulate this drive", "I have data, do something with it". |
| 24 | - *Anything that has a downstream simulation or scenario target.* |
| 25 | |
| 26 | If you ever feel an urge to add a "let me open DLA so you can verify" step after wrapping — **stop.** Save the wrapped objects to `sandbox/<dataset>_wrapped.mat`, print a short summary, and hand off. |
| 27 | |
| 28 | ## When to Use |
| 29 | |
| 30 | - User has raw driving dataset files (KITTI, nuScenes, Waymo, custom logs, ROS/ROS2 bags, .mat, .csv, .xls, video) and needs them loaded into `scenariobuilder.*` objects |
| 31 | - User says **"open in DLA"**, **"drivingLogAnalyzer"**, **"inspect / visualize / explore / replay / analyze this dataset"** *(triggers DLA — Rule 0 case 1)* |
| 32 | - User wants to map raw structs/tables/rosbag topics to `GPSData`, `CameraData`, `LidarData`, `ActorTrackData`, `Trajectory`, or `laneData` |
| 33 | - User wants to attach camera/lidar **Mounting Location / Mounting Angles / Intrinsics / Ego Origin Height** |
| 34 | - User asks for **multi-sensor synchronization** of any kind: "sync", "align sensors", "match sample rates", "resample to a common timeline", "sensor-to-sensor alignment" |
| 35 | - User asks for **offset correction** ("drag-to-align", "time offset", "shift this sensor by X seconds") |
| 36 | - User asks to **crop / trim / extract a segment** of a recording across sensors |
| 37 | - User asks to **normalize timestamps** ("common t=0", "time origin", "POSIX to seconds", "datetime to numeric") |
| 38 | - User wants to **export sensor data** to MAT, workspace, timetable, or a reproducible script |
| 39 | - User needs to inspect dataset structure, identify available sensor modalities, validate calibration transforms, or check for pre-computed annotations |
| 40 | - User needs to compute actor tracks from lidar when no annotations exist (clustering / detector / camera-based pipeline) |
| 41 | - User reports a **sensor-data problem** (Rule 0 case 2) — wrap, then offer DLA as the debugging path |
| 42 | |
| 43 | ## When NOT to Use |
| 44 | |
| 45 | - **Do NOT auto-launch DLA after wrapping.** If the user asked to virtualize / build a scenario / export to a |