Commit Graph

704 Commits

Author SHA1 Message Date
Kacper Rączy
80bc61dc6c controlsd: use livePose (#33283)
* Pose calibrator

* Fix static analysis

* Fix static

* Fix test_latcontrol

* Fix test_latcontrol

* Update services in process replay

* Fix static

* Matmul not mul

* Add assertion

* Move pose calibration to data_sample

* Update ref commit

* Remove llk from cycle alerts

* Deprecated nogps event

* Switch power_draw to lp

* Bring back noGps alert

* Add handling code back

* get_bool

* Bring inputsok back
old-commit-hash: 9734015bbb
2024-08-13 21:11:16 -07:00
Shane Smiskol
7ce33fbe2b process replay: use zst (#33138)
* test

* update refs to zst

* update
old-commit-hash: dfd387520e
2024-07-30 01:46:03 -07:00
Kacper Rączy
7ea8d9e91d torqued: use livePose (#33136)
* Use livePose

* Replace it in process replay

* Add liveCalibration to messages

* Update ref commit
old-commit-hash: 86d8d1d996
2024-07-29 20:20:31 -07:00
Kacper Rączy
3740693956 paramsd: use livePose (#33099)
* Use livePose instead  of llk

* Update process replay sockets

* Fix import

* Fix calib

* Fix field name

* Dont store device_from_calib

* Update ref commit
old-commit-hash: 84cff4fc03
2024-07-29 19:51:21 -07:00
Kacper Rączy
130d0d2e3a process_replay: regenerate locationd logs (#33134)
* Filter out non-relevant services in most_messages_valid check

* Set as comprehension

* Update segments

* Update ref commit

* New check for hyundai2
old-commit-hash: 6e185f4eea
2024-07-29 17:12:05 -07:00
Harald Schäfer
28a91c4e23 livePose log (#32868)
* add livepose

* Formatting

* Add to sevices

* Update locationd to publish livePose

* Remove fields and increase decimation

* Fix field indices

* Remove the line

* Add livePose to pubmaster

* Fix llk decimation

* Update ref commit

* XYZ measurements instead of lists

* Update locationd

* Update ref commit

* Lower the qlog size in test_onroad

* Update lower and upper boundary

---------

Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
old-commit-hash: 996bced674
2024-07-17 16:17:23 -07:00
Shane Smiskol
bb67139ca7 torqued: check steer override to current time (#32963)
* lat active/steer override: check up to now

* lint

* Update ref_commit
old-commit-hash: b247c3caaa
2024-07-10 17:25:39 -07:00
Shane Smiskol
8e3b18c3a0 Ford: use more reliable gear message (#32886)
* todo

* nope

* not this one

* yep

* passes

* clean up

* not used!

* oop

* update refs
old-commit-hash: 7de2aac3c9
2024-07-02 22:22:56 -07:00
Harald Schäfer
47d5601d8a long control: new API (#32706)
* Simplify long control

* Seperate

* Rename

* Try new api for toyota

* rm v_pid everywhere

* No speed in reset

* 0 is better default

* unassigned variable

* Update other cars

* Update gm

* SIMPLIFY

* simplify more

* fix API boundry

* Fix stopping bug

* Small fixes

* Update ref
old-commit-hash: bc303df6a0
2024-06-14 00:08:58 -07:00
Shane Smiskol
272216b2a8 remove uiPlan (#32721)
* remove uiPlan from ui

* remove publishing

* Update log.capnp

* Update services.py

* no uiPlan here

* Update ref_commit
old-commit-hash: 684209e077
2024-06-11 21:31:10 -07:00
Harald Schäfer
d9fb61da16 Long control: Double delay is super complicated (#32694)
* Double delay is super complicated

* No more upper bound

* DEAD

* Update ref
old-commit-hash: 965415135a
2024-06-10 22:29:17 -07:00
Vivek Aithal
cf8885b596 [torqued] Reduce friction for some Hyundai cars (#32578)
* reduce friction coeff for ev6 and ioniq6

* Update ref

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
old-commit-hash: 8a4bfcf5b4
2024-06-04 11:10:04 -07:00
ZwX1616
a51790da10 dmonitoringd: set invalid if missing dependence(s) (#32569)
* no step but still send

* no this

* update diff
old-commit-hash: a16fbdae38
2024-05-29 15:43:55 -07:00
ZwX1616
bf7724d30b dmonitoringd: simplify main loop (#32517)
* one call does all

* no need

* update etst

* filename

* dbf5b05ff480145a79b5941e360d0698b70979cd
old-commit-hash: 204219695f
2024-05-23 20:14:28 -07:00
ZwX1616
bd0cabd88d Update process replay refs with updated submaster alive behavior (#32508)
* add cereal

* update cereal

* cereal master

* lol really

* ref com

* ref
old-commit-hash: 749455c91d
2024-05-22 15:47:11 -07:00
Shane Smiskol
ee03d13529 card: process that abstracts car interface and CAN (#32380)
* format card

* standalone process

* no class member CS, there's no point

also can be confusing; what else could be using this?

* rename CoS

* Update selfdrive/controls/controlsd.py

* never works first time :D

* canRcvTimeout is bool

* hack

* add cpu

* see what testing closet comes up with

* first

* some clean up

* support passable CI, fix test models

* fix startup alert

* process replay changes

* test_fuzzy

* gate carOutput valid on carControl valid

* we should publish after we update carOutput

* controlsd was using actuatorsOutput from 2 frames ago for torque, not the most up to date

* check all checks for carControl in case controlsd dies

* log more timestamps

* more generic latency logger; needs some clean up

latency_logger.py was difficult to understand and modify

* card polls on can and carControl to get latest carControl possible

* temp try to send earlier

* add log

* remove latencylogger

* no mpld3!

* old loop

* detect first event

* normal send

* revert "card polls on can and carControl to get latest carControl possible"

how it was is best

* sheesh! update should be first

* first timestamp

* temp comment ( timestamp is slow :( )

* more final ordering, and make polling on/off test repeatable

* Received can

* new plot timestamps

* clean up

* no poll

* add controllers (draft)

* Revert "add controllers (draft)"

This reverts commit e2c3f01b2fadcff74347bac90c8a5cc1ef4e27b3.

* fix that

* conventions

* just use CS

* consider controlsd state machine in card: not fully done

* hmm it's just becoming controlsd

* rm debugging

* Revert "hmm it's just becoming controlsd"

This reverts commit 534a357ee95bec4ed070667186af55d59421bbc7.

* Revert "just use CS"

This reverts commit 9fa7406f30c86200f20457f7b9ff95e731201bf9.

* add vCruise

* migrate car state

* Revert "migrate car state"

This reverts commit 4ae86ca163c6920070f410f608f7644ab632850b.

* Revert "add vCruise"

This reverts commit af247a8da41c3626ada4231b98042da1a1ae4633.

* simple state machine in card (doesn't work as is)

* Revert "simple state machine in card (doesn't work as is)"

This reverts commit b4af8a9b0a2e17fdfc89d344c64678ef51305c24.

* poll carState without conflate

* bump

* remove state transition

* fix

* update refs

* ignore cumLagMs and don't ignore valid

* fix controls mismatch; controlsd used to set alt exp

* controlsd_config_callback not needed for card

* revert ref temp

* update refs

* no poll

* not builder!

* test fix

* need to migrate initialized

* CC will be a reader

* more as_reader!

* fix None

* init after publish like before - no real difference

* controlsd clean up

* remove redundant check and check passive for init

* stash

* flip

* migrate missing carOutput for controlsd

* Update ref_commit

* bump cereal

* comment

* no class params

* no class

* Revert "no class"

This reverts commit 5499b83c2dcb5462070626f8523e3aec6f4c209d.

* add todo

* regen and update refs

* fix

* update refs

* and fix that

* should be controlsstate

* remove controlsState migration

CoS.initialized isn't needed yet

* fix

* flip!

* bump

* fix that

* update refs

* fix

* if canValid goes false, controlsd would still send

* bump

* rm diff

* need to be very careful with initializing

* update refs
old-commit-hash: 71f5c441fe
2024-05-21 01:18:10 -07:00
Shane Smiskol
b3fc3f25ce process replay: regen routes (#32464)
* regen

* regen

* update

* undo

* update refs

* fix

* real fix

* test

* test2

* test3

* stash

* Revert "stash"

This reverts commit bf6765f526b48426f49a4b29c4042097f57fc4b0.

* rk.lagging can not be trusted. BODY segment has radarFault while modelV2 is not valid, causing radarState to not be valid

* order

* update refs again

* we never logged carOutput!

* bump

* add back checks
old-commit-hash: 220fcc1675
2024-05-19 01:07:12 -07:00
ZwX1616
1f9bc952bf dmonitoringd: don't check for buttonEvents or vCruise change (#32454)
* drop check for carState.buttonEvents

* 100% people not use this

* huge oof

* ref comit

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 8e87655a12
2024-05-17 21:38:03 -07:00
Shane Smiskol
97dc134a42 card: create pedal pressed event (#32417)
* card: create pedal pressed event (#32393)

* move pedalPressed to card

* rm

* needs to be a builder

* move these

* clean up

* reader later

* Update ref_commit

* moved to card
old-commit-hash: d0d44a51a0
2024-05-13 16:18:55 -07:00
Shane Smiskol
4c7c4272d0 Revert "card: create pedal pressed event" (#32414)
Revert "card: create pedal pressed event (#32393)"

This reverts commit 05be56def1f1fdddb761291e1a40cce459fc7d36.
old-commit-hash: 9287a69624
2024-05-13 14:25:22 -07:00
Shane Smiskol
48bb3caaac card: create pedal pressed event (#32393)
* move pedalPressed to card

* rm

* needs to be a builder

* move these

* clean up

* reader later

* Update ref_commit
old-commit-hash: d18da895d3
2024-05-13 14:15:26 -07:00
Shane Smiskol
4a0b3c8b64 CarInterface: move stateless, common car events to car interface (#32394)
* move stateless, common car events to car interface

* try to reduce process replay diff a bit

* Revert "try to reduce process replay diff a bit"

This reverts commit b12798deabea67c5a636d6e70e80a3c21c7225ff.

* update refs
old-commit-hash: 3dfb6d7931
2024-05-13 12:50:42 -07:00
Shane Smiskol
4b0149cb14 Events: use sorted container (#32395)
* use SortedList

* Update ref_commit
old-commit-hash: d98ab4ddb1
2024-05-13 12:16:53 -07:00
Jason Young
2b755e330d VW: raise minimum steering speed to fix a fault (#31450)
* VW: Steer to zero, for large values of zero

* ah, the joy of floating point

* comment, style

* actually fix floating point issue

* follow PlatformConfig refactor

* this check is not useful after PlatformConfig

* don't really need that

* work around docs assert

* little better

* one comment

* update refs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 93fa207c5c
2024-05-08 14:38:08 -07:00
Shane Smiskol
ad662f6f95 Update ref_commit
old-commit-hash: 2e5f2d208c
2024-04-17 23:50:42 -07:00
ZwX1616
c741dca04c Toggle to always enable DM (#32205)
* permanent

* param

* correct behavior

* toggle

* need trans

* ref_commit

* translate for chs/t

* disable on P and R

* read
old-commit-hash: 1d05704d27
2024-04-17 12:56:37 -07:00
Shane Smiskol
3c1694ec56 VW: check cruise control (#32049)
* VW: check cruise control!

* fix that

* fix that

* Update ref_commit
old-commit-hash: 493c81076b
2024-03-29 20:56:40 -07:00
Cameron Clough
6f9c3f88cd Ford: handle metric cruise speed (v2) (#31463)
* Ford: handle metric cruise speed (v2)

**Description**

I found a signal which appears to match the IPC "Show km/h" setting.
Requires https://github.com/commaai/opendbc/pull/1010.

**Verification**

- [ ] Test in car and confirm that toggling the "Show km/h" setting does
  not result in the cruise speed shown in openpilot being incorrect.
- [ ] Test in a non-English (metric) car.

* not present on Q4

* fix freq

* test

* Revert "test"

This reverts commit 5e3a9f6df126d51685157de1e52bd6695db40fac.

* Update ref_commit

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: b59ae50961
2024-03-21 16:19:59 -07:00
Justin Newberry
b899592b18 cars: platform enums -> prepend brand name (#31927)
* with brand name

* migrate

* Fix

* fixes

* more

* passes

* fix

* fix the doc

* collects

* these too

* more stuff

* body exception :/

* more

* hardcode i guess

* update ref

* toyota

* more toyota

* and here

* final!

* fix notebooks and ccs

* move this here
old-commit-hash: b0eb3ba4f4
2024-03-19 17:29:50 -07:00
thenhnn
77d6d1a8f1 PlatformConfig: automatically get platform_str from the enum name (#31868)
* get platform_str from the enum name

* fix tests

* add migration table

* remove impossible todo

* Add link to PR in MIGRATION table

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

* Remove useless brand name comments and rename RAM_1500 to RAM_1500_5TH_GEN

* rename RAM_HD to RAM_HD_5TH_GEN

* rename references to RAM_HD and RAM_1500

* change "mock" to "MOCK" and rename torque data of Nissan Leaf 2018 IC

* remove MOCK from fingerprints.py

* change hard-coded car model in test_can_fingerprint.py/test_timing

* migration

* update ref

* space

* prius

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: justin newberry <justin@comma.ai>
Co-authored-by: Justin Newberry <jnewberry0502@gmail.com>
old-commit-hash: 489528dcae
2024-03-19 11:16:02 -07:00
Adeeb Shihadeh
3bf3f4bf78 remove pedal (#31903)
* remove pedal

* bump panda

* fix

* update refs
old-commit-hash: fa12a67228
2024-03-17 22:42:49 -07:00
Shane Smiskol
7ffcd0d13d Honda Nidec: show distance bars (#31854)
* show lines nidec

* lead

* Update ref_commit
old-commit-hash: 7d0f234398
2024-03-13 01:53:15 -07:00
Shane Smiskol
f3414250a3 Move personality to controlsState (#31855)
* start at param

* start by sending personality

* change to personality

* POC: button changes personality

* what's wrong with this?

* fix

* not really possible but fuzzy test catches this

* there's always a typo

* dang, we're dropping messages

* clean up

* no comment

* bump

* rename

* not all cars yet

* works but at what cost

* clean up

* inside settings

* write param so we save the distance button changes

* setChecked activates buttonToggled and already writes param!

* don't need this, we update from longitudinalPlan on changes

* some clean up

* more

* ui

* allow some time for ui to receive and write param

* plannerd: only track changes in case no ui

* Revert "plannerd: only track changes in case no ui"

This reverts commit 2b081aa6ceb92c67a621b74592b2292756d29871.

* write in plannerd as well, I assume this is atomic?

* don't write when setting checked (only user clicks)

* better nane

* more

* Update selfdrive/controls/lib/longitudinal_planner.py

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>

* doesn't write param now

* ParamWatcher is nice

* no debug

* Update translations

* fix

* odd drain sock proc replay behavior

* vanish

* Revert "odd drain sock proc replay behavior"

This reverts commit 29b70b39413e1852bb512155af6b6a94a5bd9454.

* add GM

* only if OP long

* move personality to controlsState, since eventually it won't be exclusive to long planner

more

bump

* diff without translations

* fix

* put nonblocking

* CS should start at up to date personality always (no ui flicker)

* update toggle on cereal message change

* fix

* fix that

* ubmp

* mypy doesn't know this is an int :(

* update translations

* fix the tests

* revert ui

* not here

* migrate controlsState

* Revert "migrate controlsState" - i see no reason we need to test with
any specific personality

This reverts commit 6063508f2df1a5623f113cda34dcd59a1f4b2ac9.

* Update ref_commit

---------

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
old-commit-hash: 29e55f99a5
2024-03-13 00:57:57 -07:00
Shane Smiskol
4643f53ffd Update ref_commit
old-commit-hash: 1e86269ab7
2024-03-11 23:04:32 -07:00
Jason Wen
583c80a417 GM Longitudinal: Display personality in instrument cluster (#31801)
* GM Longitudinal: Display personality in instrument cluster

* Correct value

Co-authored-by: Shane Smiskol <shane@smiskol.com>

* update refs

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: 3d7595dfe3
2024-03-11 13:31:01 -07:00
Shane Smiskol
632fd1d20b longitudinal personality: display in Toyota instrument cluster (#31760)
* start at param

* start by sending personality

* change to personality

* POC: button changes personality

* what's wrong with this?

* fix

* not really possible but fuzzy test catches this

* there's always a typo

* dang, we're dropping messages

* clean up

* no comment

* bump

* rename

* revert longplan

* revert this

* Fix check

* more appropriate up here

* consistenet

* Update selfdrive/car/toyota/carstate.py

* Update ref_commit
old-commit-hash: 2c353a25a4
2024-03-08 23:26:01 -08:00
Adeeb Shihadeh
6bf5c62155 add hasFix field to gpsLocation (#31778)
* add hasFix field to gpsLocation

* migration

* update refs for ubloxd

* cereal master
old-commit-hash: a0389d7120
2024-03-08 11:32:38 -08:00
Justin Newberry
891b9a1ab4 card: prepare for separate process (#31660)
* Card

* update ref

* bump cpu

* sub to caroutput

* update ref
old-commit-hash: 8ec0d87de0
2024-03-04 09:53:42 -08:00
Shane Smiskol
46c211d833 Honda: two base platform configs (#31676)
* subclass bosch and nidec

* end with comma

* one line

* remove unused flags

* as a test see what happens if we exceeed CP.flags

* Revert "as a test see what happens if we exceeed CP.flags"

This reverts commit f57a346df5e6f3c6ab19875b843633c0571d16e3.

* Update ref_commit
old-commit-hash: 77d896eb89
2024-03-01 17:16:46 -08:00
Shane Smiskol
2ac06e8d7d Toyota: use platform config (#31607)
* part 1. Toyota platform config

* more

* everything works now

* no more DBC

* janky but that saves a lot of car lines

* need to init inside values or else it won't be reliable

* no return

* fixes

* minor update

* common flags, no dbc grouping

* some clean up

* some clean up

* rename

* copied wrong :(

* another

* copied specs for easiest ones first

* second easiest

* fix erroneous commas

* more clean up

* do the rest

* bug

* the refactor is so error prone

* huh?!

* static

* fix stiffness factor

* detect unsupported DSU

* Revert "detect unsupported DSU"

This reverts commit 9b72de6c8ef282ce20f6472970874a960761884b.

* fix DBC diff

* test carparams

* test sets

* scratch

* catches this

* Revert "scratch"

This reverts commit de08daa9fb8cc0368c5847b669e87b1b2e577616.

* Revert "test sets"

This reverts commit 62402f9b021cdf16a27fd9fb0883d81169711cbd.

* Revert "test carparams"

This reverts commit b02971659c2a8268d0ac8fdff02231dc36b5a197.

* Update ref_commit
old-commit-hash: 52ee070fe0
2024-03-01 02:14:33 -08:00
Justin Newberry
0ffb29accd HKG: move to platform config (#31649)
* fuck me!

* that kinda makes things pretty nice

* move it down

* and move this comment

* Wip

* more flags :/

* add the debug shit

* add

* lets not break this yet

* MORE flags git add .git add .git add .git add .!

* B

* add mando

* update ref

* possibly better?

* we can use flags here

* formatting

* formatting

* move up

* canfd subclass

* this is more clear

* spacing

* static!

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
old-commit-hash: e341707b0f
2024-02-29 17:04:54 -08:00
Justin Newberry
1a5b057983 Honda: move to platformconfig (#31637)
* first

* Fixes

* not

* not

* Fixes

* fix

* cleanup + use sets for now

* update ref

* update ref
old-commit-hash: 5734d7c2bf
2024-02-29 11:29:40 -08:00
Justin Newberry
1567508bd4 Mazda: move to platform config (#31647)
* mazda platform config

* update ref
old-commit-hash: e122f1d749
2024-02-29 11:14:00 -08:00
Justin Newberry
9ccd7f15f9 Subaru: move to flags within PlatformConfig (#31584)
* flags

* update ref

* use the flags directly

* use post_init (don't freeze)

* we can maintain frozen with custom class

* not preglobal

* move to common

* cleanup
old-commit-hash: 3a6c3315ab
2024-02-28 20:12:14 -08:00
Shane Smiskol
2ff56746cf Honda Accord: allow fingerprinting without comma power (#31477)
* Do Accord

* add comment

* good test

* this catches the accord/accordh issue!

* as expected, only if both radar&camera have in common FW does the test fail

* cmt

* clean up

* better

* Use HondaFlags

* detect alt brake

* for test

* hypothesis isn't installed

* test failure

* works

* Revert " works"

This reverts commit bfc0d808abe548630e6507431f13b01e8a1316cb.

* Revert "test failure"

This reverts commit 10ab6eb63ccd411740751b742f31fd610397fe8e.

* Revert "hypothesis isn't installed"

This reverts commit d474cc3f0ed7e84fe8bd24f452b3315fd2b8d47c.

* Revert "for test"

This reverts commit 98e039f4fc0189ccb57c1dae6b344209ef15eb1c.

* this is important too

* clean up

* merge accord fingerprints, test

* remove duplicates

* accordh doesn't have these

* rm

* no unknown

* start over, merge platforms

* add cmt

* note non-essential ecus

* add non essential obd ecus

* combine FW

* format fingerprints (remove dups)

* migrate test models segs

* cmt

* Update ref_commit

* clean up
old-commit-hash: ce6637cd8f
2024-02-27 20:09:02 -08:00
Harald Schäfer
2f0d283183 Wheeled body (#31614)
* Wheeled body

* 100hz only for balance

* No carparams in locationd no more

* Update ref
old-commit-hash: c05b37979d
2024-02-27 13:23:04 -08:00
Shane Smiskol
9cc2677a7a torqued: log raw params if calculable (#31521)
* log params when calculable

* better

* Update ref_commit

* this is redundant

* this is only used in one place, confusing which to use so remove

* better
old-commit-hash: c3e3103830
2024-02-20 22:30:51 -08:00
Shane Smiskol
7b3b908ef7 Honda Bosch: detect alternate brake signal (#31500)
* Do Accord

* add comment

* good test

* this catches the accord/accordh issue!

* as expected, only if both radar&camera have in common FW does the test fail

* cmt

* clean up

* better

* Use HondaFlags

* detect alt brake

* for test

* hypothesis isn't installed

* test failure

* works

* Revert " works"

This reverts commit bfc0d808abe548630e6507431f13b01e8a1316cb.

* Revert "test failure"

This reverts commit 10ab6eb63ccd411740751b742f31fd610397fe8e.

* Revert "hypothesis isn't installed"

This reverts commit d474cc3f0ed7e84fe8bd24f452b3315fd2b8d47c.

* Revert "for test"

This reverts commit 98e039f4fc0189ccb57c1dae6b344209ef15eb1c.

* this is important too

* clean up

* more clean up

* Update ref_commit
old-commit-hash: 2e8c62358c
2024-02-17 04:03:12 -08:00
Adeeb Shihadeh
66adafe850 radard: remove sleep for cars without radar (#31467)
* radard: remove sleep for cars without radar

* fix

* update refs
old-commit-hash: 6f905ed979
2024-02-14 13:12:54 -08:00
Shane Smiskol
4970ae9ced Toyota: log engine RPM (#31423)
* Update carstate.py

* 42 is safe

* mirai

* we hit this after 30 mins: Exceeded message traversal limit.  See capnp::ReaderOptions.

* too easy to write this bug, no need to be generic yet

* Update ref_commit
old-commit-hash: 04ada8e436
2024-02-12 21:28:16 -08:00