Skip to content

Commit 9c7dfe9

Browse files
author
Stefan Cyliax
authored
Merge pull request #549 from OpenSimulationInterface/migration
Migration of documentation to AsciiDoc
2 parents 6ae62d6 + b1fc85c commit 9c7dfe9

File tree

79 files changed

+8083
-1625
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+8083
-1625
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "asciidoc-resources"]
2+
path = asciidoc-resources
3+
url = https://code.asam.net/simulation/asciidoc-resources.git

asciidoc-resources

Submodule asciidoc-resources added at e0bd505
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
= Overview of OSI architecture
2+
3+
OSI contains an object-based environment description that uses the message format of the https://github.com/protocolbuffers/protobuf/wiki[Protocol Buffer] library.
4+
The Protocol Buffer library was developed and is maintained by Google.
5+
OSI defines top-level messages that are used to exchange data between separate models.
6+
Top-level messages define the `GroundTruth` interface, the `SensorData` interface, and – since OSI version 3.0.0 – the interfaces `SensorView`, `SensorViewConfiguration`, and `FeatureData`.
7+
8+
The following figure shows the interfaces and models involved in modeling a sensor.
9+
10+
.Open Simulation Interface overview
11+
image::{images_open_simulation_interface}/osi-context.png[1100]
12+
13+
14+
OSI also defines interfaces for traffic participant models.
15+
The `TrafficCommand` interface makes it possible to send commands to traffic participant models.
16+
The `TrafficUpdate` interface makes it possible to receive the updated state from traffic participant models.
17+
The following figure shows the interfaces of a generic traffic participant.
18+
19+
.Interface of a traffic participant
20+
image::{images_open_simulation_interface}/osi-traffic-participant-principle.png[1100]
21+
22+
Traffic participant models may use other OSI interfaces internally, for example, to model autonomous vehicles.
23+
The following figure shows a more advanced use case for traffic participants.
24+
25+
.Traffic participant with sensor models, AD function, and dynamic model
26+
image::{images_open_simulation_interface}/osi-traffic-participant-advanced.png[1100]
27+
28+
The `HostVehicleData` interface describes the measured internal states of a traffic participant.
29+
OSI currently provides only limited support for data structures that describe measured internal states of traffic participants.
30+
Actuator intentions are currently not covered by OSI and must be handled with a different data description format.
31+
32+
All fields in an interface are set to `optional`.
33+
`required` is not used.
34+
This has been done to allow backward-compatible changes in the field.
35+
Additionally, this is the default behavior in Protocol Buffer version 3 that does no longer have the `required` type.
36+
Setting all fields to `optional` thus ensures update compatibility.
37+
However, this does not mean that filling the field is optional.
38+
For the purpose of providing a complete interface, all existing fields should be set, unless not setting a field carries a specific meaning as indicated in the accompanying comment.
39+
40+
All field numbers equal to or greater than 10000 are available for user-specific extensions via custom fields.
41+
Therefore, no future evolution of OSI will use field numbers equal to or greater than 10000.

doc/architecture/data_layer.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
= Data layer
2+
3+
The data layer of OSI is defined in the message specifications using the ProtoBuf IDL.
4+
It defines the data that can be transmitted using OSI, including the structure and the semantics of the data.
5+
6+
Additionally, it specifies the encoding to be used when OSI data is transmitted.
7+
Currently, ProtoBuf encoding is used, but other encodings are possible with the ProtoBuf IDL.
8+
FlatBuffer encoding has been implemented as an experimental feature.
9+
10+
The data layer does not directly define components and transmission routes.
11+
These are defined in the packaging layer of OSI.
12+
There may be different packaging layer implementations using the shared data layer definitions.
13+
The data that is exchanged remains compatible regardless of the packaging layer implementation.
14+
The use of a shared data layer ensures easy bridging between different packaging layer implementations.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
= Environmental effect model
2+
3+
Environmental effect models consume sensor-view messages and produce sensor-view messages.
4+
Environmental effect models may, for example, alter sensor-view messages to include effects and phenomena caused by:
5+
6+
* Shadows and occlusions
7+
* Weather effects
8+
* Physics of a sensor
9+
* Pre-processing of raw sensor data

doc/architecture/feature_data.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
= Feature data
2+
3+
Feature-data messages contain detected features in the reference frame of a sensor.
4+
Feature-data messages are generated from ground-truth messages.
5+
They serve, for example, as input to sensor models simulating object detection or feature fusion models.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
= Trace-file formatting scripts
2+
3+
The OSI repository contains Python scripts for converting trace files from one format to the other.
4+
The formatting scripts are stored in `open-simulation-interface/format/`
5+
6+
**txt2osi.py**
7+
8+
`txt2osi.py` converts plain-text trace files to binary `.osi` trace files.
9+
This script takes the following parameters:
10+
11+
`--data`, `-d`::
12+
String containing the path to the file with serialized data.
13+
14+
`--type`, `-t`::
15+
Optional string describing the message type used to serialize data.
16+
Allowed values are `'SensorView'`, `'GroundTruth'`, or `'SensorData'`.
17+
The default value is `'SensorView'`.
18+
19+
`--output`, `-o`::
20+
Optional string containing the name of the output file.
21+
The default value is `'converted.osi'`.
22+
23+
`--compress`, `-c`::
24+
Optional boolean controlling whether to compress the output to a lzma file.
25+
Allowed values are `True`, or `False`.
26+
The default value is `False`.
27+
28+
**osi2read.py**
29+
30+
`osi2read.py` converts trace files to human-readable `.txth` trace files.
31+
This script takes the following parameters:
32+
33+
`--data`, `-d`::
34+
String containing the path to the file with serialized data.
35+
36+
`--type`, `-t`::
37+
Optional string describing the message type used to serialize data.
38+
Allowed values are `'SensorView'`, `'GroundTruth'`, or `'SensorData'`.
39+
The default value is `'SensorView'`.
40+
41+
`--output`, `-o`::
42+
Optional string containing the name of the output file.
43+
The default value is `'converted.txth'`.
44+
45+
`--format`, `-f`::
46+
Optional string containing the format type of the trace file.
47+
Allowed values are `'separated'`, or `None`.
48+
The default value is `None`.
49+
50+
**Related topics**
51+
52+
* <<#top-1a2f4b0c-195c-4f18-89ad-d48a123bd8c1>>[OSI trace file formats]

doc/architecture/ground_truth.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
= Ground truth
2+
3+
Ground-truth messages describe the simulated environment containing all simulated objects in the global coordinate system at consecutive time instances.
4+
It is based on data available to the simulation environment.
5+
Typically, ground-truth messages are contained in sensor view messages.

doc/architecture/logical_model.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
= Logical model
2+
3+
Logical models consume sensor-data messages and produce sensor-data messages.
4+
5+
An example of a logical model is a sensor-fusion model, which combines the output of multiple sensor models to produce data with less uncertainty.
6+
Another use case is the fault-injection model which, contrary to a sensor-fusion model, may be used to increase uncertainties.

doc/architecture/packaging_layer.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
= Packaging layer
2+
3+
The packaging layer of OSI specifies how components that use the OSI data layer, for example, sensor models, are packaged for exchange.
4+
5+
It specifies model types and their mandatory and optional OSI inputs, OSI outputs, and parameter interfaces.
6+
A model type may be, for example, a sensor model or a traffic participant model.
7+
The packaging layer also specifies component technology standards.
8+
This makes it possible to encapsulate model types in easily exchangeable component packages that can be used across platforms and implementations.
9+
10+
Multiple packaging layer implementations are possible within the OSI framework.
11+
The shared data layer ensures easy bridging between the different implementations.
12+
The currently defined central packaging layer is the OSI Sensor Model Packaging (OSMP) specification.
13+
It is based on FMI 2.0 and uses certain additional conventions to allow packaging of OSI using models as FMUs.

doc/architecture/proto-files.adoc

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
= Protobuffer files
2+
3+
TODO: Add general description.
4+
5+
osi_common.proto::
6+
TODO: Add description.
7+
8+
osi_datarecording.proto::
9+
TODO: Add description.
10+
11+
osi_detectedlane.proto::
12+
TODO: Add description.
13+
14+
osi_detectedobject.proto::
15+
TODO: Add description.
16+
17+
osi_detectedoccupant.proto::
18+
TODO: Add description.
19+
20+
osi_detectedroadmarking.proto::
21+
TODO: Add description.
22+
23+
osi_detectedtrafficlight.proto::
24+
TODO: Add description.
25+
26+
osi_detectedtrafficsign.proto::
27+
TODO: Add description.
28+
29+
osi_environment.proto::
30+
TODO: Add description.
31+
32+
osi_featuredata.proto::
33+
TODO: Add description.
34+
35+
osi_groundtruth.proto::
36+
TODO: Add description.
37+
38+
osi_hostvehicledata.proto::
39+
TODO: Add description.
40+
41+
osi_lane.proto::
42+
TODO: Add description.
43+
44+
osi_logicaldetectiondata.proto::
45+
TODO: Add description.
46+
47+
osi_object.proto::
48+
TODO: Add description.
49+
50+
osi_occupant.proto::
51+
TODO: Add description.
52+
53+
osi_roadmarking.proto::
54+
TODO: Add description.
55+
56+
osi_sensordata.proto::
57+
TODO: Add description.
58+
59+
osi_sensorspecific.proto::
60+
TODO: Add description.
61+
62+
osi_sensorview.proto::
63+
TODO: Add description.
64+
65+
osi_sensorviewconfiguration.proto::
66+
TODO: Add description.
67+
68+
osi_trafficcommand.proto::
69+
TODO: Add description.
70+
71+
osi_trafficlight.proto::
72+
TODO: Add description.
73+
74+
osi_trafficsign.proto::
75+
TODO: Add description.
76+
77+
osi_trafficupdate.proto::
78+
TODO: Add description.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
= Coordinate systems and reference points
2+
3+
OSI uses DIN ISO 8855:2013-11 for coordinate systems and transformations between coordinate systems.
4+
OSI uses three coordinate systems:
5+
6+
World coordinate system::
7+
Coordinate system for all entities that are part of ground truth.
8+
The world coordinate system is an inertial x/y/z-coordinate system.
9+
The origin is the global reference point that is determined by the environment simulation.
10+
This reference point may be derived from map data or other considerations.
11+
World coordinates can be mapped to a geographic coordinate system via `osi3::GroundTruth::proj_string`.
12+
13+
Sensor coordinate system::
14+
Coordinate system for all entities that are part of sensor data.
15+
The origin is the mounting position of the physical sensor or a virtual mounting position, depending on the OSI message.
16+
17+
Object coordinate system::
18+
Local object coordinate system.
19+
The origin of the corresponding coordinate system is not necessarily identical to the center of the object's bounding box.
20+
If the origin of the corresponding coordinate system is not identical to the center of the object's bounding box, the object documentation will provide the actual definition.

doc/architecture/sensor_data.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
= Sensor data
2+
3+
Sensor-data messages imitate the output of real sensors.
4+
It can be generated from ground-truth messages, sensor-view messages, feature-data messages or from sensor-data messages.
5+
Except feature data, all information regarding the environment is given with respect to the virtual sensor coordinate system.
6+
Feature data is given with respect to the physical sensor coordinate system.
7+
Sensor data can be used as input for an automated driving function, a sensor model simulating limited perception, or a sensor fusion model.

doc/architecture/sensor_model.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
= Sensor model
2+
3+
Sensor models consume sensor-view messages and produce sensor-data messages.
4+
5+
Sensor-model output does not represent raw data but detected features or classified objects.

doc/architecture/sensor_view.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
= Sensor view
2+
3+
The sensor view provides the input to OSI sensor models.
4+
Sensor-view messages are derived from ground-truth messages.
5+
All information regarding the environment is given with respect to the virtual sensor coordinate system, with two exceptions:
6+
7+
* Physical technology-specific data, given with respect to the physical sensor coordinate system specified in the corresponding physical sensor's mounting position.
8+
Example of technology-specific data: https://opensimulationinterface.github.io/open-simulation-interface/structosi3_1_1CameraSensorView.html#ac58456a34babf78792ea2608eb963f36[`image_data` of `osi3::CameraSensorView`]
9+
* Ground truth, given in the global coordinate system.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
= Sensor view configuration
2+
3+
The sensor view is flexibly defined to provide different kinds of sensor models with appropriate input.
4+
The sensor view configuration defines the configuration of a particular sensor view.
5+
6+
The sensor-view-configuration message is used in the initialization phase of a simulation to negotiate the sensor view configuration for a particular sensor view input.
7+
It is also included as a sub-message in sensor view messages to indicate that the sensor view configuration is valid for a particular sensor view message.
8+
9+
Sensor-view-configuration data has two main applications:
10+
11+
- It enables the environment simulation to provide the necessary input to a sensor model.
12+
- It enables a sensor model to check whether the input matches its requirements.
13+
If the input does not match the requirements, the sensor model may terminate the simulation.
14+
15+
NOTE: Sensor-view-configuration data is intended for the automatic configuration of the sensor view interface between environment simulation and sensor model.
16+
The data is not intended as a mechanism to parametrize a generic sensor model.
17+
18+
During the initialization phase, there are two sources for sensor-view-configuration data:
19+
20+
1. Sensor-view-configuration data may be provided by the sensor model to the environment simulation.
21+
In this case, the data describes the input configuration that is requested by the sensor model.
22+
If no such data is provided by the sensor model, then the environment simulation will fall back to manual configuration of the sensor view.
23+
24+
2. Sensor-view-configuration data may be provided by the environment simulation.
25+
In response to the request by the sensor model, or based on manual configuration, the environment simulation configures the input and provides a new message that describes the actual configuration.
26+
27+
The configuration requested by the sensor model may differ from the configuration provided by the environment simulation.
28+
This happens when the environment simulation does not support a requested configuration or when the requested configuration is ambiguous.
29+
30+
In response to this difference, the sensor model can either accept this difference and adapt to it, or it can terminate the simulation to indicate that it is not able to accept the difference.
31+
32+
The packaging layer defines the specifics of this auto-negotiation mechanism.
33+
34+
After the initialization phase, the environment simulation provides the actual sensor view configuration as part of each sensor view message.

doc/architecture/test_scripts.adoc

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
= Test scripts
2+
3+
TODO: Add general description.
4+
5+
__init__.py::
6+
TODO: Add description.
7+
8+
test_comment_type.py::
9+
TODO: Add description.
10+
11+
test_doxygen_output.py::
12+
TODO: Add description.
13+
14+
test_invalid_comment.py::
15+
TODO: Add description.
16+
17+
test_invalid_enum.py::
18+
TODO: Add description.
19+
20+
test_invalid_html.py::
21+
TODO: Add description.
22+
23+
test_invalid_message.py::
24+
TODO: Add description.
25+
26+
test_invalid_punctuation.py::
27+
TODO: Add description.
28+
29+
test_invalid_tabs.py::
30+
TODO: Add description.
31+
32+
test_newline.py::
33+
TODO: Add description.
34+
35+
test_non_ascii.py::
36+
TODO: Add description.
37+
38+
test_osi_trace.py::
39+
TODO: Add description.
40+
41+
test_rules.py::
42+
TODO: Add description.
43+
44+
test_units.py::
45+
TODO: Add description.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[#top-1a2f4b0c-195c-4f18-89ad-d48a123bd8c1]
2+
= OSI trace file formats
3+
4+
There are multiple formats for storing multiple serialized OSI messages into one trace file.
5+
6+
*.osi::
7+
Binary trace file.
8+
Messages are separated by a length specification before each message.
9+
The length is represented by a four-byte, little-endian, unsigned integer.
10+
The length does not include the integer itself.
11+
12+
*.txt::
13+
Plain-text trace file.
14+
Messages are separated by `$$__$$`.
15+
16+
*.txth::
17+
Human-readable plain-text trace file.
18+
Messages are separated by newlines.
19+
Such a file may be used for manual checks.

0 commit comments

Comments
 (0)