Commit Graph

230 Commits

Author SHA1 Message Date
Adeeb Shihadeh
d33afc2cac remove custom markdown rendering (#24538)
* remove custom markdown rendering

* remove from release
old-commit-hash: 222c7cd60d
2022-05-14 22:18:13 -07:00
Adeeb Shihadeh
5f429c1513 CI: build master-ci in Actions (#24533)
* jenkins: build master-ci on pc

* make target configurable

* build on actions

* no wait

* more fetch

* v3 has push?

* example

* remove that

* wait

* v1.1.1

* this one works

* schedule

* clear out target first

* no lfs
old-commit-hash: 531f4483b2
2022-05-14 00:18:30 -07:00
George Hotz
a053d070be encoderd: enable (#24492)
* enable encoderd

* correct enable line

* fix loggerd tests

* fix power draw and cpu tests

* correct cpu for encoderd

* fix a bug, video_writer is shared

* fix issue with not recording dcam

* add recording state

* wooo tests pass. encode id keeps counting

* core 3

* loggerd then encoderd

* stop loggerd first

* core 3 always online

* see the camera when we see encoder packet

* encoderd on small core uses 37%

* remove encoder logic from loggerd

* delete unit test that doesn't really make sense anymore

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 94b9972eb7
2022-05-13 17:56:02 -07:00
Shane Smiskol
3c716d6395 bump opendbc and remove common file (#24529)
* bump and remove file

* bump opendbc to master
old-commit-hash: 11e1ad3e3f
2022-05-13 15:32:09 -07:00
Adeeb Shihadeh
ceda3495b9 add body to release (#24528)
* add body to release

* sort

* add dbc
old-commit-hash: ed5c14e86c
2022-05-13 13:18:09 -07:00
Shane Smiskol
de83c06fcb Dynamically parse DBCs (#24455)
* test commit

* bump

* bump

* doesn't work

* bump

* bump

* bump

* no more of these files

* bump

* bump opendbc

* bump

* bump opendbc

* bump opendbc

* bump opendbc

* bump opendbc

* remove dbc_out

* bump opendbc to master

* bump opendbc
old-commit-hash: f9e2e82400
2022-05-12 21:19:33 -07:00
George Hotz
1f4628bad5 encoderd: make work on PC (#24483)
* don't use the codec in video_writer

* this produces broken videos for some reason

* bugfix

* refactor on the class

* works on device

* fix codec

* no codec enum

* fix pc

* move into dirs

* these includes also

* rename it ffmpegencoder

* add avcodec_close

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 2008db47c2
2022-05-10 15:20:51 -07:00
George Hotz
7119a98414 loggerd: switch to v4l encoder try 2 (#24380)
* start v4l encoder

* v4l encoder starts

* start and stop

* fill in proper controls

* it dequeued a buffer

* getting bytes

* it made a video

* it does make files

* getting close

* ahh, so that's how dequeue works

* qcam works (no remuxing)

* remuxing works

* we just need to make shutdown and rollover graceful

* graceful destruction

* switch to polling

* should work now

* fix pc build

* refactors, stop properly

* touchups, remove a copy

* add v4l encoder to release

* inlcude file

* move writing to it's own thread

* fix minor memory leak

* block instead of dropping frames

* add counter, fix tests maybe

* better debugging and test print

* print file path in assert

* format string in test

* no more oversized qlogs

* match qcam

* touchups, remove omx encoder

* remove omx include files

* checked ioctl, better debugging, open by name

* unused import

* move linux includes to third_party/linux/include

* simple encoderd

* full packet

* encoderd should be complete

* lagging print

* updates

* name dq thread

* subset idx

* video file writing works

* debug

* potential bugfix

* rotation works

* iframe

* keep writing support

* ci should pass

* loggerd, not encoderd

* remote encoder code

* support remote encoder

* cereal to master, add encoderd

* header no longer required

* put that back there

* realtime

* lower decoder latency

* don't use queue for VisionIpcBufExtra, disable realtime again

* assert all written

* hmm simpler

* only push to to_write if we are writing

* assert timestamp is right

* use at and remove assert

* revert to queue

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 0baa4c3e2a
2022-04-30 09:22:52 -07:00
Adeeb Shihadeh
7e1f873cf7 third_party cleanup (#24336)
* third_party cleanup

* remove zlib

* cleanup release files
old-commit-hash: 2474546f48
2022-04-26 19:03:54 -07:00
George Hotz
b872fe92ab loggerd: Separate writer from encoder (#24257)
* seperate writer from encoder

* video writer in release

* confirm loggerd on PC works, add YUV option to compressed_vipc

* make raw_logger use video_writer

* put this back to master

* close codec

* put this back

* use unique_ptr

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 8d24655787
2022-04-20 14:51:24 -07:00
HaraldSchafer
2174005f05 Lateral torque-based control with roll on TSS2 corolla and TSSP rav4 (#24260)
* Initial commit

* Fix bugs

* Need more torque rate

* Cleanup cray cray control

* Write nicely

* Chiiil

* Not relevant for cray cray control

* Do some logging

* Seems like it has more torque than I thought

* Bit more feedforward

* Tune change

* Retune

* Retune

* Little more chill

* Add coroll

* Add corolla

* Give craycray a good name

* Update to proper logging

* D to the PI

* Should be in radians

* Add d

* Start oscillations

* Add D term

* Only change torque rate limits for new tune

* Add d logging

* Should be enough

* Wrong sign in D

* Downtune a little

* Needed to prevent faults

* Add lqr rav4 to tune

* Try derivative again

* Data based retune

* Data based retune

* add friction compensation

* Doesnt need too much P with friction comp

* remove lqr

* Remove kd

* Fix tests

* fix tests

* Too much error

* Get roll induced error under 1cm/deg

* Too much jitter

* Do roll comp

* Add ki

* Final update

* Update refs

* Cleanup latcontrol_torque a little more
old-commit-hash: fe0bcdaef6
2022-04-19 19:34:31 -07:00
Adeeb Shihadeh
f536724f4e add joystick to release
old-commit-hash: 6877059b45
2022-04-19 17:25:59 -07:00
Adeeb Shihadeh
5a9644261f remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
old-commit-hash: 5c48e7bc86
2022-04-18 17:55:23 -07:00
Cameron Clough
0830dc0277 Ford: Support for LCA vehicles (#23331)
* Ford: add Focus Mk4

Also removes support for the Ford Fusion.

* Ford: LKAS/LCA steering and UI CAN commands

* Ford: implement CarController w/ steering and lanes ui

* Ford: FPv2 firmware request

* Ford: Add FW for 2018 Ford Focus

* Ford: add Escape Mk4

* bump panda

* cleanup

* add that back

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: acd455ed3a
2022-04-14 14:32:03 -07:00
Adeeb Shihadeh
1ce647b0a6 UI: body support (#24079)
* body ui template

* faces

* abs

* not raw

* auto switch

* check that

* no smoosh

* cmath
old-commit-hash: b51deb97d1
2022-04-01 15:12:54 -07:00
Shane Smiskol
bf8262394f Docs: auto-generate supported cars documentation (#23762)
* make CAR class enum, and values.py formatting

* Revert "make CAR class enum, and values.py formatting"

This reverts commit 04d9817e9d5d6ab5c027754018fc445f2cd3067a.

* stash

* add supported packages and model years

* don't change model years in fps

* move Lexus to info dict and make int enum

* remove sometimes wrong model years from name string

* use enum names

* convert Honda's values

* nice names

* use name

* GM

* Mazda, Ford

* Hyundai: WIP

* finish Hyundai

* fix

* Nissan

* Subaru

* Tesla

* formatting is for another PR

* Chrysler: todo: unify the Pacificas?

* do volkswagen

* this isn't a zoo

* skip enums for now

* Update selfdrive/car/volkswagen/values.py

Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>

* set All

* temp cars

* auto-generate CARS.md

* update type hinting

* add generated file

* add longitudinal star to cars that support disabling radar

* add TODO

* add notes

* add min_steer_speed exception for hatchback

* add minimum steering speeds

* Add exceptions and run generator

* Missing Telluride

* fix Prius v

* missing Prius Prime

generate

* start to convert years to strings

* Fixup Hyundai

* convert year sets to strings

* handle this

* missing S3

* Fix and add all missing cars (verified with script

* Supported Package fixes

* add get_tiered_cars

* Check radarOffCan for removing most Honda from op long

* Update for Avalon stop and go update on master

* Fix missing car params

* add my temporary script i'm using to verify new generated DBC

add my temporary script i'm using to verify new generated DBC

* generate with jinja template

* add header and footer

* clean up

* rename

rename

* add exceptions. jinja is nice, but why are its loop indexes starting at 1?

* add list of known car videos

* See how these look

* Add nice table formatting for column description

Add nice table formatting for column description

* generate

* consisten br tag

* small clean up

* temp

* Move car videos into CarInfo

* add new copy and rename to footnotes

* Revert "temp"

This reverts commit 93c3fce1d3ab406f80cbfb9c00c2237d109c7846.

clean up

* generate

* replace with svg

* simplify a bit

* add footnotes to CarInfo

* move some variables to docs.py

* Add video link for Acadia

* Make Footnote an enum so we don't use random ints

* static analysis fixes

* move to CARS.md

* fix last missing footnote

* add to release files

* rm test file

* use svg

generate

* fix sorting

* not needed

* not sure how this got here

* remove Sedan/Couple and add Diesel footnote

* finish todos

* move make specific footnotes to selfdrive/car/*/values.py

rename

* change to zeros

* align bottom to center

* Apply some suggestions

* Update selfdrive/car/mock/values.py

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

* Update copy

* Try headers + bullet points

* somehow better

somehow better

* finish updating copy

* move template and add links to sups

* stars shouldn't be clickable

that didn't work

try this

try this

this is better

* add type hints to CarInfo

add more type hinting

* optional needs a type and any covers all (?)

* move good steering torque to */values.py

* dataclasses are much nicer than attr

* use tuple

* Update docs/cars.py

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

* suggestions

* suggestions

* suggestions

remove

* clean up a bit

* add more type hints

* center stars and remove hardcoding from template

* update copy

* Add test

* Fix types

Fix types

* add supported cars documentation test

* clean up

* replace with docs_definitions

* Add back Footnote enums

* Ah so these are like fstrings!

* Update selfdrive/car/CARS_template.md

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

* Update selfdrive/car/docs.py

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

* Update year from master merge

* Fix longitudinal star from merge

* sort properly stars by Column enum

* clean up

* HKG: Sorry guys

* Prius V gets FSR star, like others

* Update selfdrive/car/docs.py

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

* update comment

* No Prius docs change for now

Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 31a6b141d6
2022-03-16 21:27:05 -07:00
Adeeb Shihadeh
805a00b5f3 cleanup selfdrive/test (#23967)
* move test routes and test_models

* move fingerprints

* little more

* remove that
old-commit-hash: 8718a59330
2022-03-14 15:46:16 -07:00
Adeeb Shihadeh
ec47e0fef0 break up selfdrive.config (#23959)
* break up selfdrive.config

* add to release files

* fix import order
old-commit-hash: 5c3f3e44bc
2022-03-13 21:42:39 -07:00
Adeeb Shihadeh
ec7f17d288 move pandad to boardd/ (#23958)
old-commit-hash: 8ac30fea24
2022-03-13 21:21:30 -07:00
George Hotz
6b52bc6c13 model: mse err from 0.02-> 0.000056 (#23891)
* mse err from 0.028070712 -> 5.8073703e-05

* build with weights fixup

* need thneed lib also

* don't break for binaries

* static analysis says i need init

* check the bias

* load_dlc_weights

* nicer scons

* tested scons

* fix static

* pylint issue

* new ref

* a few more asserts

Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
old-commit-hash: 8d6f49aecf
2022-03-02 20:52:17 -08:00
Robbe Derks
98caf30f9b Fan controller cleanup + testing (#23886)
* clean up fan controllers in preparation for testing

* add fan controller to release

* add some unit tests around the fan controller

* subclass ABC
old-commit-hash: 8c971f24e3
2022-03-02 17:35:58 +01:00
Adeeb Shihadeh
2e91f016bb modeld: remove support for small model (#23803)
* modeld: remove support for small model

* use extra
old-commit-hash: 8a19d9892e
2022-02-28 10:32:39 -08:00
Willem Melching
ad5ccabce3 bigmodel (#23684)
* Added wide cam vipc client and bigmodel transform logic

* Added wide_frame to ModelState, should still work normally

* Refactored image input into addImage method, should still work normally

* Updated thneed/compile.cc

* Bigmodel, untested: 44f83118-b375-4d4c-ae12-2017124f0cf4/200

* Have to initialize extra buffer in SNPEModel

* Default paramater value in the wrong place I think

* Move USE_EXTRA to SConscript

* New model: 6c34d59a-acc3-4877-84bd-904c10745ba6/250

* move use extra check to runtime, not on C2

* this is always true

* more C2 checks

* log if frames are out of sync

* more logging on no frame

* store in pointer

* print sof

* add sync logic

* log based on sof difference as well

* keep both models

* less assumptions

* define above thneed

* typo

* simplify

* no need for second client is main is already wide

* more comments update

* no optional reference

* more logging to debug lags

* add to release files

* both defines

* New model: 6831a77f-2574-4bfb-8077-79b0972a2771/950

* Path offset no longer relevant

* Remove duplicate execute

* Moved bigmodel back to big_supercombo.dlc

* add wide vipc stream

* Tici must be tici

* Needs state too

* add wide cam support to model replay

* handle syncing better

* ugh, c2

* print that

* handle ecam lag

* skip first one

* so close

* update refs

Co-authored-by: mitchellgoffpc <mitchellgoffpc@gmail.com>
Co-authored-by: Harald Schafer <harald.the.engineer@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 85efde269d
2022-02-19 16:06:31 -08:00
George Hotz
37349c0fef add thneed optimizer (#23772)
* add thneed optimizer

* local work group opt

* kernels and final mods

* release files

* build system touchups

* fix kernel path, rand inputs for self test

* broken since extra is gone

* update model replay ref

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 90beaebefb
2022-02-15 15:32:00 -08:00
Shane Smiskol
40a688983a Honda: use common DBC for CRV H and Accord Diesel (#23743)
* bump

* use Accord DBC for CRVH, Civic Diesel

* bump

* bump opendbc
old-commit-hash: 31228ce560
2022-02-12 16:28:53 -08:00
Shane Smiskol
3ec9266de0 Honda: use common DBC for PILOT and others (#23659)
* use common dbc

* bump

* remove from files common
old-commit-hash: a584436328
2022-01-28 22:26:18 -08:00
Adeeb Shihadeh
31857ee45b Toyota: DBC rename
old-commit-hash: 036c1799d4
2022-01-27 11:44:57 -08:00
Adeeb Shihadeh
effdebff11 Toyota: use common DBC for IS and RC
old-commit-hash: 4c765acb6e
2022-01-27 10:27:28 -08:00
Adeeb Shihadeh
0a5779a090 Toyota: remove Prius DBC
old-commit-hash: 9a211ee14b
2022-01-27 08:59:16 -08:00
Adeeb Shihadeh
c59e3695db Toyota: unify TNGA-K platform DBCs
old-commit-hash: 2f01bf3b6f
2022-01-27 08:52:24 -08:00
Adeeb Shihadeh
4ecc611e27 Toyota: CT200H DBC merged into Rav4
old-commit-hash: b321d65cac
2022-01-27 08:43:40 -08:00
Robbe Derks
c69bba9c9c Statlog in C (#23596)
* statlog in C

* fix swaglog and the test

* add missing files

* fix context initialization todo

* speed up test
old-commit-hash: 6366d1303f
2022-01-27 17:14:38 +01:00
Adeeb Shihadeh
9363436646 Toyota: rav4 DBC is same as corolla now
old-commit-hash: 33c8468e02
2022-01-26 22:13:51 -08:00
Shane Smiskol
af77fa14a4 Toyota: use common gear packet signal (#23634)
* Toyota: remove nodsu hybrid dbc

* bump

* no longer exists
old-commit-hash: 14133069e1
2022-01-26 17:10:32 -08:00
Shane Smiskol
beeb0442ce base LatControl class (#21967)
* base LatControl class, move sat check out of pid.py

clean up

clean up

* fix

* global variable for min control speed

* nicer name

* unify latcontrol class init arguments

* add to release files

* saturated if close to limit

* move angle mode saturation checks into class

* check_saturation function takes in current saturated status

undo

* apply latcontrol_angle's active checking to all controllers

* clean up

* move those back

* make abstract baseclass

* add test for saturation

* keep clip

* update ref

* fix static analysis

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 9de8f8cd8c
2022-01-26 17:10:41 +01:00
Shane Smiskol
a790a658f8 LateralPlanner: Move lane change logic to another class (#23476)
* should work

* Revert "should work"

This reverts commit dabc2ea17a072a6c835e4bd1c75a2c1e2d10623d.

* move lane change logic to DesireHelper class

* clean up desires

clean up desires

* comments

* Revert "clean up desires"

This reverts commit 7301c921e305fcbd4746b19040631d935d50dfd9.

* Update selfdrive/controls/lib/desire_helper.py

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

* add to files_common

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 6be70a063d
2022-01-25 13:40:03 +01:00
Adeeb Shihadeh
f96d34902f GM: use generated DBC (#23615)
* Rename GM PT dbc to generated

* bump opendbc

Co-authored-by: Jason Shuler <jshuler@gmail.com>
old-commit-hash: cdd3598146
2022-01-24 20:51:57 -08:00
Adeeb Shihadeh
6501708ad8 remove ridgeline DBC from release files
old-commit-hash: f006e392ad
2022-01-24 15:18:17 -08:00
cydia2020
3b1b0a4dbf Toyota: unify Sienna, Avalon, Highlander Lexus NX, Lexus RX into single DBC (#23577)
* remove sienna dbc

same as avalon

* rx and nx are also the same as avalon

* highlander can also use avalon's dbc

* bump opendbc

* rename avalon to tnga-k

* pt

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 783db0cf33
2022-01-19 11:46:07 -08:00
cydia2020
c607c5d30b Toyota: use single DBC for Lexus NXH, Lexus RXH, HighlanderH, Rav4H (#23576)
* use rav4h dbc for nx

also bump opendbc

* remove from release file

* same with highlander

* bump opendbc

* rav4h -> tngakh

also rxh

* bump opendbc

* bump again

* remove from release files

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: f32f53540e
2022-01-19 11:06:34 -08:00
Dean Lee
403e92e9c4 boardd: move main() to main.cc for test cases (#23564)
* move main() to main.cc

* move includes back
old-commit-hash: 498d54be9c
2022-01-18 14:59:42 +01:00
Adeeb Shihadeh
fa8ba3617b sentry fixups (#23249)
* set env

* do init in same place

* no sentry for forks

* start session

* start session

* remove that

* val
old-commit-hash: b63bc89bc9
2022-01-14 15:25:16 -08:00
Adeeb Shihadeh
2f87bde2ff Log android system shutdown to param (#23520)
* Log android system shutdown to param

* comment

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 610b99fd68
2022-01-13 22:40:35 -08:00
Robbe Derks
323febbf37 Statsd (#23413)
* device side of statsd

* need to start it

* enable in manager

* add sleep

* cleanup

* remove aggregates for now and standardize on industry terms

* manager needs main

* need to have a try/except

* atomic_write_on_fs_tmp does not work

* cleaner

* use dump

Co-authored-by: Willem Melching <willem.melching@gmail.com>

* one file at a time

* limit amount of files

* move to influx line protocol and cleanup

* needs to be a list

* fix timezone bug

* actually rate limit

* add to release

* normalized origin

* also log deviceType

* more stats

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 1b49ce6ec4
2022-01-10 15:21:48 +01:00
Shane Smiskol
c569652638 Toyota: use common DBC for TSSP Camry Hybrid (#23453)
* bump dbc

* use nodsu_hybrid dbc

* remove from files_common

* bump opendbc

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 0c075a66db
2022-01-08 18:41:05 -08:00
Igor Biletskyy
f532819faf Revert "boardd: new class USBDevice (#23015)"
This reverts commit 6965aa0b903060ab38aace31c15fefdc7a0429eb.

old-commit-hash: 285addeef2
2021-12-16 17:11:45 -08:00
Dean Lee
49c35a70b5 boardd: new class USBDevice (#23015)
* USBDevice

* merge master

* rebase master

* add to fiels_common

* inline functions

* namespace

* init err

* remove nested if

* cleanup

* bump panda for branch

* change includes

* bump panda branch

* change name

* bump master panda

Co-authored-by: Igor Biletskyy <briskspirit@users.noreply.github.com>
Co-authored-by: Igor Biletskyy <bs@privacy.im>
old-commit-hash: 4061f50da3
2021-12-16 16:53:48 -08:00
Adeeb Shihadeh
3dc321435e Remove NanoVG (#23147)
old-commit-hash: efa448d829
2021-12-06 14:18:00 -08:00
Adeeb Shihadeh
973a48acef remove dead + duplicate python code
old-commit-hash: 08f9316b56
2021-11-28 14:02:06 -08:00
Adeeb Shihadeh
94d30c6c5f camerad: remove camera frame stream (#23045)
* camerad: remove camera frame stream

* fix release files
old-commit-hash: 8160cf3c1b
2021-11-27 21:58:21 -08:00