Skip to content

Commit ff6674a

Browse files
authored
Merge branch 'master' into documentation/v3.0.1-update-9
2 parents f4ec2dd + f4b0340 commit ff6674a

File tree

5 files changed

+179
-56
lines changed

5 files changed

+179
-56
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,21 @@ script:
7575
- cd build
7676
- cmake --build . --target install
7777
- cd ..
78+
- cp VERSION VERSION.SAVED
7879
- echo "" >> VERSION
7980
- echo "VERSION_PATCH = \"GitHub_MasterBranch\"" >> VERSION
8081
- cd build
8182
- cmake -D FILTER_PROTO2CPP_PY_PATH=${DEPS_DIR}/proto2cpp ..
8283
- doxygen
8384
- cd ..
8485
- python test_cases_doc.py
86+
- mv VERSION.SAVED VERSION
87+
- sh convert-to-proto3.sh
88+
- mkdir -p build3
89+
- cd build3
90+
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
91+
- cmake --build .
92+
- cd ..
8593

8694
# Deploy the documentation on github (only for master branch).
8795
deploy:

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ The compatibility of both recorded files and code remains.
7575
- Clarification of text passages explaining the message content
7676

7777

78+
Proto3 Support
79+
--------------
80+
81+
For users that need to use proto3 syntax, for example because the language
82+
binding of choice only supports proto3 syntax out of the box, a shell script
83+
called `convert-to-proto3.sh` is supplied that converts all proto files to
84+
proto3 syntax. If this is run prior to building, the resulting libaries will
85+
use proto3, with the on-the-wire format remaining compatible between proto2
86+
and proto3 libraries.
87+
7888
Packaging
7989
---------
8090

@@ -102,10 +112,12 @@ Copy the content of the repo proto2cpp to your desired `<path-to-proto2cpp.py>`
102112
Citing
103113
------
104114

105-
Use the following citation for referencing the OSI interface in your scientific work: `@misc{osi.2017,
115+
Use the following citation for referencing the OSI interface in your scientific work: `
116+
@misc{osi.2017,
106117
author = {Hanke, Timo and Hirsenkorn, Nils and {van~Driesten}, Carlo and {Garcia~Ramos}, Pilar and Schiementz, Mark and Schneider, Sebastian},
107118
year = {2017},
108119
title = {{Open Simulation Interface: A generic interface for the environment perception of automated driving functions in virtual scenarios.}},
109120
url = {http://www.hot.ei.tum.de/forschung/automotive-veroeffentlichungen/},
110121
note = {{Accessed: 2017-08-28}}
111-
}`
122+
}
123+
`

convert-to-proto3.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
3+
# This shell script converts all proto files to proto3 syntax, which can
4+
# then be used as a stand in for the proto2 syntax files. The resulting
5+
# on-the-wire format should be compatible with the proto2-based formats
6+
# in all respects.
7+
#
8+
# Call this script prior to building normally if you want/need to use
9+
# proto3 syntax, e.g. for language bindings that do not support proto2,
10+
# like C#.
11+
12+
test -f osi_version.proto && rm osi_version.proto
13+
14+
for f in osi_version.proto.in osi_*.proto
15+
do
16+
mv $f $f.pb2 && sed -e 's/syntax *= *"proto2";/syntax = "proto3";/' -e 's/^\([ \t]*\)optional /\1/' $f.pb2 > $f
17+
done
18+
19+
mv CMakeLists.txt CMakeLists.txt.pb2 && sed -e 's/find_package(Protobuf 2.6.1 REQUIRED)/find_package(Protobuf 3.0.0 REQUIRED)/' CMakeLists.txt.pb2 > CMakeLists.txt

osi_roadmarking.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ message RoadMarking
9797
//
9898
enum Type
9999
{
100-
// Type of road marking is unknown (must not be used in ground truth).
100+
// Type of road marking is unknown (must not be used in ground
101+
// truth).
101102
//
102103
TYPE_UNKNOWN = 0;
103104

0 commit comments

Comments
 (0)