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

Add time gap and distance cost parameters to Longitudinal MPC #23

Merged
merged 3 commits into from
Mar 16, 2019

Conversation

rhinodavid
Copy link
Owner

openpilot has hardcoded values for the time gap and distance cost settings of the Longitudinal MPC planner. Update the underlying Cxx code to accept these values as parameters, and update the python code which calls the code. Scale up the time gap as the vehicle slows down, but hardcode the values in python for now.

rhinodavid added 3 commits March 14, 2019 01:06
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.
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
@rhinodavid rhinodavid merged commit 44e6435 into time_gap Mar 16, 2019
@rhinodavid rhinodavid deleted the longmpc_scale branch March 17, 2019 01:39
rhinodavid added a commit that referenced this pull request Apr 8, 2019
* 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
rhinodavid added a commit that referenced this pull request Apr 25, 2019
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant