Replies: 1 comment
-
I'm very confused about this as well. The R1ex matrix should expect the steering command not to deviate too much from the reference steering command, while the R2ex matrix is to expect the steering command not to jump too much, taking into account the steering rate and steering acceleration, but which does not seem to be the same in the code. Now do you have any ideas? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been going through the MPC code, specifically mpc.cpp in mpc_lateral_controller package, when I noticed something odd. Although the cost function is defined as J = Xex' * Qex * Xex + (Uex - Uref)' * R1ex * (Uex - Uref_ex) + Uex' * R2ex * Uex, the steering rate and steering acceleration weight terms are added to R1ex instead of R2ex (see here) which doesn't make sense. I think they should be added to R2ex. Does anyone know if they're switched intentionally and why? Or is it a bug?
Beta Was this translation helpful? Give feedback.
All reactions