Hi
If you have an issue with acados
and are looking for help here, please mention:
- What interface of
acados
are you using (`C and Python)?
there is a part of my model code
f_expl = vertcat(
sdota,#s'
v * sin(alpha + C1 * delta), #n'
# v * C2 * sin(C1 * delta) - params[0][current_idx] * sdota,#alpha'
v * tan(delta) / WHEELBASE - params[0][current_idx] * sdota,#alpha'
a_car * cos(C1 * delta),
ddelta,
5
)
model.f_impl_expr = model.xdot - f_expl
model.f_expl_expr = f_expl
#constrains
# past speed info
time_step_idx = floor(time_step)
time_s = params[4][time_step_idx]
obs_need_idx = ceil(s / time_s * time_step_idx *2) # 预测是100ms,因此*2
# past_step info
past_time_step_idx = if_else(time_step_idx>0,time_step_idx - 1, time_step_idx)
past_time_s = params[4][past_time_step_idx]
past_obs_need_idx = ceil(s / time_s * past_time_step_idx *2)
...
i use python generate c_generated_code,so how can i “past_time_s” info in every step?
thanks!
Code
Snippet
- It is ideal to share a minimal example to reproduce your issue.
- If you get an error message, paste it as a formatted one, like
this error message
These hints should help other people to help you
Thanks for using acados