Commit Graph

13 Commits (d09dffb7cd99aefb7e3c251265f2cfd9ae9e72f8)

Author SHA1 Message Date
Jonathan Frey d09dffb7cd
Cython acados and minor (#23835)
* acados_ocp_solver_pyx.pyx: implement get_stats for timings and ints

* long_mpc: use acados timers

* acados_ocp_solver_pyx.pyx: fix dynamics_get

* acados_ocp_solver_pyx.pyx: get statistics

* use acados_ocp_solver_pyx.pyx from commaai/cython2 branch

* acados_ocp_solver_pyx.pyx: implement store_iterate

* acados_ocp_solver_pyx.pyx: implement get_residuals

* acados_ocp_solver_pyx.pyx: fix set() for empty fields

* acados_ocp_solver_pyx.pyx: load_iterate

* cython acados: add print_statistics

* test_following_distance: fix typo

* test_longitudinal: unique names for test maneuvers

* longitudinal MPC: comments for evaluation

* longitudinal MPC: add comments to eval acados residuals

* long_mpc: use qp_solver_cond_N = 1

* long MPC: comments, simplify set_cur_state

* update acados version in build script

* longitudinal mpc: weigh a_change in 1 place only

* update ref

* Update ref

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
2022-02-25 14:16:44 -08:00
HaraldSchafer 0dcdf9c30f
Long policy: strictly squared stopped equivalence function (#23118)
* new ref

* never let lead stopped equivalence go down

* no overbraking

* stricter again

* cleanup

* updated refs
2021-12-03 16:12:30 -08:00
HaraldSchafer 46fd5892bf
Human inspired follow distance (#22937)
* Add cost for creep

* more reasonable cost

* seems better than before

* science tune

* more chill

* closer follow

* stopping takes some leeway

* better cruise

* needed to be cumsum all along

* jerk not even needed

* matches better

* 6 is too much

* add back

* a little extra buffer is good for badly tuned cars

* new refs

* refs again
2021-12-02 14:42:13 -08:00
HaraldSchafer fe983a7b8c
acados long merged (#22224)
* rebased

* cleaner, seems to drive better?

* more stable

* wrong import

* new way of thinking

* reports look nice

* start move back

* works at leas

* good timestamps

* step by step

* somewhat work

* tests pass

* ALL CARS STOPPED

* should work

* fake a cruise obstacle

* cleaner costs

* pretty good except cruise braking

* works pretty well now!

* cleanup

* add source

* add source

* that is needed for unit tests

* nan recovery

* little cleaner

* stop wasting arrays

* unreasonable without unfair init

* this isnt needed without the exponential

* that works too

* unused

* uses less

* new ref

* long enough

* e2e long api

* DONT PUT IN A VIEW INTO ACADOS

* new ref for outside weights

* remove debug prints
2021-09-27 19:48:28 -07:00
HaraldSchafer fcda55fbf1
Fix cruise MPC convergence bug and add test (#22295)
* fix tests

* fix cruise convergence bug

* update refs

* Update selfdrive/controls/tests/test_cruise_speed.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* Update selfdrive/controls/tests/test_cruise_speed.py

* add msgh

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-09-21 12:19:05 -07:00
HaraldSchafer cc6af379ce
various cleanup (#22289) 2021-09-20 16:26:10 -07:00
HaraldSchafer 66c275b711
Acados long fast (#22233)
* acados long

* new ref

* SPPEEEEEDDD

* less iterations

* this shouldn't be so high

* reset only essentials

* minimal reset for long mpc

* more cpu usage plannerd

* Use lead mpc even when going to crash

* reset to current state

* Use open loop speed for lead mpc

* 1 iteration is too little for cruise mpc

* add whitespace

* update refs
2021-09-15 19:00:12 -07:00
HaraldSchafer be5ddd25cd
Refactor long (#21433)
* refactor

* needs casting

* tests pass

* fix that test

* refactor in controls

* lets not go crazy

* change of names

* use constants

* better naming

* renamed

* soft constraints

* compile slack variables

* rm git conflict

* add slack variables

* unused

* new edition

* fcw

* fix tests

* dividing causes problems

* was way too slow

* take a step back

* byeeee

* for another time

* bad idxs

* little more cpu for cruise mpc

* update refs

* these limits seem fine

* rename

* test model timings fails sometimes

* add default

* save some cpu

* Revert "little more cpu for cruise mpc"

This reverts commit f0a8163ec90e8dc1eabb3c4a4268ad330d23374d.

* Revert "test model timings fails sometimes"

This reverts commit d259d845710ed2cbeb28b383e2600476527d4838.

* update refs

* less cpu

* Revert "Revert "test model timings fails sometimes""

This reverts commit e0263050d9929bfc7ee70c9788234541a4a8461c.

* Revert "less cpu"

This reverts commit 679007472bc2013e7fafb7b17de7a43d6f82359a.

* cleanup

* not too much until we clean up mpc

* more cost on jerk

* change ref

* add todo

* new ref

* indentation
2021-07-07 19:42:26 -07:00
Adeeb Shihadeh 000bd226aa
Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
2021-02-03 19:57:30 -08:00
Mitchell Goff 608f00f814
Split planner and pathplanner publishing into separate 'publish' methods (#19860)
* Split planner and pathplanner publishing into separate 'publish' methods

* Updated test_following_distance.py

* Combined publish+send_mpc_solution methods
2021-01-26 20:27:24 -08:00
qadmus 72e0ac2de1
cleanup long planner, mpc: unused globals and arguments (#2211)
Co-authored-by: user <email@web.com>
2020-09-21 11:43:28 +02:00
Shane Smiskol 6ff881f789
initialize all messages in 1 line (#1206) 2020-03-05 17:32:52 -08:00
George Hotz b0260dadba selfdrive/controls 2020-01-17 12:48:30 -08:00