Open arya1106 opened 7 months ago
Planning to use LQR implementation with forward kinematics from here. Another example implementation. Simulation code here.
$x$ – x-coordinate relative to world frame $\dot{x}$ – x-coordinate change $y$ – y-coordinate relative to world frame $\dot{y}$ – y-coordinate change $\theta$ – yaw in degrees relative to world frae $\dot{\theta}$ – change in yaw $\phi$ – current steering angle of car $\dot{\phi}$ – current steering angle of car $t_0$ – current time $t_1$ – time we are trying to predict $dt$ – discrete time step $\beta$ – Brake (0-255) $\tau$ – Throttle (0-255) $\pi$ – Steering Angle (0-255) $u_1$ - velocity of kart $u_2$ - turning rate of kart
$x, y, \theta$ – Coordinates from #6 $\phi$ - Control memory
\begin{bmatrix}
x \\
y \\
\phi \\
\theta
\end{bmatrix}
$u_1$ = $c_1\beta + c_2\tau$ $u_2$ = $\frac{\pi - \phi}{dt}$
$c_1$ and $c_2$ to be found experimentally.
\begin{bmatrix}
\dot{x} \\
\dot{y} \\
\dot{\phi} \\
\dot{\theta}
\end{bmatrix} =
\begin{bmatrix}
u_1\cos\theta \\
u_1\sin\theta \\
u_2 \\
u_1\cdot\frac{1}{L}\cdot\tan\phi
\end{bmatrix}
\begin{bmatrix}
x_t \\
y_t \\
\phi_t \\
\theta_t
\end{bmatrix}
+
\begin{bmatrix}
\dot{x} \\
\dot{y} \\
\dot{\phi} \\
\dot{\theta}
\end{bmatrix}
=
\begin{bmatrix}
x_{t+1} \\
y_{t+1} \\
\phi_{t+1} \\
\theta_{t+1}
\end{bmatrix}
Use the information provided by #6 and a series of target points to plan and follow a given path. Output control values of: