|
Algorithm 1: Trajectory planning |
-
1:
initialize:
-
2:
desired longitudinal velocity from user
-
3:
procedure GENERATE TRAJECTORY
-
4:
top:
-
5:
Use Equation (3) to create matrix Q
-
6:
Ackerman pole placement formula as (4) and calculate
-
7:
Obtained in (28)–(37) and generate P
-
8:
Obtained P and substitute (19) in (25)-(27) to calculate Q
-
9:
loop:
-
10:
generate target states as
-
11:
current state vector
-
12:
getRoadBoundaryConstraints as (38) (39)–(45)
-
13:
getCollisionAvoidanceConstraints as (46)–(50)
-
14:
solve MPC with generated Q from top with fixed R
-
15:
Apply optimal input as (12)–(15)
-
16:
if user request to change then
-
17:
goto initialize.
-
18:
else
-
19:
goto loop.
|