You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ In this context, OSI defines generic interfaces to ensure modularity, integrabil
12
12
13
13
For more information on OSI see the [official documentation](https://opensimulationinterface.github.io/osi-documentation/) or the [official reference documentation](https://opensimulationinterface.github.io/open-simulation-interface/) for defined protobuf messages.
14
14
15
-
[[1]](https://www.hot.ei.tum.de/forschung/automotive-veroeffentlichungen/)*A generic interface for the environment perception of automated driving functions in virtual scenarios.(Dated 03.02.2017) T. Hanke, N. Hirsenkorn, C. van-Driesten, P. Garcia-Ramos, M. Schiementz, S. Schneider, E. Biebl*
15
+
[1] Hanke, T., Hirsenkorn, N., van-Driesten, C., Garcia-Ramos, P., Schiementz, M., Schneider, S. & Biebl, E. (2017, February 03).*A generic interface for the environment perception of automated driving functions in virtual scenarios.* Retrieved January 25, 2020, from https://www.hot.ei.tum.de/forschung/automotive-veroeffentlichungen/
16
16
17
17
## Usage
18
18
##### Example of writing and reading an OSI message in `Python`
Copy file name to clipboardExpand all lines: doc/commenting.rst
+64-54Lines changed: 64 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,8 @@ During the building process of open simulation interface (using the `proto2cpp <
7
7
8
8
For any additional comment styles see `list <http://www.doxygen.nl/manual/commands.html>`_ of doxygen commands.
9
9
10
-
Reference for writing values and units: ISO 80000-1: 2009, Quantities and units – Part 1: General
11
-
Nice summary: [Rohde & Schwarz: Der korrekte Umgang mit Größen, Einheiten und Gleichungen ](https://karriere.rohde-schwarz.de/fileadmin/customer/downloads/PDF/Der_korrekte_Umgang_mit_Groessen_Einheiten_und_Gleichungen_bro_de_01.pdf
12
-
)
10
+
Reference for writing values and units: ISO 80000-1:2013-08, Quantities and units – Part 1: General
11
+
Nice summary in German: `Rohde & Schwarz: Der korrekte Umgang mit Groessen, Einheiten und Gleichungen <https://karriere.rohde-schwarz.de/fileadmin/customer/downloads/PDF/Der_korrekte_Umgang_mit_Groessen_Einheiten_und_Gleichungen_bro_de_01.pdf>`_
13
12
14
13
15
14
Commenting with block syntax
@@ -150,7 +149,7 @@ Then you describe the field by adding an explanation.
150
149
//
151
150
message EnvironmentalConditions
152
151
{
153
-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
152
+
// Atmospheric pressure in Pascal at z = 0.0 m in world frame (about 101325 Pa).
154
153
//
155
154
optional double atmospheric_pressure = 1;
156
155
}
@@ -169,7 +168,7 @@ Next you decide the unit of the field.
169
168
//
170
169
message EnvironmentalConditions
171
170
{
172
-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
171
+
// Atmospheric pressure in Pascal at z = 0.0 m in world frame (about 101325 Pa).
173
172
//
174
173
// Unit: Pa
175
174
//
@@ -190,7 +189,7 @@ You can optionally add a note to the field to describe the field better.
190
189
//
191
190
message EnvironmentalConditions
192
191
{
193
-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
192
+
// Atmospheric pressure in Pascal at z = 0.0 m in world frame (about 101325 Pa).
194
193
//
195
194
// Unit: Pa
196
195
//
@@ -199,7 +198,40 @@ You can optionally add a note to the field to describe the field better.
199
198
optional double atmospheric_pressure = 1;
200
199
}
201
200
202
-
If you want to provide a reference to a DIN or to web page which helps in understanding the field you can add a reference.
201
+
To help understanding the field, you should add a reference.
202
+
Every OSI message should be defined properly and should have a well cited reference.
203
+
204
+
**Citation style for different sources:**
205
+
206
+
- Within the text, the number system is used with the number of the source in brackets [#] for mentioning.
207
+
- We use the so called `"APA style" <https://apastyle.apa.org/>`_ from the American Psychological Association for referencing.
208
+
- In the references list, the number in brackets [#] is followed by a full citation.
209
+
- For writing the title in italic, use <em>title</em>.
210
+
- If the list contains more than one entry, add " \n " at the end of the line to create a line break within the list.
211
+
- Author names are written as <surname>, <initial(s)> like Authorname, A. A.
212
+
- Editor names are written as <initial(s)> <surname> like B. B. Editorname.
213
+
- Naming pages at the end is optional to enable finding in long texts or for direct citations.
214
+
- All citations should be primary citations. Sources like Wikipedia et al. are not allowed.
215
+
- Find filled-out examples under `https://apastyle.apa.org <https://apastyle.apa.org/style-grammar-guidelines/references/examples>`_ and in existing entries.
216
+
- The scheme of popular sources for the reference list is as follows (replace tags with corresponding values):
217
+
218
+
1. <author1>, <author2>, <author3> & <author4>. (<year>). Contribution in a compilation title. <em><Compilation Title></em>. <edition>. <page(s)>. <publisher>. <location>. <doi>. <page(s)>.
// [1] DIN Deutsches Institut fuer Normung e. V. (1982). <em>DIN 5031-3 Strahlungsphysik im optischen Bereich und Lichttechnik - Groessen, Formelzeichen und Einheiten der Lichttechnik</em>. (DIN 5031-3:1982-03). Berlin, Germany. \n
256
+
// [2] Rapp, C. (2017). Grundlagen der Physik. In <em>Hydraulik fuer Ingenieure und Naturwissenschaftler</em> (pp.23-36). Springer Vieweg. Wiesbaden, Germany. https://doi.org/10.1007/978-3-658-18619-7_3. p. 105.
224
257
//
225
258
optional double atmospheric_pressure = 1;
226
259
}
@@ -239,14 +272,15 @@ Finally you can provide a set of rules which this field needs to be followed. Th
239
272
//
240
273
message EnvironmentalConditions
241
274
{
242
-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
275
+
// Atmospheric pressure in Pascal at z = 0.0 m in world frame (about 101325 Pa) [1, 2].
// [1] DIN Deutsches Institut fuer Normung e. V. (1982). <em>DIN 5031-3 Strahlungsphysik im optischen Bereich und Lichttechnik - Groessen, Formelzeichen und Einheiten der Lichttechnik</em>. (DIN 5031-3:1982-03). Berlin, Germany. \n
283
+
// [2] Rapp, C. (2017). Grundlagen der Physik. In <em>Hydraulik fuer Ingenieure und Naturwissenschaftler</em> (pp.23-36). Springer Vieweg. Wiesbaden, Germany. https://doi.org/10.1007/978-3-658-18619-7_3. p. 105.
250
284
//
251
285
// \rules
252
286
// is_optional
@@ -262,45 +296,21 @@ The rule definition must follow the syntax which is defined by a regex search wh
For example a naming for a trace with the information below:
48
+
49
+
.. code-block:: txt
50
+
51
+
Type = SensorView
52
+
OSI Version= 3.1.2
53
+
Protobuf Version = 3.0.0
54
+
Number of frames = 1523
55
+
Scenario name = highway
56
+
57
+
would then look like this:
58
+
59
+
.. code-block:: txt
60
+
61
+
sv_312_300_1523_highway.osi
62
+
63
+
The type definition would only be possible for ``SensorView = sv``, ``SensorData = sd`` and ``GroundTruth = gt``.
64
+
By following this best practice users can understand the general content of a file. By comparing the information provided by the naming and the actual trace the user can check the overall validity of a trace file.
65
+
39
66
Generate OSI traces
40
67
--------------------
41
68
If you want to generate a valid OSI trace file which can be used as an input for the `osi-validator <https://github.com/OpenSimulationInterface/osi-validation>`_ or the `osi-visualizer <https://github.com/OpenSimulationInterface/osi-visualizer>`_ see the example script in python below:
@@ -47,7 +74,7 @@ If you want to generate a valid OSI trace file which can be used as an input for
47
74
48
75
defmain():
49
76
"""Initialize SensorView"""
50
-
f =open("test_trace.osi", "ab")
77
+
f =open("sv_312_320_10_movingobject.osi", "ab")
51
78
sensorview = SensorView()
52
79
53
80
sv_ground_truth = sensorview.global_ground_truth
@@ -95,5 +122,5 @@ In the script we initialize the type we want to use for the messages. Here we us
95
122
For the ``SensorView`` it is mandatory to define the version and the timestamp. After that we can add objects.
96
123
Here we add a moving object with the ID 114. For this object we generate in a for loop 10 OSI messages which all have different x values over a time span of 9 seconds.
97
124
This means the object is changing the position in the x direction through the iteration each second.
98
-
Each time we change the x value and the timestamp we append the length of the OSI message and the serialized OSI message itself to a file called ``test_trace.osi``.
99
-
After finishing the loop we now have a ``test_trace.osi`` file which can be `validated <https://github.com/OpenSimulationInterface/osi-validation>`_ and `visualized <https://github.com/OpenSimulationInterface/osi-visualizer>`_.
125
+
Each time we change the x value and the timestamp we append the length of the OSI message and the serialized OSI message itself to a file called ``sv_312_320_10_movingobject.osi``.
126
+
After finishing the loop we now have a ``sv_312_320_10_movingobject.osi`` file which can be `validated <https://github.com/OpenSimulationInterface/osi-validation>`_ and `visualized <https://github.com/OpenSimulationInterface/osi-visualizer>`_.
0 commit comments