forked from commaai/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add time gap and distance cost parameters to Longitudinal MPC (#23)
* Update longitudinal mpc with follow distance param Update generator.cpp to parameterize the follow time. Then, using the process outlined in the ACADO docs (https://acado.github.io/cgt_overview.html), rebuild the generator binary and run it to regenerate the source files in lib_mpc_export, then manually copy them into the openpilot repo. Update longitudinal_mpc.c, libmpc_py.py, and planner.py to take in the additional follow_time parameter. Incorporate arne182's PR to update the Makefile (commaai#248). Note that I did not use the generate recipie inside the repo; I created the files outside of the repo as stated above. * Add distance cost parameter to longitudinal mpc The distance cost was hardcoded, allow with the time gap. But as we lower the time gap we will need to increase the distance cost for reliable control * Scale the time gap up as we slow down
- Loading branch information
1 parent
d36047f
commit 44e6435
Showing
8 changed files
with
118 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 45 additions & 36 deletions
81
selfdrive/controls/lib/longitudinal_mpc/lib_mpc_export/acado_solver.c
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters