Commit Graph

247 Commits

Author SHA1 Message Date
wolterhv 56f48a03bc Replace hardcoded values for Pi (#20235)
* 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.
old-commit-hash: 93911a7dbedcd06383cb9fea94ed78133442f687
2021-03-03 14:22:06 -08:00
Marius Larsen 3879b9dfc8 Fxing some typos in vehicle_model.py comments (#20220)
old-commit-hash: e998d6d93f786733468756d51df2d11494389d7c
2021-03-03 11:40:22 +01:00
Willem Melching ddc95515d0 only allow INDI wind down on user override (#20080)
old-commit-hash: 280192ed1443f112463417c2d815ea8ee2762fbd
2021-02-23 16:39:40 -08:00
HaraldSchafer e88b2ecfeb Always linearize, better way of compensating for lag (#20133)
* need to divide diff by 2

* simple linearization seems to work best

* update refs
old-commit-hash: 8df76b398021827c18b19a4d1437b671dd859223
2021-02-23 12:56:12 +01:00
HaraldSchafer df9381abd4 Do not allow engagement outside of training distribution (#20112)
* 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>
old-commit-hash: a0cdacbb2ad6a26012ca374723539e838488dcc5
2021-02-18 17:16:20 -08:00
Adeeb Shihadeh 05eb44115e cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65ebd01abfa8493ae12c9e6b14f7ada976.

* panda state

* camera stuff

* start deg

* most is building

* builds

* planner + controls run

* fix up paramsd

* cleanup

* process replay passes

* fix webcam build

* camerad

* no more frame

* thermald

* ui

* paramsd

* camera replay

* fix long tests

* fix camerad tests

* maxSteeringAngle

* bump cereal

* more frame

* cereal master
old-commit-hash: 312b681a46b8153314a8420611b6479dd6f70dfc
2021-02-16 21:39:32 -08:00
Igor bebc21ca09 Fix division by zero in lateral_planner.py (#20071)
* Fix division by zero

* Change fix logic
old-commit-hash: 8f9ee10b8a1aeeac26c5b269c1137984b172b378
2021-02-16 11:43:11 +01:00
HaraldSchafer 2f66f98523 fix low speed lateral (#20053)
* fix low speed lateral

* update ref

* fix failing CI jobs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 0c900c8ce11409ddf574f5b7ff7bbab8b5536c36
2021-02-09 15:36:58 -08:00
HaraldSchafer 5092214913 Different lag comp (#20024)
* more sensible

* different names for different segs

* new ref

* this is checked somewhere
old-commit-hash: c3707328f51c4cec051b375a195b41d7456d27a6
2021-02-05 14:01:22 -08:00
HaraldSchafer 61b3840c7f camera offsets (#20022)
* camera offsets

* runs on pc so is 0 in proc replay
old-commit-hash: bad68e466316a75f3c7b34c4e6f911f33e01b1c0
2021-02-04 15:50:53 -08:00
Adeeb Shihadeh 966945880b Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
old-commit-hash: 000bd226aa9902da01e6010bf26762fca2c20df0
2021-02-03 19:57:30 -08:00
HaraldSchafer f4e94524d4 Remove curv factor (#20011)
* cleaning crew

* need that to match

* smooth factor

* that didn't really work

* closer to previous

* new ref

* new names
old-commit-hash: 61a4e3e66179c731aee9d631675c23936d7da7fb
2021-02-03 17:51:21 -08:00
HaraldSchafer 8fc39f52c8 Deal with long lag compensation (#20004)
* add hack for big lags

* wrong bracket

* new pathplanner values
old-commit-hash: 3f2b42b4e3527b9575f0a385079bfa8869b12581
2021-02-02 17:09:01 -08:00
HaraldSchafer 5794b3a053 not relevant at high speed (#19946)
* not relevant at high speed

* update ref
old-commit-hash: d1b31d3697d1169fed8c0d2330d48f57fdb07d15
2021-01-27 20:28:17 -08:00
Mitchell Goff d28831dbab 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
old-commit-hash: 608f00f81485c674263eb403c201934e1b904fe4
2021-01-26 20:27:24 -08:00
HaraldSchafer b3287a405b important for indi (#19926)
* important for indi

* dont change that in this pr
old-commit-hash: d6283520980554454f7fb924f3c0f0bf63c52c8a
2021-01-26 14:26:27 -08:00
Willem Melching 9d1220b117 manager.py broadcast process states (#19880)
* 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>
old-commit-hash: b6a220a133640c24fc596f6c3b181f5d0dd921a2
2021-01-26 14:49:55 +01:00
Shane Smiskol d328f2a928 INDI: Time constant is used based on breakpoints (#19858)
* Time constant is used based on break points

* no need for alpha class variable
old-commit-hash: 76cf50066936e60a9a6c0fd144d48f33728e12c6
2021-01-21 15:14:50 +01:00
HaraldSchafer 5c2c6691b2 remove old model packet (#19769)
* 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>
old-commit-hash: 124100d0fa42485edaf86cb25f77f27e8917eed1
2021-01-19 17:15:16 -08:00
HaraldSchafer 7af6dab1e8 Cleanup pathplanner (#19827)
* no divide by 0

* misc cleanup

* final fixes

* remove last polys

* new ref

* fix test

* update again
old-commit-hash: 0e49919ab99b9cb85c5df271de5145e388d756ad
2021-01-19 00:02:53 -08:00
HaraldSchafer 94b1be1ec9 back to open loop (#19781)
old-commit-hash: bf5332c4918c2340126cada543b9068fea731716
2021-01-16 13:43:30 -08:00
Harald Schafer 110605a723 fix tests
old-commit-hash: 61b7527b95d7a573a8c11ff8c260a4f01cc15113
2021-01-14 21:46:01 -08:00
Harald Schafer f9b9253a6d fix init
old-commit-hash: 90216ce620acce2f045221348dd292652ec20396
2021-01-14 20:52:39 -08:00
HaraldSchafer c6d9b9565a Mpc rework2 (#19660)
* 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>
old-commit-hash: 158210cde8e689daa04bcaa1e502727cf7bfddb6
2021-01-14 18:43:50 -08:00
Adeeb Shihadeh a633eaf660 GPS malfunction alert (#19756)
* GPS malfunction alert

* fix process replay

* fix long tests

* fix long tests again
old-commit-hash: c114316d94d91f09a759f575ed915436425dd177
2021-01-14 14:45:10 -08:00
Igor b1c6f804e5 Add indi breakpoints (#19664)
* Added BP, V to latcontrol_indi

* hyundai

* toyota

* Tests for INDI outerLoopGain
old-commit-hash: 0a65e87394f071a18cd377ab81391a48729d1fa0
2021-01-07 15:55:46 +01:00
Willem Melching e0f2111061 Rebuild acado and add scons command to regenerate mpc (#19685)
* rebuild acado and add scons command to regenerate mpc

* update scons help
old-commit-hash: 7c43a60bda6c129c0c5a34cdb7fe74d8243729c5
2021-01-07 15:18:23 +01:00
Willem Melching 4daa6f05cf Move all CarControllerParams into values.py (#19663)
* toyota

* use scale from values.py

* nissan

* subaru

* honda

* gm

* toyota combine into CarControllerParams

* nissan refactor

* chrysler refactor

* mazda refactor

* hyundai refactor

* subaru refactor
old-commit-hash: e4cf43c6fcc2f442318df815fdc38fb26a74bdb7
2021-01-06 11:20:44 +01:00
Adeeb Shihadeh 6913b7d763 remove old event
old-commit-hash: 389649d6ac67d2f55b2e0816c3c1d1f43970f925
2020-12-21 15:55:30 -08:00
Adeeb Shihadeh 91fc6d21a0 don't go onroad if internet needed (#19572)
old-commit-hash: 41b31a17566e0786b58ac0ac21cea44bc06985d1
2020-12-21 15:13:20 -08:00
Willem Melching 455145dd34 remove commIssueWarning from events
old-commit-hash: 776a67ad2e8d6141c91ed520b2fff621ab1df94f
2020-12-17 22:25:22 +01:00
Shane Smiskol aa326065b8 don't wait for 4 seconds before it starts steering again after steering fault (#19520)
old-commit-hash: 89a600884138c59397670f2513bc5d0ba0ebc2b1
2020-12-16 12:24:42 -08:00
Igor 8bc42f4aff Parametrize startingBrakeRate (#19511)
* Parametrize startingBrakeRate

* new ref_commit
old-commit-hash: 717bc747c32114df13e8334eeb591f9ca289a034
2020-12-16 20:58:07 +01:00
Adeeb Shihadeh 3e6abdd8bd oneplus deprecation (#2748)
* oneplus deprecation

* lowercase

* too long

* no udpates
old-commit-hash: 6a151dcd9c9f988301368312a7969aa9f413d346
2020-12-12 12:51:12 -08:00
Igor faa4c57ee1 Parametrize stoppingBrakeRate (#2745)
* Parametrize stoppingBrakeRate

* ref_commit updated
old-commit-hash: d3c2a0e6c1e898b08570dd0a9b1eef12934f6c9a
2020-12-11 16:30:35 +01:00
Igor 95bb79c51c Parametrize MIN_CAN_SPEED in car interfaces (#2684)
* 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>
old-commit-hash: 093456cc40f2bafac6a36491cac8e57db42ee9e5
2020-12-04 11:09:34 +01:00
Willem Melching 2658685895 fix typo in event name
old-commit-hash: d5a806e564afcc1b4de0b934a6073e4695cc7f96
2020-12-03 17:07:03 +01:00
Willem Melching 2ddbb49742 Add event for commIssueWarning
old-commit-hash: 93e90898ddbd1bf85fd5809a43227f07cd15f1db
2020-12-03 16:54:54 +01:00
Adeeb Shihadeh 238b9a35c7 don't need that
old-commit-hash: 9d18b45cd0153a929cc198938ce24b74b069a6ec
2020-11-24 22:47:44 -08:00
Willem Melching 69440d8037 Typing experiments (#1633)
* add more types

* car

* no abc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 40acdc4524eb5d3365c363ac7441daf407f4adbd
2020-11-24 22:45:37 -08:00
George Hotz 8a35cce75f remove model lag warning, leave red alert at 20
old-commit-hash: 160fd207a5087754408d829f39b24d1f1c508df2
2020-11-24 13:02:56 -08:00
Adeeb Shihadeh d2710f2fcf model lag warning (#2608)
old-commit-hash: 2d7a194f9fd5e5b26b55e3aa9e33efc95c97be6e
2020-11-23 13:42:18 -08:00
Harald Schafer a8f5a9834a update comments
old-commit-hash: 69077145100242a72d9725e04b3d7808300f8abb
2020-11-12 10:21:27 -08:00
HaraldSchafer 008f37c749 Torch model (#2452)
* 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>
old-commit-hash: 08846b5c0ec3a5299c8cb73904da15a18d3aaccf
2020-11-11 20:31:46 -08:00
HaraldSchafer b7ae2e9e85 Fix lane width (#2520)
* use prob modifiers in lane width calc

* update ref

* update ref
old-commit-hash: f7d1ace8836e02689d344561586e966758e99d23
2020-11-10 21:12:36 -08:00
HaraldSchafer 902d107af1 cleanup planner (#2519)
* no reason for external function

* dont need d_poly for this test

* dont copy float

* typo
old-commit-hash: 39f27f9d6a0d486e9d965fb2f3eb28caa12476a0
2020-11-10 14:42:43 -08:00
Shane Smiskol a600b9c0e2 some laneplanner updates (#2505)
old-commit-hash: dca6f61db94705e4d15db93d5fa26e359f41ac57
2020-11-09 01:15:29 -08:00
HaraldSchafer 4bd3ffa94b No uncertain ll (#2495)
* initial, needs tune

* support metrics

* a little more

* wrong type

* fixup

* update refs
old-commit-hash: 26583b1b85cfe496300ab61310c3489b542ecead
2020-11-06 21:01:16 -08:00
HaraldSchafer fcb995e19c set y too (#2448)
* set y too

* new ref
old-commit-hash: e6668625fa8c0dec0277a87ce3d5bfad4a1a55a6
2020-11-04 19:52:05 -08:00
Adeeb Shihadeh f25cec394e grey panda is unsupported (#2458)
old-commit-hash: 47c21f10f598639307994392e96f4d9293b295c7
2020-11-03 19:56:25 -08:00