* add metric values
Freedom units have weird multiples compared to metric. Modified so that it increments by 10 km/h on long press and 1 km/h on short press, rather than 8 and 1.6 km/h. This mimics stock hyundai behaviour on metric vehicles.
* use is_metric from controlsd
* use actual mph value instead of rounded
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* just use MPC for fcw checking
* thats already bad
* model FCW is always good
* better fcw
* should be good for now
* comment
* linting
* cleaner
* unused
* 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
* 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
* panda
* bring over changes
* dont check car model
* remove comment
* fix typo
* more stuff gated behind long
* not
* not used
* gate that too
* try honda tuning
* clip accel values
* fix up merge
* fix stopping
* add retry logic around knockout
* increase timeout
* keep flipping lead bit
* true for now
* less tuning
* update comment
* 0.1 s is fine now
* merge honda and hyundai knockout
* more lead fields
* another obj bit
* increase timeout
* fix stopping flag
* only lag compensate for braking
* no lead
* less tuning
* only do knockout if not readonly
* try controlling using jerk
* tuning
* try higher stopping rate
* set stopping flag at higher speed
* clip upper jerk when stopping
* remove comments
* tester present 1hz
* use positive start accel
* 1.0 to maybe improve low speed stuff
* no point going over 0
* bump panda
* bump panda
* revert that change
* update ref
* use ISO 15622:2018 limits in PID controller
* allow more for nidec
* limit PID inputs
* CP is not needed
* add GM
* not used
* update ref
* fix honda bosch
* add higher set speed
* freeze when close to cruise
* dont bias this
* higher set speed
* start high
* 2mph might be needed
* better condition
* limit accel windup like this
* wrong name
* dumb controller 'tuned' on a desk
* reduce Ki
* fix prev_time bug
* reset integral on going onroad
* cleanup thermal detection logic
* more minor tuning
* use controls' PI controller
* get rid of bat_temp
* change if once more
* cleanup
* cleanup import order
* add back bat temp in this PR
* move to constructor
* consistency
* add bp
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* retune civic
* seems smooth
* back to normal
* new ref
* fix conflict
* runs
* rm
* accel scale is 4
* toyota should be good
* more cleanup
* fixup
* better naming
* update ref
* deprecated
* sending brake when not enable causes a fault
* rm gas and brake
* unused
* update ref
* acura logic is no more
* wrong before
* revert tuning cleanup
* adress comments
* update ref
* already on master
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* less is more
* small
* remove HUD warnings
* update ref
* safe
* update refs
* update again
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Use first order filter in INDI
* use first order filter in LP as well
* Update selfdrive/controls/lib/lane_planner.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* RC->rc
* division safe
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900
* Enable keeps
* use new packet
* Send keep pulses once per second
* Updated model_replay_ref_commit
* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac
* Bump model_replay_ref_commit
* Bump submodules
* New model: fd904bf9-5dd8-4619-8997-c5668400e078/550
* New model: fd904bf9-5dd8-4619-8997-c5668400e078/950
* No keeps
* Bumped model replay ref
Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
* use canonical language
* filter out when gps signal is flaky
* Update selfdrive/locationd/locationd.cc
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* Mazda CX-9 no steer lockout, and newer cars can use more torque
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* Mazda CX-9 2021 test route
Signed-off-by: Jafar Al-Gharaibeh <to.jafar@gmail.com>
* cleanup
* more cleanup
* don't show community features alert if dashcam only
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* New model: b822ee32-917c-4639-99f8-25be3e6aabad/900
* Enable keeps
* use new packet
* Send keep pulses once per second
* Updated model_replay_ref_commit
* New model: 0f160bf9-1bce-43e6-9785-564b2453eeac
* Bump model_replay_ref_commit
Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
* 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
* untested changes
* set compute_gb
* community feature for good measure
* add code for rolling backwards
* init needs CarParams
* stay in elm mode until carParams is written
* fix tester present bus number
* fix can errors
* fix enableCruise flag
* print when radar disable is done
* move retry logic to controlsd
* move lookup table into carcontroller params
* cleanup brake error values
* make init return
* that should be 1
* floats
* back to no failure handling
* try simplify knockout
* bump panda
* Move flags to panda
* add warnings
* Revert "try simplify knockout"
This reverts commit 4f496245791ea6bd041d4412b96035c6b434b91c.
* add note about LoC.long_control_state
* update ref
* some common changes
* rename to joystick
* add alert and update controlsd to work with joystick
* update joystickd
* Update Joystick readme
* assume we have inputs
* only send gb or steer when engaged_toggle is true
* Update instructions
* fix --ip
* Easier to understand at a glance
* much better
* -a
* receive events and send msg in same loop
* always import
* Update selfdrive/controls/lib/events.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Update selfdrive/controls/lib/events.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* combine logic and clean up
* use argparse
* outdated, and use normal class
* rm
* bit of a refactor
* refactor part 2 / 3
* much better (3 / 3)
* Simplify
* bump cereal and update readme
* capitalize
* Update tools/joystick/joystickd.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Update tools/joystick/joystickd.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* make joystick abstraction class clearer
* use interp, clearer without comments
* no need to use apply_deadzone
* more explicit
* define btns and axes once
* split function by use_keyboard again, but simpler
* we can use handle_button as a reset function
* need to flip sign
* remove
* invert axes map for kb, easier to read the button mapping
* apply changes from review
* new lateral log for debug mode
* bump
* add saturated
* static alert
* joystick_mode
* conditionally subscribe
* Update selfdrive/controls/controlsd.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* move params instantiation
* Spoof active and enabled
* Only allow car to engage
* no startup alert if joystick
* Update controlsd.py
* Should be orange not enabled, green enabled
* no more button states
* should work
* blue
* submaster conflates, so only send when we have an update
* final change
* remove msg
* clean up a bit
sort of clean up
clean up a bit
remove msg
* this was right
* Apply suggestions from code review
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* lowercase
* suggestions from code review
* forgot laptop
* bump to latest
* fixes
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: vanillagorillaa <31773928+vanillagorillaa@users.noreply.github.com>
* Emit correct alerts for LDW Left & Right on Subarus
This change switches the ldw event to use VisualAlert.ldw and
alters all cars to use the prior behaviour for that alert, except
global subarus - they emit the correct warning to the dash
* Remove whitespace, and add comment about not overwriting stock alerts
Co-authored-by: Crispin Flowerday <crispin@theflowerdays.com>
* Update carcontroller.py
* Lane change blocked orange + audible alert
* Actually make it make sound
* Update carcontroller.py
* leave priority the same
* New model: 51a237cd-9c43-4281-9072-802325e6744d/950
* Added new meta outputs and proper interp for plan_t_arr
* Added meta-based trigger for FCW
* No nans in planner, separate alert for model FCW
* Cleaned up plan_t interp logic
* Added empty cameraError alert to fix unit tests
* Use the normal FCW event
* Updated filter logic
* Updated model replay ref
* Moved disengage predictions into their own cereal struct
* Updated model replay ref for new cereal structs
* Apparently this breaks stuff?
* Bumped cereal commit and model replay ref
* Toyota: use FW query for DSU detection
* make sure we have at least some fw responses
* bool
* add test to test_startup
Co-authored-by: Willem Melching <willem.melching@gmail.com>
* Fuzzy match on 3+ ECUs
* reuse dict
* exclude some shared ecus to be sure
* show alert for fuzzy match
* use title case
* require community toggle
* refactor
* do both exact and fuzzy in test script
* update test script
* add fuzz test and lower matches to >= 2
* strip alert length
* sort mismatches
* add fw tests to test_startup
* bump cereal
* steer temp unavailable should be a soft disable
* no mute
* these should be no entries
* sound
* better name
* deprecated
* make vehicleModelInvalid a soft disable
* update refs
* bump cereal
* bump cereal
* update refs
* use ecam in ui
* needs reboot
* use in modeld
* typo
* effective FL is longer in center
* normalize zoom by focal dist
* read param before init
* make 2x as wide
* review comments
* more explicit
* fix camera offset
Co-authored-by: ZwX1616 <zwx1616@gmail.com>
* no heading cost
* live mpc weight config
* need to add stds
* make work on empty data
* no divide by 0
* update refs
* update model replay
* update proc replat
* new model replay ref
* New model: 0bf38240-6b55-42b0-bcfb-da08ff5cd0b9/650
* laneless baby
* hardcode model difference for now
* kale toggle
* kale emoji
* sensible description
* make clear it is not just for ui
* emojis dont work yet
* 9671a8fe-539f-4a04-a163-54571df21139/650
* new model
* only read param on rising edge of ignition
* update toggle text
* fix that
* update refs
Co-authored-by: mitchell <mitchellgoffpc@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* 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>
* Avoid redefining pi, use instead math.pi or M_PI from math.h
* Revert overwriting of the gpsPi variable, which is part the GPS standard.
* Move standard library imports to top, remove standard library import comments.
* higher is out of the training distribution
* Update RELEASES.md
* Update RELEASES.md
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* untested code
* add to manager
* whitespace
* only save on fix
* cleanup
* fix typo
* add to ignored processes
* import tici
* fix param name
* cleanup
* only run offroad
* use itertools
* wait for thermald
* simpler
* fall back to api call
* add param to override timezone
Co-authored-by: Comma Device <device@comma.ai>
* broadcast managerstate
* Remove boardd
* show alert
* only trigger on actually receiving a manager state
* add managerstate to simulation exclude for longitudinal test
* broadcast managerState in process replay
* update alert text
* bump cereal
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* remove publisher
* move to V2
* radard new model
* fix plant
* change packety
* need hack here too
* change to new
* this has been wrong all along
* no more model msg
* subscribe to new model
* not needed anymore
* make work
* need to ignore that too
* should pass tests, needs car test
* fix process replay
* no more poly
* update refs
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* use carla provided frame_number
* fix carla comm issues error
* add minimal W-A-S-D keyboard controls
* fix window from carla docker not showing
* carla 0.9.7 uses `frame`, not `frame_number`
* set safetyModel on health for simulator
* safetyModel check now works with simulator
* ignore ubloxRaw and frontFrame when running sim
* Update selfdrive/controls/controlsd.py
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* added WINDOW flag for optional show carla window
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* start again
* need that too
* this actually works
* not needed
* do properly
* still works
* still works
* still good
* all G without ll
* still works
* all still good
* cleanup building
* cleanup sconscript
* new lane planner
* how on earth is this silent too....
* update
* add rotation radius
* update
* pathplanner first pass
* misc fixes
* fix
* need deep_interp
* local again
* fix
* fix test
* very old
* new replay
* interp properly
* correct length
* another horrible silent bug
* like master
* fix that
* do doubles
* different delay compensation
* make robust to empty msg
* make pass with hack for now
* add some extra
* update ref for increased leg
* test cpu usage on this pr
* tiny bit faster
* purge numpy
* update ref
* not needed
* ready for merge
* try again after recompile
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* Parametrize MIN_CAN_SPEED in car interfaces
* fixed instance in planner.py
* fix typo
* var name change
* changed var name to minSpeedCan for consistency with other uses of CAN in the capnproto files
* added default value to get_std_params, removed unneeded instances from car interface files
* Revert PEP8 autoformat corrections
* update refs
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
* refactor draw model
* rebase master
* correct valid_len
* rename function
* rename variables
* white space
* rebase to master
* e16c13ac-927d-455e-ae0a-81b482a2c787
* start rewriting
* save proress
* compiles!
* oops
* many fixes
* seems to work
* fix desires
* finally cleaned
* wrong std for ll
* dont pulse none
* compiles!
* ready to test
* WIP does not compile
* compiles
* various fixes
* does something!
* full 3d
* not needed
* draw up to 100m
* fix segfault
* wrong sign
* fix flicker
* add road edges
* finish v2 packet
* Added pytorch supercombo
* fix rebase
* no more keras
* Hacky solution to the NCHW/NHWC incompatibility between SNPE and our frame data
* dont break dmonitoringd, final model 229e3ce1-7259-412b-85e6-cc646d70f1d8/430
* fix hack
* Revert "fix hack"
This reverts commit 5550fc01a7881d065a5eddbbb42dac55ef7ec36c.
* Removed axis permutation hack
* Folded padding layers into conv layers
* Removed the last pad layer from the dlc
* Revert "Removed the last pad layer from the dlc"
This reverts commit b85f24b9e1d04abf64e85901a7ff49e00d82020a.
* Revert "Folded padding layers into conv layers"
This reverts commit b8d1773e4e76dea481acebbfad6a6235fbb58463.
* vision model: 5034ac8b-5703-4a49-948b-11c064d10880/780 temporal model: 229e3ce1-7259-412b-85e6-cc646d70f1d8/430 with permute + pool opt
* fix ui drawing with clips
* ./compile_torch.py 5034ac8b-5703-4a49-948b-11c064d10880/780 dfcd2375-81d8-49df-95bf-1d2d6ad86010/450 with variable history length
* std::clamp
* not sure how this compiled before
* 2895ace6-a296-47ac-86e6-17ea800a74e5/550
* db090195-8810-42de-ab38-bb835d775d87/601
* 5m is very little
* onnx runner
* add onnxruntime to pipfile
* run in real time without using the whole CPU
* bump cereal;
* add stds
* set road edge opacity based on stddev
* don't access the model packet in paint
* convert mat.h to a c++ header file (#2499)
* update tests
* safety first
Co-authored-by: deanlee <deanlee3@gmail.com>
Co-authored-by: mitchell <mitchell@comma.ai>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: George Hotz <george@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>