Commit Graph

1212 Commits

Author SHA1 Message Date
Dean Lee 57ad4f02f8
cabana: use a monotonic buffer to allocate CanEvent (#29652)
* use a monotonic buffer to allocate CanEvent

* set the next buffer size to 6MB

* static

* cleanup

* use const iter

* rename to insert_pos
2023-08-26 08:42:50 -07:00
Justin Newberry c46965fc27
CI: use local scons cache instead of building a separate image (#29634)
* use local

* added ci_sim

* revert scons

* dont need these anymore

* same for sim

* fix dockerfiles
2023-08-25 16:06:17 -07:00
Dean Lee 2484548fdd
cabana: improve frequency accuracy (#29631)
* improve frequency accuracy

* apply review

* 2 less lines!

* another!

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
2023-08-25 15:15:16 -07:00
Dean Lee 86386fd87f
scons: fix always generating car_fingerprint_to_dbc.json (#29625) 2023-08-25 10:39:55 -07:00
Justin Newberry 1ee6ed4b16
Linter: remove pylint (#29611)
remove pylint
2023-08-24 16:30:54 -07:00
Adeeb Shihadeh 4917e22615
Minimal build (#29600)
* add build flag for minimum build

* add minimal build

* update

* fix pj

* bump opendbc

* update subaru
2023-08-24 14:58:30 -07:00
Dean Lee 7bfd3dac81
cpplint: add filter `whitespace/comma` (#29595) 2023-08-24 10:42:06 -07:00
Dean Lee 21da5a216f
cpplint: add filter `build/include_subdir` (#29585) 2023-08-24 15:42:17 +01:00
Dean Lee 3c94d953ab
replay: fix visionbuf alignment on device (#26913)
* align visionbuf

* update test case

* cleanup

* fix cpplint warning
2023-08-24 00:03:16 -07:00
Dean Lee f203648de0
cpplint: add filter `whitespace/semicolon` (#29568) 2023-08-23 15:00:30 -07:00
Dean Lee 5480d32bb5
cpplint: add filter `whitespace/parens` (#29565) 2023-08-23 14:25:05 -07:00
Adeeb Shihadeh e726505918
bump cereal (#29561) 2023-08-23 13:42:37 -07:00
Dean Lee 2d99521e75
cpplint: `build/include_what_you_use` (#29556)
* include_what_you_use

* remove comments

* include <memory>

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-08-23 13:25:17 -07:00
Willem Melching 2b0e4d46bb
cabana: socketcan support (#27952)
* empty socketcan class

* works on linux with vcan

* add open stream widget

* fix MacOS build

* update readme

* unused

* no socketcan on C3

* fix in cabana sconstruct

* serial -> device
2023-08-23 10:50:11 -07:00
Dean Lee 363740a497
cpplint: add `readability/braces` filter (#29554) 2023-08-23 10:13:46 -07:00
Robbe Derks d71a7190f1
Devcontainer (#29259)
* mvp devcontainer. builds, runs and UI works

* fix indentation

* enable color and fix openpilot_env path

* separate dockerfile for devcontainer

* use prebuilt image

* Fix openpilot_env setup

* Add dev container section in readme

* Fix typo

* Fix typo again

* Move dev dockerfile to .devcontainer dir

* Update README

* Add note about x11 forwarding on macos

* Update dev container json

* Fix typo

* Override DISPLAY on macOS

* Mention XAUTHORITY for macOS setup in README

* fix typo

* Add devcontainer CI test

* Rename to devcontainer

* Fix git issues

* ripgrep

* Link instead of vscode manual

* Replace raw path with containerWorkspaceFolder

* Fix typo

* Remove dev tools workflow

* Link away X11 forwarding setup isntructions for mac

* Remove fork consrtaint, add test run of scons

* Add submodules as safe.directories in postStartCommand

* Remove openpilot_env references

* Add scons cache volume

---------

Co-authored-by: Robbe Derks <robbe@localhost.localdomain>
Co-authored-by: Kacper Rączy <gfw.kra@gmail.com>
2023-08-22 11:47:09 -07:00
Adeeb Shihadeh 91dc8457ae
Revert Qt MOC hacks (#29528)
* Revert "CI: prevent moc from running in cache population step (#29401)"

This reverts commit d1aedccfbe.

* Revert "SCons: respect cache read only (#29437)"

This reverts commit 59abb469ea.

* don't change moc path
2023-08-22 11:16:58 -07:00
Greg Hogan b24bbe4607
script to install only ubuntu dependencies (#29510)
* script to install only ubuntu dependencies

* update Dockerfile

* add shebang
2023-08-21 16:32:35 -07:00
Justin Newberry 197460e061
CI: use scons cache mount for building simulator and docs (#29436)
* build docker image with scons cache

* use setup

* scons cache

* added the dockerfile

* add the shell

* docs use cache

* dont pull lfs for docs

* simulator too

* dont pull the cache image

* fix inputs

* inputs

* booleans aren't supported

* bool not supported

* bool isnt supported

* fix

* readonly cache

* fix sim cache too

* respect readonly

* gitignore and move to correct folder

* also copy old

* move to tools/ci

* move to selfdrive/test

* just make the cache writable, it's discarded anyway

* minimize diff in this pr
2023-08-21 15:11:31 -07:00
Kacper Rączy 0f7be5b1e6
Setup cleanup vol. 2 (#29456)
* code from setup cleanup #29419

update ci

update ci

export variables for mac os

check env

what is in the profile script?

install pyenv the same everywhere

temporarily disable brew cache

temporarily disable brew cache

try fixing pyenv virtualenv-init

try this

inject shims path earlier

try alternate install method

switch back to brew install

try         eval "$(pyenv init --path)"

add eval "\$(pyenv init --path)"

* Add local .env file to the cache list

* Change .env paths

* debug line

* order?

* remove .env

* Add .venv to caches

---------

Co-authored-by: Greg Hogan <gregjhogan@gmail.com>
2023-08-21 13:30:48 -07:00
Adeeb Shihadeh a9626f95b6
add openpilot prefix to imports (#29498)
* add openpilot prefix to imports

* more

* more

* fix docs

* fix linter

* bump submodules

* fix patched tests

* update dynamic imports

* debug

* Revert "debug"

This reverts commit db5e13b991.

* fix pm test
2023-08-20 20:49:55 -07:00
Adeeb Shihadeh 5690386d8d
update clone instructions (#29490)
* both

* Update README.md

* Update README.md
2023-08-20 15:13:24 -07:00
Greg Hogan 012060ba32
fast clone instructions (#29455)
* fast clone instructions

* Support default ubuntu 20.04 git

---------

Co-authored-by: Harald Schäfer <harald.the.engineer@gmail.com>
2023-08-19 01:49:16 -07:00
Greg Hogan 282fd778aa
venv in code directory (#29452)
put venv in code directory
2023-08-17 15:43:02 -07:00
Justin Newberry 1944945d9d
Revert "setup cleanup (#29419)" (#29451)
This reverts commit ad32816fd6.
2023-08-17 13:23:06 -07:00
Dean Lee 61a00d2673
replay/logreader: use unique_ptr for `mbr_` (#29440) 2023-08-17 11:42:35 -07:00
Greg Hogan ad32816fd6
setup cleanup (#29419)
* setup cleanup

* update ci

* update ci

* export variables for mac os

* check env

* what is in the profile script?

* install pyenv the same everywhere

* temporarily disable brew cache

* temporarily disable brew cache

* try fixing pyenv virtualenv-init

* try this

* inject shims path earlier

* try alternate install method

* switch back to brew install

* try         eval "$(pyenv init --path)"

* add eval "\$(pyenv init --path)"
2023-08-17 08:51:16 -07:00
Dean Lee e8e03197ca
replay: fix seekTo issue (#29422)
* fix seekTo issue

* remove extra space
2023-08-16 11:01:14 -07:00
Dean Lee 9dac6b66f9
cabana: set border color for scatter series (#29408) 2023-08-15 10:28:48 -07:00
Kacper Rączy d8bda6feb4
replay: increase file descriptor limit macOS (#29346)
* Increase file descriptor limit for replay on macos

* Reword comment

* Move set_file_descriptor_limit to common/util.cc

* Include resource.h header
2023-08-15 00:05:27 +02:00
Dean Lee 22bc06fdaa
common/util: move function `random_int` to util (#29388) 2023-08-14 09:37:16 -07:00
Justin Newberry 783bb1f878
Replay UI: Fix zip issue (#29384)
Update ui_helpers.py

resolves https://github.com/commaai/openpilot/issues/29383
2023-08-13 22:55:59 -07:00
Adeeb Shihadeh db287496d8
Fixes for PYTHONWARNINGS=error (#29381) 2023-08-13 17:22:56 -07:00
Dean Lee fd8a9c8520
ui/networking: remove call to clearLayout (#29037)
* build list inplace

* move clearLayout to cabana

* cleanup include

* polish style

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-08-13 11:57:40 -07:00
Adeeb Shihadeh b11b14aff8
CI: enable PYTHONWARNINGS=error (#29364)
* CI: enable PYTHONWARNINGS=error

* fixes

* more ignore

* more modeld ignore
2023-08-12 17:15:16 -07:00
Adeeb Shihadeh 0ced56b2ea
remove xx dependencies (#29263)
* rm xx deps

* mv that

* fix

* fix a path

* relock

* relock

* update

* update sentry

* update

* revert sentry

* Update lock

* Dummy pip package

* Not needed with poetry

* dont need dummy

---------

Co-authored-by: Bruce Wayne <harald.the.engineer@gmail.com>
2023-08-11 20:05:44 -07:00
Justin Newberry e4ead4f183
Ruff: b905 (strict zip) (#29336)
* added mutable default args

* most of the Bs

* add comment about lrucache

* b905
2023-08-11 16:13:51 -07:00
Justin Newberry 62c1e65924
Ruff: enable most of bugbear (#29320)
* added mutable default args

* most of the Bs

* add comment about lrucache
2023-08-11 15:33:49 -07:00
Shane Smiskol 84fbf1c2e9
simulator: fix CANParser input args (#29343)
* we weren't testing?

* fix
2023-08-11 14:12:33 -07:00
Dean Lee 233e053842
scons: rename QT_MOCHPREFIX to QT3_MOCHPREFIX (#29334)
rename QT_MOCHPREFIX to QT3_MOCHPREFIX
2023-08-11 10:38:34 -07:00
Justin Newberry 8793cbff40
Ruff: enable flake8-builtins (#29315)
* enable flake8-builtins

* replace any with contains

* fix typo in pack

* fix type

* format is from the parent module, has to be enabled

* item_id

* fix item_id

* disable for id since that's what the remote server returns
2023-08-10 18:58:22 -07:00
Justin Newberry af3ed37c5c
Ruff: flake8 pie (misc lints) (#29318)
flake8 pie
2023-08-10 15:28:51 -07:00
Justin Newberry 7fdd9fc37c
CI: Pylint to ruff (#29294)
* pylint to riff

* pylint to riff

* pylint to riff

* revert more

* undo exclude removal

* exclude tinygrad

* set line length

* pylint exclusions to ruff

* same excludes as old linter

* fix tools QA

* remove unrequired check

* revert linting third_party

* ignore e402
2023-08-09 13:26:54 -07:00
Justin Newberry cf64b27168
Linter: Fix >160 line length test (#29287)
* test

* fix line length

* fix line length

* fix file size

* revert poetry

* cleanup for PR
2023-08-08 17:13:35 -07:00
Vivek Aithal e7d307ca1b
[commabody] Add new body teleop ui (#29282)
* Revert "Revert "[commabody] Add new body teleop ui (#29119)" (#29249)"

This reverts commit 623351e4ed.

* add to release files

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-08-08 14:12:51 -07:00
Adeeb Shihadeh ee7a763ba3
macOS: remove old dependencies (#29275) 2023-08-07 21:13:09 -07:00
Harald Schäfer 623351e4ed
Revert "[commabody] Add new body teleop ui (#29119)" (#29249)
This reverts commit a7304d059c.
2023-08-05 07:15:35 -07:00
Vivek Aithal a7304d059c
[commabody] Add new body teleop ui (#29119)
* add new ui

* move body tele op ui to new dir

* fix codespell errors

* resolve mediablackhole pylint error

* fix import error

* style fixes

* use logging, not print

* fix js styling

* resolve comments
2023-08-04 13:56:46 -07:00
Adeeb Shihadeh 7949dfe796
bump panda (#29234)
* bump panda

* bump
2023-08-04 11:09:20 -07:00
Justin Newberry a90f6d9163
Cabana: Fix >1 hour route time displaying (#29226)
fix greater than 1 hour
2023-08-03 13:27:17 -07:00
Shane Smiskol acc732efbb
replay: new demo route (#29215)
* new demo route

* replace other references (except gps test)

* Apply suggestions from code review

* it's 13 segments
2023-08-03 13:18:44 -07:00
nathanoy 3fca1b4f8d
Updated Carla to version 0.9.14 (#29210) 2023-08-02 08:41:36 -07:00
Adeeb Shihadeh 2e634bc199
macOS: use bash_profile instead of bashrc (#29165)
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@Adeebs-MacBook-Air.local>
2023-07-27 00:31:42 -07:00
Vivek Aithal 156c7a84e8
[commabody] Add body packages to op (#29162)
* add body packages

* update poetry lock
2023-07-26 23:08:23 -07:00
Mitchell Goff f0ae0c34cd
Added python VisionBuf class (#29075)
* Added python VisionBuf class

* fixed property names

* Bump cereal
2023-07-25 01:08:39 -07:00
Maxime Desroches 97eec45d42
Test scons multithreaded random build (#29082)
* random build

* name

* 2 pass

* clean after

* fail on this

* fix deps

* format

* var

* try without lfs
2023-07-21 21:57:27 -07:00
Harald Schäfer ca699e3989
radard: no clustering (#29010)
* First commit

* cleanup

* Update ref

* Doesnt deserve two files

* cleanup radard
2023-07-19 20:31:40 -07:00
Dean Lee 319ce562f2
cabana: cleanup `MessageViewHeader` & `MessageBytesDelegate` (#29040)
* cleanup

* remove double ;
2023-07-19 18:39:55 -07:00
Dean Lee 3ad434c5ca
replay: emit segmentsMerged before updateEvent (#28849) 2023-07-08 17:09:54 -07:00
Dean Lee 1301e2d640
cabana: fix segfault when editing signal while filtering (#28836)
Fix the issue that editing signal will segfault when there is a filter string.
2023-07-07 15:39:03 -07:00
Robbe Derks 9774fb43e9
Compressed vipc improvements (#28837)
* debug flag

* make it easier to use
2023-07-07 16:04:23 +02:00
Dean Lee 940609956d
cabana: preserve msg transmitter & signal receiver when saving DBC (#28825)
preserve transmitter&receiver_name
2023-07-06 12:39:58 -07:00
Dean Lee 059529cae2
cabana: improve timeline (#28801) 2023-07-04 12:03:08 -07:00
Qi Liu aa85fed91d
replay: fix segfault caused by pointer usage after freeing (#28779) 2023-07-01 23:01:47 -07:00
Dean Lee 5f6d947e36
cabana: fix 'QObject::connect: No such signal' warning in UnixSignalHandler (#28702) 2023-06-26 13:08:30 -07:00
Lucas Keller 0e34b87744
Document WSL bug workaround (#28696)
* Document WSL bug workaround

WSL developers may run into an issue while running GUIs, where GUIs will segfault or crash due to hardware rendering issues.

Use LIBGL_ALWAYS_SOFTWARE=1 if you see segfaults or other strange GUI failures even after setting up a fresh WSL.

History: https://github.com/commaai/openpilot/discussions/26091#discussioncomment-4258846 .

* make smaller

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2023-06-25 15:38:53 -07:00
AlexandreSato dc06ce7ac3
minor typo on replay.cc comment (#28692) 2023-06-25 20:24:19 +01:00
Dean Lee fe91ea1139
cabana: properly handle unix signals (#28657) 2023-06-23 15:27:51 -07:00
Dean Lee 6cc600e84f
cabana: fixed the issue of parsing multiplexed signals (#28660) 2023-06-23 13:14:11 -07:00
Adeeb Shihadeh d081396102 pj: update thermal debug layout 2023-06-23 13:12:33 -07:00
Kacper Rączy 45a6834a74
macOS: fix build issues & re-enable CI (#28258)
* Uncomment build_mac job

* Add PYCURL_CURL_CONFIG

* Acados universal binary

* Remove x86 macos references from sconscript

* Add missing include in cabana

* Update cereal

* Update workflow

* Remove unnecessary libpaths for darwin

* Add missing path to cached dirs

* Fix path in cache preparation step

* Add poetry caches to CI cache

* Compile acados with lower deployment target for CI

* Update cereal

* Pass -rpath in linker flags as scons doed not support RPATH on macos

* Use scons api instead of os

* @rpath in install name of acados dylibs

* SConstruct cleanup

* fix liblocationd tests by adding lib suffix based on platform

* Update cereal

* Update opendbc

* Update opendbc

* Add acados gitignore to release files

* Update cereal

* Update cereal

* Add scons_cache to build cache

* Add Caskroom to cache

* Fix typo

* Link all packages at once, instead of one by one

* Run cleanup stage using poetry

* Remove casks from cache

* Move scons cache to separate cache step

* Save scons cache only on master

* Remove restore-keys from save-scons-cache step

* Uncomment if conditions for scons save

* Add gcc-arm-embedded cask cache to cache

* Custom handling of gcc-arm-embedded toolchain cache

* Rename dep cache key

* Exclude .fseventsd from cache

* Fix glob pattern

* Remove .feventsd before caching

* Run mac_setup only if dependency cache-hit != true

* Update cereal to master

* Add overwrite flag to brew link

* Remove manual casadi build from mac_setup

* Remove restore-keys from dependency cache

* Remove linux requirement for casadi

* Restore restore-keys to dependency cache
2023-06-21 13:14:20 -07:00
Dean Lee 3c398b2e2f
cabana: simplifying endian conversion (#28601) 2023-06-20 10:56:40 -07:00
Dean Lee e80440dc5d
cabana: fixed the multi-threading issues of AbstractStream (#28590)
* fix multi-threading issues

* protect masks with mutex
2023-06-19 10:21:16 -07:00
Dean Lee 2ebd7ab088
cabana: fix segfault when switching DBC files. (#28587) 2023-06-17 20:30:17 +01:00
Adeeb Shihadeh d0369521ba
tools: update windows instructions 2023-06-16 11:06:33 -07:00
Dean Lee 4891a234e2
cabana: Prevent dialog that load autosaved file from blocking replay->start() (#28558) 2023-06-15 10:35:30 -07:00
Cameron Clough e57f3ab4da cabana: round signal raw value for value description 2023-06-15 12:46:08 +01:00
Dean Lee 6f54ebe110
cabana: use raw signal value to match value descriptions (#28554) 2023-06-15 11:50:14 +01:00
Harald Schäfer c5c9d5b921
Fix CARLA simulation (#28541)
* logmessaged conflicts with onnxrunner

* More fixes, now engages

* Fix can properly

* Otherwise it faults

* Put check back

* remove more hacks

* remove more hacks

* Not relevant anymore

* Narrow camera default
2023-06-13 22:54:37 -07:00
Dean Lee e08569b0f3
cabana: support multiplexed signals (#28309)
* support muxed signals

* write multiplexor in generateDBC

* edit multiplex_switch_value in signalView

* no overlapping warning for mux signals

* group signals by multiplexer indicator

* display freq for each multiplexed signals

* remove all multiplexed signals after switch deleted

* disable switch value

* cleanup

* historyView: use getValue

* sort by switch value

* check address

* rename variables

* rename signale type

* parse multiplexed signals in dbcmanater

* cache signal color in member variable

* cleanup num_decimals

* remove sources from dbcmanager and cleanup code

* fix sort

* check mltiplex in operator==

* fix sizehint

* convert multipledxed to normal after changing multiplxor to normal

* throw error on multiple 'M' signals

* add comment

* parse multipled signals in test case

* cleanup

* change order

* cleanup open

* display multiplexed/overlapping signals in binaryview

* sort overlapped signals by size

* refactor dbcmanager

* trimmed

* parse multiplexed signals in test case

* cleanup

* merge master

* space

* use pointer for sigs

* alldbcFiles

* cleanup

* cleanup sparkline

* use std::vector

* skip draw sparkline if isnull

* bigger capacity
2023-06-13 13:22:03 -07:00
Dean Lee 7128daebba
cabana: fix core dump when failed to connect to panda (#28529) 2023-06-13 10:49:59 -07:00
Dean Lee 9632451d1d
cabana: display signal details in tooltip (#28471)
* show details in tooltip

* display tooltip in signalView

* cleanup

* setHeader before sortByColumn

* more compact tooltip

* move to util
2023-06-12 13:58:41 -07:00
Dean Lee 4ae0378f63
automatically detect available camera streams (#27640)
* remove WideCameraOnly

* check in set_initial_state

* no block

* remove try block

* apply reviews
2023-06-12 13:40:43 -07:00
Dean Lee bd34124a84
replay: fix timeline issues (#28501) 2023-06-11 13:41:23 -07:00
Dean Lee 3a3e38e425
replay: Improve the performance of the log parser (#28495) 2023-06-11 08:28:30 -07:00
Dean Lee 376144dca3
cabana: add "view" menu to the menu bar (#28467) 2023-06-09 10:54:52 -07:00
Dean Lee 0e67d41eef
cabana: fix bg color issue for inactive item (#28468) 2023-06-09 10:50:25 -07:00
Cameron Clough f210b2da08
Update SSH README 2023-06-08 21:05:38 -07:00
Adeeb Shihadeh f3299b19cf pj: fix camera timings layout default tab 2023-06-08 16:08:20 -07:00
Dean Lee ff4aae85fe
cabana: refactor dbc manager (#28445)
* rafactor signal

* cleanup

* refacto dbcmanager

* refactor dbcmanger
2023-06-08 13:41:55 -07:00
Dean Lee 3b9fdf206e
cabana: fix hang on exiting with CTRL+C (#28455) 2023-06-08 13:30:19 -07:00
Angus Gratton 7cb4adfebb
Cabana: Improve contrast when using dark themes (#28389) 2023-06-06 22:22:06 -07:00
Kacper Rączy 64377a88f9
process_replay: helpers (#28367)
* process_replay helper

* Refactor

* refactor check_enabled uses

* fix __init__

* noqa in __init__ imports

* Move compare_logs outside of process_replay

* Move save_logs to tools.lib.helpers

* Remove save_log from compare_logs

* fix lint issues
2023-06-06 10:31:13 -07:00
Dean Lee b7a2a921ec
cabana: segment live stream logging (#28407) 2023-06-05 09:44:30 -07:00
Angus Gratton f659d4d44b
cabana dbc: Sort signals by name if start bits are equal (#28399) 2023-06-04 14:04:09 -07:00
Angus Gratton 92d8295096
cabana: Add menu item that resets the window layout (#28390) 2023-06-03 14:51:16 -07:00
Dean Lee 67b27b7496
replay: fixed incorrect totalSeconds when there are invalid segments in route (#28388) 2023-06-03 11:43:27 -07:00
Dean Lee 4e738e64e4
cabana: add a test case for dbc parsing (#28383)
test case for dbc parsing
2023-06-02 22:34:37 -07:00
Kacper Rączy 26ad9b32f3
replay: lock uiDebug and userFlag messages behind all flag (#28349)
* Add ui-debug flag, for replaying ui debug states

* Fix flag description

* Replace --ui-debug with --all flag

* Add base_blacklist for services blacklisted by default
2023-06-02 15:17:25 -07:00
Dean Lee 99398176df
cabana: Support parsing of multi-line comments (#28345) 2023-06-01 20:52:08 -07:00