You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: planning/behavior_path_planner/docs/behavior_path_planner_manager_design.md
+10-44
Original file line number
Diff line number
Diff line change
@@ -532,67 +532,33 @@ When the manager removes succeeded modules, the last added module's output is us
532
532
533
533
## Reference path generation
534
534
535
-
The root reference path is generated from the centerline of the **lanelet sequence**that obtained from the **root lanelet**, and it is not only used as an input to the first added module of approved modules stack, but also used as the output of `behavior_path_planner` if none of the modules are running.
535
+
The reference path is generated from the centerline of the **lanelet sequence** obtained from the **current route lanelet**, and it is not only used as an input to the first added module of approved modules stack, but also used as the output of `behavior_path_planner` if none of the modules are running.
The root lanelet is the closest lanelet within the route, and the update timing is based on Ego's operation mode state.
542
+
The **current route lanelet** keeps track of the route lanelet currently followed by the planner.
543
+
It is initialized as the closest lanelet within the route.
544
+
It is then updated as ego travels along the route such that (1) it follows the previous **current route lanelet** and (2) it is the closest lanelet within the route.
543
545
544
-
- the state is `OperationModeState::AUTONOMOUS`: Update only when the ego moves to right or left lane by lane change module.
545
-
- the state is **NOT**`OperationModeState::AUTONOMOUS`: Update at the beginning of every planning cycle.
546
+
The **current route lanelet** can be reset to the closest lanelet within the route, ignoring whether it follows the previous **current route lanelet** .
The manager needs to know the ego behavior and then generate a root reference path from the lanes that Ego should follow.
550
551
551
-
For example, during autonomous driving, even if Ego moves into the next lane in order to avoid a parked vehicle, the target lanes that Ego should follow will **NOT** change because Ego will return to the original lane after the avoidance maneuver. Therefore, the manager does **NOT**update **root lanelet** even if the avoidance maneuver is finished.
552
+
For example, during autonomous driving, even if Ego moves into the next lane in order to avoid a parked vehicle, the target lanes that Ego should follow will **NOT** change because Ego will return to the original lane after the avoidance maneuver. Therefore, the manager does **NOT**reset the **current route lanelet**, even if the avoidance maneuver is finished.
552
553
553
554

554
555
555
-
On the other hand, if the lane change is successful, the manager updates **root lanelet** because the lane that Ego should follow changes.
556
+
On the other hand, if the lane change is successful, the manager resets the **current route lanelet** because the lane that Ego should follow changes.
556
557
557
558

558
559
559
-
In addition, while manual driving, the manager always updates **root lanelet** because the pilot may move to an adjacent lane regardless of the decision of the autonomous driving system.
560
-
561
-
```c++
562
-
/**
563
-
* @brief get reference path from root_lanelet_ centerline.
Code is [here](https://github.com/autowarefoundation/autoware.universe/blob/b1734916e3efd9786507a271e0fe829dd37476c8/planning/behavior_path_planner/include/behavior_path_planner/planner_manager.hpp#L202-L227)
560
+
In addition, while manually driving (i.e., either the `OperationModeState` is different from `AUTONOMOUS` or the Autoware control is not engaged), the manager resets the **current route lanelet** at each iteration because the ego vehicle may move to an adjacent lane regardless of the decision of the autonomous driving system.
561
+
The only exception is when a module is already approved, allowing testing the module's behavior while manually driving.
0 commit comments