Skip to content

Commit b64133d

Browse files
WIP: Documentation/citation style (#371)
* Commenting style definition: APA * Typo-corrections in documentation * Example citation corrected in doc/commenting.proto * Citation in README.md corrected * References must be line seperated for correct displaying * Line break for references-list changed to adding ' \n ' at the end * German Umlaute changed for ASCII conformity * Non-ASCII accent changed in citation * Accent character changed
1 parent c853a1c commit b64133d

13 files changed

+120
-110
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ In this context, OSI defines generic interfaces to ensure modularity, integrabil
1212

1313
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.
1414

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/
1616

1717
## Usage
1818
##### Example of writing and reading an OSI message in `Python`

doc/commenting.rst

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ During the building process of open simulation interface (using the `proto2cpp <
77

88
For any additional comment styles see `list <http://www.doxygen.nl/manual/commands.html>`_ of doxygen commands.
99

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>`_
1312

1413

1514
Commenting with block syntax
@@ -150,7 +149,7 @@ Then you describe the field by adding an explanation.
150149
//
151150
message EnvironmentalConditions
152151
{
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).
154153
//
155154
optional double atmospheric_pressure = 1;
156155
}
@@ -169,7 +168,7 @@ Next you decide the unit of the field.
169168
//
170169
message EnvironmentalConditions
171170
{
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).
173172
//
174173
// Unit: Pa
175174
//
@@ -190,7 +189,7 @@ You can optionally add a note to the field to describe the field better.
190189
//
191190
message EnvironmentalConditions
192191
{
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).
194193
//
195194
// Unit: Pa
196195
//
@@ -199,7 +198,32 @@ You can optionally add a note to the field to describe the field better.
199198
optional double atmospheric_pressure = 1;
200199
}
201200
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+
.. [#] <author1>, <author2>, <author3> & <author4>. (<year>). Contribution in a compilation title. <em><Compilation Title></em>. <edition>. <page(s)>. <publisher>. <location>. <doi>. <page(s)>.
219+
.. [#] <author1>, <author2> & <author3>. (<year>). <em><book (monograph) title></em>. <edition>. <publisher>. <doi>. <page(s)>.
220+
.. [#] <author1> & <author2>. (<year>). <book chapter title>. In <editor1> & <editor2> (Eds.), <em><book title></em> (<page(s)>). <publisher>. <doi>. <page(s)>.
221+
.. [#] <author1> & <author2>. (<year>). <journal article title>. <em><journal title></em>. <page(s)>. <location>. <doi>. <page(s)>.
222+
.. [#] <author>. (<year>). <em><Phd thesis title></em>. Phd. thesis. <location>. <university>. <doi or url>. <page(s)>.
223+
.. [#] <author>. (<year>, <month> <day>). <em><internet article title></em>. Retrieved <month> <day>, <year>, from <url>.
224+
.. [#] <standarding organisation>. (<year>). <em><title of the standard></em>. (<standard identifier>). <location>.
225+
.. [#] <author>. (<year>). <em><patent title and id></em>. <location>. <organisation>.
226+
203227
204228
.. code-block:: protobuf
205229
@@ -213,14 +237,15 @@ If you want to provide a reference to a DIN or to web page which helps in unders
213237
//
214238
message EnvironmentalConditions
215239
{
216-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
240+
// Atmospheric pressure in Pascal at z = 0.0 m in world frame (about 101325 Pa) [1, 2].
217241
//
218242
// Unit: Pa
219243
//
220244
// \note 100000 Pa = 1 bar
221245
//
222-
// \par Reference:
223-
// - [1] [Definition atmospheric pressure](https://en.wikipedia.org/wiki/Atmospheric_pressure)
246+
// \par References:
247+
// [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
248+
// [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.
224249
//
225250
optional double atmospheric_pressure = 1;
226251
}
@@ -239,14 +264,15 @@ Finally you can provide a set of rules which this field needs to be followed. Th
239264
//
240265
message EnvironmentalConditions
241266
{
242-
// Atmospheric pressure in Pascal at z=0.0 in world frame (about 101325 Pa).
267+
// Atmospheric pressure in Pascal at z = 0.0 m in world frame (about 101325 Pa) [1, 2].
243268
//
244269
// Unit: Pa
245270
//
246271
// \note 100000 Pa = 1 bar
247272
//
248-
// \par Reference:
249-
// - [1] [Definition atmospheric pressure](https://en.wikipedia.org/wiki/Atmospheric_pressure)
273+
// \par References:
274+
// [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
275+
// [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.
250276
//
251277
// \rules
252278
// is_optional
@@ -318,8 +344,8 @@ If you want to reference message fields and enums add '#' to the enum/field name
318344
319345
// A reference to a enum e.g. \c #COLOR_GREEN.
320346
321-
Commenting with links
322-
----------------------
347+
Commenting with links (e.g. in references)
348+
------------------------------------------
323349
With ``[<add name of your link>](<add url of your link>)`` you can integrate a link to a certain homepage while commenting.
324350

325351
Commenting with images

osi_common.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ message Dimension3d
166166
// \attention This definition changed in OSI version 3.0.0. Previous OSI
167167
// versions (V2.xx) had an other definition.
168168
//
169-
// \par References:
170-
// - [1] DIN ISO 8855:2013-11
169+
// \par Reference:
170+
// [1] DIN Deutsches Institut fuer Normung e. V. (2013). <em>DIN ISO 8855 Strassenfahrzeuge - Fahrzeugdynamik und Fahrverhalten - Begriffe</em>. (DIN ISO 8855:2013-11). Berlin, Germany.
171171
//
172172
message Orientation3d
173173
{

osi_detectedobject.proto

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ package osi3;
1515
message DetectedItemHeader
1616
{
1717
// Specific ID of the detected item as assigned by the sensor internally.
18-
// Need not match with \c #ground_truth_id.
18+
// Needs not to match with \c #ground_truth_id.
1919
//
2020
optional Identifier tracking_id = 1;
2121

@@ -215,28 +215,28 @@ message DetectedMovingObject
215215

216216
// Additional data that is specific to radar sensors.
217217
//
218-
// \note Field need not be set if simulated sensor is not a radar
218+
// \note Field needs not to be set if simulated sensor is not a radar
219219
// sensor.
220220
//
221221
optional RadarSpecificObjectData radar_specifics = 100;
222222

223223
// Additional data that is specific to lidar sensors.
224224
//
225-
// \note Field need not be set if simulated sensor is not a lidar
225+
// \note Field needs not to be set if simulated sensor is not a lidar
226226
// sensor.
227227
//
228228
optional LidarSpecificObjectData lidar_specifics = 101;
229229

230230
// Additional data that is specific to camera sensors.
231231
//
232-
// \note Field need not be set if simulated sensor is not a camera
232+
// \note Field needs not to be set if simulated sensor is not a camera
233233
// sensor.
234234
//
235235
optional CameraSpecificObjectData camera_specifics = 102;
236236

237237
// Additional data that is specific to ultrasonic sensors.
238238
//
239-
// \note Field need not be set if simulated sensor is not an ultrasonic
239+
// \note Field needs not to be set if simulated sensor is not an ultrasonic
240240
// sensor.
241241
//
242242
optional UltrasonicSpecificObjectData ultrasonic_specifics = 103;
@@ -275,36 +275,36 @@ message DetectedMovingObject
275275
// Pedestrian head pose for behavior prediction. Describes the head
276276
// orientation w.r.t. the host vehicle orientation.
277277
// The x-axis of the right-handed head frame is pointing along the
278-
// pedestrian's straight ahead viewing direction and the z-axis is
279-
// pointing upwards (cranial direction [1] i.e. to pedestrian's skull
280-
// cap).
278+
// pedestrian's straight ahead viewing direction (anterior), the y-axis lateral to the left,
279+
// and the z-axis is pointing upwards (superior) [1].
281280
//
282281
// ``View_normal_base_coord_system =
283282
// Inverse_Rotation(#head_pose)*Unit_vector_x``
284283
//
285284
// \note This field is mandatory if the \c CandidateMovingObject.type is
286285
// \c MovingObject::TYPE_PEDESTRIAN
287286
//
288-
// \par References:
289-
// - [1] https://en.wikipedia.org/wiki/Anatomical_terms_of_location
287+
// \par Reference:
288+
//
289+
// [1] Patton, K. T. & Thibodeau, G. A. (2015). <em>Anatomy & Physiology</em>. 9th Edition. Elsevier. Missouri, U.S.A. ISBN 978-0-323-34139-4. p. 1229.
290290
//
291291
optional Orientation3d head_pose = 4;
292292

293293
// Pedestrian upper body pose for behavior prediction. Describes the
294294
// upper body orientation w.r.t. the host vehicle orientation.
295295
// The x-axis of the right-handed upper body frame is pointing along the
296-
// pedestrian's upper body ventral direction [2] (i.e. usually
297-
// pedestrian's intended moving direction) and the z-axis is pointing
298-
// upwards (to pedestrian's head).
296+
// pedestrian's upper body ventral (anterior) direction (i.e. usually
297+
// pedestrian's intended moving direction), the y-axis lateral to the left,
298+
// and the z-axis is pointing upwards (superior, to the pedestrian's head) [1].
299299
//
300300
// ``View_normal_base_coord_system =
301301
// Inverse_Rotation(#upper_body_pose)*Unit_vector_x``
302302
//
303303
// \note This field is mandatory if the \c CandidateMovingObject::type
304304
// is \c MovingObject::TYPE_PEDESTRIAN
305305
//
306-
// \par References:
307-
// - [2] https://en.wikipedia.org/wiki/Anatomical_terms_of_location
306+
// \par Reference:
307+
// [1] Patton, K. T. & Thibodeau, G. A. (2015). <em>Anatomy & Physiology</em>. 9th Edition. Elsevier. Missouri, U.S.A. ISBN 978-0-323-34139-4. p. 1229.
308308
//
309309
optional Orientation3d upper_body_pose = 5;
310310
}

0 commit comments

Comments
 (0)