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
refactor(lane_change): refactor getLaneChangePaths function (#8909)
* refactor lane change utility funcions
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* LC utility function to get distance to next regulatory element
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* don't activate LC module when close to regulatory element
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* modify threshold distance calculation
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* move regulatory element check to canTransitFailureState() function
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* always run LC module if approaching terminal point
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* use max possible LC length as threshold
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* update LC readme
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* refactor implementation
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* update readme
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* refactor checking data validity
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* refactor sampling of prepare phase metrics and lane changing phase metrics
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* add route handler function to get pose from 2d arc length
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* refactor candidate path generation
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* refactor candidate path safety check
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* fix variable name
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* Update planning/autoware_route_handler/src/route_handler.cpp
Co-authored-by: Zulfaqar Azmi <93502286+zulfaqar-azmi-t4@users.noreply.github.com>
* correct parameter name
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* set prepare segment velocity after taking max path velocity value
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* update LC README
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* minor changes
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* check phase length difference with previos valid candidate path
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* change logger name
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* change functions names to snake case
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* use snake case for function names
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
* add colors to flow chart in README
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
---------
Signed-off-by: mohammad alqudah <alqudah.mohammad@tier4.jp>
Co-authored-by: Zulfaqar Azmi <93502286+zulfaqar-azmi-t4@users.noreply.github.com>
The following chart illustrates the process of sampling candidate paths for lane change.
28
+
29
+
```plantuml
30
+
@startuml
31
+
skinparam defaultTextAlignment center
32
+
skinparam backgroundColor #WHITE
33
+
34
+
start
35
+
36
+
if (Is current lanes, target lanes OR target neighbor lanes polygon empty?) then (yes)
37
+
#LightPink:Return prev approved path;
38
+
stop
39
+
else (no)
40
+
endif
41
+
42
+
:Get target objects;
43
+
44
+
:Calculate prepare phase metrics;
45
+
46
+
:Start loop through prepare phase metrics;
47
+
48
+
repeat
49
+
:Get prepare segment;
50
+
51
+
if (Is LC start point outside target lanes range) then (yes)
52
+
if (Is found a valid path) then (yes)
53
+
#Orange:Return first valid path;
54
+
stop
55
+
else (no)
56
+
#LightPink:Return prev approved path;
57
+
stop
58
+
endif
59
+
else (no)
60
+
endif
61
+
62
+
:Calculate shift phase metrics;
63
+
64
+
:Start loop through shift phase metrics;
65
+
repeat
66
+
:Get candidate path;
67
+
note left: Details shown in the next chart
68
+
if (Is valid candidate path?) then (yes)
69
+
:Store candidate path;
70
+
if (Is candidate path safe?) then (yes)
71
+
#LightGreen:Return candidate path;
72
+
stop
73
+
else (no)
74
+
endif
75
+
else (no)
76
+
endif
77
+
repeat while (Finished looping shift phase metrics) is (FALSE)
78
+
repeat while (Is finished looping prepare phase metrics) is (FALSE)
79
+
80
+
if (Is found a valid path) then (yes)
81
+
#Orange:Return first valid path;
82
+
stop
83
+
else (no)
84
+
endif
85
+
86
+
#LightPink:Return prev approved path;
87
+
stop
88
+
89
+
@enduml
90
+
```
91
+
92
+
While the following chart demonstrates the process of generating a valid candidate path.
93
+
94
+
```plantuml
95
+
@startuml
96
+
skinparam defaultTextAlignment center
97
+
skinparam backgroundColor #WHITE
98
+
99
+
start
100
+
101
+
:Calculate resample interval;
102
+
103
+
:Get reference path from target lanes;
104
+
105
+
if (Is reference path empty?) then (yes)
106
+
#LightPink:Return;
107
+
stop
108
+
else (no)
109
+
endif
110
+
111
+
:Get LC shift line;
112
+
113
+
:Set lane change Info;
114
+
note left: set information from sampled prepare phase and shift phase metrics\n<color:red>(duration, length, velocity, and acceleration)
115
+
116
+
:Construct candidate path;
117
+
118
+
if (Candidate path has enough length?) then (yes)
119
+
#LightGreen:Return valid candidate path;
120
+
stop
121
+
else (no)
122
+
#LightPink:Return;
123
+
stop
124
+
endif
125
+
126
+
@enduml
127
+
```
128
+
27
129
### Preparation phase
28
130
29
131
The preparation trajectory is the candidate path's first and the straight portion generated along the ego vehicle's current lane. The length of the preparation trajectory is computed as follows.
Copy file name to clipboardexpand all lines: planning/behavior_path_planner/autoware_behavior_path_lane_change_module/include/autoware/behavior_path_lane_change_module/scene.hpp
+9-10
Original file line number
Diff line number
Diff line change
@@ -153,18 +153,17 @@ class NormalLaneChange : public LaneChangeBase
Copy file name to clipboardexpand all lines: planning/behavior_path_planner/autoware_behavior_path_lane_change_module/include/autoware/behavior_path_lane_change_module/utils/calculation.hpp
+33
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ using autoware::route_handler::Direction;
24
24
using autoware::route_handler::RouteHandler;
25
25
using behavior_path_planner::lane_change::CommonDataPtr;
26
26
using behavior_path_planner::lane_change::LCParamPtr;
27
+
using behavior_path_planner::lane_change::PhaseMetrics;
27
28
28
29
/**
29
30
* @brief Calculates the distance from the ego vehicle to the terminal point.
Copy file name to clipboardexpand all lines: planning/behavior_path_planner/autoware_behavior_path_lane_change_module/include/autoware/behavior_path_lane_change_module/utils/data_structs.hpp
Copy file name to clipboardexpand all lines: planning/behavior_path_planner/autoware_behavior_path_lane_change_module/include/autoware/behavior_path_lane_change_module/utils/utils.hpp
0 commit comments