Closed zhangnage123 closed 4 months ago
Hi, The control variable is the kappa rate w.r.t the actual path length $\bar s$, instead of the length for the reference line length $s$. so $u = {dk \over d\bar s}$, where $v = {d\bar s \over dt}$. If we put $u$ in the penalty term, we are actually optimizing the lateral comfortability regardless of the shape of the reference line. But the dynamics are parameterized by the ref $s$. The dynamics for $k$ become:
$$ {dk \over ds} = {{ dk \over d\bar s}{d\bar s \over dt} \over {ds \over dt}} = {uv \over ({vcos(e_\phi) \over (1-k_r l)})} = ... $$
so $v$ is eliminated. Hope this helps :)
got it, thank you for the reply.
Thanks for sharing your great work!
There is some confusion regarding the calculation of![image](https://github.com/LiJiangnanBit/path_optimizer_ilqr/assets/30584145/3650c6ba-e5b5-4ffe-87f0-7a463c36c2e4)
FrenetPathDynamics::dx
. The system dynamics model should be as follows.I understand that in the code, the control variable
kappa_rate
should be the derivative ofkappa
with respect to time t, whereas in the dynamic model, it is the derivative ofkappa
with respect to s.Therefore, there should be a conversion here.where $${\Large {\color{Red} \dot s = \frac{v \cos e_{\psi}}{1 - k_r l} } } $$ so $${\color{Red} {\Large k^\prime = \frac{\dot k}{ \dot s} = \dot k \frac{1 - krl}{v \cos e\psi } } } $$
I noticed that v disappeared when calculating the state matrix. I wonder why? Maybe I missed something.