@@ -140,7 +140,19 @@ message ReferenceLine
140140 }
141141}
142142
143- // Like a LaneBoundary, but with a reference and ST positions.
143+ // Similar to a LaneBoundary, but with a reference and ST positions.
144+ //
145+ // A logical lane boundary describes the boundary between two logical lanes. As
146+ // such, there will always be exactly one logical lane boundary between two
147+ // lanes at a given S position. Contrary to that, there can be 0 to N physical
148+ // lane boundaries (i.e. type LaneBoundary) between two logical lanes at a
149+ // given S position.
150+ //
151+ // If there are multiple physical lane boundaries at one S position between two
152+ // lanes (think of a solid-broken marking, which would be described by two
153+ // LaneBoundary objects, one for the solid lane marking, one for the broken lane
154+ // marking), then the single LogicalLaneBoundary describing the boundary between
155+ // two logical lanes should be between the physical boundaries.
144156//
145157// Notes on design decisions:
146158// - The LogicalLaneBoundary has ST coordinates, and is thus a separate type
@@ -164,10 +176,6 @@ message ReferenceLine
164176// This information can be gotten from the physical lane referenced in the
165177// LogicalLane, if needed.
166178//
167- // TODO To Discuss: It would be entirely possible to add ST coordinates also to
168- // LaneBoundary. Then no separate type would be needed. However, it is unclear if
169- // the additional overhead is acceptable for sensor models.
170- //
171179message LogicalLaneBoundary
172180{
173181 // The ID of the lane boundary.
@@ -214,18 +222,58 @@ message LogicalLaneBoundary
214222 // All points of this LogicalLaneBoundary must have S coordinates in the
215223 // range [sStart,sEnd].
216224 //
217- // The reference line should roughly have the same shape as the boundary, so
218- // that S coordinates continually increase along the lane.
225+ // The reference line should roughly have the same shape as the boundary (so
226+ // roughly parallel to the lane middle), so that S coordinates continually
227+ // increase along the boundary.
219228 //
220229 // \rules
221230 // refers_to: ReferenceLine
222231 // \endrules
223232 //
224233 optional Identifier reference_line_id = 3 ;
225234
226- // The classification of the lane boundary.
235+ // Reference to the physical lane boundary or boundaries that make up this
236+ // logical boundary.
237+ //
238+ // Rules and notes:
239+ // - This list is empty if there are no physical lane boundaries to delimit
240+ // a lane.
241+ // - In the common case, this will contain one physical boundary.
242+ // - This list contains several lane boundaries if there are several physical
243+ // lane boundaries at one S position (e.g. both a broken and a solid
244+ // line).
245+ // - If there are several lane boundaries, they must be listed in increasing
246+ // T order (i.e. from right to left in reference line direction).
247+ // Rationale: this makes it easier to determine e.g. rules on lane
248+ // changes, which depend on the T order of the lanes.
249+ // - Whenever physical lane boundaries begin or end, or switch their T
250+ // position (if there are multiple physical lane boundaries), a new
251+ // LogicalLaneBoundary must be created.
252+ // - The referenced LaneBoundary objects may be longer than the
253+ // LogicalLaneBoundary which references them, but must never be shorter.
254+ //
255+ // Example:
256+ // Lane 1
257+ // --------a------------------ - - - -c- - - -
258+ // - - - -b- - - -
259+ // Lane 2
260+ //
261+ // This shows the boundary between lane 1 and lane 2. First there is a
262+ // solid-broken line (a and b), then there is only a solid line (a), then
263+ // there is a broken line (c). There would be three LogicalLaneBoundary
264+ // objects between Lane1 and Lane2: the first would reference a and b, the
265+ // second would reference only a, and the third would reference c.
266+ //
267+ // \rules
268+ // refers_to: LaneBoundary
269+ // \endrules
270+ //
271+ repeated Identifier physical_boundary_id = 4 ;
272+
273+ // The passing rules, insomuch as they can be determined just from road
274+ // markings.
227275 //
228- optional LaneBoundary.Classification classification = 4 ;
276+ optional PassingRule passing_rule = 5 ;
229277
230278 // Optional external reference to the lane boundary source.
231279 //
@@ -239,7 +287,7 @@ message LogicalLaneBoundary
239287 // from more than one origin source, for example, from a scenario file
240288 // and from sensors.
241289 //
242- repeated ExternalReference source_reference = 5 ;
290+ repeated ExternalReference source_reference = 6 ;
243291
244292 // A point on the boundary
245293 //
@@ -259,6 +307,39 @@ message LogicalLaneBoundary
259307 //
260308 optional double t_position = 3 ;
261309 }
310+
311+ // Passing rule of the LogicalLaneBoundary.
312+ //
313+ // This describes how vehicles may move across the LogicalLaneBoundary. The
314+ // PassingRule is determined solely based on the road, not on any signs
315+ // (i.e. it may be overridden by signs).
316+ //
317+ enum PassingRule {
318+ // Passing rule cannot be determined, e.g. because it depends on the
319+ // agent type.
320+ //
321+ CANNOT_BE_DETERMINED = 0 ;
322+
323+ // No passing is allowed (neither from left to right nor from right to
324+ // left).
325+ //
326+ NONE_ALLOWED = 1 ;
327+
328+ // Only passing from left to right (in definition direction, so in
329+ // decreasing T direction) is allowed.
330+ //
331+ LEFT_TO_RIGHT = 2 ;
332+
333+ // Only passing from right to left (in definition direction, so in
334+ // increasing T direction) is allowed.
335+ //
336+ RIGHT_TO_LEFT = 3 ;
337+
338+ // Passing is allowed in both directions (left to right and right to
339+ // left).
340+ //
341+ BOTH_ALLOWD = 4 ;
342+ }
262343}
263344
264345//
@@ -272,6 +353,11 @@ message LogicalLaneBoundary
272353// driving path is one LogicalLane, but the whole area is one \c Lane of type
273354// \c #TYPE_INTERSECTION.
274355//
356+ // Outside of junctions, logical lanes are constructed such that each point on
357+ // the road belongs to at least one (typically: exactly one) logical lane. So
358+ // there are no gaps between logical lanes, and no areas that don't belong to a
359+ // logical lane.
360+ //
275361// If OSI is generated from OpenDRIVE, then LogicalLanes map directly to
276362// OpenDRIVE lanes. However, it is allowed to merge multiple consecutive
277363// OpenDRIVE lanes with the same type into one OSI LogicalLane: if an OpenDRIVE
@@ -400,13 +486,31 @@ message LogicalLane
400486 // have smaller T coordinates.
401487 // Entries must be ordered: first by start_s, then by end_s.
402488 //
489+ // The XY positions of the polyline generated by the LogicalLaneBoundaries
490+ // of adjacent lanes must match up to a small error (5cm).
491+ // Typically adjacent lanes will share a LogicalLaneBoundary, but this will
492+ // not always be true. Examples: on intersections, it might be hard to generate
493+ // data such that lanes that are adjacent for a short length share a
494+ // LogicalLaneBoundary for this length; also different LogicalLaneBoundaries
495+ // are needed if the lanes have different heights at their boundaries (e.g.
496+ // road adjacent to a sidewalk).
497+ //
403498 repeated LaneRelation right_adjacent_lane = 9 ;
404499
405500 // Lanes that are directly left of this lane, without gap or overlap.
406501 // "Left" is in definition direction (not driving direction), so left lanes
407502 // have larger T coordinates.
408503 // Entries must be ordered: first by start_s, then by end_s.
409504 //
505+ // The XY positions of the polyline generated by the LogicalLaneBoundaries
506+ // of adjacent lanes must match up to a small error (5cm).
507+ // Typically adjacent lanes will share a LogicalLaneBoundary, but this will
508+ // not always be true. Examples: on intersections, it might be hard to generate
509+ // data such that lanes that are adjacent for a short length share a
510+ // LogicalLaneBoundary for this length; also different LogicalLaneBoundaries
511+ // are needed if the lanes have different heights at their boundaries (e.g.
512+ // road adjacent to a sidewalk).
513+ //
410514 repeated LaneRelation left_adjacent_lane = 10 ;
411515
412516 // Lanes that partially or completely overlap this lane. Only overlaps
0 commit comments