Commit Graph

271 Commits (master)

Author SHA1 Message Date
HaraldSchafer 2afe224813
need to do something about the valid (#1713) 2020-06-15 17:20:31 -07:00
Willem Melching 10cb6ab87a dont conflate in ubloxd 2020-06-15 13:31:28 -07:00
Dean Lee 981a166a7c
remove duplite #include (#1697) 2020-06-14 08:31:36 -07:00
Willem Melching ef1c7b6833 Reset stiffness at beginning of each drive 2020-06-12 12:09:32 -07:00
HaraldSchafer 87bbbd4100
Clean mesh3d 2 (#1618)
* seems overkill

* not too extreme

* make linter happy

* try adding accel scale

* some tweaks

* Revert "some tweaks"

This reverts commit 58cec365da650fa653dee91c7a5cbe37b8289908.

* Revert "Revert "some tweaks""

This reverts commit 517108b5b676b4ab31bba92a9eb59afa1b3d3faf.

* stability concerns

* this works

* still works

* ugh sympy is weird, still may be not correct

* comment clean

* comment

* clarify

* fix

* unused
2020-06-10 17:25:48 -07:00
Willem Melching fac0231471 wider margins on stiffness 2020-06-09 17:36:16 -07:00
Willem Melching c18e7da3c2
Write orientation & transform in C++ (#1637)
* locationd at 20hz

* update ref

* bump cereal

* dont modify global state

* add scons files

* ecef2geodetic and geodetic2ecef

* Finish local coords class

* Add header file

* Add orientation.cc

* cleanup

* Add functions to header file

* Add cython wrapper

* y u no work?

* This passes the tests

* test rot2quat and quat2rot

* Teste euler2rot and rot2euler

* rot_matrix

* test ecef_euler_from_ned and ned_euler_from_ecef

* add benchmark

* Add test

* Consistent newlines

* no more radians supported in geodetic

* test localcoord single

* test localcoord single

* all tests pass

* Unused import

* Add alternate namings

* Add source for formulas

* no explicit tests needed

* remove benchmark

* Add release files

* Typo

* Remove print statement

* no access to raw transform matrix

* temporarily add tolerance

* handcode quat2euler

* update ref
2020-06-09 16:44:26 -07:00
Dean Lee 90d97de74d
add function read_db_bytes (#1662) 2020-06-09 13:46:49 -07:00
Adeeb 7666d99694
Remove common/messaging.h (#1635)
* remove common/messaging.h

* release files
2020-06-05 12:46:49 -07:00
Dean Lee 5f58307153
pass subframes_map by refer (#1640) 2020-06-05 12:42:23 -07:00
Adeeb Shihadeh 3463f1165e quick LGTM fixes 2020-06-05 11:29:09 -07:00
Adeeb 367155168a
Update Flake8 config (#1624)
* update flake8 checks

* add E502

* no whitespace warnings

* fix violations

* no W391

Co-authored-by: Jason Young <jason@comma.ai>
2020-06-03 16:13:34 -07:00
Adeeb ab83e48ec4
Add pre-commit hooks (#1629) 2020-06-03 12:54:49 -07: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
Willem Melching a108e7f211 paramsd output at 20 Hz instead of 100 Hz 2020-06-01 13:47:17 -07:00
Adeeb Shihadeh f3dcf861c7 enable flake8 E303: too many blank lines 2020-05-31 17:21:11 -07:00
Adeeb Shihadeh 27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
Adeeb Shihadeh efd5dffb1e enable flake8 E231: missing whitespace after comma 2020-05-31 12:49:11 -07:00
Adeeb 6051061ff8
Flake8 E22X (#1607)
* e221

* e225

* bump opendbc
2020-05-31 00:48:47 -07:00
Adeeb d9bf9f0a40
Enable more flake8 checks (#1602)
* enable some more flake8 checks

* some more quick ones

* bump opendbc

* e401

* e711 e712

* e115 e116

* e222

* e301

* remove that

* e129

* e701 e702

* e125 e131

* e227

* e306

* e262

* W503

* e713

* e704

* e731

* bump opendbc

* fix some e722
2020-05-30 20:14:58 -07:00
Willem Melching 3d08dcc3b2
Run mypy commit hook (#1591)
* run mypy commit hook

* fix mypy errors
2020-05-28 15:05:04 -07:00
Willem Melching 29aaa44740
flake8 in pre-commit(#1583) 2020-05-27 20:33:05 -07:00
Willem Melching bd06434243
pre-commit pylint (#1580)
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
-  pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344

* add pylint to pre-commit and make everything pass

* Remove uncommented stuff

Co-authored-by: J <user@4800.lan>
2020-05-27 20:00:14 -07:00
Harald Schafer 5a841c2856 Revert "better values"
This reverts commit 109ba298b1.
2020-05-27 17:11:27 -07:00
Willem Melching 8ea8f405db add gpsOK flag to liveLocationKalman 2020-05-27 15:14:13 -07:00
Harald Schafer 109ba298b1 better values 2020-05-27 12:16:05 -07:00
HaraldSchafer 7c8d6cbdef
pure init (#1569) 2020-05-26 20:49:14 -07:00
Harald Schafer 00e05bc7d8 needed for stability 2020-05-21 17:47:05 -07:00
Willem Melching ab5af232b2
Use C++ version of SubMaster and PubMaster (#1548)
* add PubMaster & SubMaster

remove 'delete msg'

remove headers

* use constructor to initial all submster

* modify drain sockets

* fix typo in ssconscript.remove lines

no checkValid in loggerd

last modify

handle_message:event->&event

fix type

remove heads

event to auto

* new interface

* api changed

* Revert "use constructor to initial all submster"

This reverts commit 73be7ea46250a325ce41d3a0445e34395a2ae692.

* change to new api

* revert loggerd

* dd

* use new PubSub api

* update to new interface

don't modify loggerd

reset panda

reset opendbc

remove empty lines

* switch to new pubMaster

* update to the new inteface

change

remove error code

. to ->

merge paramsd.cc

update panda

fix typo

simplify

fix typo

* Fix build

* always conflate

Co-authored-by: deanlee <deanlee3@gmail.com>
2020-05-21 16:04:33 -07:00
HaraldSchafer 7ffaff029f
Calib in settings (#1543)
* test test

* yo dawg

* yo dawg 2

* yo dawg 3

* calib in ui

* no pitch and yaw

* no more drive rating

* stricter

* param is no longer a vp

* less wall of test

* less is more

* better language

* cleaner
2020-05-20 19:21:03 -07:00
Willem Melching 8f3e932f96 Locationd fixes 2020-05-20 14:18:28 -07:00
Willem Melching f69f200178 Rename enum 2020-05-19 18:13:11 -07:00
Willem Melching 44484102db Paramsd handle liveLocation not valid and add alerts 2020-05-19 17:00:30 -07:00
Willem Melching d099e09fb7
Handle posenet and sensor alerts in locationd (#1541)
* handle posenet and senor alerts in locationd

* defaults now set in capnp file

* Cleanup c++ version of params learner

* update ref commit
2020-05-19 16:45:20 -07:00
HaraldSchafer 81686547cc
Locationd cleanup (#1517)
* way cleaner take 2

* cleanup

* be more relaxed

* just let it be

* don't drive backwards or upside down

* do this more

* vNED sometyimes invalid

* use reasonble stds

* stability in nonlinear zone

* previous metrics were without publishing
2020-05-17 20:59:53 -07:00
Willem Melching 896bd1b5c7 use base class in car_kf 2020-05-15 15:48:48 -07:00
Harald Schafer 273e81715a xRevert "way cleaner"
This reverts commit a4ffd8c226.
2020-05-15 14:29:34 -07:00
Harald Schafer a4ffd8c226 way cleaner 2020-05-15 14:24:11 -07:00
Willem Melching 2cc218e144 lane kf was not built 2020-05-15 14:22:36 -07:00
Paweł Goliński 8b0ab73fef
Use Conversions in calibrationd (#1511) 2020-05-14 17:56:45 -07:00
Bruce Wayne f8a0eb0f7a make linter happy 2020-05-14 17:38:52 -07:00
Harald Schafer 013e49bf90 too complex 2020-05-14 16:30:00 -07:00
Willem Melching 28bf5d1dd8
Rednose (#1503)
* add rednose

* update rednose

* This compiles

* Add rednose to release

* cleanup

* Extract generated dir as argument

* Add constants.py to release

* Add rednose to dockerfile

* Fix that
2020-05-14 15:36:56 -07:00
Willem Melching add784a7df
remove eigen from phonelibs (#1505) 2020-05-13 16:41:52 -07:00
Adeeb 008700a6b3
LGTM fixes (#1480) 2020-05-09 16:40:43 -07:00
robbederks 71bebc4fca
Ambient light calibration parameters on persist partition (#1429)
* WIP: light sensor persistent params

* fix params writing

* Persistent params argument in C params lib. Fixed symlink flow

* Removed debug prints

* fix boardd

* fix ui

* remove debug print
2020-05-08 19:39:18 -07:00
Adeeb Shihadeh 9670f8fb9f these don't need json 2020-05-04 23:37:07 -07:00
George Hotz d5ca841b0f Revert "Bypass alignment related copy whenever possible (#1443)"
This reverts commit b225016628.
2020-05-04 09:54:05 -07:00
George Hotz e568d3cadc
More LGTM fixups (#1457)
* exclude lib dirs, fix 3 cpp errors

* fix more alerts, exclude mkvparse

Co-authored-by: George Hotz <geohot@gmail.com>
2020-05-02 20:00:41 -07:00
George Hotz 1295cfe06c
Using lgtm.com and fixing found alerts (#1452)
* lgtm in readme, and mac nui fixes

* call super inits in radars

* unused imports, dup lines

* more radars, more unused imports

* pass CP into RadarInterfaceBase

* more fixups

* unused imports

* delete unused lines

* ugh, new unused import

Co-authored-by: George Hotz <geohot@gmail.com>
2020-05-02 12:07:34 -07:00
Dean Lee b225016628
Bypass alignment related copy whenever possible (#1443)
remove blank lines

add file messagehelp.h

remove blank line

simplify

after review
2020-05-01 19:21:00 -07:00
Willem Melching 8db89a6b04 Return avg angle offset 2020-04-28 17:47:04 -07:00
Willem Melching 9159a8d701 Retune stiffness 2020-04-28 15:30:11 -07:00
Willem Melching b2aefd252f Faster sR and stiffness factor 2020-04-27 16:39:27 -07:00
HaraldSchafer 368b65e29b
angles instead of vp (#1421)
* angles instead of vo

* clean migration
2020-04-27 13:58:36 -07:00
Willem Melching f15d55c2b1 Car_kf tuning 2020-04-23 14:48:14 -07:00
Willem Melching 12af1f9175 Refactor locationd message building 2020-04-21 17:13:54 -07:00
Harald Schafer 3aab9facaa mixed up 2020-04-20 14:39:18 -07:00
Harald Schafer 438b03d9f2 no param reads in pipeline 2020-04-20 14:00:06 -07:00
HaraldSchafer 28d8b4abac
Fallback publish calib (#1392)
* if no inputs still publish

* better
2020-04-17 17:05:54 -07:00
HaraldSchafer a18832748c
rely on carstate to be sure (#1363)
* rely on carstate to be sure

* relies on carstate now too

* don't know how else to make this work

* update ref

* clean up hacks

* prev ref was weirdly bad?

* lets try that from my machine

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-04-15 13:14:23 -07:00
Harald Schafer adac0135b3 this wasnt the issue 2020-03-26 17:25:21 -07:00
Harald Schafer 16c84074f2 lane comp 2020-03-26 14:01:36 -07:00
Harald Schafer cc5b9b32bf better nothing than wrong 2020-03-24 11:01:41 -07:00
Willem Melching bb1557f8de Paramsd tuning 2020-03-24 09:40:14 -07:00
Harald Schafer 82f316732a correctness is expensive 2020-03-23 18:02:59 -07:00
Willem Melching a24d08e569 paramsd improvements from branch 2020-03-23 16:57:05 -07:00
Harald Schafer bcbcd96d92 need sqrtsd 2020-03-18 15:23:59 -07:00
HaraldSchafer 628e7e6968
stricter calibration requirements (#1227)
* stricter requirements

* update refg

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-03-13 11:15:58 -07:00
Willem Melching 6be97f6396 Don't build all the kalman filters on the phone 2020-03-12 15:46:38 -07:00
Willem Melching e28832b359
EKF global variable support (#1230)
* Add global variables to kalman filter code

* fix linter
2020-03-12 12:52:31 -07:00
Willem Melching 2abc1a299f Use calibrated reference frame instead of device frame 2020-03-09 13:29:30 -07:00
Willem Melching 01a14400cb Correct reference frame name in car_kf 2020-03-09 12:49:52 -07:00
Willem Melching 01ac9d4722 Use new locationd packet in paramsd 2020-03-09 12:45:04 -07:00
Shane Smiskol 6ff881f789
initialize all messages in 1 line (#1206) 2020-03-05 17:32:52 -08:00
HaraldSchafer 24eeec4e0b
Locationd packet (#1204)
* initial

* add desire

* initial

* some progress

* fill in, untests

* add timestamping

* fixes

* unix timestamp

* no debug print

* cleanre

* normal syntax

* no laika
2020-03-05 15:59:49 -08:00
Harald Schafer a8f2dbe727 unstable init 2020-03-04 18:20:10 -08:00
Willem Melching c9ecab2139
Kalman filter to identify vehicle parameters (#1123)
* full vehicle model simulator

* Add vehicle model

* Model compiles

* Close enough

* Simulation works

* Add fast angle offset

* Tune fast angle offset learner

* Create live service for paramsd

* Better clamping

* Fix rotation matrix

* Cleanup before merge

* move debug script to debug/internal

* revert plannerd change

* switch vehicle model to corolla

* fix valid flag

* Bigger stiffness range

* Lower process noise on steer ratio

* Tuning

* Decimation

* No maha tests
2020-02-26 16:19:02 -08: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
Willem Melching ff91c6f9d4
Run locationd online (#1089)
* add locationd to manager

* add to release files and make linter happy

* Don't ship all models

* Also add locationd.py

* Remove unused import

* Fix import in kalman helpers
2020-02-17 18:07:23 -08:00
HaraldSchafer 8ba5ef3209
Update README.md 2020-02-17 17:10:24 -08:00
George Hotz c4d89699d9 Fix bugged exception in lst_sq_computer. 2020-02-13 16:35:29 -08:00
George Hotz d86c7b7d15 build lst_sq_computer 4 and 5 2020-02-13 16:13:14 -08:00
Comma Device 76b3dca208 more decimation 2020-02-13 23:54:45 +00:00
Harald Schafer 4470407729 better packet info 2020-02-13 11:12:16 -08:00
Harald Schafer 891d6cea94 fix std 2020-02-13 08:38:50 -08:00
Harald Schafer f72044327b passes tests again 2020-02-12 20:28:02 -08:00
Harald Schafer 8257c60f71 misc cleanup 2020-02-12 15:27:13 -08:00
Willem Melching 1716f0b11b Whitespace 2020-02-12 14:32:53 -08:00
Harald Schafer 5c005adc79 fix broken compilation 2020-02-12 14:26:35 -08:00
Willem Melching 7015a4704e Gnss kf whitespace 2020-02-12 14:11:50 -08:00
Willem Melching 965a9ae042 Loc kf whitespace, fix phone accelerometer covariance 2020-02-12 14:08:40 -08:00
Harald Schafer 2b5a8fd7af no magic numbers 2020-02-12 14:05:48 -08:00
Willem Melching 1de5d84a06 Live kf whitespace cleanup, fix covariance phone accel 2020-02-12 13:47:08 -08:00
Harald Schafer 6823971a11 bury scipy 2020-02-12 13:15:57 -08:00
Harald Schafer a8261c8017 bury scipy for now 2020-02-12 13:13:17 -08:00
Harald Schafer 579a9714da no delay buffer for now 2020-02-12 10:31:15 -08:00
Willem Melching 47fd50ca60
Kalman filter compilation cleanup (#1080)
* start cleanup

* create generated dir if not exist

* tests pass!

* everything works again

* also convert live_kf to new structure

* Remove sympy helpers from file list

* Add laika to docker container

* Only build models that are present
2020-02-12 09:40:28 -08:00
HaraldSchafer 5e675bd563
Update README.md 2020-02-11 19:19:42 -08:00
HaraldSchafer 8df126cd65
rough readme draft
First pass at readme
2020-02-11 19:19:25 -08:00
Harald Schafer 871d5b3c99 IMPORTANT CHECK 2020-02-11 17:41:02 -08:00
Harald Schafer 980ef2a930 fixes! 2020-02-11 17:39:08 -08:00
Willem Melching 8d4dda391c loc_local is dead 2020-02-11 15:37:40 -08:00
Harald Schafer 45dea449c5 ignore 2020-02-11 10:29:49 -08:00
Harald Schafer 1a1f1182d7 more fixes 2020-02-10 19:53:43 -08:00
Willem Melching 31794a3d10
WIP: Live localizer (#1074)
* cleanup

* Proper exception handling

* Also check sensor number
2020-02-10 19:06:23 -08:00
Willem Melching 64a2d0c3e9 remove old locationd stuff 2020-02-10 16:20:43 -08:00
Harald Schafer 59728ebca6 fix imports 2020-02-10 15:38:17 -08:00
Harald Schafer dcb14dd830 get ready for live localizer 2020-02-10 15:28:23 -08:00
Harald Schafer 4212b7f91c live kalman 2020-02-07 16:53:50 -08:00
robbederks d0c1f9a864
Added hw status to ublox test scripts and ubloxGnss packet (#1054)
* Added hw status to ublox test scripts and ubloxGnss packet

* Added extra config to boardd

* Implemented new ublox message handler in ubloxd

* Fixed debug text

* Added some explanation and cereal bump
2020-02-05 11:12:03 -08:00
Harald Schafer fe250d6a9e make it converge within 1min 2020-02-03 13:24:33 -08:00
Willem Melching 64feca5692 Fix bias state number in paramsd too 2020-02-03 12:47:04 -08:00
Harald Schafer 1db7b43870 fix 2020-02-03 12:45:12 -08:00
Willem Melching a53577ed35 Remove unused states from locationd yawrate kalman filer 2020-02-03 12:23:41 -08:00
George Hotz f72f78f2b9
Support scons build on Mac (#1034)
* fix clock and add Darwin sconstruct

* it builds, this changes should be simplifications too

* fix boardd build

* that's the real type of EGLClientBuffer

* remove extra lines

* ui needs opencl on phone
2020-02-01 23:36:50 -08:00
Harald Schafer 48b4a57980 needs to be array 2020-01-23 11:08:05 -08:00
Harald Schafer ba6fd511b6 sanity clip every vp 2020-01-22 13:09:03 -08:00
Harald Schafer c32ebcb2c6 simplify and better 2020-01-21 16:37:22 -08:00
Willem Melching ec6e83ca2d Fix locationd_yawrate A matrix 2020-01-21 13:52:45 -08:00
George Hotz fcf8efb826 selfdrive/locationd 2020-01-17 11:39:56 -08:00