Commit Graph

38 Commits

Author SHA1 Message Date
Adeeb Shihadeh
8971e2c177 longitudinal tests: cleanup old hacks (#30585) 2023-12-02 10:01:28 -08:00
Justin Newberry
4086795c29 Pytest: more post-test path cleanup (#30556)
* test cleanup

* missed this one

* remove that

* static class
2023-11-30 09:55:48 -08:00
Adeeb Shihadeh
a9626f95b6 add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b9911cc74438bee123bc3430da6c31b24b.

* fix pm test
2023-08-20 20:49:55 -07:00
Shane Smiskol
b45dda2d0a Longitudinal tests: test forceDecel (#26765)
* test with forceDecel

* test all combos

* fix

* fix

* fix

* ...

* remove print

* clean up

* just set cruise to 0

* update ref commit

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2023-01-10 14:46:43 -08:00
Shane Smiskol
9ea72b6550 Longitudinal tests: clean up (#26708)
* refactor test_cruise_speed.py

* clean up long tests

* and here
2022-12-05 17:34:57 -08:00
Shane Smiskol
9f80a97eee longitudinal tests: add disabled maneuver (#26470)
* undeclared variable

* run first second disabled

* only test

* test disabled as a new maneuver

* bottom
2022-11-11 14:02:09 -08:00
Adeeb Shihadeh
9a3f468051 experimental mode (#26416)
* experimental mode

* rename param

* red lights
2022-11-08 14:45:01 -08:00
HaraldSchafer
7899fb79c1 More conservative lead policy in e2e long mode (#25684)
* Add params for lead and danger

* fix long params

* E2e passes simple maneuver tests

* Make tests run with e2e long mode

* Slightly more error allowed in e2e mode

* FCW back and populate long source field

* Fix planner name

* FCW still doesnt work

* Slightly less aggressive

* Doesn't need to simulate from stop
2022-09-06 21:52:34 -07:00
Shane Smiskol
fd2de54172 Stock longitudinal: spam resume button when lead starts moving (#24873)
* always log leads, we hide them in ui

* only spam resume when future is > vEgoStarting

* do rest but vw

* vw

* remove comments

* rename to resume

* maintain original button msg rate

* mazda: ensure no resume if cancelling

* same for non-HDA2

* Always run planner if not opLong

* try 0.2

* 0.1 should be pretty safe

* add test for resuming

* fix test

* stricter test, speeds[-1] is 0.14 when starting here

* no walrus

* fixup mazda cc

* remove extra import
2022-07-07 00:24:03 -07:00
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
Adeeb Shihadeh
3e9cb7fa12 remove community features toggle (#23214)
* remove community features toggle

* bump cereal

* little more

* update refs
2022-01-24 14:49:47 -08:00
HaraldSchafer
b3b45c8d29 Add cost to long plan change for smoother lag comp (#22923)
* add plan changing cost

* fix compile

* set weights

* try this cost

* horizon problem

* looks pretty good

* update refs

* update refs

* smoother plan changes
2021-11-16 17:57:55 -08:00
HaraldSchafer
04cf12cb00 ACADOS fix non-convergence when long_plan changes (#22495)
* debug commit

* cleanup

* some indexing bugs

* need more its

* BALANCE is way better it seems

* fix test

* this converges in 2000segs

* new ref

* less cpu
2021-10-10 00:05:29 -07:00
HaraldSchafer
9ab09f5ae9 Retune long mpc (#22445)
* first try

* looks decent

* finalize retune

* back to 3 its

* may need 4 still

* misc cleanup

* new ref

* SPEEEED

* new ref
2021-10-06 09:37:53 -07: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
f0be9a57ac Dont run plannerd for long tests (#22260) 2021-09-16 20:45:13 -07:00
HaraldSchafer
2c04176b5f Add stopping for stopped car tests (#22250)
* add stopping for stopped car tests

* too extreme
2021-09-16 20:05:09 -07:00
HaraldSchafer
9e8d99b530 Extra longitudinal unit tests (#21601)
* linter needs this

* unit test radar override
2021-07-14 12:38:47 -07:00
HaraldSchafer
234971203b Simplify longitudinal tests (#21337)
* first pass

* passes!

* little more cleanup

* little more

* fix sim

* remove more plot stuff

* fix crash check

* fcw

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-24 21:03:18 -07:00
Willem Melching
ae094042ad add putBool/getBool wrappers to cython params class (#20611)
* add putBool/getBool wrappers to cython class

* use new API

* some more puts

* fix mockparams arguments

* add get_bool to MockParams

* typo
2021-04-07 15:36:37 +02:00
Willem Melching
5a3b511306 Manager cleanup (#20231)
* move manager in folder

* inital refactor

* call start

* small cleanup

* add comments

* use self.signal()

* order shouldnt matter

* newlines

* add helpers

* newlines

* add process config

* split out build part of manager

* this should fix most tests

* no sensord on pc

* dont start athena

* remove comment

* fix old athena test

* fix inject model

* fix test car models

* should be not none

* fix helpers exitcode

* ignore manage_athenad

* Use time.monotonic()

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* combine init, remove spinner

* move manager test

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-05 11:03:23 +01: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
Adeeb Shihadeh
c114316d94 GPS malfunction alert (#19756)
* GPS malfunction alert

* fix process replay

* fix long tests

* fix long tests again
2021-01-14 14:45:10 -08:00
Adeeb Shihadeh
59d7c5e64a move to github container registry + CI speedup (#19621) 2020-12-31 14:57:01 -08:00
ZwX1616
d8fea41b2a use enabled flag from controlsState instead of carState (#2518)
* use enabled from controls instead of carstate

* update process replay

* rm

* fix long test

* update reff

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-12 17:30:33 -08:00
Adeeb Shihadeh
47c21f10f5 grey panda is unsupported (#2458) 2020-11-03 19:56:25 -08:00
qadmus
cba53957bd Fix grade force in test_long plant (#2225)
Co-authored-by: user <email@web.com>
2020-09-28 11:54:48 +02:00
Willem Melching
843a64c72f Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
2020-06-02 16:29:32 -07:00
Adeeb Shihadeh
ebed2d1dcc enable flake8 E251: unexpected spaces around keyword / parameter equals 2020-05-31 17:34:47 -07:00
Adeeb Shihadeh
efd5dffb1e enable flake8 E231: missing whitespace after comma 2020-05-31 12:49:11 -07:00
Adeeb
e8cb6ea06a Abstract common events + event cleanup (#1129)
* too many if

* unused

* whitespace

* key

* sefldrive/car/*

* no more gctx

* lower

* start abstracting common events

* all cars

* start small

* all cars

* reverse gear

* wrongCarMode

* wrongGear

* espDisabled

* steerUnvailable

* make linter happy

* c isn't used

* fix esp_disabled in VW

* update ref

* more red

* more cleanup

* fix subaru

* update ref
2020-02-20 16:22:25 -08:00
George Hotz
c42e2ecc50 manager runs on Mac, and other openpilot for PC fixes (#1037)
* use the openpilot/persist directory on PC

* manager runs on mac

* sim runs w/o carla

* fix params location in test

* that rmtree can fail and it's okay

* refactor params clear functionality

* set PARAMS_PATH
2020-02-02 12:15:02 -08:00
ZwX1616
6322a275d6 dmonitoringd (#1016) 2020-01-30 19:12:44 -08:00
Willem Melching
25f799bb8e Fix linter 2020-01-27 13:50:59 -08:00
Willem Melching
413a432b13 Speed up longitudinal tests and add retry 2020-01-27 12:35:43 -08:00
George Hotz
c0bfbc12c7 selfdrive/test 2020-01-17 11:16:14 -08:00