From ce4cf6a9ddd8523a3bcf469413a5e5adefa5ba67 Mon Sep 17 00:00:00 2001 From: AhmedMzid Date: Fri, 24 Mar 2017 15:07:50 +0100 Subject: [PATCH 01/11] Generate Doxygen documentation using cmake --- .gitignore | 4 +- CMakeLists.txt | 19 ++ doc/proto2cpp/lgpl-2.1.txt | 502 +++++++++++++++++++++++++++++++++++++ doc/proto2cpp/proto2cpp.py | 225 +++++++++++++++++ doxygen-config.cmake.in | 14 ++ 5 files changed, 763 insertions(+), 1 deletion(-) create mode 100644 doc/proto2cpp/lgpl-2.1.txt create mode 100644 doc/proto2cpp/proto2cpp.py create mode 100644 doxygen-config.cmake.in diff --git a/.gitignore b/.gitignore index b61cb462d..2b8006516 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,6 @@ CTestTestfile.cmake build *.egg-info osi -.project \ No newline at end of file +.project +doc/html +doc/latex \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 519475079..6b3ea89ad 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ cmake_minimum_required(VERSION 3.7) +# set name and version of the project project(open_simulation_interface) +set(VERSION_MAJOR 2) +set(VERSION_MINOR 1) +set(VERSION_PATCH 1) find_package(Protobuf 2.6.1 REQUIRED) @@ -60,3 +64,18 @@ target_include_directories(${PROJECT_NAME} ${CMAKE_CURRENT_BINARY_DIR} ) target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY}) + + +# add a target to generate API documentation with Doxygen +FIND_PACKAGE(Doxygen) + +IF (DOXYGEN_FOUND) + set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-config.cmake.in) + set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) + + configure_file(${doxyfile_in} ${doxyfile} @ONLY) + + ADD_CUSTOM_TARGET(api_doc ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) +ENDIF (DOXYGEN_FOUND) \ No newline at end of file diff --git a/doc/proto2cpp/lgpl-2.1.txt b/doc/proto2cpp/lgpl-2.1.txt new file mode 100644 index 000000000..4362b4915 --- /dev/null +++ b/doc/proto2cpp/lgpl-2.1.txt @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/doc/proto2cpp/proto2cpp.py b/doc/proto2cpp/proto2cpp.py new file mode 100644 index 000000000..137818c78 --- /dev/null +++ b/doc/proto2cpp/proto2cpp.py @@ -0,0 +1,225 @@ +#!/usr/bin/env python +## +# Doxygen filter for Google Protocol Buffers .proto files. +# This script converts .proto files into C++ style ones +# and prints the output to standard output. +# +# version 0.6-beta-vg +# +# How to enable this filter in Doxygen: +# 1. Generate Doxygen configuration file with command 'doxygen -g ' +# e.g. doxygen -g doxyfile +# 2. In the Doxygen configuration file, find JAVADOC_AUTOBRIEF and set it enabled +# JAVADOC_AUTOBRIEF = YES +# 3. In the Doxygen configuration file, find FILE_PATTERNS and add *.proto +# FILE_PATTERNS = *.proto +# 4. In the Doxygen configuration file, find EXTENSION_MAPPING and add proto=C +# EXTENSION_MAPPING = proto=C +# 5. In the Doxygen configuration file, find INPUT_FILTER and add this script +# INPUT_FILTER = "python proto2cpp.py" +# 6. Run Doxygen with the modified configuration +# doxygen doxyfile +# +# +# Copyright (C) 2016 Regents of the University of California +# Copyright (C) 2012-2015 Timo Marjoniemi +# All rights reserved. +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +## + +import os +import sys +import re +import fnmatch +import inspect + +## Class for converting Google Protocol Buffers .proto files into C++ style output to enable Doxygen usage. +## +## The C++ style output is printed into standard output.
+## There are three different logging levels for the class: +##
  • #logNone: do not log anything
  • +##
  • #logErrors: log errors only
  • +##
  • #logAll: log everything
+## Logging level is determined by \c #logLevel.
+## Error logs are written to file determined by \c #errorLogFile.
+## Debug logs are written to file determined by \c #logFile. +# +class proto2cpp: + + ## Logging level: do not log anything. + logNone = 0 + ## Logging level: log errors only. + logErrors = 1 + ## Logging level: log everything. + logAll = 2 + + ## Constructor + # + def __init__(self): + ## Debug log file name. + self.logFile = "proto2cpp.log" + ## Error log file name. + self.errorLogFile = "proto2cpp.error.log" + ## Logging level. + self.logLevel = self.logNone + + ## Handles a file. + ## + ## If @p fileName has .proto suffix, it is processed through parseFile(). + ## Otherwise it is printed to stdout as is except for file \c proto2cpp.py without + ## path since it's the script given to python for processing. + ## + ## @param fileName Name of the file to be handled. + # + def handleFile(self, fileName): + if fnmatch.fnmatch(filename, '*.proto'): + self.log('\nXXXXXXXXXX\nXX ' + filename + '\nXXXXXXXXXX\n\n') + # Open the file. Use try to detect whether or not we have an actual file. + try: + with open(filename, 'r') as inputFile: + self.parseFile(inputFile) + pass + except IOError as e: + self.logError('the file ' + filename + ' could not be opened for reading') + + elif not fnmatch.fnmatch(filename, os.path.basename(inspect.getfile(inspect.currentframe()))): + self.log('\nXXXXXXXXXX\nXX ' + filename + '\nXXXXXXXXXX\n\n') + try: + with open(filename, 'r') as theFile: + output = '' + for theLine in theFile: + output += theLine + print(output) + self.log(output) + pass + except IOError as e: + self.logError('the file ' + filename + ' could not be opened for reading') + else: + self.log('\nXXXXXXXXXX\nXX ' + filename + ' --skipped--\nXXXXXXXXXX\n\n') + + ## Parser function. + ## + ## The function takes a .proto file object as input + ## parameter and modifies the contents into C++ style. + ## The modified data is printed into standard output. + ## + ## @param inputFile Input file object + # + def parseFile(self, inputFile): + # Go through the input file line by line. + isEnum = False + inPackage = False + # This variable is here as a workaround for not getting extra line breaks (each line + # ends with a line separator and print() method will add another one). + # We will be adding lines into this var and then print the var out at the end. + theOutput = '' + for line in inputFile: + # Search for comment ("//") and add one more slash character ("/") to the comment + # block to make Doxygen detect it. + matchComment = re.search("//", line) + # Search for semicolon and if one is found before comment, add a third slash character + # ("/") and a smaller than ("<") chracter to the comment to make Doxygen detect it. + matchSemicolon = re.search(";", line) + if matchSemicolon is not None and (matchComment is not None and matchSemicolon.start() < matchComment.start()): + line = line[:matchComment.start()] + "///<" + line[matchComment.end():] + elif matchComment is not None: + line = line[:matchComment.start()] + "///" + line[matchComment.end():] + + # Search for "package " and if one is found before comment, make a namespace + matchPackage = re.search(r"\bpackage\b", line) + if matchPackage is not None and (matchComment is None or matchPackage.start() < matchComment.start()): + isPackage = True + # Convert to C++-style separator and block instead of statement + line = "namespace" + line[:matchPackage.start()] + line[matchPackage.end():].replace(".", "::").replace(";", " {") + + # Search for "repeated" fields and make them template-y + matchRepeated = re.search(r"\brepeated\b", line) + if matchRepeated is not None and (matchComment is None or matchRepeated.start() < matchComment.start()): + # Convert to a template + line = re.sub(r'repeated\s+(\S+)', r'repeated<\1>', line) + + # Search for "enum" and if one is found before comment, + # start changing all semicolons (";") to commas (","). + matchEnum = re.search(r"\benum\b", line) + if matchEnum is not None and (matchComment is None or matchEnum.start() < matchComment.start()): + isEnum = True + # Search again for semicolon if we have detected an enum, and replace semicolon with comma. + if isEnum is True and re.search(";", line) is not None: + matchSemicolon = re.search(";", line) + line = line[:matchSemicolon.start()] + "," + line[matchSemicolon.end():] + # Search for a closing brace. + matchClosingBrace = re.search("}", line) + if isEnum is True and matchClosingBrace is not None: + line = line[:matchClosingBrace.start()] + "};" + line[matchClosingBrace.end():] + isEnum = False + elif isEnum is False and re.search("}", line) is not None: + # Message (to be struct) ends => add semicolon so that it'll + # be a proper C(++) struct and Doxygen will handle it correctly. + line = line[:matchClosingBrace.start()] + "};" + line[matchClosingBrace.end():] + # Search for 'message' and replace it with 'struct' unless 'message' is behind a comment. + matchMsg = re.search(r"\bmessage\b", line) + if matchMsg is not None and (matchComment is None or matchMsg.start() < matchComment.start()): + output = "struct" + line[:matchMsg.start()] + line[matchMsg.end():] + theOutput += output + else: + theOutput += line + + if isPackage: + # Close the package namespace + theOutput += "}" + isPackage = False + + # Now that we've got all lines in the string let's split the lines and print out + # one by one. + # This is a workaround to get rid of extra empty line at the end which print() method adds. + lines = theOutput.splitlines() + for line in lines: + if len(line) > 0: + print(line) + # Our logger does not add extra line breaks so explicitly adding one to make the log more readable. + self.log(line + '\n') + else: + self.log('\n --- skipped empty line') + + ## Writes @p string to log file. + ## + ## #logLevel must be #logAll or otherwise the logging is skipped. + ## + ## @param string String to be written to log file. + # + def log(self, string): + if self.logLevel >= self.logAll: + with open(self.logFile, 'a') as theFile: + theFile.write(string) + + ## Writes @p string to error log file. + ## + ## #logLevel must be #logError or #logAll or otherwise the logging is skipped. + ## + ## @param string String to be written to error log file. + # + def logError(self, string): + if self.logLevel >= self.logError: + with open(self.errorLogFile, 'a') as theFile: + theFile.write(string) + +converter = proto2cpp() +# Doxygen will give us the file names +for filename in sys.argv[1:]: + converter.handleFile(filename) + +# end of file diff --git a/doxygen-config.cmake.in b/doxygen-config.cmake.in new file mode 100644 index 000000000..53ef95edb --- /dev/null +++ b/doxygen-config.cmake.in @@ -0,0 +1,14 @@ +#set the name and version of the project according to the configuration in CMakeLists.txt +PROJECT_NAME = "@CMAKE_PROJECT_NAME@" +PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ + +#Set input and output directories +INPUT = "@CMAKE_CURRENT_SOURCE_DIR@" +OUTPUT_DIRECTORY = "@CMAKE_CURRENT_SOURCE_DIR@/doc" + +# There is no standard configuration for .proto files documentation. +# A Doxygen filter for .proto files has to be added under the directory doc/. +JAVADOC_AUTOBRIEF = YES +EXTENSION_MAPPING = proto=C +FILE_PATTERNS = *.proto +INPUT_FILTER = "python @CMAKE_CURRENT_SOURCE_DIR@/doc/proto2cpp/proto2cpp.py" From 9ba4fe57d2309a3f31e34bcb96076d5b2e7c9e73 Mon Sep 17 00:00:00 2001 From: AhmedMzid Date: Tue, 28 Mar 2017 13:20:05 +0200 Subject: [PATCH 02/11] delete proto2cpp and get the filter proto2cpp.py from a local directory --- CMakeLists.txt | 32 ++- README.md | 12 + doc/proto2cpp/lgpl-2.1.txt | 502 ------------------------------------- doc/proto2cpp/proto2cpp.py | 225 ----------------- doxygen-config.cmake.in | 2 +- 5 files changed, 37 insertions(+), 736 deletions(-) delete mode 100644 doc/proto2cpp/lgpl-2.1.txt delete mode 100644 doc/proto2cpp/proto2cpp.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b3ea89ad..8ab03ab3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,15 +67,31 @@ target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY}) # add a target to generate API documentation with Doxygen +# Dependencies: Doxygen and proto2cpp.py FIND_PACKAGE(Doxygen) +set(FILTER_PROTO2CPP_PY_PATH CACHE PATH "directory to the filter proto2cpp.py") -IF (DOXYGEN_FOUND) - set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-config.cmake.in) - set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) +if(NOT DOXYGEN_FOUND) - configure_file(${doxyfile_in} ${doxyfile} @ONLY) + message(WARNING "Doxygen could not be found.") - ADD_CUSTOM_TARGET(api_doc ALL - COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile} - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) -ENDIF (DOXYGEN_FOUND) \ No newline at end of file +else() + + if(NOT EXISTS ${FILTER_PROTO2CPP_PY_PATH}/proto2cpp.py) + + message(WARNING "${FILTER_PROTO2CPP_PY_PATH}/proto2cpp.py could not be found.") + + else() + + set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-config.cmake.in) + set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) + + configure_file(${doxyfile_in} ${doxyfile} @ONLY) + + ADD_CUSTOM_TARGET(api_doc ALL + COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) + + endif(NOT EXISTS ${FILTER_PROTO2CPP_PY_PATH}/proto2cpp.py) + +endif(NOT DOXYGEN_FOUND) \ No newline at end of file diff --git a/README.md b/README.md index 1a06aec75..af135a53a 100644 --- a/README.md +++ b/README.md @@ -76,3 +76,15 @@ Packaging A specification to package sensor models using OSI as (extended) Functional Mock-up Units (FMUs) for use in simulation environments is available [here](https://github.com/OpenSimulationInterface/osi-sensor-model-packaging). + +Documentation +------------- + +In order to generate the doxygen documentation for OSI, please follow the following steps: +1. Install Doxygen and set an environmental variable 'Doxygen' with the path to the binary file. +2. Download and unzip the [zip file containing the filter proto2cpp.py](https://sourceforge.net/projects/proto2cpp/files/latest/download ). +3. From the cmd navigate to the build directory and run: +```cmd +cmake -DFILTER_PROTO2CPP_PY_PATH= +``` +4. The build process will then generate the doxygen documentation under the directory doc. \ No newline at end of file diff --git a/doc/proto2cpp/lgpl-2.1.txt b/doc/proto2cpp/lgpl-2.1.txt deleted file mode 100644 index 4362b4915..000000000 --- a/doc/proto2cpp/lgpl-2.1.txt +++ /dev/null @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/doc/proto2cpp/proto2cpp.py b/doc/proto2cpp/proto2cpp.py deleted file mode 100644 index 137818c78..000000000 --- a/doc/proto2cpp/proto2cpp.py +++ /dev/null @@ -1,225 +0,0 @@ -#!/usr/bin/env python -## -# Doxygen filter for Google Protocol Buffers .proto files. -# This script converts .proto files into C++ style ones -# and prints the output to standard output. -# -# version 0.6-beta-vg -# -# How to enable this filter in Doxygen: -# 1. Generate Doxygen configuration file with command 'doxygen -g ' -# e.g. doxygen -g doxyfile -# 2. In the Doxygen configuration file, find JAVADOC_AUTOBRIEF and set it enabled -# JAVADOC_AUTOBRIEF = YES -# 3. In the Doxygen configuration file, find FILE_PATTERNS and add *.proto -# FILE_PATTERNS = *.proto -# 4. In the Doxygen configuration file, find EXTENSION_MAPPING and add proto=C -# EXTENSION_MAPPING = proto=C -# 5. In the Doxygen configuration file, find INPUT_FILTER and add this script -# INPUT_FILTER = "python proto2cpp.py" -# 6. Run Doxygen with the modified configuration -# doxygen doxyfile -# -# -# Copyright (C) 2016 Regents of the University of California -# Copyright (C) 2012-2015 Timo Marjoniemi -# All rights reserved. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -# -## - -import os -import sys -import re -import fnmatch -import inspect - -## Class for converting Google Protocol Buffers .proto files into C++ style output to enable Doxygen usage. -## -## The C++ style output is printed into standard output.
-## There are three different logging levels for the class: -##
  • #logNone: do not log anything
  • -##
  • #logErrors: log errors only
  • -##
  • #logAll: log everything
-## Logging level is determined by \c #logLevel.
-## Error logs are written to file determined by \c #errorLogFile.
-## Debug logs are written to file determined by \c #logFile. -# -class proto2cpp: - - ## Logging level: do not log anything. - logNone = 0 - ## Logging level: log errors only. - logErrors = 1 - ## Logging level: log everything. - logAll = 2 - - ## Constructor - # - def __init__(self): - ## Debug log file name. - self.logFile = "proto2cpp.log" - ## Error log file name. - self.errorLogFile = "proto2cpp.error.log" - ## Logging level. - self.logLevel = self.logNone - - ## Handles a file. - ## - ## If @p fileName has .proto suffix, it is processed through parseFile(). - ## Otherwise it is printed to stdout as is except for file \c proto2cpp.py without - ## path since it's the script given to python for processing. - ## - ## @param fileName Name of the file to be handled. - # - def handleFile(self, fileName): - if fnmatch.fnmatch(filename, '*.proto'): - self.log('\nXXXXXXXXXX\nXX ' + filename + '\nXXXXXXXXXX\n\n') - # Open the file. Use try to detect whether or not we have an actual file. - try: - with open(filename, 'r') as inputFile: - self.parseFile(inputFile) - pass - except IOError as e: - self.logError('the file ' + filename + ' could not be opened for reading') - - elif not fnmatch.fnmatch(filename, os.path.basename(inspect.getfile(inspect.currentframe()))): - self.log('\nXXXXXXXXXX\nXX ' + filename + '\nXXXXXXXXXX\n\n') - try: - with open(filename, 'r') as theFile: - output = '' - for theLine in theFile: - output += theLine - print(output) - self.log(output) - pass - except IOError as e: - self.logError('the file ' + filename + ' could not be opened for reading') - else: - self.log('\nXXXXXXXXXX\nXX ' + filename + ' --skipped--\nXXXXXXXXXX\n\n') - - ## Parser function. - ## - ## The function takes a .proto file object as input - ## parameter and modifies the contents into C++ style. - ## The modified data is printed into standard output. - ## - ## @param inputFile Input file object - # - def parseFile(self, inputFile): - # Go through the input file line by line. - isEnum = False - inPackage = False - # This variable is here as a workaround for not getting extra line breaks (each line - # ends with a line separator and print() method will add another one). - # We will be adding lines into this var and then print the var out at the end. - theOutput = '' - for line in inputFile: - # Search for comment ("//") and add one more slash character ("/") to the comment - # block to make Doxygen detect it. - matchComment = re.search("//", line) - # Search for semicolon and if one is found before comment, add a third slash character - # ("/") and a smaller than ("<") chracter to the comment to make Doxygen detect it. - matchSemicolon = re.search(";", line) - if matchSemicolon is not None and (matchComment is not None and matchSemicolon.start() < matchComment.start()): - line = line[:matchComment.start()] + "///<" + line[matchComment.end():] - elif matchComment is not None: - line = line[:matchComment.start()] + "///" + line[matchComment.end():] - - # Search for "package " and if one is found before comment, make a namespace - matchPackage = re.search(r"\bpackage\b", line) - if matchPackage is not None and (matchComment is None or matchPackage.start() < matchComment.start()): - isPackage = True - # Convert to C++-style separator and block instead of statement - line = "namespace" + line[:matchPackage.start()] + line[matchPackage.end():].replace(".", "::").replace(";", " {") - - # Search for "repeated" fields and make them template-y - matchRepeated = re.search(r"\brepeated\b", line) - if matchRepeated is not None and (matchComment is None or matchRepeated.start() < matchComment.start()): - # Convert to a template - line = re.sub(r'repeated\s+(\S+)', r'repeated<\1>', line) - - # Search for "enum" and if one is found before comment, - # start changing all semicolons (";") to commas (","). - matchEnum = re.search(r"\benum\b", line) - if matchEnum is not None and (matchComment is None or matchEnum.start() < matchComment.start()): - isEnum = True - # Search again for semicolon if we have detected an enum, and replace semicolon with comma. - if isEnum is True and re.search(";", line) is not None: - matchSemicolon = re.search(";", line) - line = line[:matchSemicolon.start()] + "," + line[matchSemicolon.end():] - # Search for a closing brace. - matchClosingBrace = re.search("}", line) - if isEnum is True and matchClosingBrace is not None: - line = line[:matchClosingBrace.start()] + "};" + line[matchClosingBrace.end():] - isEnum = False - elif isEnum is False and re.search("}", line) is not None: - # Message (to be struct) ends => add semicolon so that it'll - # be a proper C(++) struct and Doxygen will handle it correctly. - line = line[:matchClosingBrace.start()] + "};" + line[matchClosingBrace.end():] - # Search for 'message' and replace it with 'struct' unless 'message' is behind a comment. - matchMsg = re.search(r"\bmessage\b", line) - if matchMsg is not None and (matchComment is None or matchMsg.start() < matchComment.start()): - output = "struct" + line[:matchMsg.start()] + line[matchMsg.end():] - theOutput += output - else: - theOutput += line - - if isPackage: - # Close the package namespace - theOutput += "}" - isPackage = False - - # Now that we've got all lines in the string let's split the lines and print out - # one by one. - # This is a workaround to get rid of extra empty line at the end which print() method adds. - lines = theOutput.splitlines() - for line in lines: - if len(line) > 0: - print(line) - # Our logger does not add extra line breaks so explicitly adding one to make the log more readable. - self.log(line + '\n') - else: - self.log('\n --- skipped empty line') - - ## Writes @p string to log file. - ## - ## #logLevel must be #logAll or otherwise the logging is skipped. - ## - ## @param string String to be written to log file. - # - def log(self, string): - if self.logLevel >= self.logAll: - with open(self.logFile, 'a') as theFile: - theFile.write(string) - - ## Writes @p string to error log file. - ## - ## #logLevel must be #logError or #logAll or otherwise the logging is skipped. - ## - ## @param string String to be written to error log file. - # - def logError(self, string): - if self.logLevel >= self.logError: - with open(self.errorLogFile, 'a') as theFile: - theFile.write(string) - -converter = proto2cpp() -# Doxygen will give us the file names -for filename in sys.argv[1:]: - converter.handleFile(filename) - -# end of file diff --git a/doxygen-config.cmake.in b/doxygen-config.cmake.in index 53ef95edb..e25e52981 100644 --- a/doxygen-config.cmake.in +++ b/doxygen-config.cmake.in @@ -11,4 +11,4 @@ OUTPUT_DIRECTORY = "@CMAKE_CURRENT_SOURCE_DIR@/doc" JAVADOC_AUTOBRIEF = YES EXTENSION_MAPPING = proto=C FILE_PATTERNS = *.proto -INPUT_FILTER = "python @CMAKE_CURRENT_SOURCE_DIR@/doc/proto2cpp/proto2cpp.py" +INPUT_FILTER = "python @FILTER_PROTO2CPP_PY_PATH@/proto2cpp.py" From 8135444bfa216ef7a532cb109946bb2c683038bb Mon Sep 17 00:00:00 2001 From: AhmedMzid Date: Fri, 31 Mar 2017 11:39:30 +0200 Subject: [PATCH 03/11] Correct comments to be compatible with doxygen and add graphs generated by Graphviz --- CMakeLists.txt | 5 +- README.md | 9 +- ...config.cmake.in => doxygen_config.cmake.in | 9 +- osi_common.proto | 276 ++++++---- osi_datarecording.proto | 34 +- osi_detectedlandmark.proto | 202 +++++--- osi_detectedlane.proto | 18 +- osi_detectedobject.proto | 125 +++-- osi_detectedoccupant.proto | 12 +- osi_environment.proto | 71 +-- osi_groundtruth.proto | 77 +-- osi_landmark.proto | 487 +++++++++++------- osi_lane.proto | 289 ++++++----- osi_lowleveldata.proto | 109 ++-- osi_modelinternal.proto | 67 +-- osi_object.proto | 246 +++++---- osi_occupant.proto | 88 ++-- osi_sensordata.proto | 74 +-- osi_sensorspecific.proto | 18 +- 19 files changed, 1275 insertions(+), 941 deletions(-) rename doxygen-config.cmake.in => doxygen_config.cmake.in (72%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ab03ab3e..65990344c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,9 +3,10 @@ cmake_minimum_required(VERSION 3.7) # set name and version of the project project(open_simulation_interface) set(VERSION_MAJOR 2) -set(VERSION_MINOR 1) +set(VERSION_MINOR 2) set(VERSION_PATCH 1) + find_package(Protobuf 2.6.1 REQUIRED) set(OSI_PROTO_FILES @@ -83,7 +84,7 @@ else() else() - set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-config.cmake.in) + set(doxyfile_in ${CMAKE_CURRENT_SOURCE_DIR}/doxygen_config.cmake.in) set(doxyfile ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) configure_file(${doxyfile_in} ${doxyfile} @ONLY) diff --git a/README.md b/README.md index af135a53a..aa00f33b9 100644 --- a/README.md +++ b/README.md @@ -81,10 +81,11 @@ Documentation ------------- In order to generate the doxygen documentation for OSI, please follow the following steps: -1. Install Doxygen and set an environmental variable 'Doxygen' with the path to the binary file. -2. Download and unzip the [zip file containing the filter proto2cpp.py](https://sourceforge.net/projects/proto2cpp/files/latest/download ). -3. From the cmd navigate to the build directory and run: +1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html) and set an environmental variable 'doxygen' with the path to the binary file. +2. Download and unzip the [zip file containing the filter proto2cpp.py](https://sourceforge.net/p/proto2cpp/wiki/Home/ ). +3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ) and set an environmental variable 'dot' with the path to the binary file. +4. From the cmd navigate to the build directory and run: ```cmd cmake -DFILTER_PROTO2CPP_PY_PATH= ``` -4. The build process will then generate the doxygen documentation under the directory doc. \ No newline at end of file +5. The build process will then generate the doxygen documentation under the directory doc. \ No newline at end of file diff --git a/doxygen-config.cmake.in b/doxygen_config.cmake.in similarity index 72% rename from doxygen-config.cmake.in rename to doxygen_config.cmake.in index e25e52981..ad642210c 100644 --- a/doxygen-config.cmake.in +++ b/doxygen_config.cmake.in @@ -4,11 +4,18 @@ PROJECT_NUMBER = @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ #Set input and output directories INPUT = "@CMAKE_CURRENT_SOURCE_DIR@" +INPUT += "@CMAKE_CURRENT_SOURCE_DIR@/README.md" + +USE_MDFILE_AS_MAINPAGE = "@CMAKE_CURRENT_SOURCE_DIR@/README.md" + OUTPUT_DIRECTORY = "@CMAKE_CURRENT_SOURCE_DIR@/doc" +IMAGE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/doc/images" # There is no standard configuration for .proto files documentation. # A Doxygen filter for .proto files has to be added under the directory doc/. -JAVADOC_AUTOBRIEF = YES +JAVADOC_AUTOBRIEF = NO EXTENSION_MAPPING = proto=C FILE_PATTERNS = *.proto INPUT_FILTER = "python @FILTER_PROTO2CPP_PY_PATH@/proto2cpp.py" +HAVE_DOT = YES + diff --git a/osi_common.proto b/osi_common.proto index 763bcf2d9..c7f2ebd3d 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -4,212 +4,260 @@ option optimize_for = SPEED; package osi; -/// -/// The interface version number. -/// + +// \brief The interface version number. + message InterfaceVersion { - /// The field containing the version number. Should be left on default, not to be modified by sender. Increments will - /// happen as part of changes to the whole interface. + // The field containing the version number. Should be left on default, not to be modified by sender. Increments will + // happen as part of changes to the whole interface. optional uint32 major = 1 [default = 2]; optional uint32 minor = 2 [default = 1]; - optional uint32 patch = 3 [default = 0]; + optional uint32 patch = 3 [default = 1]; } -/// -/// A cartesian 3D vector for positions, velocities or accelerations. -/// Units are [m] for positions, [m/s] for velocities and [m/s^2] for accelerations. -/// +// +// \brief A cartesian 3D vector for positions, velocities or accelerations. +// +// Units are [m] for positions, [m/s] for velocities and [m/s^2] for accelerations. +// message Vector3d { - /// The x coordinate + // The x coordinate + // optional double x = 1; - /// The y coordinate + // The y coordinate + // optional double y = 2; - /// The z coordinate + // The z coordinate + // optional double z = 3; } -/// -/// A cartesian 2D vector for positions, velocities or accelerations. -/// Units are [m] for positions, [m/s] for velocities and [m/s^2] for accelerations. -/// +// +// \brief A cartesian 2D vector for positions, velocities or accelerations. +// +// Units are [m] for positions, [m/s] for velocities and [m/s^2] for accelerations. +// message Vector2d { - /// The x coordinate + // The x coordinate + // optional double x = 1; - /// The y coordinate + // The y coordinate + // optional double y = 2; } -/// -/// A timestamp. -/// Names and types of fields chosen in accordance with google/protobuf/timestamp.proto to allow a possible switch in the -/// future. Definition of zero point in time differs and does not use Unix epoch. -/// +// +// \brief A timestamp. +// +// Names and types of fields chosen in accordance with google/protobuf/timestamp.proto to allow a possible switch in the future. +// Definition of zero point in time differs and does not use Unix epoch. +// message Timestamp { - /// The number of seconds since start of the simulation / system / vehicle. Unit: [s]. + // The number of seconds since start of the simulation / system / vehicle. Unit: [s]. + // optional int64 seconds = 1; - /// The number of nanoseconds since the start of the last second. Unit: [ns]. + // The number of nanoseconds since the start of the last second. Unit: [ns]. + // optional int32 nanos = 2; } -/// -/// A 3D dimension, e.g. parameters of a 3D bounding box. -/// Units are all [m]. -/// +// +// \brief A 3D dimension, e.g. parameters of a 3D bounding box. +// +// Units are all [m]. +// message Dimension3d { - /// The width of the bounding box. + // The width of the bounding box. + // optional double width = 1; - /// The length of the bounding box. + // The length of the bounding box. + // optional double length = 2; - ///The height of the bounding box. + //The height of the bounding box. + // optional double height = 3; } -/// -/// A 3D orientation, orientation rate or orientation acceleration. -/// Units are [rad] for orientation, [rad/s] for rates and [rad/s^2] for accelerations. The preferred angular range is -/// (-pi, pi]. See http://planning.cs.uiuc.edu/node102.html for a definition of the rotational order. The rotations are -/// to be performed roll first, then the pitch, and finally the yaw. Rotations are defined in the reference coordinate -/// frame around z (=yaw), y (=pitch) and x (=roll), not in the body frame of the object. Rotations with positive angles -/// are performed counter-clockwise. -/// -/// Roll/Pitch are 0 if objects xy-plane corresponds it's parent xy-plane. -/// Yaw is 0 if the x axis is parallel to the x axis of it's parent coordinate system. -/// +// +// \brief A 3D orientation, orientation rate or orientation acceleration. +// +// Units are +// \arg [rad] for orientation +// \arg [rad/s] for rates +// \arg [rad/s^2] for accelerations +// +// The preferred angular range is (-pi, pi]. The coordinate system is defined as right-handed. +// +// The rotations are to be performed \b roll \b first, \b pitch \b second, and \b yaw \b third to follow the definition according to [1]. +// +// Rotations are defined in the reference coordinate frame around z (=yaw), y (=pitch) and x (=roll), not in the body frame of the object. +// Rotations with positive angles are performed counter-clockwise. +// +// Roll/Pitch are 0 if objects xy-plane corresponds it's parent xy-plane. +// Yaw is 0 if the x axis is parallel to the x axis of it's parent coordinate system. +// +// \par References: +// [1] LAVALLE, Steven M. Planning algorithms. Cambridge university press, 2006. Chapter 3.2.3. +// See http://planning.cs.uiuc.edu/node102.html for online version of this chapter. +// message Orientation3d { - /// The roll angle/rate/acceleration. + // The roll angle/rate/acceleration. + // optional double roll = 1; - /// The pitch angle/rate/acceleration. + // The pitch angle/rate/acceleration. + // optional double pitch = 2; - /// The yaw angle/rate/acceleration. + // The yaw angle/rate/acceleration. + // optional double yaw = 3; } -/// -/// A common identifier. -/// Has to be unique among all simulated items at any given time. For ground truth, the identifier of an item (object, -/// lane, sign, etc.) must remain stable over its lifetime. Identifier values might be only be reused if the available -/// address space is exhausted and the specific values have not been in use for several timesteps. Sensor specific -/// tracking ids have no restrictions and should behave according to the sensor specifications. -/// +// +// \brief A common identifier. +// +// Has to be unique among all simulated items at any given time. For ground truth, the identifier of an item (object, +// lane, sign, etc.) must remain stable over its lifetime. Identifier values might be only be reused if the available +// address space is exhausted and the specific values have not been in use for several timesteps. Sensor specific +// tracking ids have no restrictions and should behave according to the sensor specifications. +// message Identifier { - /// The identifier's value. + // The identifier's value. + // optional uint64 value = 1; } -/// -/// Specifies the mounting position of a sensor. Details are specified in each instance where MountingPosition is used. -/// +// +// \brief Specifies the mounting position of a sensor. +// +// Details are specified in each instance where MountingPosition is used. +// message MountingPosition { - /// Offset position relative to specified reference coordinate system. + // Offset position relative to specified reference coordinate system. + // optional Vector3d position = 1; - /// Orientation offset relative to specified reference coordinate system. + // Orientation offset relative to specified reference coordinate system. + // optional Orientation3d orientation = 2; } -/// -/// A polar representation for a point / vector in 3D space used for low level representations of radar detections. -/// Units are [m] for radial distance and [rad] for azimuth and elevation angles. If azimuth and elevation are zero, the -/// referenced point is directly in front / vector is pointing directly in the central viewing direction of the sensor. -/// +// +// \brief A polar representation for a point / vector in 3D space used for low level representations of radar detections. +// +// Units are [m] for radial distance and [rad] for azimuth and elevation angles. If azimuth and elevation are zero, the +// referenced point is directly in front / vector is pointing directly in the central viewing direction of the sensor. +// message Polar3d { - /// The radial distance. + // The radial distance. + // optional double distance = 1; - /// The azimuth (horizontal) angle. + // The azimuth (horizontal) angle. + // optional double azimuth = 2; - /// The elevation (vertical) angle. + // The elevation (vertical) angle. + // optional double elevation = 3; } -/// -/// The base attributes of object or similar that is stationary. -/// This includes the StationaryObject, TrafficSign, TrafficLight, RoadMarking messages. -/// +// +// \brief The base attributes of object or similar that is stationary. +// +// This includes the StationaryObject, TrafficSign, TrafficLight, RoadMarking messages. +// message BaseStationary { - /// The 3D dimension of the landmark (bounding box): + // The 3D dimension of the landmark (bounding box): + // optional Dimension3d dimension = 1; - /// The reference point for position and rotation (orientation): center (x, y, z) of bounding box. + // The reference point for position and rotation (orientation): center (x, y, z) of bounding box. + // optional Vector3d position = 2; - /// The relative orientation of the landmark w.r.t its parent frame. + // The relative orientation of the landmark w.r.t its parent frame. + // optional Orientation3d orientation = 3; - /// Usage as ground truth: - /// The two dimensional (flat) contour of the object. This is an extension of the concept of a - /// bounding box as defined in Dimension3d. The contour is the projection of the object outline - /// on the z-plane in the object frame (independent of its current position and orientation). - /// Usage as sensor data: - /// The polygon describes the visible part of the object's contour. - /// General definitions: - /// The polygon is defined in the local object frame: x pointing forward and y to the left. - /// The origin is the center of the bounding box. - /// As ground truth, the polygon is closed by connecting the last with the first point. Therefore - /// these two points are different and there are at least three points. - /// As sensor data, the polygon is open. - /// The polygon is defined counter-clockwise. + // Usage as ground truth: + // The two dimensional (flat) contour of the object. This is an extension of the concept of a + // bounding box as defined in Dimension3d. The contour is the projection of the object outline + // on the z-plane in the object frame (independent of its current position and orientation). + // Usage as sensor data: + // The polygon describes the visible part of the object's contour. + // General definitions: + // The polygon is defined in the local object frame: x pointing forward and y to the left. + // The origin is the center of the bounding box. + // As ground truth, the polygon is closed by connecting the last with the first point. Therefore + // these two points are different and there are at least three points. + // As sensor data, the polygon is open. + // The polygon is defined counter-clockwise. repeated Vector2d base_polygon = 4; } -/// -/// The base attributes of each object that is moving. -/// This includes the MovingObject messages. -/// +// +// \brief The base attributes of each object that is moving. +// +// This includes the MovingObject messages. +// message BaseMoving { - /// The 3D dimension of the object (bounding box): + // The 3D dimension of the object (bounding box): + // optional Dimension3d dimension = 1; - /// The reference point for position and rotation (orientation): center (x, y, z) of bounding box. + // The reference point for position and rotation (orientation): center (x, y, z) of bounding box. + // optional Vector3d position = 2; - /// The relative orientation of the object w.r.t its parent frame. + // The relative orientation of the object w.r.t its parent frame. optional Orientation3d orientation = 3; - /// The relative velocity of the object w.r.t. its parent frame and parent velocity. - /// Obviously, the velocity becomes global/absolute if the parent frame does not move. + // The relative velocity of the object w.r.t. its parent frame and parent velocity. + // Obviously, the velocity becomes global/absolute if the parent frame does not move. + // optional Vector3d velocity = 4; - /// The relative acceleration of the object w.r.t. its parent frame and parent acceleration. - /// Obviously, the acceleration becomes global/absolute if the parent frame is not accelerating. + // The relative acceleration of the object w.r.t. its parent frame and parent acceleration. + // Obviously, the acceleration becomes global/absolute if the parent frame is not accelerating. + // optional Vector3d acceleration = 5; - /// The relative orientation rate of the object w.r.t. its parent frame and parent orientation rate. - /// Obviously, the orientation rate becomes global/absolute if the parent frame is not rotating. + // The relative orientation rate of the object w.r.t. its parent frame and parent orientation rate. + // Obviously, the orientation rate becomes global/absolute if the parent frame is not rotating. + // optional Orientation3d orientation_rate = 6; - /// Usage as ground truth: - /// The two dimensional (flat) contour of the object. This is an extension of the concept of a - /// bounding box as defined in Dimension3d. The contour is the projection of the object outline - /// on the z-plane in the object frame (independent of its current position and orientation). - /// Usage as sensor data: - /// The polygon describes the visible part of the object's contour. - /// General definitions: - /// The polygon is defined in the local object frame: x pointing forward and y to the left. - /// The origin is the center of the bounding box. - /// As ground truth, the polygon is closed by connecting the last with the first point. Therefore - /// these two points are different and there are at least three points. - /// As sensor data, the polygon is open. - /// The polygon is defined counter-clockwise. + // Usage as ground truth: + // The two dimensional (flat) contour of the object. This is an extension of the concept of a + // bounding box as defined in Dimension3d. The contour is the projection of the object outline + // on the z-plane in the object frame (independent of its current position and orientation). + // Usage as sensor data: + // The polygon describes the visible part of the object's contour. + // General definitions: + // The polygon is defined in the local object frame: x pointing forward and y to the left. + // The origin is the center of the bounding box. + // As ground truth, the polygon is closed by connecting the last with the first point. Therefore + // these two points are different and there are at least three points. + // As sensor data, the polygon is open. + // The polygon is defined counter-clockwise. repeated Vector2d base_polygon = 7; } diff --git a/osi_datarecording.proto b/osi_datarecording.proto index e28a37590..614b35329 100644 --- a/osi_datarecording.proto +++ b/osi_datarecording.proto @@ -6,30 +6,34 @@ import "osi_sensordata.proto"; package osi; -/// -/// (Time) Series of SensorData messages that may be used for data recording or internal buffering by some sensor models. -/// +// +// \brief (Time) Series of SensorData messages that may be used for data recording or internal buffering by some sensor models. +// message SensorDataSeries { - /// List of sensor data messages for subsequent timesteps. + // List of sensor data messages for subsequent timesteps. + // repeated SensorData sensor_data = 1; } -/// -/// List of SensorData interface copies, one for each sensor in the vehicle. -/// Can be used to bundle output of multiple sensors in one transmission. -/// +// +// \brief List of SensorData interface copies, one for each sensor in the vehicle. +// +// Can be used to bundle output of multiple sensors in one transmission. +// message SensorDataList { - /// List of sensor data for multiple sensors at a specific timestep. - repeated SensorData sensor = 1; + // List of sensor data for multiple sensors at a specific timestep. + // + repeated SensorData sensor = 1; } -/// -/// List of sensors where each element contains a time series of SensorData messages. -/// +// +// \brief List of sensors where each element contains a time series of SensorData messages. +// message SensorDataSeriesList { - /// List of sensor data for multiple sensors at subsequent timesteps. - repeated SensorDataSeries sensor = 1; + // List of sensor data for multiple sensors at subsequent timesteps. + // + repeated SensorDataSeries sensor = 1; } diff --git a/osi_detectedlandmark.proto b/osi_detectedlandmark.proto index aecbca448..36060a237 100644 --- a/osi_detectedlandmark.proto +++ b/osi_detectedlandmark.proto @@ -7,191 +7,231 @@ import "osi_landmark.proto"; package osi; -/// -/// A traffic sign in the environment as detected by the sensor. -/// +// +// \brief A traffic sign in the environment as detected by the sensor. +// message DetectedTrafficSign { - /// The id of the original traffic sign in the ground truth. - /// In case of a ghost sign (no corresponding ground truth), this field should be unset. + // The id of the original traffic sign in the ground truth. + // In case of a ghost sign (no corresponding ground truth), this field should be unset. optional Identifier ground_truth_id = 1; - /// A list of candidates for this traffic sign as estimated by the sensor. - repeated CandidateSign candidate_sign = 2; + // A list of candidates for this traffic sign as estimated by the sensor. + // + repeated CandidateSign candidate_sign = 2; - /// A list of candidates for (a) possible supplementary sign(s) as estimated by the sensor. + // A list of candidates for (a) possible supplementary sign(s) as estimated by the sensor. + // repeated CandidateSupplementarySign candidate_supplementary_sign = 3; - /// The detected geometry of the traffic sign. + // The detected geometry of the traffic sign. + // optional Geometry geometry = 4; - /// The estimated probability that this traffic sign really exists. Range [0,1]. + // The estimated probability that this traffic sign really exists. Range [0,1]. + // optional double existence_probability = 5; - /// The measurement state of the traffic sign. + // The measurement state of the traffic sign. + // optional MeasurementState measurement_state = 6; - /// The standard deviation of the base parameters of the detected traffic sign. + // The standard deviation of the base parameters of the detected traffic sign. + // optional BaseStationary standard_deviation = 7; - /// Links to the corresponding lanes. + // Links to the corresponding lanes. + // repeated RelevantLane relevant_lane = 8; - /// Definition of traffic sign geometries. + // Definition of traffic sign geometries. + // enum Geometry { - /// Geometry of the traffic sign is unknown. - GEOMETRY_UNKNOWN = 0; - /// Geometry of the traffic sign is unspecified (but known). + // Geometry of the traffic sign is unknown. + // + GEOMETRY_UNKNOWN = 0; + // Geometry of the traffic sign is unspecified (but known). + // GEOMETRY_OTHER = 1; - /// Traffic sign has a triangular geometry. + // Traffic sign has a triangular geometry. + // GEOMETRY_TRIANGLE = 2; - /// Traffic sign has a circular geometry. + // Traffic sign has a circular geometry. + // GEOMETRY_CIRCLE = 3; - /// Traffic sign has a square geometry. + // Traffic sign has a square geometry. + // GEOMETRY_SQUARE = 4; } - /// Definition of measurement states. + // Definition of measurement states. + // enum MeasurementState { - /// Measurement state is unknown. + // Measurement state is unknown. + // MEASUREMENT_STATE_UNKNOWN = 0; - /// Measurement state is unspecified (but known, i.e. value is not part of this enum list). + // Measurement state is unspecified (but known, i.e. value is not part of this enum list). + // MEASUREMENT_STATE_OTHER = 1; - /// Traffic sign has been measured by the sensor in the current timestep. + // Traffic sign has been measured by the sensor in the current timestep. + // MEASUREMENT_STATE_MEASURED = 2; - /// Traffic sign has not been measured by the sensor in the current timestep. Values provided by tracking only. + // Traffic sign has not been measured by the sensor in the current timestep. Values provided by tracking only. + // MEASUREMENT_STATE_PREDICTED = 3; } } -/// -/// A candidate for a detected traffic sign as estimated by the sensor. -/// +// +// \brief A candidate for a detected traffic sign as estimated by the sensor. +// message CandidateSign { - /// The definition of the candidate's properties. - /// The sign.id values of all CandidateSigns within one DetectedTrafficSign correspond to the tracking id and must - /// be identical. + // The definition of the candidate's properties. + // The sign.id values of all CandidateSigns within one DetectedTrafficSign correspond to the tracking id and must + // be identical. optional TrafficSign sign = 1; - /// The estimated probability that this candidate is the true value. Range [0,1]. - /// The sum of all candidate_probabilities must be one. + // The estimated probability that this candidate is the true value. Range [0,1]. + // The sum of all candidate_probabilities must be one. optional double candidate_probability = 2; } -/// -/// A candidate for (a) detected supplementary sign(s) as estimated by the sensor. -/// +// +// \brief A candidate for (a) detected supplementary sign(s) as estimated by the sensor. +// message CandidateSupplementarySign { - /// The definition of one of more supplementary signs that together define this candidate. + // The definition of one of more supplementary signs that together define this candidate. + // repeated SupplementarySign sign = 1; - /// The estimated probability that this candidate is the true value. Range [0,1]. - /// The sum of all candidate_probabilities must be one. + // The estimated probability that this candidate is the true value. Range [0,1]. + // The sum of all candidate_probabilities must be one. optional double candidate_probability = 2; } -/// -/// A traffic light in the environment as detected by the sensor. -/// +// +// \brief A traffic light in the environment as detected by the sensor. +// message DetectedTrafficLight { - /// The id of the original traffic light in the ground truth. - /// In case of a ghost detection (no corresponding ground truth), this field should be unset. + // The id of the original traffic light in the ground truth. + // In case of a ghost detection (no corresponding ground truth), this field should be unset. optional Identifier ground_truth_id = 1; - /// Description of the detected traffic light. + // Description of the detected traffic light. + // optional TrafficLight traffic_light = 2; - /// Determines for which directions the traffic light applies. + // Determines for which directions the traffic light applies. + // repeated RelevantDirection relevant_direction = 3; - /// Links to the corresponding lanes. + // Links to the corresponding lanes. + // repeated RelevantLane relevant_lane = 4; - /// Existence probability. Range [0,1]. + // Existence probability. Range [0,1]. + // optional double existence_probability = 5; - /// The standard deviation of the base parameters of the detected traffic light. + // The standard deviation of the base parameters of the detected traffic light. + // optional BaseStationary standard_deviation = 6; - /// - /// Further specifies the relevant directions of the traffic light. - /// + // + // \brief Further specifies the relevant directions of the traffic light. + // message RelevantDirection { - /// The direction the traffic light corresponds to. + // The direction the traffic light corresponds to. + // optional Direction direction = 1; - /// Relevance probability. Range [0,1]. + // Relevance probability. Range [0,1]. + // optional double relevance_probability = 2; - /// Specifies the different directions. + // Specifies the different directions. + // enum Direction { - /// Direction is unknown (must not be used in ground truth). + // Direction is unknown (must not be used in ground truth). + // DIRECTION_UNKNOWN = 0; - /// Other (unspecified but known) direction. + // Other (unspecified but known) direction. + // DIRECTION_OTHER = 1; - /// Direction is straight. + // Direction is straight. + // DIRECTION_STRAIGHT = 2; - /// Direction is left. + // Direction is left. + // DIRECTION_LEFT = 3; - /// Direction is right. + // Direction is right. + // DIRECTION_RIGHT = 4; } } } -/// -/// Further specifies the relevant lane of a detected object. -/// +// +// \brief Further specifies the relevant lane of a detected object. +// message RelevantLane { - /// Tracking id of the lane segment. + // Tracking id of the lane segment. + // optional Identifier lane_id = 1; - /// Relevance probability. Range [0,1]. + // Relevance probability. Range [0,1]. + // optional double relevance_probability = 2; } -/// -/// A road marking in the environment as detected by the sensor. -/// +// +// \brief A road marking in the environment as detected by the sensor. +// message DetectedRoadMarking { - /// Tracking id of the road marking. + // Tracking id of the road marking. + // optional Identifier tracking_id = 1; - /// The id of the original road marking in the ground truth. - /// In case of a ghost detection (no corresponding ground truth), this field should be unset. + // The id of the original road marking in the ground truth. + // In case of a ghost detection (no corresponding ground truth), this field should be unset. optional Identifier ground_truth_id = 2; - /// A list of candidates for this road marking as estimated by the sensor. + // A list of candidates for this road marking as estimated by the sensor. + // repeated CandidateRoadMarking candidate_road_marking = 3; - /// Existence probability. Range [0,1]. + // Existence probability. Range [0,1]. + // optional double existence_probability = 4; - /// Links to the corresponding lanes. + // Links to the corresponding lanes. + // repeated RelevantLane relevant_lane = 5; - /// The standard deviation of the base parameters of the detected road marking. + // The standard deviation of the base parameters of the detected road marking. + // optional BaseStationary standard_deviation = 6; } -/// -/// A candidate for a detected road marking as estimated by the sensor. -/// +// +// \brief A candidate for a detected road marking as estimated by the sensor. +// message CandidateRoadMarking { - /// The description of the road marking. + // The description of the road marking. + // optional RoadMarking road_marking = 1; - /// The estimated probability that this candidate is the true value. Range [0,1]. - /// The sum of all candidate_probabilities must be one. + // The estimated probability that this candidate is the true value. Range [0,1]. + // The sum of all candidate_probabilities must be one. optional double candidate_probability = 2; } diff --git a/osi_detectedlane.proto b/osi_detectedlane.proto index 7b3344489..9adf40259 100644 --- a/osi_detectedlane.proto +++ b/osi_detectedlane.proto @@ -7,19 +7,21 @@ import "osi_lane.proto"; package osi; -/// -/// A lane segment as detected by the sensor. -/// +// +// \brief A lane segment as detected by the sensor. +// message DetectedLane { - /// The id of the original lane in the ground truth. - /// Multiple entries if the detected lane is a merge of multiple lanes in ground truth (as lane segment definitions - /// may vary between sensor and ground truth). + // The id of the original lane in the ground truth. + // Multiple entries if the detected lane is a merge of multiple lanes in ground truth (as lane segment definitions + // may vary between sensor and ground truth). repeated Identifier ground_truth_id = 1; - /// The detected lane. + // The detected lane. + // optional Lane lane = 2; - /// Estimated probability that this lane really exists. Range [0,1]. + // Estimated probability that this lane really exists. Range [0,1]. + // optional double existence_probability = 3; } diff --git a/osi_detectedobject.proto b/osi_detectedobject.proto index 8036057fd..e6a07b7c5 100644 --- a/osi_detectedobject.proto +++ b/osi_detectedobject.proto @@ -9,105 +9,128 @@ import "osi_sensorspecific.proto"; package osi; -/// -/// Object in the environment as detected and perceived by the sensor. -/// +// +// \brief Object in the environment as detected and perceived by the sensor. +// message DetectedObject { - /// Specific id of the object as assigned by the sensor internally. Need not match with ground_truth_id. - optional Identifier tracking_id = 1; + // Specific id of the object as assigned by the sensor internally. Need not match with ground_truth_id. + // + optional Identifier tracking_id = 1; - /// The id of the original object in the ground truth list of vehicles / objects / .. - /// Multiple entries if detected object is a merge of multiple ground truth objects. + // The id of the original object in the ground truth list of vehicles / objects / .. + // Multiple entries if detected object is a merge of multiple ground truth objects. repeated Identifier ground_truth_id = 2; - /// Base parameters of the object. Reference point is the middle of the bounding box of the target object. + // Base parameters of the object. Reference point is the middle of the bounding box of the target object. + // optional BaseMoving object = 3; - /// The standard deviations of the base parameters in object (cross correlations are currently neglected). + // The standard deviations of the base parameters in object (cross correlations are currently neglected). + // optional BaseMoving standard_deviation = 4; - /// The estimated probabilities for the object to belong to a specific class. + // The estimated probabilities for the object to belong to a specific class. + // optional ClassProbability class_probability = 5; - /// The estimated probability that this object really exists. Range [0,1]. + // The estimated probability that this object really exists. Range [0,1]. + // optional double existence_probability = 6; - /// Current state of lights as perceived by sensor, only relevant if the object is estimated to be an object that - /// has lights. + // Current state of lights as perceived by sensor, only relevant if the object is estimated to be an object that + // has lights. optional Vehicle.LightState light_state = 7; - /// Reference point of the sensor measurement (required to decouple position and bounding box estimation) as used by - /// the sensor (model). - /// Note that the value of this field has no impact on the value of object.position, which always references the - /// center of the object / bounding box. + // Reference point of the sensor measurement (required to decouple position and bounding box estimation) as used by + // the sensor (model). + // Note that the value of this field has no impact on the value of object.position, which always references the + // center of the object / bounding box. optional ReferencePoint reference_point = 8; - /// Additional internal data and state flags required and used by the sensor-models, should not be used by - /// subscribers to SensorData. Generally this field should be cleared after internal processing. + // Additional internal data and state flags required and used by the sensor-models, should not be used by + // subscribers to SensorData. Generally this field should be cleared after internal processing. optional ModelInternalObject model_internal_object = 9; - /// Additional data that is specific to radar sensors. - /// Field need not be set if simulated sensor is not a radar sensor. + // Additional data that is specific to radar sensors. + // Field need not be set if simulated sensor is not a radar sensor. optional RadarSpecificObjectData radar_specifics = 10; - /// Additional data that is specific to lidar sensors. - /// Field need not be set if simulated sensor is not a lidar sensor. + // Additional data that is specific to lidar sensors. + // Field need not be set if simulated sensor is not a lidar sensor. optional LidarSpecificObjectData lidar_specifics = 11; - /// Additional data that is specific to camera sensors. - /// Field need not be set if simulated sensor is not a camera sensor. + // Additional data that is specific to camera sensors. + // Field need not be set if simulated sensor is not a camera sensor. optional CameraSpecificObjectData camera_specifics = 12; - /// Definition of available reference points. + // Definition of available reference points. + // enum ReferencePoint { - /// Reference point is unknown, i.e. sensor does not report a reference point for the position coordinate. - /// Value must not be used in ground truth data. - /// Usually this means that the reference point for the given position coordinates is a largely arbitrary point - /// within the bounding volume unknown to the sensor. If this value is set, the center of the bounding box should - /// be used as reference point by convention, unless the specific use case requires otherwise. + // Reference point is unknown, i.e. sensor does not report a reference point for the position coordinate. + // Value must not be used in ground truth data. + // Usually this means that the reference point for the given position coordinates is a largely arbitrary point + // within the bounding volume unknown to the sensor. If this value is set, the center of the bounding box should + // be used as reference point by convention, unless the specific use case requires otherwise. REFERENCE_POINT_UNKNOWN = 0; - /// Other (unspecified but known) reference point. + // Other (unspecified but known) reference point. + // REFERENCE_POINT_OTHER = 1; - /// Center of the bounding box. + // Center of the bounding box. + // REFERENCE_POINT_CENTER = 2; - /// Middle-Left of the bounding box. + // Middle-Left of the bounding box. + // REFERENCE_POINT_MIDDLE_LEFT = 3; - /// Middle-Right of the bounding box. + // Middle-Right of the bounding box. + // REFERENCE_POINT_MIDDLE_RIGHT = 4; - /// Rear-Middle of the bounding box. + // Rear-Middle of the bounding box. + // REFERENCE_POINT_REAR_MIDDLE = 5; - /// Rear-Left of the bounding box. + // Rear-Left of the bounding box. + // REFERENCE_POINT_REAR_LEFT = 6; - /// Rear-Right of the bounding box. + // Rear-Right of the bounding box. + // REFERENCE_POINT_REAR_RIGHT = 7; - /// Front-Middle of the bounding box. + // Front-Middle of the bounding box. + // REFERENCE_POINT_FRONT_MIDDLE = 8; - /// Front-Left of the bounding box. + // Front-Left of the bounding box. + // REFERENCE_POINT_FRONT_LEFT = 9; - /// Front-Right of the bounding box. + // Front-Right of the bounding box. + // REFERENCE_POINT_FRONT_RIGHT = 10; } - /// - /// Probabilities for the classification of the object as perceived by the sensor. - /// + // + // \brief Probabilities for the classification of the object as perceived by the sensor. + // message ClassProbability { - /// Probability that the object has unknown type. Range [0,1]. + // Probability that the object has unknown type. Range [0,1]. + // optional double prob_unknown = 1; - /// Probability that the object is a car. Range [0,1]. + // Probability that the object is a car. Range [0,1]. + // optional double prob_car = 2; - /// Probability that the object is a truck. Range [0,1]. + // Probability that the object is a truck. Range [0,1]. + // optional double prob_truck = 3; - /// Probability that the object is a motorbike. Range [0,1]. + // Probability that the object is a motorbike. Range [0,1]. + // optional double prob_motorbike = 4; - /// Probability that the object is a bicycle. Range [0,1]. + // Probability that the object is a bicycle. Range [0,1]. + // optional double prob_bicycle = 5; - /// Probability that the object is a pedestrian. Range [0,1]. + // Probability that the object is a pedestrian. Range [0,1]. + // optional double prob_pedestrian = 6; - /// Probability that the object is a stationary object. Range [0,1]. + // Probability that the object is a stationary object. Range [0,1]. + // optional double prob_stationary = 7; } } diff --git a/osi_detectedoccupant.proto b/osi_detectedoccupant.proto index 1fc7c713e..5de958b72 100644 --- a/osi_detectedoccupant.proto +++ b/osi_detectedoccupant.proto @@ -7,14 +7,16 @@ import "osi_occupant.proto"; package osi; -/// -/// A vehicle occupant as detected and perceived by an interior sensor. -/// +// +// \brief A vehicle occupant as detected and perceived by an interior sensor. +// message DetectedOccupant { - /// The detected vehicle occupant + // The detected vehicle occupant + // optional Occupant occupant = 1; - /// The id of the original vehicle occupant in the ground truth. + // The id of the original vehicle occupant in the ground truth. + // optional Identifier ground_truth_occupant_id = 2; } diff --git a/osi_environment.proto b/osi_environment.proto index 9e9ee79dc..44670321e 100644 --- a/osi_environment.proto +++ b/osi_environment.proto @@ -4,70 +4,83 @@ option optimize_for = SPEED; package osi; -/// -/// The conditions of the environment. -/// +// +// \brief The conditions of the environment. +// message EnvironmentalConditions { - /// The ambient illumination of the environment. + // The ambient illumination of the environment. + // optional AmbientIllumination ambient_illumination = 1; - /// The time of day. + // The time of day. + // optional TimeOfDay time_of_day = 2; - /// Atmospheric pressure in Pascal at z=0.0 in world frame + // Atmospheric pressure in Pascal at z=0.0 in world frame + // optional double atmospheric_pressure = 3; - /// Temperature in Kelvin at z=0.0 in world frame + // Temperature in Kelvin at z=0.0 in world frame + // optional double temperature = 4; - /// Precipitation + // Precipitation + // optional Precipitation precipitation = 5; - /// Definition of precipitation states. See https://en.wikipedia.org/wiki/Rain#Measurement + // Definition of precipitation states. See https://en.wikipedia.org/wiki/Rain#Measurement + // enum Precipitation { - /// Light intensity rain, when the precipitation rate is < 2.5 mm per hour + // Light intensity rain, when the precipitation rate is < 2.5 mm per hour + // PRECIPITATION_RAIN_LIGHT = 0; - /// Medium intensity rain, when the precipitation rate is between 2.5 mm and 10 mm per hour + // Medium intensity rain, when the precipitation rate is between 2.5 mm and 10 mm per hour + // PRECIPITATION_RAIN_MEDIUM = 1; - /// High intensity rain, when the precipitation rate is between 10 mm and 50 mm per hour + // High intensity rain, when the precipitation rate is between 10 mm and 50 mm per hour + // PRECIPITATION_RAIN_HIGH = 2; - /// Violent intensity rain, when the precipitation rate is > 50 mm per hour + // Violent intensity rain, when the precipitation rate is > 50 mm per hour + // PRECIPITATION_RAIN_VIOLENT = 3; } - /// Definition of ambient illumination states. + // Definition of ambient illumination states. + // enum AmbientIllumination { - /// Ambient illumination is unknown (must not be used in ground truth). + // Ambient illumination is unknown (must not be used in ground truth). + // AMBIENT_ILLUMINATION_UNKNOWN = 0; - /// Other (unspecified but known) ambient illumination. + // Other (unspecified but known) ambient illumination. + // AMBIENT_ILLUMINATION_OTHER = 1; - /// Ambient illumination index is "bright". - /// E.g. daytime with sunshine. + // Ambient illumination index is "bright". + // E.g. daytime with sunshine. AMBIENT_ILLUMINATION_BRIGHT = 2; - /// Ambient illumination index is "medium". - /// E.g. daytime with overcast sky. + // Ambient illumination index is "medium". + // E.g. daytime with overcast sky. AMBIENT_ILLUMINATION_MEDIUM = 3; - /// Ambient illumination index is "low". - /// E.g. during twilight (dawn/dusk) or in a tunnel. + // Ambient illumination index is "low". + // E.g. during twilight (dawn/dusk) or in a tunnel. AMBIENT_ILLUMINATION_LOW = 4; - /// Ambient illumination index is "dark". - /// E.g. night time, no sunlight. + // Ambient illumination index is "dark". + // E.g. night time, no sunlight. AMBIENT_ILLUMINATION_DARK = 5; } - /// - /// The time of day at the location of the vehicle. - /// + // + // \brief The time of day at the location of the vehicle. + // message TimeOfDay { - /// The number of seconds that have passed since midnight local time. - /// Used for determining the current state of the circadian rhythm of a driver. + // The number of seconds that have passed since midnight local time. + // Used for determining the current state of the circadian rhythm of a driver. optional uint32 seconds_from_midnight = 1; } } diff --git a/osi_groundtruth.proto b/osi_groundtruth.proto index c33c9ddad..71c88086b 100644 --- a/osi_groundtruth.proto +++ b/osi_groundtruth.proto @@ -11,59 +11,70 @@ import "osi_occupant.proto"; package osi; -/// -/// The ground truth information from the simulation environment. -/// -/// This ground truth information is supposed to describe the whole simulated environment around any simulated vehicle. -/// For each simulated ego vehicle (might only be one, but could also be multiple) define an area around the vehicle -/// which is greater than the combined field of views (FOV) of all sensors obstructed in the vehicle. The ground truth -/// data is supposed to describe the convex hull of all such areas w.r.t. a global simulation coordinate system. -/// -/// The simulation coordinate system might change during the simulation if and only if, all coordinates w.r.t. this -/// coordinate system are also changed. -/// -/// The data has to be sent at a rate defined by the receiving partner. When sending, values with default values might be -/// left default in order to improve performance. -/// -/// To provide a complete interface, all fields of all messages have to be set, unless specifically stated in the field's -/// definition that the field may remain unset. -/// -/// In enums (e.g. types) the unknown (first / default) value is not allowed to be used in the ground truth interface. -/// +// +// \brief The ground truth information from the simulation environment. +// +// This ground truth information is supposed to describe the whole simulated environment around any simulated vehicle. +// For each simulated ego vehicle (might only be one, but could also be multiple) define an area around the vehicle +// which is greater than the combined field of views (FOV) of all sensors obstructed in the vehicle. The ground truth +// data is supposed to describe the convex hull of all such areas w.r.t. a global simulation coordinate system. +// +// The simulation coordinate system might change during the simulation if and only if, all coordinates w.r.t. this +// coordinate system are also changed. +// +// The data has to be sent at a rate defined by the receiving partner. When sending, values with default values might be +// left default in order to improve performance. +// +// To provide a complete interface, all fields of all messages have to be set, unless specifically stated in the field's +// definition that the field may remain unset. +// +// In enums (e.g. types) the unknown (first / default) value is not allowed to be used in the ground truth interface. +// message GroundTruth { - /// The interface version used by the sender (simulation environment). - optional InterfaceVersion version = 1; + // The interface version used by the sender (simulation environment). + // + optional InterfaceVersion version = 1; - /// The data timestamp of the simulation environment. Zero time is arbitrary but must be identical for all messages. - /// Zero time does not need to coincide with the unix epoch. Recommended is the starting time point of the - /// simulation. + // The data timestamp of the simulation environment. Zero time is arbitrary but must be identical for all messages. + // Zero time does not need to coincide with the unix epoch. Recommended is the starting time point of the + // simulation. + // optional Timestamp timestamp = 2; - /// A list of vehicles. + // A list of vehicles. + // repeated Vehicle vehicle = 3; - /// A list of moving objects (excluding vehicles). + // A list of moving objects (excluding vehicles). + // repeated MovingObject moving_object = 4; - /// A list of stationary objects. + // A list of stationary objects. + // repeated StationaryObject stationary_object = 5; - /// A list of traffic signs. + // A list of traffic signs. + // repeated TrafficSign traffic_sign = 6; - /// A list of traffic lights. + // A list of traffic lights. + // repeated TrafficLight traffic_light = 7; - /// A list of road surface markings. Lane Markings are excluded and defined as LaneBoundaries as part of the Lanes. + // A list of road surface markings. Lane Markings are excluded and defined as LaneBoundaries as part of the Lanes. + // repeated RoadMarking road_marking = 8; - /// A list of lanes forming a road network. + // A list of lanes forming a road network. + // repeated Lane lane = 9; - /// A list of passengers in the (ego) vehicle(s). + // A list of passengers in the (ego) vehicle(s). + // repeated Occupant occupant = 10; - /// Conditions of the environment. + // Conditions of the environment. + // optional EnvironmentalConditions environmental_conditions = 11; } diff --git a/osi_landmark.proto b/osi_landmark.proto index 28c7b50ec..e2e9938dd 100644 --- a/osi_landmark.proto +++ b/osi_landmark.proto @@ -6,432 +6,519 @@ import "osi_common.proto"; package osi; -/// -/// A traffic sign. -/// +// +// \brief A traffic sign. +// message TrafficSign { - /// The id of the traffic sign. - optional Identifier id = 1; + // The id of the traffic sign. + // + optional Identifier id = 1; - /// The base parameters of the traffic sign. + // The base parameters of the traffic sign. + // optional BaseStationary base = 2; - /// The type of the traffic sign. + // The type of the traffic sign. + // optional Type type = 3; - /// Additional value associated with the traffic sign, e.g. value of the speed limit. - /// Field need not be set if traffic sign type does not require it. Speed (limits) should be given in km/h. + // Additional value associated with the traffic sign, e.g. value of the speed limit. + // Field need not be set if traffic sign type does not require it. Speed (limits) should be given in km/h. optional double value = 4; - /// Variability + // Variability + // optional Variability variability = 5; - /// Additional, supplementary signs, e.g. time limit, modifying the traffic sign. + // Additional, supplementary signs, e.g. time limit, modifying the traffic sign. + // repeated SupplementarySign supplementary_sign = 6; - /// The ids of the lanes that the traffic sign is assigned to. - /// Might be multiple if the traffic sign is valid for multiple lanes. + // The ids of the lanes that the traffic sign is assigned to. + // Might be multiple if the traffic sign is valid for multiple lanes. repeated Identifier assigned_lane = 7; - /// Definition of traffic sign types. - /// Numbers given according to German StVO. For an overview see - /// http:///www.dvr.de/multimedia/downloads/verkehrszeichen.htm (Images) - /// https:///www.gesetze-im-internet.de/stvo_2013/anlage_1.html (Allgemeine und Besondere Gefahrenzeichen) - /// https:///www.gesetze-im-internet.de/stvo_2013/anlage_2.html (Vorschriftzeichen) - /// https:///www.gesetze-im-internet.de/stvo_2013/anlage_3.html (Richtzeichen) - /// https:///www.gesetze-im-internet.de/stvo_2013/anlage_4.html (Verkehrseinrichtungen) + // Definition of traffic sign types. + // Numbers given according to German StVO. + // + // For an overview see: + // \arg http://www.dvr.de/multimedia/downloads/verkehrszeichen.htm (Images) + // \arg https://www.gesetze-im-internet.de/stvo_2013/anlage_1.html (Allgemeine und Besondere Gefahrenzeichen) + // \arg https://www.gesetze-im-internet.de/stvo_2013/anlage_2.html (Vorschriftzeichen) + // \arg https://www.gesetze-im-internet.de/stvo_2013/anlage_3.html (Richtzeichen) + // \arg https://www.gesetze-im-internet.de/stvo_2013/anlage_4.html (Verkehrseinrichtungen) enum Type { - /// Type of traffic sign is unknown (must not be used in ground truth). + // Type of traffic sign is unknown (must not be used in ground truth). + // TYPE_UNKNOWN = 0; - /// Other (unspecified but known) type of traffic sign. + // Other (unspecified but known) type of traffic sign. + // TYPE_OTHER = 1; - /// Start of speed limit (StVO 274). + // Start of speed limit (StVO 274). + // TYPE_SPEED_LIMIT_BEGIN = 2; - /// End of speed limit (StVO 278). + // End of speed limit (StVO 278). + // TYPE_SPEED_LIMIT_END = 3; - /// Town entrance (StVO 310). + // Town entrance (StVO 310). + // TYPE_TOWN_BEGIN = 4; - /// Town exit (StVO 311). + // Town exit (StVO 311). + // TYPE_TOWN_END = 5; - /// Start of zone with speed limit 30 (StVO 274.1). + // Start of zone with speed limit 30 (StVO 274.1). + // TYPE_ZONE_30_BEGIN = 6; - /// End of zone with speed limit 30 (StVO 274.2). + // End of zone with speed limit 30 (StVO 274.2). + // TYPE_ZONE_30_END = 7; - /// Mandatory minimum speed (StVO 275). + // Mandatory minimum speed (StVO 275). + // TYPE_MINIMUM_SPEED = 8; - /// Start of area with calmed / reduced traffic (verkehrsberuhigter Bereich - StVO 325.1). + // Start of area with calmed / reduced traffic (verkehrsberuhigter Bereich - StVO 325.1). + // TYPE_TRAFFIC_CALMED_DISTRICT_BEGIN = 9; - /// End of area with calmed / reduced traffic (verkehrsberuhigter Bereich - StVO 325.2). + // End of area with calmed / reduced traffic (verkehrsberuhigter Bereich - StVO 325.2). + // TYPE_TRAFFIC_CALMED_DISTRICT_END = 10; - /// Start of area without traffic to reduce harmful air pollution (StVO 270.1). + // Start of area without traffic to reduce harmful air pollution (StVO 270.1). + // TYPE_ENVIRONMENTAL_ZONE_BEGIN = 11; - /// End of area without traffic to reduce harmful air pollution (StVO 270.2). + // End of area without traffic to reduce harmful air pollution (StVO 270.2). + // TYPE_ENVIRONMENTAL_ZONE_END = 12; - /// Start of overtaking ban (StVO 276). + // Start of overtaking ban (StVO 276). + // TYPE_OVERTAKING_BAN_BEGIN = 13; - /// End of overtaking ban (StVO 280). + // End of overtaking ban (StVO 280). + // TYPE_OVERTAKING_BAN_END = 14; - /// Start of overtaking ban for trucks (StVO 277). + // Start of overtaking ban for trucks (StVO 277). + // TYPE_OVERTAKING_BAN_FOR_TRUCKS_BEGIN = 15; - /// End of overtaking ban for trucks (StVO 281). + // End of overtaking ban for trucks (StVO 281). + // TYPE_OVERTAKING_BAN_FOR_TRUCKS_END = 16; - /// End of all speed and overtaking restrictions (StVO 282). + // End of all speed and overtaking restrictions (StVO 282). + // TYPE_ALL_RESTRICTIONS_END = 17; - /// Begin of priority road with right of way (StVO 306). + // Begin of priority road with right of way (StVO 306). + // TYPE_RIGHT_OF_WAY_BEGIN = 18; - /// End of priority road with right of way (StVO 307). + // End of priority road with right of way (StVO 307). + // TYPE_RIGHT_OF_WAY_END = 19; - /// Right of way at the next intersection (StVO 301). + // Right of way at the next intersection (StVO 301). + // TYPE_RIGHT_OF_WAY_NEXT_INTERSECTION = 20; - /// Begin of no parking zone (StVO 290.1). + // Begin of no parking zone (StVO 290.1). + // TYPE_NO_PARKING_ZONE_BEGIN = 21; - /// End of no parking zone (StVO 290.2). + // End of no parking zone (StVO 290.2). + // TYPE_NO_PARKING_ZONE_END = 22; - /// No parking sign (StVO 286). + // No parking sign (StVO 286). + // TYPE_NO_PARKING = 23; - /// No stopping sign (StVO 283). + // No stopping sign (StVO 283). + // TYPE_NO_STOPPING = 24; - /// Give way sign (StVO 205). + // Give way sign (StVO 205). + // TYPE_GIVE_WAY = 25; - /// Stop sign (StVO 206). + // Stop sign (StVO 206). + // TYPE_STOP = 26; - /// Danger sign (StVO 101). + // Danger sign (StVO 101). + // TYPE_DANGER_SPOT = 27; - /// Road works sign (StVO 123) + // Road works sign (StVO 123) + // TYPE_ROAD_WORKS = 28; - /// Roundabout (StVO 215). + // Roundabout (StVO 215). + // TYPE_ROUNDABOUT = 29; - /// Traffic light ahead sign (StVO 131). + // Traffic light ahead sign (StVO 131). + // TYPE_ATTENTION_TRAFFIC_LIGHT = 30; - /// Pedestrian crossing (StVO 350). + // Pedestrian crossing (StVO 350). + // TYPE_PEDESTRIAN_CROSSING_INFO = 31; - /// Minimum safety distance for trucks (StVO 273). + // Minimum safety distance for trucks (StVO 273). + // TYPE_MINIMUM_DISTANCE_FOR_TRUCKS = 32; - /// Entry not allowed (StVO 267). + // Entry not allowed (StVO 267). + // TYPE_DO_NOT_ENTER = 33; - /// Entry prohibited for all vehicle types (StVO 250). + // Entry prohibited for all vehicle types (StVO 250). + // TYPE_PROHIBITED_FOR_ALL = 34; - /// Entry prohibited for all motor vehicles (StVO 251). + // Entry prohibited for all motor vehicles (StVO 251). + // TYPE_PROHIBITED_FOR_MOTOR_VEHICLES = 35; - /// Entry prohibited for trucks (StVO 253). + // Entry prohibited for trucks (StVO 253). + // TYPE_PROHIBITED_FOR_TRUCKS = 36; - /// Entry prohibited for bicycles (StVO 254). + // Entry prohibited for bicycles (StVO 254). + // TYPE_PROHIBITED_FOR_BICYCLES = 37; - /// Entry prohibited for motor bikes (StVO 255). + // Entry prohibited for motor bikes (StVO 255). + // TYPE_PROHIBITED_FOR_MOTOR_BIKES = 38; - /// Entry prohibited for pedestrians (StVO 259). + // Entry prohibited for pedestrians (StVO 259). + // TYPE_PROHIBITED_FOR_PEDESTRIANS = 39; - /// Entry prohibited for all motor vehicles and bikes (StVO 260). + // Entry prohibited for all motor vehicles and bikes (StVO 260). + // TYPE_PROHIBITED_FOR_MOTOR_VEHICLES_BIKES = 40; - /// Begin of highway (StVO 330.1). + // Begin of highway (StVO 330.1). + // TYPE_HIGHWAY_BEGIN = 41; - /// End of highway (StVO 330.2). + // End of highway (StVO 330.2). + // TYPE_HIGHWAY_END = 42; - /// Highway exit sign (StVO 333). + // Highway exit sign (StVO 333). + // TYPE_HIGHWAY_EXIT = 43; - /// Pole indicating highways exit in 100m (StVO 450). + // Pole indicating highways exit in 100m (StVO 450). + // TYPE_POLE_EXIT_100M = 44; - /// Pole indicating highways exit in 200m (StVO 450). + // Pole indicating highways exit in 200m (StVO 450). + // TYPE_POLE_EXIT_200M = 45; - /// Pole indicating highways exit in 300m (StVO 450). + // Pole indicating highways exit in 300m (StVO 450). + // TYPE_POLE_EXIT_300M = 46; - /// Pole for warning and guiding purposes (red/white stripes - StVO 605). + // Pole for warning and guiding purposes (red/white stripes - StVO 605). + // TYPE_POLE_WARNING = 47; - /// Begin of expressway for motor vehicles (StVO 331.1). + // Begin of expressway for motor vehicles (StVO 331.1). + // TYPE_EXPRESSWAY_BEGIN = 48; - /// End of expressways for motor vehicles (StVO 331.2). + // End of expressways for motor vehicles (StVO 331.2). + // TYPE_EXPRESSWAY_END = 49; - /// Parking space (StVO 314). + // Parking space (StVO 314). + // TYPE_CAR_PARKING = 50; } - /// + // enum Variability { - /// Variability type of sign is unknown. Value must not be used in ground truth. + // Variability type of sign is unknown (must not be used in ground truth). + // VARIABILITY_UNKNOWN = 0; - /// Other (unspecified but known) variability. + // Other (unspecified but known) variability. + // VARIABILITY_OTHER = 1; - /// Fixed sign, i.e. always present. + // Fixed sign, i.e. always present. + // VARIABILITY_FIXED = 2; - /// Temporary or variable sign, e.g. on a sign bridge. + // Temporary or variable sign, e.g. on a sign bridge. + // VARIABILITY_VARIABLE = 3; } } -/// -/// Additional, supplementary sign modifying a parent traffic sign. -/// +// +// \brief Additional, supplementary sign modifying a parent traffic sign. +// message SupplementarySign { - /// Type of the supplementary sign. - optional Type type = 1; + // Type of the supplementary sign. + // + optional Type type = 1; - /// Optional first value defining additional properties, e.g. length, mass, or starting time in time range. - optional double value_1 = 2; + // Optional first value defining additional properties, e.g. length, mass, or starting time in time range. + // + optional double value_1 = 2; - /// Optional second value defining additional properties, e.g. end time in time range. - optional double value_2 = 3; + // Optional second value defining additional properties, e.g. end time in time range. + // + optional double value_2 = 3; - /// Definition of supplementary sign types. - /// See TrafficSign.Type for further information. + // Definition of supplementary sign types. + // See TrafficSign.Type for further information. enum Type { - /// Type of supplementary sign is unknown. Value must not be used in ground truth. + // Type of supplementary sign is unknown (must not be used in ground truth). + // TYPE_UNKNOWN = 0; - /// Other (unspecified but known) type of supplementary sign. + // Other (unspecified but known) type of supplementary sign. + // TYPE_OTHER = 1; - /// There is no supplementary sign. Value must not be used in ground truth. + // There is no supplementary sign (must not be used in ground truth). + // TYPE_NO_SIGN = 2; - /// Traffic sign is valid for a certain distance (given by value_1 in meter). + // Traffic sign is valid for a certain distance (given by value_1 in meter). + // TYPE_VALID_FOR_DISTANCE = 3; - /// Distance to the start of validity of the traffic sign (given by value_1 in meter). + // Distance to the start of validity of the traffic sign (given by value_1 in meter). + // TYPE_VALID_IN_DISTANCE = 4; - /// Time range for validity of traffic sign (starting from value_1 and ending with value_2, both defining - /// time of day in minutes from midnight). + // Time range for validity of traffic sign (starting from value_1 and ending with value_2, both defining + // time of day in minutes from midnight). TPYE_TIME_RANGE = 5; - /// Restriction of the validity of the traffic sign depending on the vehicle's weight (more than value_1 in - /// kilogram). + // Restriction of the validity of the traffic sign depending on the vehicle's weight (more than value_1 in kilogram). + // TYPE_WEIGHT = 6; - /// Restriction of the validity of the traffic sign to wet / rainy conditions. + // Restriction of the validity of the traffic sign to wet / rainy conditions. + // TYPE_RAIN = 7; - /// Restriction of the validity of the traffic sign to foggy conditions. + // Restriction of the validity of the traffic sign to foggy conditions. + // TYPE_FOG = 8; - /// Restriction of the validity of the traffic sign to snowy / icy conditions. + // Restriction of the validity of the traffic sign to snowy / icy conditions. + // TYPE_SNOW = 9; - /// Combined restriction of the validity of the traffic sign to rainy or snowy conditions denoted by a single - /// supplementary sign (instead of two signs of TYPE_WET and TYPE_SNOW respectively). + // Combined restriction of the validity of the traffic sign to rainy or snowy conditions denoted by a single + // supplementary sign (instead of two signs of TYPE_WET and TYPE_SNOW respectively). TYPE_SNOW_RAIN = 10; - /// + // TYPE_LEFT_ARROW = 11; - /// + // TYPE_RIGHT_ARROW = 12; - /// + // TYPE_LEFT_BEND_ARROW = 13; - /// + // TYPE_RIGHT_BEND_ARROW = 14; - /// + // TYPE_TRUCK = 15; - /// + // TYPE_TRACTORS_MAY_BE_PASSED = 16; - /// + // TYPE_HAZARDOUS = 17; - /// + // TYPE_TRAILER = 18; - /// + // TYPE_NIGHT = 19; - /// + // TYPE_ZONE = 20; - /// + // TYPE_STOP_4_WAY = 21; - /// + // TYPE_MOTORCYCLE = 22; - /// + // TYPE_MOTORCYCLE_ALLOWED = 23; - /// + // TYPE_CAR = 24; - /// + // TYPE_STOP_IN = 25; } } -/// -/// A traffic light. -/// +// +// \brief A traffic light. +// message TrafficLight { - /// The id of the traffic light. + // The id of the traffic light. + // optional Identifier id = 1; - /// The base parameters of the traffic light. + // The base parameters of the traffic light. + // optional BaseStationary base = 2; - /// The type of the traffic light. + // The type of the traffic light. + // optional Type type = 3; - /// The shape of the traffic light. + // The shape of the traffic light. + // optional Shape shape = 4; - /// The state of the traffic light. + // The state of the traffic light. + // optional LightState light_state = 5; - /// Presence of a green arrow sign for right turns on the traffic light. + // Presence of a green arrow sign for right turns on the traffic light. + // optional GreenArrowPresence green_arrow = 6; - /// The ids of the lanes that the traffic light is assigned to. - /// Might be multiple if the traffic light is valid for multiple lanes. + // The ids of the lanes that the traffic light is assigned to. + // Might be multiple if the traffic light is valid for multiple lanes. repeated Identifier assigned_lane = 7; - /// Definition of traffic light types. + // Definition of traffic light types. + // enum Type { - /// Unknown type of traffic light. Value must not be used in ground truth. + // Unknown type of traffic light (must not be used in ground truth). TYPE_UNKNOWN = 0; - /// Other (unspecified but known) type of traffic light. + // Other (unspecified but known) type of traffic light. TYPE_OTHER = 1; - /// Normal traffic light for motor vehicle traffic. + // Normal traffic light for motor vehicle traffic. TYPE_NORMAL = 2; - /// Light for pedestrian traffic. + // Light for pedestrian traffic. TYPE_PEDESTRIAN = 3; - /// Light for bicycle traffic. + // Light for bicycle traffic. TYPE_BICYCLE = 4; } - /// Definition of traffic light shapes. + // Definition of traffic light shapes. enum Shape { - /// Unknown shape of traffic light. Value must not be used in ground truth. + // Unknown shape of traffic light (must not be used in ground truth). SHAPE_UNKNOWN = 0; - /// Other (unspecified but known) shape of traffic light. + // Other (unspecified but known) shape of traffic light. SHAPE_OTHER = 1; - /// This is a normal traffic light without specification of direction. + // This is a normal traffic light without specification of direction. SHAPE_CIRCULAR = 2; - /// This traffic light applies to the lane straight ahead. + // This traffic light applies to the lane straight ahead. SHAPE_ARROW_STRAIGHT = 3; - /// This traffic light applies to left turns. + // This traffic light applies to left turns. SHAPE_ARROW_LEFT = 4; - /// This traffic light applies to diagonal left turns. + // This traffic light applies to diagonal left turns. SHAPE_ARROW_DIAG_LEFT = 5; - /// This traffic light applies to a lane allowing to drive straight ahead or to turn left. + // This traffic light applies to a lane allowing to drive straight ahead or to turn left. SHAPE_ARROW_STRAIGHT_LEFT = 6; - /// This traffic light applies to right turns. + // This traffic light applies to right turns. SHAPE_ARROW_RIGHT = 7; - /// This traffic light applies to diagonal right turns. + // This traffic light applies to diagonal right turns. SHAPE_ARROW_DIAG_RIGHT = 8; - /// This traffic light applies to a lane allowing to drive straight ahead or to turn right. + // This traffic light applies to a lane allowing to drive straight ahead or to turn right. SHAPE_ARROW_STRAIGHT_RIGHT = 9; - /// This traffic light applies to a lane allowing to turn left or right. + // This traffic light applies to a lane allowing to turn left or right. SHAPE_ARROW_LEFT_RIGHT = 10; - /// This traffic light indicates that the assigned lane is open for driving. + // This traffic light indicates that the assigned lane is open for driving. SHAPE_ARROW_DOWN = 11; - /// This traffic light indicates a necessary lane change to the left ahead. + // This traffic light indicates a necessary lane change to the left ahead. SHAPE_ARROW_DOWN_LEFT = 12; - /// This traffic light indicates a necessary lane change to the right ahead. + // This traffic light indicates a necessary lane change to the right ahead. SHAPE_ARROW_DOWN_RIGHT = 13; - /// This traffic light indicates that the assigned lane is not open for driving. + // This traffic light indicates that the assigned lane is not open for driving. SHAPE_ARROW_CROSS = 14; } - /// - /// Definition of light state for traffic lights. - /// This containes the logical information about the traffic light and NOT a description of individual light bulbs. - /// + // + // \brief Definition of light state for traffic lights. + // + // This containes the logical information about the traffic light and NOT a description of individual light bulbs. + // message LightState { - /// The color of the traffic light. + // The color of the traffic light. optional Color color = 1; - /// The operating mode of the traffic light. + // The operating mode of the traffic light. optional Mode mode = 2; - /// Definition of colors for traffic lights. + // Definition of colors for traffic lights. enum Color { - /// Color is unknown. Value must not be used in ground truth. + // Color is unknown (must not be used in ground truth). COLOR_UNKNOWN = 0; - /// Other (unspecified but known) color. + // Other (unspecified but known) color. COLOR_OTHER = 1; - /// Traffic light is off / not active. In this case mode must also be set to MODE_OFF. + // Traffic light is off / not active. In this case mode must also be set to MODE_OFF. COLOR_OFF = 2; - /// Red light is on. + // Red light is on. COLOR_RED = 3; - /// Red and yellow light are on at the same time. + // Red and yellow light are on at the same time. COLOR_RED_YELLOW = 4; - /// Yellow light is on. + // Yellow light is on. COLOR_YELLOW = 5; - /// Green light is on. + // Green light is on. COLOR_GREEN = 6; } - /// Definition of light modes for traffic lights. + // Definition of light modes for traffic lights. enum Mode { - /// Mode is unknown. Value must not be used in ground truth. + // Mode is unknown (must not be used in ground truth). MODE_UNKNOWN = 0; - /// Other (unspecified but known) mode. + // Other (unspecified but known) mode. MODE_OTHER = 1; - /// Traffic light is off / not active. In this case color must also be set to COLOR_OFF. + // Traffic light is off / not active. In this case color must also be set to COLOR_OFF. MODE_OFF = 2; - /// Light is on normally. + // Light is on normally. MODE_CONSTANT = 3; - /// Light is blinking. + // Light is blinking. MODE_BLINKING = 4; } } - /// Definition of states for the presence of a green arrow sign for right turns. + // Definition of states for the presence of a green arrow sign for right turns. enum GreenArrowPresence { - /// Presence of green arrow sign is unknown (must not be used in ground truth). + // Presence of green arrow sign is unknown (must not be used in ground truth). GREEN_ARROW_UNKNOWN = 0; - /// Other (unspecified but known) green arrow sign. + // Other (unspecified but known) green arrow sign. GREEN_ARROW_OTHER = 1; - /// No green arrow sign present. + // No green arrow sign present. GREEN_ARROW_NOT_PRESENT = 2; - /// Green arrow sign present. + // Green arrow sign present. GREEN_ARROW_PRESENT = 3; } } -/// -/// A road surface marking. -/// Lane Markings are excluded and defined as LaneBoundaries as part of the Lanes. -/// +// +// \brief A road surface marking. +// +// Lane Markings are excluded and defined as LaneBoundaries as part of the Lanes. +// message RoadMarking { - /// The id of the road marking. + // The id of the road marking. + // optional Identifier id = 1; - /// The base parameters of the road marking. + // The base parameters of the road marking. + // optional BaseStationary base = 2; - /// The type of the road marking. + // The type of the road marking. + // optional Type type = 3; - /// The color of the road marking. + // The color of the road marking. + // optional Color color = 4; - /// Additional value associated with the road marking, e.g. value of the speed limit. - /// Field need not be set if road marking type does not require it. + // Additional value associated with the road marking, e.g. value of the speed limit. + // Field need not be set if road marking type does not require it. optional double value = 5; - /// The id(s) of the lane(s) that the road marking is assigned to. - /// Might be multiple if the road marking goes across multiple lanes. + // The id(s) of the lane(s) that the road marking is assigned to. + // Might be multiple if the road marking goes across multiple lanes. repeated Identifier assigned_lane = 6; - /// Definition of road marking types. + // Definition of road marking types. + // enum Type { - /// Type of road marking is unknown. Value must not be used in ground truth. + // Type of road marking is unknown (must not be used in ground truth). TYPE_UNKNOWN = 0; - /// Other (unspecified but known) type of road marking. + // Other (unspecified but known) type of road marking. TYPE_OTHER = 1; - /// A stop line. + // A stop line. TYPE_STOP_LINE = 2; - /// A speed limit sign painted on the road surface. + // A speed limit sign painted on the road surface. TYPE_SPEED_LIMIT = 3; - /// A straight arrow painted on the road surface indicating a lane to drive straight. + // A straight arrow painted on the road surface indicating a lane to drive straight. TYPE_STRAIGHT_ARROW = 4; - /// A straight arrow painted on the road surface indicating a lane to turn right. + // A straight arrow painted on the road surface indicating a lane to turn right. TYPE_RIGHT_TURN_ARROW = 5; - /// A straight arrow painted on the road surface indicating a lane to turn left. + // A straight arrow painted on the road surface indicating a lane to turn left. TYPE_LEFT_TURN_ARROW = 6; } - /// Definition of road marking colors + // Definition of road marking colors enum Color { - /// Color of road marking is unknown. Value must not be used in ground truth. + // Color of road marking is unknown (must not be used in ground truth). COLOR_UNKNOWN = 0; - /// Marking with another (unspecified but known) color. + // Marking with another (unspecified but known) color. COLOR_OTHER = 1; - /// Marking with white color. + // Marking with white color. COLOR_WHITE = 2; - /// Marking with yellow / orange-yellow color. + // Marking with yellow / orange-yellow color. COLOR_YELLOW = 3; - /// Marking with blue color. + // Marking with blue color. COLOR_BLUE = 5; } } diff --git a/osi_lane.proto b/osi_lane.proto index 7c43ed8f4..a20f33685 100644 --- a/osi_lane.proto +++ b/osi_lane.proto @@ -6,232 +6,257 @@ import "osi_common.proto"; package osi; -/// -/// A lane in the road network. -/// -/// A lane is part of a road and mainly characterized by its center line. It also knows about any adjacent lanes, -/// antecessor and successor lanes. The following image will be referred to by later comments. We'll use the lane with id -/// 3 as reference if not mentioned otherwise. -/// -/// \image html highway_exit.png -/// -/// For lane a to be the antecessor of lane b, the last point of a's center line has to be identical to the first point -/// of b's center line (although both points might lie outside the simulated region, the relationship remains). Any lane -/// starts or ends at such a split/merge point. No lane can ever keep its id after such a split point, i.e. lane 4 has to -/// change its id after lane 6 splits off of lane 4, thus in the example it becomes a new lane with id 7. -/// +// +// \brief A lane in the road network. +// +// A lane is part of a road and mainly characterized by its center line. It also knows about any adjacent lanes, +// antecessor and successor lanes. +// The following image will be referred to by later comments. We'll use the lane with id 3 as reference if not mentioned otherwise. +// +// \image html highway_exit.png +// +// For lane a to be the antecessor of lane b, the last point of a's center line has to be identical to the first point +// of b's center line (although both points might lie outside the simulated region, the relationship remains). Any lane +// starts or ends at such a split/merge point. No lane can ever keep its id after such a split point, i.e. lane 4 has to +// change its id after lane 6 splits off of lane 4, thus in the example it becomes a new lane with id 7. +// message Lane { - /// The (global) id of the lane. - /// Example: 3 (see reference picture) + // The (global) id of the lane. + // Example: 3 (see reference picture) optional Identifier id = 1; - /// The type of the lane. - /// Example: Lane::Type::NORMAL (see reference picture) + // The type of the lane. + // Example: Lane::Type::NORMAL (see reference picture) optional Type type = 2; - /// The lane's center line. - /// - /// This is the line, that a typical vehicle is supposed to follow. Thus, if the road narrows (e.g. construction - /// site) this line is supposed to describe the trajectory that the vehicle should follow. The intended direction of - /// travel on the lane is given by the direction defined by the sequence of points forming the center line. - /// - /// \attention The points might be set at arbitrary distances, but must not be further appart than 5m. When the - /// points are pairwise linearly connected, the lateral distance to the real ideal line (as used by the simulation - /// environment internally) must not exceed 5cm. As shown in the following image. - /// - /// \image html line_approximation_error.png - /// - /// Example: The yellow dotted line right of the blue 3. + // The lane's center line. + // + // This is the line, that a typical vehicle is supposed to follow. Thus, if the road narrows (e.g. construction + // site) this line is supposed to describe the trajectory that the vehicle should follow. The intended direction of + // travel on the lane is given by the direction defined by the sequence of points forming the center line. + // + // \image html highway_exit.png "Center lines as yellow dotted lines." + // + // \attention The points describing the center line might be set at arbitrary distances, but must not be further appart than 5m. + // When the points are pairwise linearly connected, the lateral distance to the real ideal line (as used by the simulation + // environment internally) must not exceed 5cm. As shown in the following image: + // + // \image html line_approximation_error.png "Approximation error as green line." + // + repeated Vector3d center_line = 3; - /// The boundary of the lane. - /// - /// The lane boundaries describe the lane markings or other boundaries delimiting the lane as well as free lines that - /// might be used e.g. in construction sites. The lane markings do not have to be parallel to the center_line, but - /// they are the basis for calculating the width of the lane at any given distance. - /// - /// Example: The double solid line above the 3, and the dashed line below the 3. (see reference picture) There might - /// also be additional free lanes. + // The boundary of the lane. + // + // The lane boundaries describe the lane markings or other boundaries delimiting the lane as well as free lines that + // might be used e.g. in construction sites. The lane markings do not have to be parallel to the center_line, but + // they are the basis for calculating the width of the lane at any given distance. + // + // Example: The double solid line above the 3, and the dashed line below the 3. (see reference picture) There might + // also be additional free lanes. repeated LaneBoundary lane_boundary = 4; - /// List of ids of all lane segments that are directy adjacent to the lane on the left side (w.r.t. intended driving - /// direction). Note that lengths of lane segments are not synchronized and therefore there are multiple adjacent - /// segments if there is a split/merge point in the adjacent lane. - /// Example: The lane id 2 is the only left adjacent lane for lane id 3 in the reference picture. + // List of ids of all lane segments that are directy adjacent to the lane on the left side (w.r.t. intended driving + // direction). Note that lengths of lane segments are not synchronized and therefore there are multiple adjacent + // segments if there is a split/merge point in the adjacent lane. + // Example: The lane id 2 is the only left adjacent lane for lane id 3 in the reference picture. repeated Identifier left_adjacent_lane_id = 5; - /// List of ids of all lane segments that are directy adjacent to the lane on the right side (w.r.t. intended driving - /// direction). Note that lengths of lane segments are not synchronized and therefore there are multiple adjacent - /// segments if there is a split/merge point in the adjacent lane. - /// Example: The lane ids 4 and 7 are the right adjacent lane segments for lane id 3 in the reference picture due to - /// the lane split. Lane id 6 is not a right adjacent lane to lane id 3 as they are separated by lane id 7. + // List of ids of all lane segments that are directy adjacent to the lane on the right side (w.r.t. intended driving + // direction). Note that lengths of lane segments are not synchronized and therefore there are multiple adjacent + // segments if there is a split/merge point in the adjacent lane. + // Example: The lane ids 4 and 7 are the right adjacent lane segments for lane id 3 in the reference picture due to + // the lane split. Lane id 6 is not a right adjacent lane to lane id 3 as they are separated by lane id 7. repeated Identifier right_adjacent_lane_id = 6; - /// The lane's antecessors (lanes that end in the same point that this lane's center line starts from). - /// There might be multiple antecessors e.g. in road crossings or on lane merges. - /// Example: Considering lane 6, its antecessor is the lane with id 4. + // The lane's antecessors (lanes that end in the same point that this lane's center line starts from). + // There might be multiple antecessors e.g. in road crossings or on lane merges. + // Example: Considering lane 6, its antecessor is the lane with id 4. repeated Identifier antecessor_lane_id = 7; - /// The lane's successors (lanes that start in the same point that this lane's center line ends in). - /// There might be multiple successors e.g. in road crossings, highway exits, or lane splits. - /// Example: Considering lane 4, its successors are the lanes with id 6 and 7. + // The lane's successors (lanes that start in the same point that this lane's center line ends in). + // There might be multiple successors e.g. in road crossings, highway exits, or lane splits. + // Example: Considering lane 4, its successors are the lanes with id 6 and 7. repeated Identifier successor_lane_id = 8; - /// A lane framing describes the surrounding of the lane segment. + // A lane framing describes the surrounding of the lane segment. + // optional LaneFraming lane_framing = 9; - /// Definition of available lane types. + // Definition of available lane types. enum Type { - /// Lane of unknown type. Value must not be used in ground truth! + // Lane of unknown type (must not be used in ground truth). TYPE_UNKNOWN = 0; - /// Any other type of lane + // Any other type of lane TYPE_OTHER = 1; - /// A normal lane. - /// E.g. lanes with ids 1, 2, 3, 4 and 7 of the highway_exit image. + // A normal lane. + // E.g. lanes with ids 1, 2, 3, 4 and 7 of the highway_exit image. TYPE_NORMAL = 2; - /// A stop/emergency lane on highways/freeways. - /// E.g. lane with id 5 of the highway_exit image. + // A stop/emergency lane on highways/freeways. + // E.g. lane with id 5 of the highway_exit image. TYPE_EMERGENCY = 3; - /// A freeway/highway entry lane. + // A freeway/highway entry lane. TYPE_ENTRANCE = 4; - /// A freeway/highway exit lane. - /// E.g. lane with id 6 of the highway_exit image. + // A freeway/highway exit lane. + // E.g. lane with id 6 of the highway_exit image. TYPE_EXIT = 5; - /// A car pooling lane. + // A car pooling lane. TYPE_HIGH_OCCUPANCY_VEHICLE = 6; - /// A road area / lane reserved for parking. + // A road area / lane reserved for parking. TYPE_PARKING = 7; } - /// Definition of available lane framing types. + // Definition of available lane framing types. enum LaneFraming { - /// Lane of unknown framing. Value must not be used in ground truth! + // Lane of unknown framing (must not be used in ground truth). LANE_FRAMING_UNKNOWN = 0; - /// Other (unspecified but known) lane framing. + // Other (unspecified but known) lane framing. LANE_FRAMING_OTHER = 1; - /// The lane is not framed. + // The lane is not framed. LANE_FRAMING_OPEN = 2; - /// The lane segment is inside of a tunnel. + // The lane segment is inside of a tunnel. LANE_FRAMING_TUNNEL = 3; - /// The lane segment is on a bridge. + // The lane segment is on a bridge. LANE_FRAMING_BRIDGE = 4; } } -/// -/// A lane boundary defining the border of a lane. -/// The left and right lane boundary define the width of the lane borders. Additionally, free markings can be defined, -/// e.g. in construction sites. Free markings across multiple lanes may be defined multiple times by all affected -/// lanes. -/// +// +// \brief A lane boundary defining the border of a lane. +// +// The left and right lane boundary define the width of the lane borders. Additionally, free markings can be defined, +// e.g. in construction sites. Free markings across multiple lanes may be defined multiple times by all affected +// lanes. +// message LaneBoundary { - /// The list of individual points defining the location of the lane boundary. - /// - /// Since a BoundaryPoint is part of a sequence only the position attribute has to be set for each instance. All - /// other values will be reused from the previous BoundaryPoint in the sequence or set to default values if there is - /// none or it was never set. For dashed lines, one BoundaryPoint has to be at the start and another at the end of - /// each dashed line segment. - /// - /// \attention For BoundaryPoints the same rules apply as for Lane::center_line regarding maximum distance and - /// approximation error. + // The list of individual points defining the location of the lane boundary. + // + // Since a BoundaryPoint is part of a sequence only the position attribute has to be set for each instance. All + // other values will be reused from the previous BoundaryPoint in the sequence or set to default values if there is + // none or it was never set. For dashed lines, one BoundaryPoint has to be at the start and another at the end of + // each dashed line segment. + // + // \attention For BoundaryPoints the same rules apply as for Lane::center_line regarding maximum distance and + // approximation error. repeated BoundaryPoint boundary_line = 1; - /// The location of the lane boundary within the lane. + // The location of the lane boundary within the lane. + // optional BoundaryLocation location = 2; - /// The type of the lane boundary. + // The type of the lane boundary. + // optional Type type = 3; - /// The color of the lane boundary in case of lane markings. + // The color of the lane boundary in case of lane markings. + // optional Color color = 4; - /// The location of the lane boundary within the lane. + // The location of the lane boundary within the lane. + // enum BoundaryLocation { - /// The location of the boundary is unknown. Value must not be used in ground truth. + // The location of the boundary is unknown. Value must not be used in ground truth. BOUNDARY_LOCATION_UNKNOWN = 0; - /// Other (unspecified but known) boundary location. + // Other (unspecified but known) boundary location. BOUNDARY_LOCATION_OTHER = 1; - /// A left lane boundary. + // A left lane boundary. BOUNDARY_LOCATION_LEFT = 2; - /// A right lane boundary. + // A right lane boundary. BOUNDARY_LOCATION_RIGHT = 3; - /// A free lane boundary. + // A free lane boundary. BOUNDARY_LOCATION_FREE = 4; } - /// The lane boundary type. - /// There are no double lines, e.g. solid solid or dashed solid, as each lane will define its own side of the lane - /// boundary. + // The lane boundary type. + // There are no double lines, e.g. solid solid or dashed solid, as each lane will define its own side of the lane + // boundary. enum Type { - /// The type of lane boundary is unknown. Value must not be used in ground truth. + // The type of lane boundary is unknown. Value must not be used in ground truth. + // TYPE_UNKNOWN = 0; - /// Unspecified but known type of lane boundary. - /// Consider proposing an additional type if using TYPE_OTHER. + // Unspecified but known type of lane boundary. + // Consider proposing an additional type if using TYPE_OTHER. TYPE_OTHER = 1; - /// An invisible lane boundary (e.g. unmarked part of a dashed line). + // An invisible lane boundary (e.g. unmarked part of a dashed line). + // TYPE_NO_LINE = 2; - /// A solid line at the lane boundary. + // A solid line at the lane boundary. + // TYPE_SOLID_LINE = 3; - /// A dashed line at the lane boundary. + // A dashed line at the lane boundary. + // TYPE_DASHED_LINE = 4; - /// A lane boundary consisting of Botts' dots. + // A lane boundary consisting of Botts' dots. + // TYPE_BOTTS_DOTS = 5; - /// A lane boundary formed by the road's edge. - /// The road edge is the end of the (paved) road surface. + // A lane boundary formed by the road's edge. + // The road edge is the end of the (paved) road surface. TYPE_ROAD_EDGE = 6; - /// A lane boundary formed by a snow edge that may be on the road surface. + // A lane boundary formed by a snow edge that may be on the road surface. + // TYPE_SNOW_EDGE = 7; - /// A guard rail. + // A guard rail. + // TYPE_GUARD_RAIL = 8; - /// A curb. + // A curb. + // TYPE_CURB = 9; - /// A structure (e.g. building or tunnel wall). + // A structure (e.g. building or tunnel wall). + // TYPE_STRUCTURE = 10; } - /// The color of the lane boundary in case of a lane markings. - /// Lane markings that change their color must be represented by individual Lane segments. + // The color of the lane boundary in case of a lane markings. + // Lane markings that change their color must be represented by individual Lane segments. enum Color { - /// Color of Marking is unknown. Value must not be used in ground truth. + // Color of Marking is unknown. Value must not be used in ground truth. + // COLOR_UNKNOWN = 0; - /// Other (unspecified but known) color. + // Other (unspecified but known) color. + // COLOR_OTHER = 1; - /// Marking without color, used to represent logical boundaries without physical markings. - /// Value may be used in ground truth only. + // Marking without color, used to represent logical boundaries without physical markings. + // Value may be used in ground truth only. COLOR_NONE = 2; - /// Marking with white color. + // Marking with white color. + // COLOR_WHITE = 3; - /// Marking with yellow / orange-yellow color. + // Marking with yellow / orange-yellow color. + // COLOR_YELLOW = 4; - /// Marking with red color + // Marking with red color + // COLOR_RED = 5; - /// Marking with blue color. + // Marking with blue color. + // COLOR_BLUE = 6; - /// Marking with green color; + // Marking with green color; + // COLOR_GREEN = 7; } } -/// -/// One point of a lane boundary. -/// +// +// \brief One point of a lane boundary. +// message BoundaryPoint { - /// The position of the BoundaryPoint. + // The position of the BoundaryPoint. + // optional Vector3d position = 1; - /// The overall width of the lane boundary at the position of the BoundaryPoint. - /// Used for lines forming lane markings. + // The overall width of the lane boundary at the position of the BoundaryPoint. + // Used for lines forming lane markings. optional double boundary_width = 2; - /// The overall height of the lane boundary at the position of the BoundaryPoint. - /// Used for guard rails, curbstone, or similar + // The overall height of the lane boundary at the position of the BoundaryPoint. + // Used for guard rails, curbstone, or similar optional double boundary_height = 3; } diff --git a/osi_lowleveldata.proto b/osi_lowleveldata.proto index d8144ad3e..48ccde386 100644 --- a/osi_lowleveldata.proto +++ b/osi_lowleveldata.proto @@ -6,112 +6,127 @@ import "osi_common.proto"; package osi; -/// -/// Interface for low level sensor data, in contrast to high level data after object hypothesis and tracking. -/// -/// All information regarding the environment is given with respect to the sensor coordinate system specified in -/// LowLevelData::mounting_position. When simulating multiple sensors, each sensor has an individual copy of LowLevelData -/// in its own reference frame. This allows an independent treatment of the sensors. -/// +// +// \brief Interface for low level sensor data, in contrast to high level data after object hypothesis and tracking. +// +// All information regarding the environment is given with respect to the sensor coordinate system specified in \c LowLevelData::mounting_position. +// When simulating multiple sensors, each sensor has an individual copy of LowLevelData in its own reference frame. This allows an independent treatment of the sensors. +// message LowLevelData { - /// The id of the sensor. + // The id of the sensor. + // optional Identifier id = 1; - /// The data timestamp of the simulation environment. Start time (zero) is arbitrary, but must remain fixed over the - /// course of a simulation run. Recommended zero time is the starting time of the simulation. + // The data timestamp of the simulation environment. Start time (zero) is arbitrary, but must remain fixed over the + // course of a simulation run. Recommended zero time is the starting time of the simulation. optional Timestamp timestamp = 2; - /// Mounting position of the sensor (origin and orientation of the sensor coordinate system); given relative to the - /// middle of the rear axis of the host vehicle. + // Mounting position of the sensor (origin and orientation of the sensor coordinate system); + // given relative to the middle of the rear axis of the host vehicle. optional MountingPosition mounting_position = 3; - /// Lidar point cloud. + // Lidar point cloud. optional LidarPointCloud lidar_point_cloud = 4; - /// Radar Reflection list. + // Radar Reflection list. optional RadarReflectionList radar_reflection_list = 5; } -/// -/// A generic lidar point cloud. -/// +// +// \brief A generic lidar point cloud. +// message LidarPointCloud { - /// List of points constituting the point cloud. + // List of points constituting the point cloud. + // repeated LidarPoint point = 1; } -/// -/// A point in a lidar point cloud. -/// +// +// \brief A point in a lidar point cloud. +// message LidarPoint { - /// Position of the point. + // Position of the point. + // optional Vector3d position = 1; - /// Intensity of echo received by sensor associated with the point. Unit: [W]. + // Intensity of echo received by sensor associated with the point. + // Unit: [W]. optional double intensity = 2; - /// Estimated type of target that caused the reflection. + // Estimated type of target that caused the reflection. + // optional ReflectionType reflection_type = 3; - /// The id of the (dynamic) object that caused the reflection (only set for corresponding ReflectionType, unset in - /// other cases). + // The id of the (dynamic) object that caused the reflection (only set for corresponding ReflectionType, unset in other cases). + // optional Identifier reflection_object_id = 4; - /// Echo number of the LidarPoint associated with a specific transmitted laser pulse. The echo number is 0 if the - /// LidarPoint results from the closest reflection, 1 for the second closest, etc. + // Echo number of the LidarPoint associated with a specific transmitted laser pulse. + // The echo number is 0 if the LidarPoint results from the closest reflection, 1 for the second closest, etc. optional uint32 echo = 5; - /// Duration of the echo pulse (above system noise cut-off threshold). Unit: [ns]. + // Duration of the echo pulse (above system noise cut-off threshold). + // Unit: [ns]. optional double echo_pulse_duration = 6; // Layer id starting from zero for the bottom layer of the point cloud. + // optional uint32 layer = 7; - /// Definition of reflection types. + // Definition of reflection types. + // enum ReflectionType { - /// Reflection type is unknown (must not be used in ground truth). + // Reflection type is unknown (must not be used in ground truth). REFLECTION_TYPE_UNKNOWN = 0; - /// Other (unspecified but known) type of reflection. + // Other (unspecified but known) type of reflection. REFLECTION_TYPE_OTHER = 1; - /// Invalid scan point, not to be used for object tracking, of unspecified type (none of the other types applies). + // Invalid scan point, not to be used for object tracking, of unspecified type (none of the other types applies). REFLECTION_TYPE_INVALID = 2; - /// Reflection from dynamic object. + // Reflection from dynamic object. REFLECTION_TYPE_DYNAMIC_OBJECT = 3; - /// Reflection from static object. + // Reflection from static object. REFLECTION_TYPE_STATIC_OBJECT = 4; - /// Reflection from ground. + // Reflection from ground. REFLECTION_TYPE_GROUND = 5; - /// Reflection from road marking. + // Reflection from road marking. REFLECTION_TYPE_ROAD_MARKING = 6; } } -/// -/// A list of radar reflections. -/// +// +// \brief A list of radar reflections. +// message RadarReflectionList { - /// List of radar reflections constituting the radar reflection list. + // List of radar reflections constituting the radar reflection list. + // repeated RadarReflection reflection = 1; } +// +// \brief A radar reflection + message RadarReflection { - /// The id of the radar reflection. + // The id of the radar reflection. + // optional Identifier id = 1; - /// The position vector of the radar reflection, given in polar coordinates. + // The position vector of the radar reflection, given in polar coordinates. + // optional Polar3d position = 2; - /// The radar cross section (RCS) of the radar reflection. Unit: [dB sqm]. + // The radar cross section (RCS) of the radar reflection. + // Unit: [dB sqm]. optional double rcs = 3; - /// Radial speed of the radar reflection. - /// Not be confused with the velocity vector! This is the absolute value of the radial component of the velocity - /// vector as can be measured directly using the Doppler effect. + // Radial speed of the radar reflection. + // + // \attention Not be confused with the velocity vector! This is the absolute value of the radial component of the velocity + // vector as can be measured directly using the Doppler effect. optional double speed = 4; } diff --git a/osi_modelinternal.proto b/osi_modelinternal.proto index fec4ade4b..3754f3905 100644 --- a/osi_modelinternal.proto +++ b/osi_modelinternal.proto @@ -7,63 +7,70 @@ import "osi_object.proto"; package osi; -/// -/// Internal data and state flags for the sensor model, set and used during modification of the interface data. -/// -/// Content of all ModelInternal* messages may be cleared at the end of the sensor model processing chain and not sent -/// with the final output of the sensor model. Receiving components must not expect values in ModelInternal* messages to -/// be set. In particular, the message structures defined in this file must not be used by receiving components outside -/// of the sensor model to read required input data. -/// +// +// \brief Internal data and state flags for the sensor model, set and used during modification of the interface data. +// +// Content of all ModelInternal* messages may be cleared at the end of the sensor model processing chain and not sent +// with the final output of the sensor model. Receiving components must not expect values in ModelInternal* messages to +// be set. In particular, the message structures defined in this file must not be used by receiving components outside +// of the sensor model to read required input data. +// message ModelInternal { - /// Low level data interface, for use by models performing statistical generation of such "low level data" before - /// object hypothesis and tracking from object ground truth. - /// Low Level data should be transferred to receiving components by means of a separate data stream. Therefore they - /// are not part the top level SensorData message, as they are used only internally by some models. + // Low level data interface, for use by models performing statistical generation of such "low level data" before + // object hypothesis and tracking from object ground truth. + // + // Low Level data should be transferred to receiving components by means of a separate data stream. Therefore they + // are not part the top level SensorData message, as they are used only internally by some models. optional LowLevelData low_level_data = 1; - /// Latency, time offset that should have been elapsed before the data is transmitted to the receiving component. - /// Unit [ms]. + // Latency, time offset that should have been elapsed before the data is transmitted to the receiving component. + // Unit [ms]. optional double latency = 2; } -/// -/// Additional internal data and state flags for SensorDataObjects. -/// +// +// \brief Additional internal data and state flags for SensorDataObjects. +// message ModelInternalObject { - /// Specifies whether this vehicle is seen by the sensor; set by the field-of-view calculation. + // Specifies whether this vehicle is seen by the sensor; set by the field-of-view calculation. + // optional bool is_seen = 1 [default = true]; - /// The type of the original object in the ground truth. + // The type of the original object in the ground truth. + // optional ObjectType ground_truth_type = 2; - /// Ground truth vehicle type for object of ground_truth_type Vehicle, should not be set otherwise. + // Ground truth vehicle type for object of ground_truth_type Vehicle, should not be set otherwise. + // optional Vehicle.Type vehicle_type = 3; - /// Ground truth object type for object of ground_truth_type MovingObject, should not be set otherwise. + // Ground truth object type for object of ground_truth_type MovingObject, should not be set otherwise. + // optional MovingObject.Type moving_object_type = 4; - /// Ground truth object type for object of ground_truth_type StationaryObject, should not be set otherwise. + // Ground truth object type for object of ground_truth_type StationaryObject, should not be set otherwise. + // optional StationaryObject.Type stationary_object_type = 5; - /// Definition of object types in ground truth (see osi_object for definitions). + // Definition of object types in ground truth. + // enum ObjectType { - /// Object is a ghost object and does not exist in ground truth. + // Object is a ghost object and does not exist in ground truth. OBJECT_TYPE_GHOST = 0; - /// Other (unspecified but known) type of object. + // Other (unspecified but known) type of object. OBJECT_TYPE_OTHER = 1; - /// Object of type Vehicle. + // Object of type Vehicle. OBJECT_TYPE_VEHICLE = 2; - /// Object of type MovingObject. + // Object of type MovingObject. OBJECT_TYPE_MOVING = 3; - /// Object of type StationaryObject. + // Object of type StationaryObject. OBJECT_TYPE_STATIONARY = 4; - /// Object of type TrafficSign. + // Object of type TrafficSign. OBJECT_TYPE_TRAFFIC_SIGN = 5; - /// Object of type TrafficLight. + // Object of type TrafficLight. OBJECT_TYPE_TRAFFIC_LIGHT = 6; } } diff --git a/osi_object.proto b/osi_object.proto index 748e52397..da2fe6d86 100644 --- a/osi_object.proto +++ b/osi_object.proto @@ -6,207 +6,233 @@ import "osi_common.proto"; package osi; -/// -/// A vehicle. -/// -/// This is basically a BaseObject with additional attributes, such as type and lights. -/// The origin of the rear (front) axis coordinate system in world coordinates is calculated as: base.position + R * bbcenter_to_rear (front) -/// for the ego vehicle (R rotates from vehicle to world frame). For all vehicles, including ego vehicles, the position given -/// in base.position points to the center of the vehicle's bounding box. -/// +// +// \brief A vehicle (ego or other). +// +// This is basically a BaseObject with additional attributes, such as type and lights. +// The origin of the rear (front) axis coordinate system in world coordinates is calculated as: +// base.position + R * bbcenter_to_rear (front) for the ego vehicle (R rotates from vehicle to world frame). +// +// For all vehicles, including ego vehicles, the position given +// in base.position points to the center of the vehicle's bounding box. +// message Vehicle { - /// The id of the vehicle. + // The id of the vehicle. + // optional Identifier id = 1; - /// The base parameters of the vehicle. + // The base parameters of the vehicle. + // optional BaseMoving base = 2; - /// The type of the vehicle. + // The type of the vehicle. + // optional Type type = 3; - /// The light state of the vehicle. + // The light state of the vehicle. + // optional LightState light_state = 4; - /// Flag defining whether the vehicle is a simulated ego vehicle: True for ego vehicle(s), false for other vehicles. - /// See the description above! + // Flag defining whether the vehicle is a simulated ego vehicle: True for ego vehicle(s), false for other vehicles. + // See the description above! optional bool ego_vehicle = 5; - /// The vector pointing from the bounding box center point (base.position) to the middle (in x, y and z) - /// of the rear axle under neutral load conditions. In object coordinates. + // The vector pointing from the bounding box center point ( base.position ) to the middle (in x, y and z) + // of the rear axle under neutral load conditions. In object coordinates. optional Vector3d bbcenter_to_rear = 6; - /// The ids of the lanes that this vehicle is assigned to. - /// Might be multiple if the vehicle is switching lanes or moving from one lane into another following lane. + // The ids of the lanes that this vehicle is assigned to. + // \note Might be multiple if the vehicle is switching lanes or moving from one lane into another following lane. repeated Identifier assigned_lane = 7; - /// Flag defining whether the vehicle has an attached trailer. + // Flag defining whether the vehicle has an attached trailer. + // optional bool has_trailer = 8; - /// Id of the attached trailer. - /// Field need not be set if has_Trailer is set to false. + // Id of the attached trailer. + // \note Field need not be set if has_Trailer is set to false. optional Identifier trailer_id = 9; - /// The id of the driver of the (ego) vehicle. - /// Field need not be set if ego_vehicle is set to false. + // The id of the driver of the (ego) vehicle. + // \note Field need not be set if ego_vehicle is set to false. optional Identifier driver = 10; - /// The vector pointing from the bounding box center point (base.position) to the middle (in x, y and z) - /// of the front axle under neutral load conditions. In object coordinates. + // The vector pointing from the bounding box center point (base.position) to the middle (in x, y and z) + // of the front axle under neutral load conditions. In object coordinates. optional Vector3d bbcenter_to_front = 11; - /// Definition of vehicle types. + // Definition of vehicle types. enum Type { - /// Type of vehicle is unknown (must not be used in ground truth). + // Type of vehicle is unknown (must not be used in ground truth) TYPE_UNKNOWN = 0; - /// Other (unspecified but known) type of vehicle. + // Other (unspecified but known) type of vehicle. TYPE_OTHER = 1; - /// Vehicle is a normal car. - TYPE_CAR = 2; - /// Vehicle is a truck, bus, or large van. - TYPE_TRUCK = 3; - /// Vehicle is a motorbike or moped. - TYPE_MOTOR_BIKE = 4; - /// Vehicle is a bicycle (without motor). - TYPE_BICYCLE = 5; - /// Vehicle is a trailer (possibly attached to another vehicle). - TYPE_TRAILER = 6; + // Vehicle is a normal car. + TYPE_CAR = 2; + // Vehicle is a truck, bus, or large van. + TYPE_TRUCK = 3; + // Vehicle is a motorbike or moped. + TYPE_MOTOR_BIKE = 4; + // Vehicle is a bicycle (without motor). + TYPE_BICYCLE = 5; + // Vehicle is a trailer (possibly attached to another vehicle). + TYPE_TRAILER = 6; } - /// - /// The state of the lights of a vehicle. - /// + // + // \brief The state of the lights of a vehicle. + // message LightState { - /// State of the objects indicators. - optional IndicatorState indicator_state = 1; + // State of the object's indicators. + // + optional IndicatorState indicator_state = 1; - /// State of the front fog light. + // State of the front fog light. + // optional GenericLightState front_fog_light = 2; - /// State of the rear fog light. + // State of the rear fog light. + // optional GenericLightState rear_fog_light = 3; - /// State of the head lights. + // State of the head lights. + // optional GenericLightState head_light = 4; - /// State of the high beam. + // State of the high beam. + // optional GenericLightState high_beam = 5; - /// State of the reversing light. + // State of the reversing light. + // optional GenericLightState reversing_light = 6; - /// State of the brake lights. + // State of the brake lights. + // optional BrakeLightState brake_light_state = 7; - /// State of the (rear) license plate illumination + // State of the (rear) license plate illumination + // optional GenericLightState license_plate_illumination_rear = 8; - /// Definition of indicator states. - enum IndicatorState - { - /// Indicator state is unknown (must not be used in ground truth). + // Definition of indicator states. + // + enum IndicatorState + { + // Indicator state is unknown (must not be used in ground truth) INDICATOR_STATE_UNKNOWN = 0; - /// Other (unspecified but known) state of indicator. - INDICATOR_STATE_OTHER = 1; - /// Indicators are off. - INDICATOR_STATE_OFF = 2; - /// Left indicator is on. - INDICATOR_STATE_LEFT = 3; - /// Right indicator is on. - INDICATOR_STATE_RIGHT = 4; - /// Hazard/warning light, i.e. both indicators, are on. - INDICATOR_STATE_WARNING = 5; + // Other (unspecified but known) state of indicator. + INDICATOR_STATE_OTHER = 1; + // Indicators are off. + INDICATOR_STATE_OFF = 2; + // Left indicator is on. + INDICATOR_STATE_LEFT = 3; + // Right indicator is on. + INDICATOR_STATE_RIGHT = 4; + // Hazard/warning light, i.e. both indicators, are on. + INDICATOR_STATE_WARNING = 5; } - /// Definition of generic light states for light that may be on or off. - enum GenericLightState + // Definition of generic light states for light that may be on or off. + // + enum GenericLightState { - /// Light state is unknown (must not be used in ground truth). - GENERIC_LIGHT_STATE_UNKNOWN = 0; - /// Other (unspecified but known) state of ligth. - GENERIC_LIGHT_STATE_OTHER = 1; - /// Light is off. - GENERIC_LIGHT_STATE_OFF = 2; - /// Light is on. - GENERIC_LIGHT_STATE_ON = 3; + // Light state is unknown (must not be used in ground truth) + GENERIC_LIGHT_STATE_UNKNOWN = 0; + // Other (unspecified but known) state of light. + GENERIC_LIGHT_STATE_OTHER = 1; + // Light is off. + GENERIC_LIGHT_STATE_OFF = 2; + // Light is on. + GENERIC_LIGHT_STATE_ON = 3; } - /// Definition of brake light states. + // Definition of brake light states. + // enum BrakeLightState { - /// Brake light state is unknown (must not be used in ground truth). + // Brake light state is unknown (must not be used in ground truth) BRAKE_LIGHT_STATE_UNKNOWN = 0; - /// Other (unspecified but known) state of brake light. + // Other (unspecified but known) state of brake light. BRAKE_LIGHT_STATE_OTHER = 1; - /// Brake lights are off. + // Brake lights are off. BRAKE_LIGHT_STATE_OFF = 2; - /// Brake lights are on with normal intensity. - BRAKE_LIGHT_STATE_NORMAL = 3; - /// Brake lights are on with extra bright intensity (indicating stronger braking). - BRAKE_LIGHT_STATE_STRONG = 4; + // Brake lights are on with normal intensity. + BRAKE_LIGHT_STATE_NORMAL = 3; + // Brake lights are on with extra bright intensity (indicating stronger braking). + BRAKE_LIGHT_STATE_STRONG = 4; } } } -/// -/// A simulated object that is neither a vehicle, traffic sign or traffic light. -/// +// +// \brief A simulated object that is neither a vehicle, traffic sign or traffic light. +// message MovingObject { - /// The id of the object. + // The id of the object. + // optional Identifier id = 1; - /// The base parameters of the vehicle. + // The base parameters of the vehicle. + // optional BaseMoving base = 2; - /// The type of the object. + // The type of the object. + // optional Type type = 3; - /// Definition of object types. + // Definition of object types. + // enum Type { - /// Type of the object is unknown (must not be used in ground truth). + // Type of the object is unknown (must not be used in ground truth). TYPE_UNKNOWN = 0; - /// Other (unspecified but known) type of moving object. - TYPE_OTHER = 1; - /// Object is a pedestrian. - TYPE_PEDESTRIAN = 2; - /// Object is an animal. - TYPE_ANIMAL = 3; + // Other (unspecified but known) type of moving object. + TYPE_OTHER = 1; + // Object is a pedestrian. + TYPE_PEDESTRIAN = 2; + // Object is an animal. + TYPE_ANIMAL = 3; } } -/// -/// A simulated object that is neither a vehicle, traffic sign or traffic light. -/// +// +// \brief A simulated object that is neither a vehicle, traffic sign or traffic light. +// message StationaryObject { - /// The id of the object. + // The id of the object. + // optional Identifier id = 1; - /// The base parameters of the vehicle. + // The base parameters of the vehicle. + // optional BaseStationary base = 2; - /// The type of the object. + // The type of the object. + // optional Type type = 3; - /// Definition of object types. + // Definition of object types. + // enum Type { - /// Type of the object is unknown (must not be used in ground truth). + // Type of the object is unknown (must not be used in ground truth) TYPE_UNKNOWN = 0; - /// Other (unspecified but known) type of object. + // Other (unspecified but known) type of object. TYPE_OTHER = 1; - /// Object is a bridge. + // Object is a bridge. TYPE_BRIDGE = 2; - /// Object is a building. + // Object is a building. TYPE_BUILDING = 3; - /// Object is a pylon. + // Object is a pylon. TYPE_PYLON = 4; - /// Object is a reflector post. + // Object is a reflector post. TYPE_REFLECTOR_POST = 5; - /// Object is a delineator (e.g. at a construction site). + // Object is a delineator (e.g. at a construction site). TYPE_DELINEATOR = 6; } } diff --git a/osi_occupant.proto b/osi_occupant.proto index ed904c086..f975a4092 100644 --- a/osi_occupant.proto +++ b/osi_occupant.proto @@ -6,69 +6,75 @@ import "osi_common.proto"; package osi; -/// -/// An occupant of an ego vehicle, especially the driver of the vehicle. -/// +// +// \brief An occupant of an ego vehicle, especially the driver of the vehicle. +// message Occupant { - /// The id of the driver. + // The id of the driver. + // optional Identifier id = 1; - /// Flag determining whether the person is the driver of the vehicle or a passenger. + // Flag determining whether the person is the driver of the vehicle or a passenger. + // optional bool is_driver = 2; - /// Seat position of the vehicle occupant. + // Seat position of the vehicle occupant. + // optional Seat seat = 3; - /// Describes the state of the passengers hands related to the steering wheel (mostly driver). + // Describes the state of the passengers hands related to the steering wheel (mostly driver). + // optional SteeringControl steering_control = 4; - /// Definition of seat positions. + // Definition of seat positions. + // enum Seat { - /// Seat position is unknown. Value must not be used in ground truth. + // Seat position is unknown (must not be used in ground truth). SEAT_UNKNOWN = 0; - /// Other (unspecified but known) seat. + // Other (unspecified but known) seat. SEAT_OTHER = 1; - /// Seat position is in the front row, left seat. - /// This is usually the driver's seat in right-hand traffic. + // Seat position is in the front row, left seat. + // This is usually the driver's seat in right-hand traffic. SEAT_FRONT_LEFT = 2; - /// Seat position is in the front row, right seat. - /// This is usually the driver's seat in left-hand traffic. + // Seat position is in the front row, right seat. + // This is usually the driver's seat in left-hand traffic. SEAT_FRONT_RIGHT = 3; - /// Seat position is in the front row, middle seat. - SEAT_FRONT_MIDDLE = 4; - /// Seat position is in the back row, left seat. - SEAT_BACK_LEFT = 5; - /// Seat position is in the back row, right right. - SEAT_BACK_RIGHT = 6; - /// Seat position is in the back row, middle seat. - SEAT_BACK_MIDDLE = 7; - /// Seat position is in the third row, left seat. + // Seat position is in the front row, middle seat. + SEAT_FRONT_MIDDLE = 4; + // Seat position is in the back row, left seat. + SEAT_BACK_LEFT = 5; + // Seat position is in the back row, right right. + SEAT_BACK_RIGHT = 6; + // Seat position is in the back row, middle seat. + SEAT_BACK_MIDDLE = 7; + // Seat position is in the third row, left seat. SEAT_THIRD_ROW_LEFT = 8; - /// Seat position is in the third row, right seat. - SEAT_THIRD_ROW_RIGHT = 9; - /// Seat position is in the third row, middle seat. - SEAT_THIRD_ROW_MIDDLE = 10; + // Seat position is in the third row, right seat. + SEAT_THIRD_ROW_RIGHT = 9; + // Seat position is in the third row, middle seat. + SEAT_THIRD_ROW_MIDDLE = 10; } - /// Definition of hands related to the steering wheel (mostly driver). + // Definition of hands related to the steering wheel (mostly driver). + // enum SteeringControl { - /// Hands state is unknown. Value must not be used in ground truth. + // Hands state is unknown (must not be used in ground truth) STEERING_CONTROL_UNKNOWN = 0; - /// Other (unspecified but known) hand positioning related to the steering wheel. - STEERING_CONTROL_OTHER = 1; - /// Hands are not on the steering wheel. - STEERING_CONTROL_NO_HAND = 2; - /// One hand is on the steering wheel. Whether it is the left or right hand is unspecified or unknown. - /// If there is no differentiation between one or both hands on the steering wheel, this value should be used. + // Other (unspecified but known) hand positioning related to the steering wheel. + STEERING_CONTROL_OTHER = 1; + // Hands are not on the steering wheel. + STEERING_CONTROL_NO_HAND = 2; + // One hand is on the steering wheel. Whether it is the left or right hand is unspecified or unknown. + // \b Note: If there is no differentiation between one or both hands on the steering wheel, this value should be used. STEERING_CONTROL_ONE_HAND = 3; - /// Both hands are on the steering wheel. - STEERING_CONTROL_BOTH_HANDS = 4; - /// The left hand only is on the steering wheel. - STEERING_CONTROL_LEFT_HAND = 5; - /// The right hand only is on the steering wheel. - STEERING_CONTROL_RIGHT_HAND = 6; + // Both hands are on the steering wheel. + STEERING_CONTROL_BOTH_HANDS = 4; + // The left hand only is on the steering wheel. + STEERING_CONTROL_LEFT_HAND = 5; + // The right hand only is on the steering wheel. + STEERING_CONTROL_RIGHT_HAND = 6; } } diff --git a/osi_sensordata.proto b/osi_sensordata.proto index 39f6f4a4f..7986770c9 100644 --- a/osi_sensordata.proto +++ b/osi_sensordata.proto @@ -12,17 +12,18 @@ import "osi_modelinternal.proto"; package osi; -/// -/// The virtual sensor information derived from osi::groundtruth and potentially processed by sensor-models. -/// -/// The virtual sensor information is supposed to imitate the output of a real sensor. All information regarding the -/// environment is given with respect to the sensor coordinate system specified in SensorData::mounting_position.When -/// simulating multiple sensors, each sensor has an individual copy of the SensorData interface. This allows an -/// independent treatment of the sensors. -/// +// +// \brief The virtual sensor information derived from GroundTruth and potentially processed by sensor-models. +// +// The virtual sensor information is supposed to imitate the output of a real sensor. All information regarding the +// environment is given with respect to the sensor coordinate system specified in \c SensorData::mounting_position. +// When simulating multiple sensors, each sensor has an individual copy of the SensorData interface. This allows an +// independent treatment of the sensors. +// message SensorData -{ +{ // The id of the sensor. + // optional Identifier id = 1; // The data timestamp of the sensor data. Zero time is arbitrary but must be identical for all messages. @@ -33,25 +34,32 @@ message SensorData // Should be used as constant; use this if you require fields that do not exist in osi_sensordata or for the purpose // of matching sensor output against ground truth data. optional SensorDataGroundTruth ground_truth = 3; - + // The id of the ego vehicle in the ground_truth data. + // optional Identifier ego_vehicle_id = 4; - // The mounting position of the sensor (origin and orientation of the sensor coordinate system); - // given in vehicle coordinates: origin is Vehicle::reference_point; the orientation is equal to the orientation of the vehicle. - // x-direction: longitudinal direction & positive in driving direction; - // y-direction: lateral direction & positive to the left when looking orientated as a driver; - // z-direction: perpendicular to x and z right hand system (up). - // See https://en.wikipedia.org/wiki/Axes_conventions#/media/File:RPY_angles_of_cars.png - // Note that this field is usually static during the simulation. + // The mounting position of the sensor (origin and orientation of the sensor coordinate system) + // + // given in vehicle coordinates: origin is \c Vehicle::reference_point; the orientation is equal to the orientation of the vehicle. + // + // \arg \b x-direction: longitudinal direction & positive in driving direction + // \arg \b y-direction: lateral direction & positive to the left when looking orientated as a driver + // \arg \b z-direction: perpendicular to x and z right hand system (up) + // + // See https://en.wikipedia.org/wiki/Axes_conventions#/media/File:RPY_angles_of_cars.png + // \note This field is usually static during the simulation. optional MountingPosition mounting_position = 5; // The list of objects detected by the sensor as perceived by the sensor. + // repeated DetectedObject object = 6; // The list of traffic signs detected by the sensor + // repeated DetectedTrafficSign traffic_sign = 7; - + + // // The list of traffic lights detected by the sensor repeated DetectedTrafficLight traffic_light = 8; @@ -59,31 +67,39 @@ message SensorData // This excludes lane boundary marking as these are included in DetectedLane. repeated DetectedRoadMarking road_marking = 9; + // // The list of lane detected by the sensor repeated DetectedLane lane = 10; + // // The list of occupants of the ego vehicle repeated DetectedOccupant occupant = 11; - // Additional internal data and state flags required and used by the sensor-models, should not be used by - // subscribers to SensorData data. Generally this field should be cleared after internal processing. + // Additional internal data and state flags required and used by the sensor-models. + // \note Should not be used by subscribers to SensorData data. + // Generally this field should be cleared after internal processing. optional ModelInternal model_internal = 12; } -/// -/// Ground truth data with respect to two different reference frames (global and sensor) for use in the sensor model's -/// data processing and comparison of sensor and ground truth data. -/// +// +// \brief Ground truth data with respect to two different reference frames (global and sensor). +// +// Use in the sensor model's data processing and comparison of sensor and ground truth data. +// message SensorDataGroundTruth { // Ground truth w.r.t. global coordinate system (copy of GroundTruth message), - // should be used as constant in the sensor models, - // needed for setting fields in the SensorData that are not covered by the model + // + // needed for setting fields in the SensorData that are not covered by the model. + // \note should be used as constant in the sensor models. + // optional GroundTruth global_ground_truth = 1; - // Ground truth w.r.t. the sensor coordinate system; - // this is equal to the version of the SensorData interface that is used as input by the sensor model before - // any processing take splace aside from the coordinate transformation from global to sensor reference frame, + // Ground truth w.r.t. the sensor coordinate system. + // + // Is equal to the version of the SensorData interface that is used as input by the sensor model before + // any processing takes place aside from the coordinate transformation from global to sensor reference frame. + // // SensorData.ground_truth is not set in this instance to avoid the resulting infinite loop. optional SensorData sensor_ground_truth = 2; } diff --git a/osi_sensorspecific.proto b/osi_sensorspecific.proto index d1532ee59..d9f587d93 100644 --- a/osi_sensorspecific.proto +++ b/osi_sensorspecific.proto @@ -4,26 +4,26 @@ option optimize_for = SPEED; package osi; -/// -/// Message encapsulates all data for detected objects that is specific to radar sensors. -/// +// +// \brief Message encapsulates all data for detected objects that is specific to radar sensors. +// message RadarSpecificObjectData { // The radar cross section (RCS) of the detected object. Unit: [dB sqm]. optional double rcs = 1; } -/// -/// Message encapsulates all data for detected objects that is specific to lidar sensors. -/// +// +// \brief Message encapsulates all data for detected objects that is specific to lidar sensors. +// message LidarSpecificObjectData { // currently no fields. } -/// -/// Message encapsulates all data for detected objects that is specific to camera sensors. -/// +// +// \brief Message encapsulates all data for detected objects that is specific to camera sensors. +// message CameraSpecificObjectData { // currently no fields. From ef10003d44cb667afb82f93bf6397c0ee36d18ed Mon Sep 17 00:00:00 2001 From: AhmedMzid Date: Fri, 31 Mar 2017 11:48:05 +0200 Subject: [PATCH 04/11] Correct version number --- CMakeLists.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 65990344c..d52a11d80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.7) # set name and version of the project project(open_simulation_interface) set(VERSION_MAJOR 2) -set(VERSION_MINOR 2) +set(VERSION_MINOR 1) set(VERSION_PATCH 1) diff --git a/setup.py b/setup.py index 6ffed1295..2898ae1f4 100644 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ def run(self): setup( name='open-simulation-interface', - version='2.0.0', + version='2.1.1', description='A generic interface for the environmental perception of' 'automated driving functions in virtual scenarios.', author='Carlo van Driesten, Timo Hanke, Nils Hirsenkorn,' From 7f267e47c4cc3473ae3298997568df5eda0de58c Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Fri, 31 Mar 2017 18:12:36 +0200 Subject: [PATCH 05/11] Added some corrections to the doxygen comments and the README.md --- README.md | 24 ++-- osi_common.proto | 39 ++++--- osi_detectedlandmark.proto | 11 +- osi_detectedobject.proto | 16 +++ osi_environment.proto | 5 + osi_groundtruth.proto | 1 - osi_landmark.proto | 227 +++++++++++++++++++++++++++++++++---- osi_lane.proto | 53 ++++++++- osi_lowleveldata.proto | 17 ++- osi_modelinternal.proto | 13 +++ osi_object.proto | 168 ++++++++++++++++++--------- osi_occupant.proto | 55 +++++++-- 12 files changed, 514 insertions(+), 115 deletions(-) diff --git a/README.md b/README.md index aa00f33b9..b6cfaa818 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,10 @@ Open Simulation Interface (OSI) [![Travis Build Status](https://travis-ci.org/OpenSimulationInterface/open-simulation-interface.svg?branch=master)](https://travis-ci.org/OpenSimulationInterface/open-simulation-interface) + General description ------------------- -https://www.hot.ei.tum.de/forschung/automotive-veroeffentlichungen/ +[TUM Department of Electrical and Computer Engineering] (https://www.hot.ei.tum.de/forschung/automotive-veroeffentlichungen/) Global remarks @@ -38,13 +39,16 @@ Fault injection: how-to Injection of pre-defined sensor errors should be handled by a specialized "fault injector" component that acts like a sensor model component, i.e. it takes a SensorData message as input and returns a modified SensorData message as output. Specific errors should be handled as follows: -- Ghost objects / false positive: An additional SensorDataObject is added to the list of objects in SensorData.object - with SensorDataObject.model_internal_object.ground_truth_type set to kTypeGhost. -- False negative: The object is marked as not seen by the sensor by setting the property - SensorDataObject.model_internal_object.is_seen to false. The implementation of field-of-view calculation modules - should respect this flag and never reset an object marked as not-seen to seen. +- Ghost objects / false positive: + An additional SensorDataObject is added to the list of objects in SensorData.object + with SensorDataObject.model_internal_object.ground_truth_type set to kTypeGhost. +- False negative: + The object is marked as not seen by the sensor by setting the property + SensorDataObject.model_internal_object.is_seen to false. The implementation + of field-of-view calculation modules should respect this flag and never reset + an object marked as not-seen to seen. + - Versioning ---------- The version number is defined in InterfaceVersion::version_number in osi_common.proto as the field's default value. @@ -70,6 +74,7 @@ The compatibility of both recorded files and code remains. - Changing or adding comments - Clarification of text passages explaining the message content + Packaging --------- @@ -77,13 +82,14 @@ A specification to package sensor models using OSI as (extended) Functional Mock-up Units (FMUs) for use in simulation environments is available [here](https://github.com/OpenSimulationInterface/osi-sensor-model-packaging). + Documentation ------------- In order to generate the doxygen documentation for OSI, please follow the following steps: -1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html) and set an environmental variable 'doxygen' with the path to the binary file. +1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html), set an environmental variable 'doxygen' with the path to the binary file and add it to PATH ´;%doxygen%´. 2. Download and unzip the [zip file containing the filter proto2cpp.py](https://sourceforge.net/p/proto2cpp/wiki/Home/ ). -3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ) and set an environmental variable 'dot' with the path to the binary file. +3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ), set an environmental variable 'graphviz' with the path to the binary file and add it to PATH ´;%graphviz%´. 4. From the cmd navigate to the build directory and run: ```cmd cmake -DFILTER_PROTO2CPP_PY_PATH= diff --git a/osi_common.proto b/osi_common.proto index c7f2ebd3d..0cb20e9eb 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -4,15 +4,24 @@ option optimize_for = SPEED; package osi; - +// // \brief The interface version number. - +// +// The field containing the version number. Should be left on default, not to be modified by sender. +// Increments will happen as part of changes to the whole interface. +// message InterfaceVersion { - // The field containing the version number. Should be left on default, not to be modified by sender. Increments will - // happen as part of changes to the whole interface. + // Major version number. + // optional uint32 major = 1 [default = 2]; + + // Minor version number. + // optional uint32 minor = 2 [default = 1]; + + // Patch version number. + // optional uint32 patch = 3 [default = 1]; } @@ -23,15 +32,15 @@ message InterfaceVersion // message Vector3d { - // The x coordinate + // The x coordinate. // optional double x = 1; - // The y coordinate + // The y coordinate. // optional double y = 2; - // The z coordinate + // The z coordinate. // optional double z = 3; } @@ -43,11 +52,11 @@ message Vector3d // message Vector2d { - // The x coordinate + // The x coordinate. // optional double x = 1; - // The y coordinate + // The y coordinate. // optional double y = 2; } @@ -79,12 +88,12 @@ message Dimension3d // The width of the bounding box. // optional double width = 1; - + // The length of the bounding box. // optional double length = 2; - - //The height of the bounding box. + + // The height of the bounding box. // optional double height = 3; } @@ -116,11 +125,11 @@ message Orientation3d // The roll angle/rate/acceleration. // optional double roll = 1; - + // The pitch angle/rate/acceleration. // optional double pitch = 2; - + // The yaw angle/rate/acceleration. // optional double yaw = 3; @@ -220,7 +229,7 @@ message BaseStationary // message BaseMoving { - // The 3D dimension of the object (bounding box): + // The 3D dimension of the object (bounding box). // optional Dimension3d dimension = 1; diff --git a/osi_detectedlandmark.proto b/osi_detectedlandmark.proto index 36060a237..e7e49e18b 100644 --- a/osi_detectedlandmark.proto +++ b/osi_detectedlandmark.proto @@ -48,18 +48,22 @@ message DetectedTrafficSign // enum Geometry { - // Geometry of the traffic sign is unknown. + // Geometry of the traffic sign is unknown (must not be used in ground truth). // GEOMETRY_UNKNOWN = 0; + // Geometry of the traffic sign is unspecified (but known). // GEOMETRY_OTHER = 1; + // Traffic sign has a triangular geometry. // GEOMETRY_TRIANGLE = 2; + // Traffic sign has a circular geometry. // GEOMETRY_CIRCLE = 3; + // Traffic sign has a square geometry. // GEOMETRY_SQUARE = 4; @@ -69,15 +73,18 @@ message DetectedTrafficSign // enum MeasurementState { - // Measurement state is unknown. + // Measurement state is unknown (must not be used in ground truth). // MEASUREMENT_STATE_UNKNOWN = 0; + // Measurement state is unspecified (but known, i.e. value is not part of this enum list). // MEASUREMENT_STATE_OTHER = 1; + // Traffic sign has been measured by the sensor in the current timestep. // MEASUREMENT_STATE_MEASURED = 2; + // Traffic sign has not been measured by the sensor in the current timestep. Values provided by tracking only. // MEASUREMENT_STATE_PREDICTED = 3; diff --git a/osi_detectedobject.proto b/osi_detectedobject.proto index e6a07b7c5..eb7b3fdd5 100644 --- a/osi_detectedobject.proto +++ b/osi_detectedobject.proto @@ -74,33 +74,43 @@ message DetectedObject // within the bounding volume unknown to the sensor. If this value is set, the center of the bounding box should // be used as reference point by convention, unless the specific use case requires otherwise. REFERENCE_POINT_UNKNOWN = 0; + // Other (unspecified but known) reference point. // REFERENCE_POINT_OTHER = 1; + // Center of the bounding box. // REFERENCE_POINT_CENTER = 2; + // Middle-Left of the bounding box. // REFERENCE_POINT_MIDDLE_LEFT = 3; + // Middle-Right of the bounding box. // REFERENCE_POINT_MIDDLE_RIGHT = 4; + // Rear-Middle of the bounding box. // REFERENCE_POINT_REAR_MIDDLE = 5; + // Rear-Left of the bounding box. // REFERENCE_POINT_REAR_LEFT = 6; + // Rear-Right of the bounding box. // REFERENCE_POINT_REAR_RIGHT = 7; + // Front-Middle of the bounding box. // REFERENCE_POINT_FRONT_MIDDLE = 8; + // Front-Left of the bounding box. // REFERENCE_POINT_FRONT_LEFT = 9; + // Front-Right of the bounding box. // REFERENCE_POINT_FRONT_RIGHT = 10; @@ -114,21 +124,27 @@ message DetectedObject // Probability that the object has unknown type. Range [0,1]. // optional double prob_unknown = 1; + // Probability that the object is a car. Range [0,1]. // optional double prob_car = 2; + // Probability that the object is a truck. Range [0,1]. // optional double prob_truck = 3; + // Probability that the object is a motorbike. Range [0,1]. // optional double prob_motorbike = 4; + // Probability that the object is a bicycle. Range [0,1]. // optional double prob_bicycle = 5; + // Probability that the object is a pedestrian. Range [0,1]. // optional double prob_pedestrian = 6; + // Probability that the object is a stationary object. Range [0,1]. // optional double prob_stationary = 7; diff --git a/osi_environment.proto b/osi_environment.proto index 44670321e..ba7c003c5 100644 --- a/osi_environment.proto +++ b/osi_environment.proto @@ -57,18 +57,23 @@ message EnvironmentalConditions // Ambient illumination is unknown (must not be used in ground truth). // AMBIENT_ILLUMINATION_UNKNOWN = 0; + // Other (unspecified but known) ambient illumination. // AMBIENT_ILLUMINATION_OTHER = 1; + // Ambient illumination index is "bright". // E.g. daytime with sunshine. AMBIENT_ILLUMINATION_BRIGHT = 2; + // Ambient illumination index is "medium". // E.g. daytime with overcast sky. AMBIENT_ILLUMINATION_MEDIUM = 3; + // Ambient illumination index is "low". // E.g. during twilight (dawn/dusk) or in a tunnel. AMBIENT_ILLUMINATION_LOW = 4; + // Ambient illumination index is "dark". // E.g. night time, no sunlight. AMBIENT_ILLUMINATION_DARK = 5; diff --git a/osi_groundtruth.proto b/osi_groundtruth.proto index 71c88086b..f0bbcc9c0 100644 --- a/osi_groundtruth.proto +++ b/osi_groundtruth.proto @@ -39,7 +39,6 @@ message GroundTruth // The data timestamp of the simulation environment. Zero time is arbitrary but must be identical for all messages. // Zero time does not need to coincide with the unix epoch. Recommended is the starting time point of the // simulation. - // optional Timestamp timestamp = 2; // A list of vehicles. diff --git a/osi_landmark.proto b/osi_landmark.proto index e2e9938dd..f681734b3 100644 --- a/osi_landmark.proto +++ b/osi_landmark.proto @@ -53,170 +53,223 @@ message TrafficSign // Type of traffic sign is unknown (must not be used in ground truth). // TYPE_UNKNOWN = 0; + // Other (unspecified but known) type of traffic sign. // TYPE_OTHER = 1; + // Start of speed limit (StVO 274). // TYPE_SPEED_LIMIT_BEGIN = 2; + // End of speed limit (StVO 278). // TYPE_SPEED_LIMIT_END = 3; + // Town entrance (StVO 310). // TYPE_TOWN_BEGIN = 4; + // Town exit (StVO 311). // TYPE_TOWN_END = 5; + // Start of zone with speed limit 30 (StVO 274.1). // TYPE_ZONE_30_BEGIN = 6; + // End of zone with speed limit 30 (StVO 274.2). // TYPE_ZONE_30_END = 7; + // Mandatory minimum speed (StVO 275). // TYPE_MINIMUM_SPEED = 8; + // Start of area with calmed / reduced traffic (verkehrsberuhigter Bereich - StVO 325.1). // TYPE_TRAFFIC_CALMED_DISTRICT_BEGIN = 9; + // End of area with calmed / reduced traffic (verkehrsberuhigter Bereich - StVO 325.2). // TYPE_TRAFFIC_CALMED_DISTRICT_END = 10; + // Start of area without traffic to reduce harmful air pollution (StVO 270.1). // TYPE_ENVIRONMENTAL_ZONE_BEGIN = 11; // End of area without traffic to reduce harmful air pollution (StVO 270.2). // TYPE_ENVIRONMENTAL_ZONE_END = 12; + // Start of overtaking ban (StVO 276). // TYPE_OVERTAKING_BAN_BEGIN = 13; + // End of overtaking ban (StVO 280). // TYPE_OVERTAKING_BAN_END = 14; + // Start of overtaking ban for trucks (StVO 277). // TYPE_OVERTAKING_BAN_FOR_TRUCKS_BEGIN = 15; + // End of overtaking ban for trucks (StVO 281). // TYPE_OVERTAKING_BAN_FOR_TRUCKS_END = 16; + // End of all speed and overtaking restrictions (StVO 282). // TYPE_ALL_RESTRICTIONS_END = 17; + // Begin of priority road with right of way (StVO 306). // TYPE_RIGHT_OF_WAY_BEGIN = 18; + // End of priority road with right of way (StVO 307). // TYPE_RIGHT_OF_WAY_END = 19; + // Right of way at the next intersection (StVO 301). // TYPE_RIGHT_OF_WAY_NEXT_INTERSECTION = 20; + // Begin of no parking zone (StVO 290.1). // TYPE_NO_PARKING_ZONE_BEGIN = 21; + // End of no parking zone (StVO 290.2). // TYPE_NO_PARKING_ZONE_END = 22; + // No parking sign (StVO 286). // TYPE_NO_PARKING = 23; + // No stopping sign (StVO 283). // TYPE_NO_STOPPING = 24; + // Give way sign (StVO 205). // TYPE_GIVE_WAY = 25; + // Stop sign (StVO 206). // TYPE_STOP = 26; + // Danger sign (StVO 101). // TYPE_DANGER_SPOT = 27; + // Road works sign (StVO 123) // TYPE_ROAD_WORKS = 28; + // Roundabout (StVO 215). // TYPE_ROUNDABOUT = 29; + // Traffic light ahead sign (StVO 131). // TYPE_ATTENTION_TRAFFIC_LIGHT = 30; + // Pedestrian crossing (StVO 350). // TYPE_PEDESTRIAN_CROSSING_INFO = 31; + // Minimum safety distance for trucks (StVO 273). // TYPE_MINIMUM_DISTANCE_FOR_TRUCKS = 32; + // Entry not allowed (StVO 267). // TYPE_DO_NOT_ENTER = 33; + // Entry prohibited for all vehicle types (StVO 250). // TYPE_PROHIBITED_FOR_ALL = 34; + // Entry prohibited for all motor vehicles (StVO 251). // TYPE_PROHIBITED_FOR_MOTOR_VEHICLES = 35; + // Entry prohibited for trucks (StVO 253). // TYPE_PROHIBITED_FOR_TRUCKS = 36; + // Entry prohibited for bicycles (StVO 254). // TYPE_PROHIBITED_FOR_BICYCLES = 37; + // Entry prohibited for motor bikes (StVO 255). // TYPE_PROHIBITED_FOR_MOTOR_BIKES = 38; + // Entry prohibited for pedestrians (StVO 259). // TYPE_PROHIBITED_FOR_PEDESTRIANS = 39; + // Entry prohibited for all motor vehicles and bikes (StVO 260). // TYPE_PROHIBITED_FOR_MOTOR_VEHICLES_BIKES = 40; + // Begin of highway (StVO 330.1). // TYPE_HIGHWAY_BEGIN = 41; + // End of highway (StVO 330.2). // TYPE_HIGHWAY_END = 42; + // Highway exit sign (StVO 333). // TYPE_HIGHWAY_EXIT = 43; + // Pole indicating highways exit in 100m (StVO 450). // TYPE_POLE_EXIT_100M = 44; + // Pole indicating highways exit in 200m (StVO 450). // TYPE_POLE_EXIT_200M = 45; + // Pole indicating highways exit in 300m (StVO 450). // TYPE_POLE_EXIT_300M = 46; + // Pole for warning and guiding purposes (red/white stripes - StVO 605). // TYPE_POLE_WARNING = 47; + // Begin of expressway for motor vehicles (StVO 331.1). // TYPE_EXPRESSWAY_BEGIN = 48; + // End of expressways for motor vehicles (StVO 331.2). // TYPE_EXPRESSWAY_END = 49; + // Parking space (StVO 314). // TYPE_CAR_PARKING = 50; } - // + // Definition of the variability of the traffic sign. + // enum Variability { // Variability type of sign is unknown (must not be used in ground truth). // VARIABILITY_UNKNOWN = 0; + // Other (unspecified but known) variability. // VARIABILITY_OTHER = 1; + // Fixed sign, i.e. always present. // VARIABILITY_FIXED = 2; + // Temporary or variable sign, e.g. on a sign bridge. // VARIABILITY_VARIABLE = 3; @@ -247,65 +300,105 @@ message SupplementarySign // Type of supplementary sign is unknown (must not be used in ground truth). // TYPE_UNKNOWN = 0; + // Other (unspecified but known) type of supplementary sign. // TYPE_OTHER = 1; + // There is no supplementary sign (must not be used in ground truth). // TYPE_NO_SIGN = 2; + // Traffic sign is valid for a certain distance (given by value_1 in meter). // TYPE_VALID_FOR_DISTANCE = 3; + // Distance to the start of validity of the traffic sign (given by value_1 in meter). // TYPE_VALID_IN_DISTANCE = 4; + // Time range for validity of traffic sign (starting from value_1 and ending with value_2, both defining // time of day in minutes from midnight). TPYE_TIME_RANGE = 5; + // Restriction of the validity of the traffic sign depending on the vehicle's weight (more than value_1 in kilogram). - // + // TYPE_WEIGHT = 6; + // Restriction of the validity of the traffic sign to wet / rainy conditions. // TYPE_RAIN = 7; + // Restriction of the validity of the traffic sign to foggy conditions. // TYPE_FOG = 8; + // Restriction of the validity of the traffic sign to snowy / icy conditions. // TYPE_SNOW = 9; + // Combined restriction of the validity of the traffic sign to rainy or snowy conditions denoted by a single // supplementary sign (instead of two signs of TYPE_WET and TYPE_SNOW respectively). TYPE_SNOW_RAIN = 10; - // + + // Direction, left-pointing. + // TYPE_LEFT_ARROW = 11; - // + + // Direction, right-pointing. + // TYPE_RIGHT_ARROW = 12; - // + + // Direction of potential danger, left-pointing. + // TYPE_LEFT_BEND_ARROW = 13; - // + + // Direction of potential danger, right-pointing. + // TYPE_RIGHT_BEND_ARROW = 14; - // + + // Valid for trucks. + // TYPE_TRUCK = 15; - // + + // Only trucks allowed. + // TYPE_TRACTORS_MAY_BE_PASSED = 16; - // + + // Hazardous. + // TYPE_HAZARDOUS = 17; - // + + // Valid for trailer. + // TYPE_TRAILER = 18; - // + + // Valid at night. + // TYPE_NIGHT = 19; - // + + // Zone. + // TYPE_ZONE = 20; - // + + // Stop 4 way. + // TYPE_STOP_4_WAY = 21; - // + + // Valid for motorcycle. + // TYPE_MOTORCYCLE = 22; - // + + // Only motorcycle allowed. + // TYPE_MOTORCYCLE_ALLOWED = 23; - // + + // Valid for cars. + // TYPE_CAR = 24; - // + + // Ends in X meter. + // TYPE_STOP_IN = 25; } } @@ -348,49 +441,88 @@ message TrafficLight enum Type { // Unknown type of traffic light (must not be used in ground truth). + // TYPE_UNKNOWN = 0; + // Other (unspecified but known) type of traffic light. + // TYPE_OTHER = 1; + // Normal traffic light for motor vehicle traffic. + // TYPE_NORMAL = 2; + // Light for pedestrian traffic. + // TYPE_PEDESTRIAN = 3; + // Light for bicycle traffic. + // TYPE_BICYCLE = 4; } // Definition of traffic light shapes. + // enum Shape { // Unknown shape of traffic light (must not be used in ground truth). + // SHAPE_UNKNOWN = 0; + // Other (unspecified but known) shape of traffic light. + // SHAPE_OTHER = 1; + // This is a normal traffic light without specification of direction. + // SHAPE_CIRCULAR = 2; + // This traffic light applies to the lane straight ahead. + // SHAPE_ARROW_STRAIGHT = 3; + // This traffic light applies to left turns. + // SHAPE_ARROW_LEFT = 4; + // This traffic light applies to diagonal left turns. + // SHAPE_ARROW_DIAG_LEFT = 5; + // This traffic light applies to a lane allowing to drive straight ahead or to turn left. + // SHAPE_ARROW_STRAIGHT_LEFT = 6; + // This traffic light applies to right turns. + // SHAPE_ARROW_RIGHT = 7; + // This traffic light applies to diagonal right turns. + // SHAPE_ARROW_DIAG_RIGHT = 8; + // This traffic light applies to a lane allowing to drive straight ahead or to turn right. + // SHAPE_ARROW_STRAIGHT_RIGHT = 9; + // This traffic light applies to a lane allowing to turn left or right. + // SHAPE_ARROW_LEFT_RIGHT = 10; + // This traffic light indicates that the assigned lane is open for driving. + // SHAPE_ARROW_DOWN = 11; + // This traffic light indicates a necessary lane change to the left ahead. + // SHAPE_ARROW_DOWN_LEFT = 12; + // This traffic light indicates a necessary lane change to the right ahead. + // SHAPE_ARROW_DOWN_RIGHT = 13; + // This traffic light indicates that the assigned lane is not open for driving. + // SHAPE_ARROW_CROSS = 14; } @@ -402,56 +534,90 @@ message TrafficLight message LightState { // The color of the traffic light. + // optional Color color = 1; - + // The operating mode of the traffic light. + // optional Mode mode = 2; - + // Definition of colors for traffic lights. + // enum Color { // Color is unknown (must not be used in ground truth). + // COLOR_UNKNOWN = 0; + // Other (unspecified but known) color. + // COLOR_OTHER = 1; + // Traffic light is off / not active. In this case mode must also be set to MODE_OFF. + // COLOR_OFF = 2; + // Red light is on. + // COLOR_RED = 3; + // Red and yellow light are on at the same time. + // COLOR_RED_YELLOW = 4; + // Yellow light is on. + // COLOR_YELLOW = 5; + // Green light is on. + // COLOR_GREEN = 6; } // Definition of light modes for traffic lights. + // enum Mode { // Mode is unknown (must not be used in ground truth). + // MODE_UNKNOWN = 0; + // Other (unspecified but known) mode. + // MODE_OTHER = 1; + // Traffic light is off / not active. In this case color must also be set to COLOR_OFF. + // MODE_OFF = 2; + // Light is on normally. + // MODE_CONSTANT = 3; + // Light is blinking. + // MODE_BLINKING = 4; } } // Definition of states for the presence of a green arrow sign for right turns. + // enum GreenArrowPresence { // Presence of green arrow sign is unknown (must not be used in ground truth). + // GREEN_ARROW_UNKNOWN = 0; + // Other (unspecified but known) green arrow sign. + // GREEN_ARROW_OTHER = 1; + // No green arrow sign present. + // GREEN_ARROW_NOT_PRESENT = 2; + // Green arrow sign present. + // GREEN_ARROW_PRESENT = 3; } } @@ -492,33 +658,56 @@ message RoadMarking enum Type { // Type of road marking is unknown (must not be used in ground truth). + // TYPE_UNKNOWN = 0; + // Other (unspecified but known) type of road marking. + // TYPE_OTHER = 1; + // A stop line. + // TYPE_STOP_LINE = 2; + // A speed limit sign painted on the road surface. + // TYPE_SPEED_LIMIT = 3; + // A straight arrow painted on the road surface indicating a lane to drive straight. + // TYPE_STRAIGHT_ARROW = 4; + // A straight arrow painted on the road surface indicating a lane to turn right. + // TYPE_RIGHT_TURN_ARROW = 5; + // A straight arrow painted on the road surface indicating a lane to turn left. + // TYPE_LEFT_TURN_ARROW = 6; } // Definition of road marking colors + // enum Color { // Color of road marking is unknown (must not be used in ground truth). + // COLOR_UNKNOWN = 0; + // Marking with another (unspecified but known) color. + // COLOR_OTHER = 1; + // Marking with white color. + // COLOR_WHITE = 2; + // Marking with yellow / orange-yellow color. + // COLOR_YELLOW = 3; + // Marking with blue color. + // COLOR_BLUE = 5; } } diff --git a/osi_lane.proto b/osi_lane.proto index a20f33685..d8e3ae497 100644 --- a/osi_lane.proto +++ b/osi_lane.proto @@ -44,7 +44,6 @@ message Lane // // \image html line_approximation_error.png "Approximation error as green line." // - repeated Vector3d center_line = 3; // The boundary of the lane. @@ -85,41 +84,64 @@ message Lane optional LaneFraming lane_framing = 9; // Definition of available lane types. + // enum Type { // Lane of unknown type (must not be used in ground truth). + // TYPE_UNKNOWN = 0; + // Any other type of lane + // TYPE_OTHER = 1; + // A normal lane. // E.g. lanes with ids 1, 2, 3, 4 and 7 of the highway_exit image. TYPE_NORMAL = 2; + // A stop/emergency lane on highways/freeways. // E.g. lane with id 5 of the highway_exit image. TYPE_EMERGENCY = 3; + // A freeway/highway entry lane. + // TYPE_ENTRANCE = 4; + // A freeway/highway exit lane. // E.g. lane with id 6 of the highway_exit image. TYPE_EXIT = 5; + // A car pooling lane. + // TYPE_HIGH_OCCUPANCY_VEHICLE = 6; + // A road area / lane reserved for parking. + // TYPE_PARKING = 7; } // Definition of available lane framing types. + // enum LaneFraming { // Lane of unknown framing (must not be used in ground truth). + // LANE_FRAMING_UNKNOWN = 0; + // Other (unspecified but known) lane framing. + // LANE_FRAMING_OTHER = 1; + // The lane is not framed. + // LANE_FRAMING_OPEN = 2; + // The lane segment is inside of a tunnel. + // LANE_FRAMING_TUNNEL = 3; + // The lane segment is on a bridge. + // LANE_FRAMING_BRIDGE = 4; } } @@ -161,52 +183,70 @@ message LaneBoundary enum BoundaryLocation { // The location of the boundary is unknown. Value must not be used in ground truth. + // BOUNDARY_LOCATION_UNKNOWN = 0; + // Other (unspecified but known) boundary location. + // BOUNDARY_LOCATION_OTHER = 1; + // A left lane boundary. + // BOUNDARY_LOCATION_LEFT = 2; + // A right lane boundary. + // BOUNDARY_LOCATION_RIGHT = 3; + // A free lane boundary. + // BOUNDARY_LOCATION_FREE = 4; } // The lane boundary type. - // There are no double lines, e.g. solid solid or dashed solid, as each lane will define its own side of the lane - // boundary. + // There are no double lines, e.g. solid solid or dashed solid, as each lane will define its own side of the lane boundary. enum Type { // The type of lane boundary is unknown. Value must not be used in ground truth. // TYPE_UNKNOWN = 0; + // Unspecified but known type of lane boundary. // Consider proposing an additional type if using TYPE_OTHER. TYPE_OTHER = 1; + // An invisible lane boundary (e.g. unmarked part of a dashed line). // TYPE_NO_LINE = 2; + // A solid line at the lane boundary. // TYPE_SOLID_LINE = 3; + // A dashed line at the lane boundary. // TYPE_DASHED_LINE = 4; + // A lane boundary consisting of Botts' dots. // TYPE_BOTTS_DOTS = 5; + // A lane boundary formed by the road's edge. // The road edge is the end of the (paved) road surface. TYPE_ROAD_EDGE = 6; + // A lane boundary formed by a snow edge that may be on the road surface. // TYPE_SNOW_EDGE = 7; + // A guard rail. // TYPE_GUARD_RAIL = 8; + // A curb. // TYPE_CURB = 9; + // A structure (e.g. building or tunnel wall). // TYPE_STRUCTURE = 10; @@ -219,24 +259,31 @@ message LaneBoundary // Color of Marking is unknown. Value must not be used in ground truth. // COLOR_UNKNOWN = 0; + // Other (unspecified but known) color. // COLOR_OTHER = 1; + // Marking without color, used to represent logical boundaries without physical markings. // Value may be used in ground truth only. COLOR_NONE = 2; + // Marking with white color. // COLOR_WHITE = 3; + // Marking with yellow / orange-yellow color. // COLOR_YELLOW = 4; + // Marking with red color // COLOR_RED = 5; + // Marking with blue color. // COLOR_BLUE = 6; + // Marking with green color; // COLOR_GREEN = 7; diff --git a/osi_lowleveldata.proto b/osi_lowleveldata.proto index 48ccde386..62d8bb83b 100644 --- a/osi_lowleveldata.proto +++ b/osi_lowleveldata.proto @@ -27,9 +27,11 @@ package osi; optional MountingPosition mounting_position = 3; // Lidar point cloud. + // optional LidarPointCloud lidar_point_cloud = 4; // Radar Reflection list. + // optional RadarReflectionList radar_reflection_list = 5; } @@ -81,18 +83,31 @@ message LidarPoint enum ReflectionType { // Reflection type is unknown (must not be used in ground truth). + // REFLECTION_TYPE_UNKNOWN = 0; + // Other (unspecified but known) type of reflection. + // REFLECTION_TYPE_OTHER = 1; + // Invalid scan point, not to be used for object tracking, of unspecified type (none of the other types applies). + // REFLECTION_TYPE_INVALID = 2; + // Reflection from dynamic object. + // REFLECTION_TYPE_DYNAMIC_OBJECT = 3; + // Reflection from static object. + // REFLECTION_TYPE_STATIC_OBJECT = 4; + // Reflection from ground. + // REFLECTION_TYPE_GROUND = 5; + // Reflection from road marking. + // REFLECTION_TYPE_ROAD_MARKING = 6; } } @@ -109,7 +124,7 @@ message RadarReflectionList // // \brief A radar reflection - +// message RadarReflection { // The id of the radar reflection. diff --git a/osi_modelinternal.proto b/osi_modelinternal.proto index 3754f3905..c63054326 100644 --- a/osi_modelinternal.proto +++ b/osi_modelinternal.proto @@ -59,18 +59,31 @@ message ModelInternalObject enum ObjectType { // Object is a ghost object and does not exist in ground truth. + // OBJECT_TYPE_GHOST = 0; + // Other (unspecified but known) type of object. + // OBJECT_TYPE_OTHER = 1; + // Object of type Vehicle. + // OBJECT_TYPE_VEHICLE = 2; + // Object of type MovingObject. + // OBJECT_TYPE_MOVING = 3; + // Object of type StationaryObject. + // OBJECT_TYPE_STATIONARY = 4; + // Object of type TrafficSign. + // OBJECT_TYPE_TRAFFIC_SIGN = 5; + // Object of type TrafficLight. + // OBJECT_TYPE_TRAFFIC_LIGHT = 6; } } diff --git a/osi_object.proto b/osi_object.proto index da2fe6d86..fe3f69638 100644 --- a/osi_object.proto +++ b/osi_object.proto @@ -64,22 +64,36 @@ message Vehicle // Definition of vehicle types. + // enum Type { - // Type of vehicle is unknown (must not be used in ground truth) + // Type of vehicle is unknown (must not be used in ground truth). + // TYPE_UNKNOWN = 0; + // Other (unspecified but known) type of vehicle. + // TYPE_OTHER = 1; + // Vehicle is a normal car. - TYPE_CAR = 2; + // + TYPE_CAR = 2; + // Vehicle is a truck, bus, or large van. - TYPE_TRUCK = 3; + // + TYPE_TRUCK = 3; + // Vehicle is a motorbike or moped. - TYPE_MOTOR_BIKE = 4; + // + TYPE_MOTOR_BIKE = 4; + // Vehicle is a bicycle (without motor). - TYPE_BICYCLE = 5; + // + TYPE_BICYCLE = 5; + // Vehicle is a trailer (possibly attached to another vehicle). - TYPE_TRAILER = 6; + // + TYPE_TRAILER = 6; } // @@ -89,82 +103,109 @@ message Vehicle { // State of the object's indicators. // - optional IndicatorState indicator_state = 1; + optional IndicatorState indicator_state = 1; // State of the front fog light. - // + // optional GenericLightState front_fog_light = 2; // State of the rear fog light. - // + // optional GenericLightState rear_fog_light = 3; // State of the head lights. - // + // optional GenericLightState head_light = 4; // State of the high beam. - // + // optional GenericLightState high_beam = 5; // State of the reversing light. - // + // optional GenericLightState reversing_light = 6; // State of the brake lights. - // + // optional BrakeLightState brake_light_state = 7; // State of the (rear) license plate illumination - // + // optional GenericLightState license_plate_illumination_rear = 8; // Definition of indicator states. // - enum IndicatorState - { - // Indicator state is unknown (must not be used in ground truth) - INDICATOR_STATE_UNKNOWN = 0; - // Other (unspecified but known) state of indicator. - INDICATOR_STATE_OTHER = 1; - // Indicators are off. - INDICATOR_STATE_OFF = 2; - // Left indicator is on. - INDICATOR_STATE_LEFT = 3; - // Right indicator is on. - INDICATOR_STATE_RIGHT = 4; - // Hazard/warning light, i.e. both indicators, are on. - INDICATOR_STATE_WARNING = 5; + enum IndicatorState + { + // Indicator state is unknown (must not be used in ground truth). + // + INDICATOR_STATE_UNKNOWN = 0; + + // Other (unspecified but known) state of indicator. + // + INDICATOR_STATE_OTHER = 1; + + // Indicators are off. + // + INDICATOR_STATE_OFF = 2; + + // Left indicator is on. + // + INDICATOR_STATE_LEFT = 3; + + // Right indicator is on. + // + INDICATOR_STATE_RIGHT = 4; + + // Hazard/warning light, i.e. both indicators, are on. + // + INDICATOR_STATE_WARNING = 5; } // Definition of generic light states for light that may be on or off. // - enum GenericLightState + enum GenericLightState { - // Light state is unknown (must not be used in ground truth) - GENERIC_LIGHT_STATE_UNKNOWN = 0; - // Other (unspecified but known) state of light. - GENERIC_LIGHT_STATE_OTHER = 1; - // Light is off. - GENERIC_LIGHT_STATE_OFF = 2; - // Light is on. - GENERIC_LIGHT_STATE_ON = 3; + // Light state is unknown (must not be used in ground truth). + // + GENERIC_LIGHT_STATE_UNKNOWN = 0; + + // Other (unspecified but known) state of light. + // + GENERIC_LIGHT_STATE_OTHER = 1; + + // Light is off. + // + GENERIC_LIGHT_STATE_OFF = 2; + + // Light is on. + // + GENERIC_LIGHT_STATE_ON = 3; } // Definition of brake light states. - // + // enum BrakeLightState { - // Brake light state is unknown (must not be used in ground truth) - BRAKE_LIGHT_STATE_UNKNOWN = 0; - // Other (unspecified but known) state of brake light. - BRAKE_LIGHT_STATE_OTHER = 1; - // Brake lights are off. - BRAKE_LIGHT_STATE_OFF = 2; - // Brake lights are on with normal intensity. - BRAKE_LIGHT_STATE_NORMAL = 3; - // Brake lights are on with extra bright intensity (indicating stronger braking). - BRAKE_LIGHT_STATE_STRONG = 4; + // Brake light state is unknown (must not be used in ground truth). + // + BRAKE_LIGHT_STATE_UNKNOWN = 0; + + // Other (unspecified but known) state of brake light. + // + BRAKE_LIGHT_STATE_OTHER = 1; + + // Brake lights are off. + // + BRAKE_LIGHT_STATE_OFF = 2; + + // Brake lights are on with normal intensity. + // + BRAKE_LIGHT_STATE_NORMAL = 3; + + // Brake lights are on with extra bright intensity (indicating stronger braking). + // + BRAKE_LIGHT_STATE_STRONG = 4; } } } @@ -190,13 +231,20 @@ message MovingObject // enum Type { // Type of the object is unknown (must not be used in ground truth). + // TYPE_UNKNOWN = 0; + // Other (unspecified but known) type of moving object. - TYPE_OTHER = 1; + // + TYPE_OTHER = 1; + // Object is a pedestrian. - TYPE_PEDESTRIAN = 2; + // + TYPE_PEDESTRIAN = 2; + // Object is an animal. - TYPE_ANIMAL = 3; + // + TYPE_ANIMAL = 3; } } @@ -219,20 +267,34 @@ message StationaryObject // Definition of object types. // - enum Type { - // Type of the object is unknown (must not be used in ground truth) + enum Type + { + // Type of the object is unknown (must not be used in ground truth). + // TYPE_UNKNOWN = 0; + // Other (unspecified but known) type of object. + // TYPE_OTHER = 1; + // Object is a bridge. + // TYPE_BRIDGE = 2; + // Object is a building. + // TYPE_BUILDING = 3; + // Object is a pylon. + // TYPE_PYLON = 4; + // Object is a reflector post. + // TYPE_REFLECTOR_POST = 5; + // Object is a delineator (e.g. at a construction site). + // TYPE_DELINEATOR = 6; } } diff --git a/osi_occupant.proto b/osi_occupant.proto index f975a4092..f7f924279 100644 --- a/osi_occupant.proto +++ b/osi_occupant.proto @@ -32,49 +32,80 @@ message Occupant enum Seat { // Seat position is unknown (must not be used in ground truth). + // SEAT_UNKNOWN = 0; + // Other (unspecified but known) seat. + // SEAT_OTHER = 1; + // Seat position is in the front row, left seat. // This is usually the driver's seat in right-hand traffic. SEAT_FRONT_LEFT = 2; + // Seat position is in the front row, right seat. // This is usually the driver's seat in left-hand traffic. SEAT_FRONT_RIGHT = 3; + // Seat position is in the front row, middle seat. - SEAT_FRONT_MIDDLE = 4; + // + SEAT_FRONT_MIDDLE = 4; + // Seat position is in the back row, left seat. - SEAT_BACK_LEFT = 5; + // + SEAT_BACK_LEFT = 5; + // Seat position is in the back row, right right. - SEAT_BACK_RIGHT = 6; + // + SEAT_BACK_RIGHT = 6; + // Seat position is in the back row, middle seat. - SEAT_BACK_MIDDLE = 7; + // + SEAT_BACK_MIDDLE = 7; + // Seat position is in the third row, left seat. + // SEAT_THIRD_ROW_LEFT = 8; + // Seat position is in the third row, right seat. - SEAT_THIRD_ROW_RIGHT = 9; + // + SEAT_THIRD_ROW_RIGHT = 9; + // Seat position is in the third row, middle seat. - SEAT_THIRD_ROW_MIDDLE = 10; + // + SEAT_THIRD_ROW_MIDDLE = 10; } // Definition of hands related to the steering wheel (mostly driver). // enum SteeringControl { - // Hands state is unknown (must not be used in ground truth) + // Hands state is unknown (must not be used in ground truth). + // STEERING_CONTROL_UNKNOWN = 0; + // Other (unspecified but known) hand positioning related to the steering wheel. - STEERING_CONTROL_OTHER = 1; + // + STEERING_CONTROL_OTHER = 1; + // Hands are not on the steering wheel. - STEERING_CONTROL_NO_HAND = 2; + // + STEERING_CONTROL_NO_HAND = 2; + // One hand is on the steering wheel. Whether it is the left or right hand is unspecified or unknown. // \b Note: If there is no differentiation between one or both hands on the steering wheel, this value should be used. STEERING_CONTROL_ONE_HAND = 3; + // Both hands are on the steering wheel. - STEERING_CONTROL_BOTH_HANDS = 4; + // + STEERING_CONTROL_BOTH_HANDS = 4; + // The left hand only is on the steering wheel. - STEERING_CONTROL_LEFT_HAND = 5; + // + STEERING_CONTROL_LEFT_HAND = 5; + // The right hand only is on the steering wheel. - STEERING_CONTROL_RIGHT_HAND = 6; + // + STEERING_CONTROL_RIGHT_HAND = 6; } } From e0eea671b58eaab06d7f9aef40e8756af335c80c Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Fri, 31 Mar 2017 18:14:26 +0200 Subject: [PATCH 06/11] Update README.md removed space -.- --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b6cfaa818..4013d164a 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Open Simulation Interface (OSI) General description ------------------- -[TUM Department of Electrical and Computer Engineering] (https://www.hot.ei.tum.de/forschung/automotive-veroeffentlichungen/) +[TUM Department of Electrical and Computer Engineering](https://www.hot.ei.tum.de/forschung/automotive-veroeffentlichungen/) Global remarks @@ -94,4 +94,4 @@ In order to generate the doxygen documentation for OSI, please follow the follow ```cmd cmake -DFILTER_PROTO2CPP_PY_PATH= ``` -5. The build process will then generate the doxygen documentation under the directory doc. \ No newline at end of file +5. The build process will then generate the doxygen documentation under the directory doc. From 0e4451a5861874a18ed8c01abaa64b2fc02e7232 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Fri, 31 Mar 2017 18:19:01 +0200 Subject: [PATCH 07/11] Update README.md Readme edit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4013d164a..92a7a71b4 100644 --- a/README.md +++ b/README.md @@ -87,9 +87,9 @@ Documentation ------------- In order to generate the doxygen documentation for OSI, please follow the following steps: -1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html), set an environmental variable 'doxygen' with the path to the binary file and add it to PATH ´;%doxygen%´. +1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html), set an environmental variable 'doxygen' with the path to the binary file and add it to PATH `;%doxygen%`. 2. Download and unzip the [zip file containing the filter proto2cpp.py](https://sourceforge.net/p/proto2cpp/wiki/Home/ ). -3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ), set an environmental variable 'graphviz' with the path to the binary file and add it to PATH ´;%graphviz%´. +3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ), set an environmental variable 'graphviz' with the path to the binary file and add it to PATH `;%graphviz%`. 4. From the cmd navigate to the build directory and run: ```cmd cmake -DFILTER_PROTO2CPP_PY_PATH= From 0d320addae5bb2fe0708382fb787bbe1397dafb5 Mon Sep 17 00:00:00 2001 From: AhmedMzid Date: Mon, 3 Apr 2017 12:36:45 +0200 Subject: [PATCH 08/11] Update README.md Change the filter version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92a7a71b4..68569ee90 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Documentation In order to generate the doxygen documentation for OSI, please follow the following steps: 1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html), set an environmental variable 'doxygen' with the path to the binary file and add it to PATH `;%doxygen%`. -2. Download and unzip the [zip file containing the filter proto2cpp.py](https://sourceforge.net/p/proto2cpp/wiki/Home/ ). +2. Clone the [git repository containing the filter proto2cpp.py](https://github.com/vgteam/vg.git). The filter can then be found under vg/contrib/proto2cpp. 3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ), set an environmental variable 'graphviz' with the path to the binary file and add it to PATH `;%graphviz%`. 4. From the cmd navigate to the build directory and run: ```cmd From afd7978e4cc12492ad28de0bef8f46bffe44d090 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Mon, 3 Apr 2017 15:38:37 +0200 Subject: [PATCH 09/11] Update README.md Changed the download location to the correct VG release containing the doxygen filter python script and changed the documentation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 68569ee90..975bee4e5 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Documentation In order to generate the doxygen documentation for OSI, please follow the following steps: 1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html), set an environmental variable 'doxygen' with the path to the binary file and add it to PATH `;%doxygen%`. -2. Clone the [git repository containing the filter proto2cpp.py](https://github.com/vgteam/vg.git). The filter can then be found under vg/contrib/proto2cpp. +2. Download the [vg-1.5.0.zip](https://github.com/vgteam/vg/releases/tag/v1.5.0). Unpack and copy the content of folder \vg-1.5.0\contrib\proto2cpp to your desired `` 3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ), set an environmental variable 'graphviz' with the path to the binary file and add it to PATH `;%graphviz%`. 4. From the cmd navigate to the build directory and run: ```cmd From a177659d54937abc6d8773bc899d7af27d32f6c1 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Mon, 3 Apr 2017 15:45:29 +0200 Subject: [PATCH 10/11] Update README.md corrected readme.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 975bee4e5..f4ef8c5b3 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Documentation In order to generate the doxygen documentation for OSI, please follow the following steps: 1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html), set an environmental variable 'doxygen' with the path to the binary file and add it to PATH `;%doxygen%`. -2. Download the [vg-1.5.0.zip](https://github.com/vgteam/vg/releases/tag/v1.5.0). Unpack and copy the content of folder \vg-1.5.0\contrib\proto2cpp to your desired `` +2. Download the [vg-1.5.0.zip](https://github.com/vgteam/vg/releases/tag/v1.5.0). Unpack and copy the content of folder /vg-1.5.0/contrib/proto2cpp to your desired `` 3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ), set an environmental variable 'graphviz' with the path to the binary file and add it to PATH `;%graphviz%`. 4. From the cmd navigate to the build directory and run: ```cmd From ff396db57fa2c2689c35eb2e74d57bc301272ad4 Mon Sep 17 00:00:00 2001 From: Carlo van Driesten Date: Mon, 3 Apr 2017 16:20:19 +0200 Subject: [PATCH 11/11] Update README.md Changed the readme.md according to suggestion --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f4ef8c5b3..c3402e65e 100644 --- a/README.md +++ b/README.md @@ -87,9 +87,9 @@ Documentation ------------- In order to generate the doxygen documentation for OSI, please follow the following steps: -1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html), set an environmental variable 'doxygen' with the path to the binary file and add it to PATH `;%doxygen%`. +1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html), set an environmental variable 'doxygen' with the path to the binary file and add it to the PATH variable: `PATH += %doxygen%`. 2. Download the [vg-1.5.0.zip](https://github.com/vgteam/vg/releases/tag/v1.5.0). Unpack and copy the content of folder /vg-1.5.0/contrib/proto2cpp to your desired `` -3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ), set an environmental variable 'graphviz' with the path to the binary file and add it to PATH `;%graphviz%`. +3. Install [graphviz-2.38](http://www.graphviz.org/Download_windows.php ), set an environmental variable 'graphviz' with the path to the binary file and add it to the PATH variable: `PATH += %graphviz%`. 4. From the cmd navigate to the build directory and run: ```cmd cmake -DFILTER_PROTO2CPP_PY_PATH=