I encountered a new problem during the experiment:
-
I need to call casasi’s interpolant function when defining AcadosModel models. However, if casasi’s function is used for definition, model.p has no value, and an error will be reported; If i directly use the list to define model. p, an error will also be reported.
-
I want to define such a dictionary shaped model. P. How do I need to set it?
......
REF = {
"s":[1,2,3,4],
"x": [1,2,3,4],
"y": [1,2,3,4],
"nl": [1,2,3,4],
"nr": [1,2,3,4],
"heading": [1,2,3,4],
"kappa": [1,2,3,4]}
weight_q = [1e-1, 1e-20, 1e-8, 1e-4, 5e-3]
weight_qe = [2e0, 1e-20, 1e-8, 5e-4, 2e-3]
weight_r = [1e-3, 5e-3]
model.p = [REF,weight_q,weight_qe,weight_r] #### is here
# dynamics
kappa_ref = REF["kappa"]
s_ref = REF["s"]
nl = REF["nl"]
nr = REF["nr"]
kappa_ref_interp = interpolant("kappa_ref_interp", "bspline", [s_ref], kappa_ref) #### and here
.......
I look forward to hearing from you! thanks!!!