Skip to content

Commit f78eb7c

Browse files
committed
refine metadata
Signed-off-by: Timm Ruppert <timm.ruppert@persival.de>
1 parent beb6d47 commit f78eb7c

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

doc/architecture/trace_file_mcap_format.adoc

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ endif::[]
99
- Must allow other non-OSI data to be present in the MCAP file
1010
- Message records must be written into `chunk records` for indexed files
1111
- Only OSI top-level messages containing a timestamp field are permitted to be directly stored in MCAP channels
12+
- Must contain only a single scenario with a unique global time
13+
- A MCAP file is condidered a single dataset
1214

1315
== Schema
1416
- `name` field: Full message type name, including package (e.g., `osi3.SensorData`)
@@ -32,14 +34,30 @@ endif::[]
3234
- Must be in nanoseconds
3335

3436

35-
== Metadata
37+
== File-wide Metadata
3638
- Must include metadata with the name `versions` containing at least the following key-value pairs:
3739
* `osi`: SemVer version of the minimum required OSI version
38-
- Must include metadata with the name `creation_date` containing at least the following key-value pairs:
39-
* `timestamp`: ISO 8601 formatted creation time
40-
- Must include metadata with the name `description` containing at least the following key-value pairs:
41-
* `text`: Scenario description
42-
- Additional custom metadata may be added
40+
- Must include metadata with the name `asam_osi` containing at least the following key-value pairs:
41+
* `zero_time`: ISO 8601 YYYYMMDDThhmmss.f formatted point in time representing the zero time of the scenario
42+
* `timestamp`: ISO 8601 YYYYMMDDThhmmss.f formatted creation time of the file
43+
- It is strongly recommended to include metadata with the name `asam_osi` containing the following key-value pairs:
44+
* `description`: Short human-readable scenario description
45+
* `creator`: csv of person or company (not tool) creating the file
46+
* 'license' csv of spdx identifiers
47+
* 'data_sources' csv of model, scenario player, etc.
48+
- Additional custom metadata may be added, but it is recommended to add a category with the name `context` where the key represents a prefix and the value pointing to the specification of the metadate. This allows to add other (channel-wise) metadata with the stated prefix. Thus, it becomes clear what a metadata is about and where it is specified. The following examples are given:
49+
- GAIA-X4PLC-AAD SHACL Shape
50+
- Assume you want to embed the hdmap of a scenario in the MCAP file.
51+
- The `context` category contains the key `GAIA-X4PLC-AAD-hdmap ` with the value `https://github.com/GAIA-X4PLC-AAD/ontology-management-base/blob/main/hdmap/hdmap_shacl.ttl`
52+
- A channel metadata contains the key `GAIA-X4PLC-AAD-hdmap` with the value of the hdmap data in the given SHACLE shape.
53+
- openDrive Reference
54+
- Assume you want to express that oncoming traffic passes on the right side of the road.
55+
- The `context` category contains the key `openDrive` with the value `https://publications.pages.asam.net/standards/ASAM_OpenDRIVE/ASAM_OpenDRIVE_Specification/1.8.1/specification/index.html`
56+
- A file metadata in a new metadata category with the arbitrary name `specification` contains the key `openDrive-road-rule` with the value `RHT`
57+
- Cycle time variation of a sensor
58+
- Assume you want to express the interface cycle time variation of a sensor.
59+
- The `context` category contains the key `iso_23150` with the value` ISO 23150:2011`
60+
- A channel containing `OSI3::SensorData` messages has metadata with the key `iso_23150-cycle-time-variation:` and the value `80`
4361

4462
== Compression
4563
- OSI-compliant tooling must support compression types: `none`, `lz4`, and `zstd`
@@ -65,7 +83,7 @@ When not using an optional field, the corresponding `_` delimiter must be omitte
6583
|An optional prefix which may be used to specify the type of scenario (e.g. `cut-in`) or uniqueness of the setup (e.g. `target-5m`). May not contain any `_` characters.
6684

6785
|opt. timestamp
68-
|Defines the absolute start time for a scenario or recording. If following the recommended zero time for the timestamps of the top-level message, this time must represent the zero time. The format must adhere to ISO 8601 [cite:iso8601].
86+
|Defines the absolute start time for a scenario or recording. If following the recommended zero time for the timestamps of the top-level messages, this time must represent the zero time. The format must adhere to ISO 8601 [cite:iso8601].
6987

7088

7189
|type

0 commit comments

Comments
 (0)