I want to integrate CBF based constraints with Acados. I need to use state of next shooting node in the horizon. while applying constraints for Xi, I want to use state Xi+1. Is this possible in Acados, cause this is possible with Casadi.
Hi
Yes this is possible via state augmentation if you are using the discrete dynamics module. With an augmented system model of the form \tilde{x}_{n+1} = \begin{bmatrix} f(x_n, u_n)\\ x_n \end{bmatrix}
you can then defined constraints on \tilde{x}_n which includes both the current and the previous state of the original dynamic system.
Hope this is helpful!
Katrin
Hi Kaethe,
Thanks for the prompt reply! But, here Xn+1 is my predicted state for i the shooting node, however I need Xn+2, that is predicted state of i+1 shooting node. But, here Un+1 is not available to calculate Xn+2. In casadi, I can access u for any time slot within the horizon. Is that possible here? With the state augmentation approach, I can maintain last state and current state, but I need to maintain current state and Next state. I hope this clarifies my scenario. Is this possible in acados?
I’m not super familiar with CBFs, but I guess you need x_n, u_n, x_{n+1}, is that correct?
In that case you simply need to augment with the control as well, i.e.
\tilde{x}_{n+1} = \begin{bmatrix} f(x_n, u_n)\\ x_n\\u_n \end{bmatrix}