Skip to content

Commit 6e666a8

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 6e666a8

File tree

6 files changed

+130
-0
lines changed

6 files changed

+130
-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_Route_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+
// Currently planned route of the 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: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
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 an e.g. planned or suggested path for an agent to travel from one
13+
// location to another within the road network. It is composed of a list of route
14+
// segments, which form a continuous path through the road network and should be
15+
// traversed in the order they are listed.
16+
// The route allows the simulation environment to provide agents with high level
17+
// path information, similar to that of a map or a navigation system, without the
18+
// need for the agent model to perform complex path planning on its own. This
19+
// allows for an efficient control of the agent's general direction, while
20+
// simultaneously giving it enough freedom on how to traverse the path.
21+
//
22+
// ## Example
23+
//
24+
// The example below shows the \link Route route\endlink of a vehicle.
25+
//
26+
// \image html OSI_Planned_Route.png "Route" width=850px
27+
//
28+
// The route is composed of three \link RouteSegment route segments\endlink RS1-3,
29+
// each indicated by a yellow outline. Two of the route segments
30+
// (RS2 and RS3) only contain a single \link LogicalLaneSegment logical lane segment\endlink
31+
// (highlighted in blue), while RS1 is composed of three
32+
// logical lane segments (green, blue and red).
33+
//
34+
message Route
35+
{
36+
37+
// The unique id of the route.
38+
//
39+
// \note This field is mandatory.
40+
//
41+
// \note This id must be unique within all route messages exchanged with
42+
// one traffic participant.
43+
//
44+
optional Identifier route_id = 1;
45+
46+
// Route segments that form the route of an agent.
47+
//
48+
// Consecutive segments should be connected without gaps, meaning that the
49+
// two of them should form a continuous area.
50+
//
51+
repeated RouteSegment route_segment = 2;
52+
53+
//
54+
// \brief A segment of a logical lane.
55+
//
56+
message LogicalLaneSegment
57+
{
58+
// The ID of the logical lane this segment belongs to.
59+
//
60+
// \rules
61+
// refers_to: LogicalLane
62+
// \endrules
63+
//
64+
optional Identifier logical_lane_id = 1;
65+
66+
// S position on the logical lane where the segment starts.
67+
//
68+
optional double start_s = 2;
69+
70+
// S position on the logical lane where the segment ends.
71+
//
72+
optional double end_s = 3;
73+
}
74+
75+
//
76+
// \brief A segment of a route.
77+
//
78+
// A route segment describes a segment of a traffic agent's route through the
79+
// road network. The route segment is composed of a list of logical lanes
80+
// segments that indicate the agent which logical lanes it should use in a
81+
// given interval, so that it will eventually reach its destination.
82+
// In general, only lanes should be listed that are parallel to each
83+
// other, though some may have different lengths (e.g. if a lane widening
84+
// occurs, the newly appearing lane will have a shorter length).
85+
//
86+
// Typically a route segment will be either
87+
// - a set of lanes between two junctions, or
88+
// - parallel lanes on an intersection with the same driving direction
89+
//
90+
// ## Example
91+
//
92+
// Consider the \link RouteSegment route segment\endlink between two intersections,
93+
// shown in the image below.
94+
//
95+
// \image html OSI_Route_Segment.png "RouteSegment" width=850px
96+
//
97+
// In the example, a single route segment RS with three
98+
// \link LogicalLaneSegment logical lane segments\endlink LL1, LL2 and LL3 is
99+
// shown. The segments are indicated by the green, blue and red highlighted areas,
100+
// one for each underlying logical lane The starting
101+
// s-position of each segment is indicated by the yellow dotted line and the s- prefix
102+
// (note that the start of LL2 lies further to the left, outside of the image),
103+
// while the ending s-position of all segments is shown by the yellow dotted line e-RS.
104+
//
105+
// As it can be seen in the example, all logical lane segments are parallel,
106+
// but two of them are opening at a later position, so their starting
107+
// s-positions will be different.
108+
//
109+
message RouteSegment
110+
{
111+
112+
// Logical lane segments that form a route segment.
113+
//
114+
// The logical lane segments of a route segment should be connected without
115+
// gaps, meaning that, together, the lane segments should form a
116+
// continous area.
117+
//
118+
repeated LogicalLaneSegment lane_segment = 1;
119+
120+
}
121+
122+
123+
}

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)