Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to properly handle the track options for the controller #6

Closed
tudoroancea opened this issue Sep 13, 2023 · 1 comment
Closed

how to properly handle the track options for the controller #6

tudoroancea opened this issue Sep 13, 2023 · 1 comment
Assignees
Labels
control relative to the control node new feature
Milestone

Comments

@tudoroancea
Copy link
Owner

Basically, each ocp solver will be generated for one track and only one track. When we switch tracks, we have to switch controllers.

  • Do we pre-generate controllers for all tracks and include them all ? => to be done properly, we would have to create some enums (maybe)
  • do we generate them lazily by calling a python script? => would be hard to source the right env from c++
@tudoroancea tudoroancea added control relative to the control node new feature labels Sep 13, 2023
@tudoroancea tudoroancea self-assigned this Sep 13, 2023
@tudoroancea tudoroancea mentioned this issue Sep 13, 2023
2 tasks
@tudoroancea tudoroancea added this to the IHM2 v3 milestone Nov 5, 2023
@tudoroancea
Copy link
Owner Author

We can actually make the casadi interpolant class parametric (see this constructor).
We can therefore only provide the grid points at generation time with

kappa_ref = interpolant("kappa_ref", "linear", [s_ref])

and define the dynamics using kappa_ref(s, kappa_ref_values) (instead of kappa_ref(s)) where kappa_ref_values is an SX/MX variable contained in the parameters of the AcadosModel.
These parameters then only have to be set at runtime using the function ihm2_fkin6_acados_update_params().

Only caveat: the grid itself can also be a parameter but the size is determined at generation time. We therefore had (for the moment) to sample a fixed number of points on the center line of each track (5000 per lap to have at most 10cm resolution for the longest FS tracks of 500m).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
control relative to the control node new feature
Projects
Status: Done
Development

No branches or pull requests

1 participant