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_lane_change_module/README.md
+83
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,89 @@ longitudinal_acceleration_resolution = (maximum_longitudinal_acceleration - mini
60
60
61
61
Note that when the `current_velocity` is lower than `minimum_lane_changing_velocity`, the vehicle needs to accelerate its velocity to `minimum_lane_changing_velocity`. Therefore, longitudinal acceleration becomes positive value (not decelerate).
62
62
63
+
The chart illustrates the conditions under which longitudinal acceleration values are sampled.
if (max_lane_change_length > ego's distance to the end of the current lanes.) then (yes)
85
+
:Return **sampled acceleration values**;
86
+
stop
87
+
endif
88
+
89
+
if (isVehicleStuck(current_lanes)) then (yes)
90
+
:Return **sampled acceleration values**;
91
+
stop
92
+
else (no)
93
+
endif
94
+
95
+
if (is goal is in target lanes) then (yes)
96
+
if (max_lane_change_length < ego's distance to the goal along the target lanes) then (yes)
97
+
:Return {max_acc};
98
+
stop
99
+
else (no)
100
+
endif
101
+
else (no)
102
+
if (max_lane_change_length < ego's distance to the end of the target lanes.) then (yes)
103
+
:Return {max_acc};
104
+
stop
105
+
else (no)
106
+
endif
107
+
endif
108
+
109
+
:Return **sampled acceleration values**;
110
+
stop
111
+
112
+
@enduml
113
+
114
+
```
115
+
116
+
while the following describes the process by which longitudinal accelerations are sampled.
117
+
118
+
```plantuml
119
+
@startuml
120
+
start
121
+
:Initialize sampled_values with min_acc;
122
+
123
+
if (min_acc > max_acc) then (yes)
124
+
:Return {};
125
+
stop
126
+
elseif (max_acc - min_acc < epsilon) then (yes)
127
+
:Return {0.0};
128
+
stop
129
+
else (no)
130
+
:Calculate resolution;
131
+
endif
132
+
133
+
:Start loop from min_acc to max_acc with resolution step;
134
+
repeat
135
+
if (sampled_values.back() < -epsilon AND next_value > epsilon) then (yes)
136
+
:Insert 0.0 into sampled_values;
137
+
endif
138
+
:Add sampled_acc to sampled_values;
139
+
repeat while (sampled_acc < max_acc + epsilon) is (TRUE)
140
+
141
+
:Return sampled_values;
142
+
stop
143
+
@enduml
144
+
```
145
+
63
146
The following figure illustrates when `longitudinal_acceleration_sampling_num = 4`. Assuming that `maximum_deceleration = 1.0` then `a0 == 0.0 == no deceleration`, `a1 == 0.25`, `a2 == 0.5`, `a3 == 0.75` and `a4 == 1.0 == maximum_deceleration`. `a0` is the expected lane change trajectories should ego vehicle do not decelerate, and `a1`'s path is the expected lane change trajectories should ego vehicle decelerate at `0.25 m/s^2`.
0 commit comments