Skip to content

Commit 9f4de30

Browse files
committed
Draft for discussion: Logical Lanes in OSI
This patch shows how logical lanes could be implemented inside OSI. These logical lanes (plus the lane assignments) would make it much easier to create agent models that work on OSI. For OpenDRIVE, the new data structures ensure that the lane information from OpenDRIVE is not lost (currently all the junction lane information from OpenDRIVE cannot be represented in OSI). Signed-off-by: Thomas Bleher <thomas.tb.bleher@bmw.de>
1 parent 412521e commit 9f4de30

File tree

4 files changed

+532
-0
lines changed

4 files changed

+532
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ set(OSI_PROTO_FILES
7676
osi_trafficcommand.proto
7777
osi_roadmarking.proto
7878
osi_lane.proto
79+
osi_logicallane.proto
7980
osi_featuredata.proto
8081
osi_logicaldetectiondata.proto
8182
osi_object.proto

osi_common.proto

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,45 @@ message Spherical3d
338338
optional double elevation = 3;
339339
}
340340

341+
//
342+
// \brief Assignment of an object to a logical lane
343+
//
344+
// An object is assigned to a logical lane if it overlaps the logical lane.
345+
// Assignment happens even if the reference point is outside the lane, and only
346+
// a part of the object overlaps.
347+
//
348+
// As an exception to this, \c TrafficSign and \c TrafficLight are assigned to
349+
// a logical lane if they control traffic on that lane.
350+
//
351+
message LogicalLaneAssignment
352+
{
353+
// ID of the LogicalLane the object is assigned to.
354+
//
355+
optional Identifier assigned_lane_id = 1;
356+
357+
// S position of the object reference point on the lane, in the ST
358+
// coordinate system of the lane.
359+
//
360+
// s_position might be outside [s_start,s_end] of the lane (and even
361+
// outside [startS,endS] of the reference line) if the reference point is
362+
// outside the lane, but the object overlaps the lane or a TrafficSign or
363+
// TrafficLight is assigned to a lane.
364+
//
365+
optional double s_position = 2;
366+
367+
// T position of the object reference point on the lane, in the ST
368+
// coordinate system of the lane.
369+
//
370+
optional double t_position = 3;
371+
372+
// Angle of the object relative to the lane.
373+
// See the ReferenceLine description how the angle is calculated.
374+
//
375+
// Unit: rad
376+
//
377+
optional double angle_to_lane = 4;
378+
}
379+
341380
//
342381
// \brief The base attributes of a stationary object or entity.
343382
//
@@ -398,6 +437,10 @@ message BaseStationary
398437
// The polygon is defined counter-clockwise.
399438
//
400439
repeated Vector2d base_polygon = 4;
440+
441+
// Assignment of this object to logical lanes
442+
//
443+
repeated LogicalLaneAssignment logical_lane_assignment = 5;
401444
}
402445

403446
//
@@ -520,6 +563,10 @@ message BaseMoving
520563
// The polygon is defined counter-clockwise.
521564
//
522565
repeated Vector2d base_polygon = 7;
566+
567+
// Assignment of this object to logical lanes
568+
//
569+
repeated LogicalLaneAssignment logical_lane_assignment = 9;
523570
}
524571

525572
//

osi_groundtruth.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import "osi_trafficsign.proto";
99
import "osi_trafficlight.proto";
1010
import "osi_roadmarking.proto";
1111
import "osi_lane.proto";
12+
import "osi_logicallane.proto";
1213
import "osi_object.proto";
1314
import "osi_occupant.proto";
1415

@@ -171,4 +172,16 @@ message GroundTruth
171172
// derives street geometries automatically from a map reference.
172173
//
173174
optional string model_reference = 16;
175+
176+
// Reference lines used by LogicalLane
177+
//
178+
repeated ReferenceLine reference_line = 17;
179+
180+
// Logical lane boundaries used by LogicalLane
181+
//
182+
repeated LogicalLaneBoundary logical_lane_boundary = 18;
183+
184+
// Logical lanes used e.g. by traffic agents
185+
//
186+
repeated LogicalLane logical_lane = 19;
174187
}

0 commit comments

Comments
 (0)