Skip to content

Commit 6efa1fa

Browse files
authored
Merge branch 'master' into 820-ide-not-recognizing-osi-classes-in-python
2 parents 68c93fb + 3af2351 commit 6efa1fa

21 files changed

+765
-50
lines changed

.github/pull_request_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ How has it been tested?
1313
#### Take this checklist as orientation for yourself, if this PR is ready for the Change Control Board:
1414
- [ ] My suggestion follows the [style and contributors guidelines](https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/specification/contributing/start_contributing.html).
1515
- [ ] I have taken care about the [message documentation](https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/specification/contributing/commenting_messages.html) and the [fields and enums documentation](https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/specification/contributing/commenting_fields_enums.html).
16-
- [ ] I have done the [DCO signoff](https://opensimulationinterface.github.io/osi-documentation/open-simulation-interface/doc/howtocontribute.html#developer-certification-of-origin-dco).
17-
- [ ] My changes generate no errors when passing CI tests.
16+
- [ ] I have done the [DCO signoff](https://opensimulationinterface.github.io/osi-antora-generator/asamosi/latest/specification/contributing/dco.html).
17+
- [ ] My changes generate no errors when passing CI tests.
1818
- [ ] I have successfully implemented and tested my fix/feature locally.
1919
- [ ] Appropriate reviewer(s) are assigned.
2020

.github/workflows/protobuf.yml

+3-17
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
9898
- name: Get git Version
9999
id: get_version
100-
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_OUTPUT
100+
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_OUTPUT
101101

102102
- name: Prepare Documentation Build
103103
run: |
@@ -122,28 +122,13 @@ jobs:
122122
- name: Run Python Tests
123123
run: python -m unittest discover tests
124124

125-
- name: Archive Documentation
126-
if: ${{ github.event_name == 'pull_request' }}
127-
uses: actions/upload-artifact@v4
128-
with:
129-
name: linux64-doc
130-
path: doc/html
131-
if-no-files-found: error
132-
133125
- name: Upload Python Distribution
134126
if: ${{ github.event_name == 'pull_request' || ( github.event_name == 'push' && ( github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') ) ) }}
135127
uses: actions/upload-artifact@v4
136128
with:
137129
name: python-dist
138130
path: dist/
139131

140-
- name: Deploy to gh-pages if push to master branch
141-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
142-
uses: peaceiris/actions-gh-pages@v3
143-
with:
144-
github_token: ${{ secrets.GITHUB_TOKEN }}
145-
publish_dir: ./doc/html
146-
147132
build-proto3-linux64:
148133
name: Build Proto3 Linux 64
149134

@@ -246,9 +231,10 @@ jobs:
246231

247232
- name: Publish Snapshot Release on TestPyPI
248233
uses: pypa/gh-action-pypi-publish@release/v1
234+
continue-on-error: true
249235
with:
250236
repository-url: https://test.pypi.org/legacy/
251237

252238
- name: Publish Full Release on PyPI
253-
if: startsWith(github.ref, 'refs/tags/v')
239+
if: startsWith(github.ref, 'refs/tags/v') && ( ! contains(github.ref, '-') )
254240
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/pypi-pub-manual.yml

+140
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: Manual Python PyPI Release Publishing
2+
3+
env:
4+
PROTOBUF_VERSION: 3.20.1
5+
PROTOBUF_VARIANT: '-all' # Use '-all' prior to 22.0, '' after
6+
ABSEIL_VERSION: 20230802.1
7+
8+
on:
9+
workflow_dispatch:
10+
inputs:
11+
tag:
12+
description: 'Tag to publish'
13+
required: true
14+
type: string
15+
16+
jobs:
17+
build-proto2-linux64:
18+
name: Build Proto2 Linux 64
19+
20+
runs-on: ubuntu-22.04
21+
22+
steps:
23+
- name: Checkout OSI
24+
uses: actions/checkout@v4
25+
with:
26+
ref: ${{ format('refs/tags/{0}', inputs.tag) }}
27+
submodules: true
28+
29+
- name: Check Build Setup
30+
run: |
31+
( result=0 ; for f in *.proto ; do grep -wq "$f" CMakeLists.txt || { echo "Missing $f in CMakeLists.txt" && let "result++"; } ; done ; exit $result )
32+
( result=0 ; for f in *.proto ; do grep -q '"'$f'"' setup.py || { echo "Missing $f in setup.py" && let "result++"; } ; done ; exit $result )
33+
34+
- name: Setup Python
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: '3.8'
38+
39+
- name: Install Python Dependencies
40+
run: |
41+
python -m pip install --upgrade pip
42+
python -m pip install build
43+
python -m pip install -r requirements_tests.txt
44+
45+
- name: Install Doxygen
46+
run: sudo apt-get install doxygen graphviz
47+
48+
- name: Cache Dependencies
49+
id: cache-depends
50+
uses: actions/cache@v4
51+
with:
52+
path: protobuf-${{ env.PROTOBUF_VERSION }}
53+
key: ${{ runner.os }}-v2-depends
54+
55+
- name: Download ProtoBuf ${{ env.PROTOBUF_VERSION }}
56+
if: steps.cache-depends.outputs.cache-hit != 'true'
57+
run: curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${{env.PROTOBUF_VERSION}}/protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz && tar xzvf protobuf${{env.PROTOBUF_VARIANT}}-${{env.PROTOBUF_VERSION}}.tar.gz
58+
59+
- name: Download Abseil ${{ env.ABSEIL_VERSION }}
60+
if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VARIANT == ''
61+
run: curl -OL https://github.com/abseil/abseil-cpp/archive/refs/tags/${{env.ABSEIL_VERSION}}.tar.gz && tar xzvf ${{env.ABSEIL_VERSION}}.tar.gz && rm -rf protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp && mv abseil-cpp-${{env.ABSEIL_VERSION}} protobuf-${{env.PROTOBUF_VERSION}}/third_party/abseil-cpp
62+
63+
- name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via autotools
64+
if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VARIANT == '-all'
65+
working-directory: protobuf-${{ env.PROTOBUF_VERSION }}
66+
run: ./configure DIST_LANG=cpp --prefix=/usr && make
67+
68+
- name: Build ProtoBuf ${{ env.PROTOBUF_VERSION }} via cmake
69+
if: steps.cache-depends.outputs.cache-hit != 'true' && env.PROTOBUF_VARIANT == ''
70+
working-directory: protobuf-${{ env.PROTOBUF_VERSION }}
71+
run: cmake -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF . && cmake --build . --config Release -j 4
72+
73+
- name: Install ProtoBuf ${{ env.PROTOBUF_VERSION }}
74+
working-directory: protobuf-${{ env.PROTOBUF_VERSION }}
75+
run: sudo make install && sudo ldconfig
76+
77+
- name: Install proto2cpp
78+
run: git clone --depth 1 https://github.com/OpenSimulationInterface/proto2cpp.git
79+
80+
- name: Prepare C++ Build
81+
run: mkdir build
82+
83+
- name: Get git Version
84+
id: get_version
85+
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_OUTPUT
86+
87+
- name: Prepare Documentation Build
88+
run: |
89+
sed -i 's/PROJECT_NUMBER\s*= @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@/PROJECT_NUMBER = master (${{ steps.get_version.outputs.VERSION }})/g' doxygen_config.cmake.in
90+
echo "EXCLUDE_PATTERNS = */osi3/* */protobuf-*/* */proto2cpp/* */flatbuffers/*" >> doxygen_config.cmake.in
91+
echo "GENERATE_TREEVIEW = YES" >> doxygen_config.cmake.in
92+
93+
- name: Configure C++ Build
94+
working-directory: build
95+
run: cmake -D FILTER_PROTO2CPP_PY_PATH=$GITHUB_WORKSPACE/proto2cpp ${{ env.PROTOBUF_VARIANT =='' && '-DCMAKE_CXX_STANDARD=17' }} ..
96+
97+
- name: Build C++
98+
working-directory: build
99+
run: cmake --build . --config Release -j 4
100+
101+
- name: Build Python
102+
run: python -m build
103+
104+
- name: Install Python
105+
run: python -m pip install .
106+
107+
- name: Run Python Tests
108+
run: python -m unittest discover tests
109+
110+
- name: Upload Python Distribution
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: python-dist
114+
path: dist/
115+
116+
publish-python-dist:
117+
name: Publish Python Distribution
118+
119+
runs-on: ubuntu-22.04
120+
121+
permissions:
122+
id-token: write
123+
124+
needs: [build-proto2-linux64]
125+
126+
steps:
127+
- name: Download Distribution
128+
uses: actions/download-artifact@v4
129+
with:
130+
name: python-dist
131+
path: dist/
132+
133+
- name: Publish Snapshot Release on TestPyPI
134+
uses: pypa/gh-action-pypi-publish@release/v1
135+
continue-on-error: true
136+
with:
137+
repository-url: https://test.pypi.org/legacy/
138+
139+
- name: Publish Full Release on PyPI
140+
uses: pypa/gh-action-pypi-publish@release/v1

doc/architecture/architecture_overview.adoc

+14-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,21 @@ include::{root-path}_config.adoc[]
44
endif::[]
55
= Overview of OSI architecture
66

7-
OSI contains an object-based environment description that uses the message format of the https://github.com/protocolbuffers/protobuf/wiki[Protocol Buffer] library.
8-
Google developed and maintains the Protocol Buffer library.
7+
OSI contains an object-based environment description that uses the message format of the https://github.com/protocolbuffers/protobuf/wiki[Protocol Buffer^] library developed by Google.
98
OSI defines top-level messages that are used to exchange data between separate models.
10-
Top-level messages define the `GroundTruth` interface, the `SensorData` interface, and – since OSI version 3.0.0 – the interfaces `SensorView` and `SensorViewConfiguration`.
11-
Further top-level messages that were added in later versions of OSI are `TrafficCommand`, `TrafficUpdate`, `MotionRequest`, and `StreamingUpdate`.
9+
10+
Top-level messages define the following interfaces:
11+
12+
- xref:architecture/ground_truth.adoc[`GroundTruth`]
13+
- xref:architecture/sensor_data.adoc[`SensorData`]
14+
- xref:architecture/sensor_view.adoc[`SensorView`]
15+
- xref:architecture/sensor_view_configuration.adoc[`SensorViewConfiguration`]
16+
- xref:architecture/host_vehicle_data.adoc[`HostVehicleData`]
17+
- xref:architecture/traffic_command.adoc[`TrafficCommand`]
18+
- xref:architecture/traffic_command_update.adoc[`TrafficCommandUpdate`]
19+
- xref:architecture/traffic_update.adoc[`TrafficUpdate`]
20+
- xref:architecture/motion_request.adoc[`MotionRequest`]
21+
- xref:architecture/streaming_update.adoc[`StreamingUpdate`].
1222
1323
The following figure shows the interfaces and models involved in modeling a sensor.
1424

doc/architecture/ground_truth.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ endif::[]
66

77
`GroundTruth` messages describe the simulated environment containing all simulated objects in the global coordinate system at consecutive time instances.
88
They are based on data available to the simulation environment.
9-
`GroundTruth` messages are typically contained in `Sensorview` messages.
9+
`GroundTruth` messages are typically contained in `Sensorview` messages.
10+
11+
For more details, see xref:gen:structosi3_1_1GroundTruth.adoc[].
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
ifndef::include-only-once[]
2+
:root-path: ../
3+
include::{root-path}_config.adoc[]
4+
endif::[]
5+
= Host vehicle data
6+
7+
The `HostVehicleData` message targets the perception of the vehicle of its own internal states.
8+
9+
It captures the knowledge the vehicle has internally, which can differ from the actual or global truth for various reasons.
10+
This message can also be understood as an interface container for the signals of a rest bus simulation.
11+
12+
For more details, see xref:gen:structosi3_1_1HostVehicleData.adoc[].

doc/architecture/motion_request.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ endif::[]
55
= Motion Request
66

77
`MotionRequest` messages are traffic participant internal messages.
8-
They function as a interface between a motion/behavior planning model and a dynamics model including, for example, controllers and vehicle kinematics.
8+
They function as a interface between a motion/behavior planning model and a dynamics model including, for example, controllers and vehicle kinematics.
9+
10+
For more details, see xref:gen:structosi3_1_1MotionRequest.adoc[].

doc/architecture/sensor_data.adoc

+2
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ Sensor data can be used as input for an automated driving function, a sensor mod
1313
`SensorData` messages include `FeatureData` messages which contain detected features in the reference frame of a sensor.
1414
`FeatureData` messages are generated from `GroundTruth` messages.
1515
They serve, for example, as an input to sensor models simulating object detection or feature fusion models.
16+
17+
For more details, see xref:gen:structosi3_1_1SensorData.adoc[].

doc/architecture/sensor_view.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ All information regarding the environment is given with respect to the virtual s
1010

1111
* Physical technology-specific data, given with respect to the physical sensor coordinate system specified in the corresponding physical sensor's mounting position.
1212
One example of technology-specific data is: xref:gen:structosi3_1_1CameraSensorView.adoc#ac58456a34babf78792ea2608eb963f36[`image_data` of `osi3::CameraSensorView`]
13-
* Ground truth given in the global coordinate system.
13+
* Ground truth given in the global coordinate system.
14+
15+
For more details, see xref:gen:structosi3_1_1SensorView.adoc[].

doc/architecture/sensor_view_configuration.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ In response to this difference, the sensor model can either accept this differen
3535

3636
The packaging layer defines the specifics of this auto-negotiation mechanism.
3737

38-
After the initialization phase, the environment simulation provides the actual sensor-view configuration as part of each `SensorView` message.
38+
After the initialization phase, the environment simulation provides the actual sensor-view configuration as part of each `SensorView` message.
39+
40+
For more details, see xref:gen:structosi3_1_1SensorViewConfiguration.adoc[].

doc/architecture/streaming_update.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ endif::[]
77
The `StreamingUpdate` message provides an interface to transmit a subset of ground truth and/or vehicle internal data.
88
This interface mainly addresses applications with low latency requirements and no need for highly consistent and complete data, e.g. visualization applications.
99
Static and/or non-relevant objects can be omitted as required for the specific use case.
10-
Note that the receiver of partial updates can only rely on the most up-to-date information at the corresponding timestamp. E.g. omitting objects does not indicate static behaviour but it may be sufficient for the use case to update certain objects at a later point in time.
10+
Note that the receiver of partial updates can only rely on the most up-to-date information at the corresponding timestamp. E.g. omitting objects does not indicate static behavior but it may be sufficient for the use case to update certain objects at a later point in time.
11+
12+
For more details, see xref:gen:structosi3_1_1StreamingUpdate.adoc[].

doc/architecture/trace_file_naming.adoc

+19-7
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,35 @@ The names of OSI trace files should have the following format:
1414

1515
**Types**
1616

17-
`sd`::
18-
Trace file contains `SensorData` messages.
19-
2017
`sv`::
2118
Trace file contains `SensorView` messages.
2219

20+
`svc`::
21+
Trace file contains `SensorViewConfiguration` messages.
22+
2323
`gt`::
2424
Trace file contains `GroundTruth` messages.
2525

26-
`tu`::
27-
Trace file contains `TrafficUpdate` messages.
26+
`hvd`::
27+
Trace file contains `HostVehicleData` messages.
28+
29+
`sd`::
30+
Trace file contains `SensorData` messages.
2831

2932
`tc`::
3033
Trace file contains `TrafficCommand` messages.
3134

32-
`hvd`::
33-
Trace file contains `HostVehicleData` messages.
35+
`tcu`::
36+
Trace file contains `TrafficCommandUpdate` messages.
37+
38+
`tu`::
39+
Trace file contains `TrafficUpdate` messages.
40+
41+
`mr`::
42+
Trace file contains `MotionRequest` messages.
43+
44+
`su`::
45+
Trace file contains `StreamingUpdate` messages.
3446

3547
**Example**
3648

doc/architecture/traffic_command.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ include::{root-path}_config.adoc[]
44
endif::[]
55
= Traffic command
66

7-
`TrafficCommand` messages contain control commands from the scenario engine to traffic participant models.
7+
`TrafficCommand` messages contain control commands from the scenario engine to traffic participant models.
8+
9+
For more details, see xref:gen:structosi3_1_1TrafficCommand.adoc[].
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ifndef::include-only-once[]
2+
:root-path: ../
3+
include::{root-path}_config.adoc[]
4+
endif::[]
5+
= Traffic command update
6+
7+
`TrafficCommandUpdate` messages enable the traffic participant model to send updates to the scenario engine about the execution of its received xref:architecture/traffic_command.adoc[TrafficCommand] input.
8+
9+
For more details, see xref:gen:structosi3_1_1TrafficCommandUpdate.adoc[].

doc/architecture/traffic_update.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ endif::[]
55
= Traffic update
66

77
`TrafficUpdate` messages are provided by traffic participants.
8-
They provide updates on the position, state, and future trajectory of a traffic participant back to the simulation environment.
8+
They provide updates on the position, state, and future trajectory of a traffic participant back to the simulation environment.
9+
10+
For more details, see xref:gen:structosi3_1_1TrafficUpdate.adoc[].

doc/open-simulation-interface_user_guide.adoc

+4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ include::./architecture/sensor_view_configuration.adoc[leveloffset=+3]
2121

2222
include::./architecture/sensor_data.adoc[leveloffset=+3]
2323

24+
include::./architecture/host_vehicle_data.adoc[leveloffset=+3]
25+
2426
include::./architecture/traffic_command.adoc[leveloffset=+3]
2527

28+
include::./architecture/traffic_command_update.adoc[leveloffset=+3]
29+
2630
include::./architecture/motion_request.adoc[leveloffset=+3]
2731

2832
include::./architecture/traffic_update.adoc[leveloffset=+3]

open_simulation_interface-config.cmake.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ find_dependency(Protobuf)
66
if(NOT TARGET @PROJECT_NAME@ AND NOT @PROJECT_NAME@_BINARY_DIR)
77
set_and_check(OPEN_SIMULATION_INTERFACE_INCLUDE_DIRS "@PACKAGE_OSI_INSTALL_INCLUDE_DIR@")
88
set(OPEN_SIMULATION_INTERFACE_LIBRARIES "@PROJECT_NAME@")
9-
include("${CMAKE_CURRENT_LIST_DIR}/open_simulation_interface_targets.cmake")
9+
include("${CMAKE_CURRENT_LIST_DIR}/open_simulation_interface-targets.cmake")
1010
endif()

0 commit comments

Comments
 (0)