Skip to content

Commit 7953232

Browse files
authored
Merge pull request #705 from FabianPfeufferCAP/OsiRoute
feat: New OSI message osi_route
2 parents ec82b7c + fbe6362 commit 7953232

6 files changed

+141
-0
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ set(OSI_PROTO_FILES
8585
osi_trafficcommandupdate.proto
8686
osi_referenceline.proto
8787
osi_roadmarking.proto
88+
osi_route.proto
8889
osi_lane.proto
8990
osi_logicallane.proto
9091
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

+5
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

@@ -91,6 +92,10 @@ message HostVehicleData
9192
//
9293
optional VehicleMotion vehicle_motion = 13;
9394

95+
// Currently planned route of the vehicle
96+
//
97+
optional Route route = 14;
98+
9499
//
95100
// \brief Base parameters and overall states of the vehicle.
96101
//

osi_route.proto

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
syntax = "proto2";
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+
// The unique id of the route.
37+
//
38+
// \note This field is mandatory.
39+
//
40+
// \note This id must be unique within all route messages exchanged with
41+
// one traffic participant.
42+
//
43+
optional Identifier route_id = 1;
44+
45+
// Route segments that form the route of an agent.
46+
//
47+
// Consecutive segments should be connected without gaps, meaning that the
48+
// two of them should form a continuous area.
49+
//
50+
repeated RouteSegment route_segment = 2;
51+
52+
//
53+
// \brief A segment of a logical lane.
54+
//
55+
// \note The LogicalLaneSegment allows that start_s > end_s.
56+
// If start_s < end_s, then the traffic agent should traverse the
57+
// segment in the logical lane's reference line definition direction.
58+
// If end_s > start_s, then the traffic agent should traverse the
59+
// segment in the opposite of the logical lane's reference line
60+
// definition direction.
61+
//
62+
message LogicalLaneSegment
63+
{
64+
// The ID of the logical lane this segment belongs to.
65+
//
66+
// \rules
67+
// refers_to: LogicalLane
68+
// \endrules
69+
//
70+
optional Identifier logical_lane_id = 1;
71+
72+
// S position on the logical lane where the segment starts.
73+
//
74+
optional double start_s = 2;
75+
76+
// S position on the logical lane where the segment ends.
77+
//
78+
optional double end_s = 3;
79+
}
80+
81+
//
82+
// \brief A segment of a route.
83+
//
84+
// A route segment describes a segment of a traffic agent's route through the
85+
// logical lanes of the road network.
86+
//
87+
// Each time there is a successor-predecessor relation between the logical
88+
// lanes along the route (i.e. a logical lane ends, and is continued by another
89+
// logical lane, e.g. at a junction border), a new RouteSegment starts. The
90+
// RouteSegment then lists the logical lane segments that can be used to
91+
// travel through this space of the road.
92+
//
93+
// Together, the listed logical lane segments should form a continuous area,
94+
// where the traffic agent can move freely. These will mostly be parallel
95+
// lanes, though lanes may overlap (e.g. if one lane splits into two on a
96+
// junction). In general, the logical lane segments in a RouteSegment will
97+
// have the same length, though there are exceptions (e.g. if a lane
98+
// widening occurs, the newly appearing lane will have a shorter length).
99+
//
100+
// Typically a route segment will be either
101+
// - a set of parallel lanes between two junctions, or
102+
// - parallel lanes on an intersection with the same driving direction
103+
//
104+
// ## Example
105+
//
106+
// Consider the \link RouteSegment route segment\endlink between two intersections,
107+
// shown in the image below.
108+
//
109+
// \image html OSI_Route_Segment.png "RouteSegment" width=850px
110+
//
111+
// In the example, a single route segment RS with three
112+
// \link LogicalLaneSegment logical lane segments\endlink LL1, LL2 and LL3 is
113+
// shown. The segments are indicated by the green, blue and red highlighted areas,
114+
// one for each underlying logical lane The starting
115+
// s-position of each segment is indicated by the yellow dotted line and the s- prefix
116+
// (note that the start of LL2 lies further to the left, outside of the image),
117+
// while the ending s-position of all segments is shown by the yellow dotted line e-RS.
118+
//
119+
// As it can be seen in the example, all logical lane segments are parallel,
120+
// but two of them are opening at a later position, so their starting
121+
// s-positions will be different.
122+
//
123+
message RouteSegment
124+
{
125+
126+
// Logical lane segments that form a route segment.
127+
//
128+
// The logical lane segments of a route segment should be connected without
129+
// gaps, meaning that, together, the lane segments should form a continuous
130+
// area.
131+
//
132+
repeated LogicalLaneSegment lane_segment = 1;
133+
}
134+
}

setup.py

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def find_protoc():
7373
"osi_occupant.proto",
7474
"osi_referenceline.proto",
7575
"osi_roadmarking.proto",
76+
"osi_route.proto",
7677
"osi_sensordata.proto",
7778
"osi_sensorspecific.proto",
7879
"osi_sensorview.proto",

0 commit comments

Comments
 (0)