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
* Added best practice for file naming
* Added validation explanation
* Added naming to example
* Corrected naming in all places
* Added definition of the three types
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