Skip to content

Commit b164ba7

Browse files
Fabian PfeufferFabian Pfeuffer
Fabian Pfeuffer
authored and
Fabian Pfeuffer
committed
feat: New OSI message osi_route
The new message allows sending route information to a traffic agent in the simulation. The route information can then be used by the agent to traverse the road network. Signed-off-by: Fabian Pfeuffer <[email protected]>
1 parent b13e49c commit b164ba7

File tree

6 files changed

+113
-0
lines changed

6 files changed

+113
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ set(OSI_PROTO_FILES
8383
osi_trafficcommand.proto
8484
osi_referenceline.proto
8585
osi_roadmarking.proto
86+
osi_route.proto
8687
osi_lane.proto
8788
osi_logicallane.proto
8889
osi_featuredata.proto

doc/images/OSI_Planned_Route.png

22.2 KB
Loading

doc/images/OSI_Road_Segment.png

16.7 KB
Loading

osi_hostvehicledata.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ option optimize_for = SPEED;
44

55
import "osi_version.proto";
66
import "osi_common.proto";
7+
import "osi_route.proto";
78

89
package osi3;
910

@@ -87,6 +88,10 @@ message HostVehicleData
8788
//
8889
repeated VehicleAutomatedDrivingFunction vehicle_automated_driving_function = 12;
8990

91+
// Route that should be used by the host vehicle
92+
//
93+
optional Route route = 13;
94+
9095
//
9196
// \brief Base parameters and overall states of the vehicle.
9297
//

osi_route.proto

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
syntax = "proto3";
2+
3+
option optimize_for = SPEED;
4+
5+
import "osi_common.proto";
6+
7+
package osi3;
8+
9+
//
10+
// \brief A route in the road network
11+
//
12+
// A route is a planned or suggested path for an agent to travel from one location
13+
// to another within the road network. It is composed of a list of road segments,
14+
// which form a continuous path through the road network and should be traversed
15+
// in the order they are listed.
16+
//
17+
// ## Example
18+
//
19+
// The example below shows the \link Route route\endlink of a vehicle.
20+
//
21+
// \image html OSI_Planned_Route.png "Route" width=850px
22+
//
23+
// The route is composed of three \link RoadSegment road segments\endlink RS1-3,
24+
// each indicated by a yellow outline. Two of the road segments
25+
// (RS2 and RS3) only contain a single \link LogicalLaneSegment logical lane segment\endlink
26+
// (highlighted in blue), while RS1 is composed of three
27+
// logical lane segments (green, blue and red).
28+
//
29+
message Route
30+
{
31+
32+
// Road segments that form the planned route of an agent.
33+
//
34+
// Consecutive segments should be connected without gaps, meaning that the
35+
// two of them should form a continuous area.
36+
//
37+
repeated RoadSegment planned_route = 1;
38+
39+
//
40+
// \brief A segment of a logical lane.
41+
//
42+
message LogicalLaneSegment
43+
{
44+
// The ID of the logical lane this segment belongs to.
45+
//
46+
// \rules
47+
// refers_to: LogicalLane
48+
// \endrules
49+
//
50+
optional Identifier logical_lane_id = 1;
51+
52+
// S position on the logical lane where the segment starts.
53+
//
54+
optional double start_s = 2;
55+
56+
// S position on the logical lane where the segment ends.
57+
//
58+
optional double end_s = 3;
59+
}
60+
61+
//
62+
// \brief A segment of a road.
63+
//
64+
// A road segment describes a segment of a road by listing the lanes that are
65+
// in there. In general, only lanes should be listed that are parallel to each
66+
// other, though some may have different lenghts (e.g. if a lane widening
67+
// occurs, the newly appearing lane will have a shorter length).
68+
//
69+
// Typically a road segment will be either
70+
// - a set of lanes between two junctions, or
71+
// - parallel lanes on an intersection with the same driving direction
72+
//
73+
// ## Example
74+
//
75+
// Consider the \link RoadSegment road segment\endlink between two intersections,
76+
// shown in the image below.
77+
//
78+
// \image html OSI_Road_Segment.png "RoadSegment" width=850px
79+
//
80+
// In the example, a single road segment RS with three
81+
// \link LogicalLaneSegment logical lane segments\endlink LL1, LL2 and LL3 is
82+
// shown. The segments are indicated by the green, blue and red highlighted areas,
83+
// one for each underlying logical lane The starting
84+
// s-position of each segment is indicated by the yellow dotted line and the s- prefix
85+
// (note that the start of LL2 lies further to the left, outside of the image),
86+
// while the ending s-position of all segments is shown by the yellow dotted line e-RS.
87+
//
88+
// As it can be seen in the example, all logical lane segments are parallel,
89+
// but two of them are opening at a later position, so their starting
90+
// s-positions will be different.
91+
//
92+
message RoadSegment
93+
{
94+
95+
// Logical lane segments that form a road segment.
96+
//
97+
// The logical lane segments of a road segment should be connected without
98+
// gaps, meaning that, together, the lane segments should form a
99+
// continous area.
100+
//
101+
repeated LogicalLaneSegment lane_segment = 1;
102+
103+
}
104+
105+
106+
}

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def find_protoc():
6464
'osi_occupant.proto',
6565
'osi_referenceline.proto',
6666
'osi_roadmarking.proto',
67+
'osi_route.proto',
6768
'osi_sensordata.proto',
6869
'osi_sensorspecific.proto',
6970
'osi_sensorview.proto',

0 commit comments

Comments
 (0)