Commit Graph

88 Commits (d91e31cac23652a9c6596a796beb8fde3d6ca4ce)

Author SHA1 Message Date
Ewout ter Hoeven 55390d273f
Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings

Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.

Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.

F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale

* revert pyextra changes

* revert ublox.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-12-16 14:58:17 +01:00
Adeeb Shihadeh b8393f7271 can_replay: warning & clone cmd if jungle lib is missing 2021-11-23 23:33:26 -08:00
Dean Lee 41e5e76596
replay: fixed the alignment issue when replaying from C3 qcamera (#22734)
* fix qcamera replay

* fix alignment in replay

* upscale yuv if needed

* remove space
2021-11-01 11:06:00 +01:00
Willem Melching b816b5b644
Sphinx docs generation (#22697)
* add sphinx

* switch theme

* Experiment: sphinx docs generation updated (#22708)

* moved build to root gitignore, added .gitkeep

* Improved makefile doc build process

- Removed auto-generated docs from source control
- Moved apidoc.sh into Makefile
- Removed make.bat (can add back if Windows support desired)
- Added sphinx viewcode and markdown extensions
- Added feature to source /docs in build, so any .rst file in /docs will
  override the respective file during the build process
- Added feature to copy all markdown/rst files from source into /build/
  during build process so they can be easily referenced while writing
  docs (see examples in index.md)
- Wrote basic starter index.md file

TODO: Add new dependencies to Pipfile [dev-packages]

* Revert accidental modification to Pipfile

* fix command substitution

* exclude xx

* improve docs

* dont include all docs in release build

* Add dockerfile

* update title

* include normal readme

* build container in CI

* use buildkit

* add login

Co-authored-by: Chad Bailey <chadbailey904@gmail.com>
2021-10-28 15:14:37 +02:00
Willem Melching 59accdd814 do not run on import 2021-10-26 14:49:51 +02:00
Adeeb Shihadeh 7b5d915a68 can_replay: use segments without an FCW 2021-10-16 15:00:07 -07:00
Dean Lee f564eca51d
tools/ui.py: support playing qcamera (#22571) 2021-10-16 11:32:24 -07:00
Adeeb Shihadeh cbac96f50c update replay readme 2021-10-12 21:19:36 -07:00
Adeeb Shihadeh 0d10c00026 remove old tools camera script 2021-10-10 16:07:11 -07:00
Greg Hogan 720e82eeef
replay: do not clear ui image when paused (#22467)
* replay: do not clear ui image when paused

* also stop plots

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-10-07 11:18:45 +02:00
Willem Melching 1cfabc3388
ui.py: small plotting cleanup (#22441) 2021-10-05 16:27:29 +02:00
Dean Lee 2a8feb9eb9
replay/ui.py: get image from vipc (#22433)
* get image from vipc

* cleanup import

* if not None

* lgtm

* bump cereal&do reconnect

* bump cereal

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-10-05 15:14:38 +02:00
Willem Melching e233d59e03
replace unlogger.py with c++ replay (#22430) 2021-10-04 21:07:40 +02:00
Adeeb Shihadeh dd67dc6b34
update demo route (#22381) 2021-09-29 18:51:30 -07:00
Willem Melching 1e494a5224
unlogger.py: fix YUV replay (#22299) 2021-09-22 09:31:46 -07:00
sshane 535af87650
fix small typo in replay docs (#22305) 2021-09-21 18:55:46 -07:00
Adeeb Shihadeh 07d23a1db9 fix up replay docs 2021-09-16 17:01:45 -07:00
Willem Melching 6fd980c63e
Hyundai radar parser (#22241)
* add radar parser for 0x5XX range

* fix speed

* enable based of fingerprint

* fix speed scale

* use proper signal names

* add to release files

* hyundai: script to enable radar points

* typo

* add comment

* fix tests

* cleanup

* add note about persistent

* Update selfdrive/car/hyundai/radar_interface.py

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

* fix bugs in hyundai enable radar points script

* accidentally removed comment

* add some other cars

* add cosine to dRel

* fw versions do not match openpilot

* bump opendbc

* include state 4

Co-authored-by: Greg Hogan <gregjhogan@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-09-15 15:43:01 -07:00
HaraldSchafer 74b6c87254
cleanup old nidec accel override logic (#22181)
* cleanup old nidec accel override logic

* add ref without deprecated fields

* no more override
2021-09-10 10:34:18 -07:00
HaraldSchafer 1ac89f14aa
Change car controller interface from gas/brake to acceleration (#21911)
* 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>
2021-08-30 09:32:52 -07:00
Comma Device 6a5940c562 can replay: flashing lock 2021-08-18 14:17:02 -07:00
Adeeb Shihadeh fd81a5556b fix up can replay script 2021-08-18 14:06:06 -07:00
speedking456 69da1a6e6e
fix tools readme url typo (#21913) 2021-08-11 23:03:00 -07:00
Maxime Desroches d90188a14e
tools: fix replay/camera.py crash (#21881)
* check array size before reshape

* revert

* check length directly
2021-08-09 09:43:11 +02:00
Adeeb Shihadeh deb170e0b2
my.comma.ai -> connect.comma.ai (#21702) 2021-07-26 13:53:49 -07:00
Willem Melching a85b5557ed fix ui.py after longitudinal refactor 2021-07-13 12:01:36 +02:00
HaraldSchafer 6838e1c82c
Refactor lateral lag compensation (#21334)
* add T_IDXS

* refactor

* fix test

* unused

* typo

* needs casting

* Update selfdrive/controls/lib/drive_helpers.py

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

* deprecate field

* regen all

* new segs

* add todo

* split back

* clean

* bad names

* do in controls

* add arg

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-30 14:19:39 -07:00
Adeeb Shihadeh 4b6ec3bca6 unlogger: put YUV vipc send behind flag 2021-06-03 21:53:16 -07:00
Josh Smith 77321dbac4
Add type hints, small cleanups (#21080)
* improve tools.lib.kbhit and tools.sim.lib.keyboard_ctrl

* unpack more efficiently

* minor improvements

* agnos.py match spec better

* manual_ctrl test missing queue arg

* fix incorrect type annotation

* queues are generic

* varname reuse resulting in incorrect type inference

* bytes().hex() rather than bytes.hex(bytes())

* a bit of type hinting stuff
2021-06-03 12:21:04 +02:00
Adeeb Shihadeh cf6d133638
fix up model tests + tools (#21071)
* unlogger: send yuv stream

* fix up model test tools

* fix unlogger

* rename model replay

* bump cereal

* test in actions

* no ci for now
2021-05-28 23:08:08 -07:00
ShaneSmiskol 551091bcfa
Deprecate brakeLights field (#20954)
* remove all references to CS.brakeLights

* unused red

* update refs

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-05-18 17:48:02 -07:00
Willem Melching 679919ab1f fix unlog_segment.py 2021-05-18 11:14:42 +02:00
Willem Melching c23ec9f753
LateralPlanner should only compute curvature (#20289)
* get curvature from planner

* no need to check active

* remove that

* remove self

* liveParams not needed

* cast

* fix test bug

* fixes

* fix ui.py

* fix radians

* update refs

* update refs

* bump cereal

* bump cereal

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-11 21:08:51 -08:00
iejMac c4031750f3
improving tools readme (#20305)
* rough draft

* plotjuggler and carla description

* testing someting

* this is cool

* very short replay and debug desc

* small change

* small change 2

* better word

* low quality mode

* better word

* fixes

* changes

* minor fixes

* ubuntu_setup fix + README changes

* Update tools/README.md

* Update README.md

* Update README.md

* Update README.md

* changes

* Update tools/sim/README.md

* final changes

* final change

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-03-11 15:28:37 -08:00
Willem Melching 7c8fcad602 ui.py: draw lines on radarState leads 2021-03-03 13:05:41 +01:00
Willem Melching dfa10ed184 fix ui and unlogger after cereal cleanup 2021-02-18 17:34:09 +01:00
Adeeb Shihadeh 312b681a46
cereal cleanup part 2 (#20092)
* car stuff

* thermal

* Revert "car stuff"

This reverts commit 77fd1c65eb.

* 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
2021-02-16 21:39:32 -08:00
Adeeb Shihadeh fe7f3f0ec6
remove gpsd (#20027) 2021-02-10 16:39:39 -08:00
HaraldSchafer ab0456c0eb
fixup ui (#20049)
* fixup ui

* works

* new formate

* more cleanup

* works I assume we need a library somehow

* more readable

* fix lead sign

* put on road

* transformations lib

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-02-09 17:23:46 -08:00
Adeeb Shihadeh 46c0e0e6f3 fix failing CI jobs 2021-02-09 13:59:34 -08:00
Willem Melching 8b7c5503af
Unlogger send video over VisionIPC (#20046)
* unlogger: flag to send images over vipc

* vipc default

* add todo

* populate frame extra data

* multiple frame sizes
2021-02-09 19:48:08 +01:00
Willem Melching 5019d1d143 ui.py: topdown fixes 2021-02-09 11:38:30 +01:00
Willem Melching 7ee5fb7e66
Fixup ui.py (#20040)
* something working

* cleanup

* add offsets

* remove sensorium
2021-02-08 16:20:00 +01:00
Willem Melching d6a4c84a73 ui.py fix current steering angle 2021-02-04 22:39:49 +01:00
Willem Melching 7ae497d05d fix ui.py 2021-02-04 22:36:46 +01:00
Adeeb Shihadeh 000bd226aa
Cereal cleanup (#20003)
* start cleanup

* fan speed

* cleanup dm

* fix cereal

* hwType -> pandaType

* update refs

* update refs

* bump cereal

* freeSpacePercent

* cereal master
2021-02-03 19:57:30 -08:00
HaraldSchafer 0e49919ab9
Cleanup pathplanner (#19827)
* no divide by 0

* misc cleanup

* final fixes

* remove last polys

* new ref

* fix test

* update again
2021-01-19 00:02:53 -08:00
HaraldSchafer 158210cde8
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>
2021-01-14 18:43:50 -08:00
Philipp Braun 5ce479cc56
ui.py: white text on graphs (#19636)
* Improve readability and add automatic size detection

* Fix global variables

* Revert angle scale

* Revert enabled and brake colors

* Fix used colors
2021-01-04 19:40:27 +01:00
Willem Melching b09e5227d0 unlogger.py: make sure img is always set 2020-12-27 11:56:11 +01:00