@@ -25,7 +25,7 @@ The main features of this class are:
* Provides access to all the road nodes of the lane defined as [COpendriveRoadNode](opendrive_road_node.md). The road nodes can be accessed by two different ways:
***by local index**: which is the local index of the road node inside the lane, not the unique index assigned to the road nodes when they are created.
***by the closest position**: in this case when the position of interest is known (i.e. the position of the car, an obstacle, etc...), it is possible to get the road node which is closest to this position.
***by the closest pose**: in this case when the position of interest is known (i.e. the position of the car, an obstacle, etc...), it is possible to get the road node which is closest to this position. It is possible to get the index of the road node of interest or a reference to it.
* Provides connectivity information of each lane with its neighbours (previous, next, left and right lanes). The Previous and next connecting lanes can only be accessed by their local index, not the one assigned to the lanes when they are created.
* Provides road mark information for the left and right sides, even if the left or right lanes don't exist.
* Provides a reference to the parent road segment [COpendriveRoadSegment](opendrive_road_segment.md).
...
...
@@ -41,11 +41,11 @@ At this point it is important to pay some attention to how the closest nodes, po
In this case, the origin of the reference system is placed at the center of the lane, at the beginning of the lane. For right lanes this means the origin is placed at the beginning of the road segment, and for left lanes it means that the origin is at the end of the road segment. The positive x axis (in red) is pointing toward the segment and the positive y axis (in green) is always pointing to the left (the positive z axis would be up). The next figure shows the reference system for left and right lanes for two road segment (a straight segment on the left and a curve segment on the right).
<imgsrc="images/ref_system_lanes.png"alt="Closest poses and node distances computation for road nodes"width="1023"height="382">
<imgsrc="images/ref_system_lanes.png"alt="Closest poses and lane distances computation for lanes"width="1023"height="382">
The lane geometry is build from the lane link geometries of the links connecting the road nodes belonging to the lane. Therefore, the computation of the closest pose is equivalent to that of the links. See the [COpendrveLink](opendrive_link.md) documentation for more details.
The closest road node to a given pose is the road node belonging to the lane whose lane link has the smallest euclidean distance to the given pose. Since the closest pose to a link is computed with respect to its starting road node, the closest road node will always be the one before the closest point, even though the distance to the next road node in the lane may be smaller. This case is shown in previous image, where the closest road nodes are shown in blue.
In case the closest point exist, its **lane distance** is always computed from the origin of the reference system of the lane, following the path defined by the lane geometry (center of the lane) as shown in the previous image. Do not confuse this distance with the closest euclidean distance between the point of interest and the closest point belonging to the lane.
The closest road node to a given pose is the road node belonging to the lane whose lane link has the smallest euclidean distance to the given pose. Since the closest pose to a link is computed with respect to its starting road node, the closest road node will always be the one before the closest point, even though the distance to the next road node in the lane may be smaller. This case is shown in previous image, where the closest road nodes are shown in blue.