Commit Graph

468 Commits

Author SHA1 Message Date
Jason Young
c007c7e681 Improved steering accuracy measurement script (#23583)
* move steering accuracy measurement script

* git rebase is utterly worthless

* fix header width
2022-05-12 15:09:37 +02:00
Dylan Herman
d2eef1955c add mypy check for return-any (#24379)
* add mypy check for return-any

* remove unused import

* typing

* remove unnecessary variable typing

* cleanup

* cleanup

* bump submodules

* small fixes

* only a problem on mac

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-05-12 14:59:00 +02:00
grekiki
17e33978cd Mypy fixes for --check-untyped-defs (#24372)
more type fixes
2022-05-12 14:08:11 +02:00
Mark Murnane
e84d073233 Add gamepad support for body (#24415)
This MR adds basic gamepad support to the joystick web client.
The mappings appear to be consistent between a few controllers I tried, so I think inverting both axes is the optimal mapping.
2022-05-12 13:40:05 +02:00
Adeeb Shihadeh
4b063a0246 pj: add fan rpm to thermal layout 2022-05-10 19:51:22 -07:00
George Hotz
2008db47c2 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>
2022-05-10 15:20:51 -07:00
Ross Fisher
32e4dc3869 tools: add link to jungle repo (#24477) 2022-05-09 14:24:09 -07:00
George Hotz
dded24662f update compressed vipc to function on packets 2022-05-09 13:44:09 -07:00
Shane Smiskol
6163dd5ca0 URLFile: raise exception if remote URL doesn't exist when using cache (#24432)
* URLFile returns empty bytes if using cache and remote file doesn't exist

* better exception

* assert on cached files
2022-05-09 13:31:55 -07:00
ntegan1
bf269bd883 Tools: allow uncompressed logs (#24471) 2022-05-09 12:07:19 -07:00
Adeeb Shihadeh
930d0c01a9 latency logger: better errors and minor cleanup 2022-05-04 14:16:27 -07:00
Lukas Petersson
43d2a3c187 warning instead assert (#24424)
* warning instead assert

* warning description
2022-05-04 14:05:41 -07:00
Jason Young
0771addd14 update joystick README for webjoystick (#24413) 2022-05-03 17:03:17 -07:00
George Hotz
0baa4c3e2a 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>
2022-04-30 09:22:52 -07:00
Lukas Petersson
1439867d16 Latency logger bad data robustness (#24343)
* robustness against bad data

* sort by time logreader

* loop until last frameid
2022-04-29 13:32:21 -07:00
Gijs Koning
ee433dfa57 Simulator: Fix CI and set low_quality default (#24354)
* Change low_quality argument and fix closing carla bridge

* Some fixes

* Change carla process in test

* Change fov to 120, higher doesn't look good

* Update readme and remove redundant test

* update

* Add folder description
2022-04-29 07:15:05 -07:00
Shane Smiskol
2fa5a59e3f Fix can replay Jungle warning (#24364) 2022-04-28 17:43:26 -07:00
Jason Young
be0f27ac85 Fix PlotJuggler saved tuning layout (#24347) 2022-04-27 21:57:37 -07:00
Daniel
c60ce2a770 Update can_replay.py (#24346)
Fixed typo from PandaJugnle to PandaJungle
2022-04-27 21:43:36 -07:00
Adeeb Shihadeh
bfeaf35d6d fix panda_jungle static analysis 2022-04-27 15:45:00 -07:00
grekiki
049b163ea0 mypy: enable --warn-unused-ignores (#24287)
* this is the easy part to check

* Not sure what this fixes, 8aaf00c6a4

* bump laika

* works here

* cleanup

* add types-certifi

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-27 14:26:15 -07:00
George Hotz
3694f9801c compressed_vipc: make yuv default 2022-04-25 21:44:37 -07:00
Comma Device
729d7ae549 body: remove print spam 2022-04-25 20:07:12 -07:00
Cameron Clough
2d77a31cd5 Don't build OpenCV tests in webcam docker image (#24326)
Building opencv tests and apps are [on by default](https://docs.opencv.org/4.x/db/d05/tutorial_config_reference.html#tutorial_config_reference_general_tests),
but we don't need them.
2022-04-25 16:08:42 -07:00
MT
2a64f7b563 ubuntu_setup.sh: support 22.04 LTS (#24312)
* Build on 22.04 lts

- Removed python-dev from install_ubuntu_common_requirements()
- Added case ubuntu 22.04
- Added install_ubuntu_21.10_requirements()
- Modified install_ubuntu_latest_requirements() to include python3-dev instead of python-dev

* remove 21.10

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-25 14:06:30 -07:00
Gijs Koning
01968ca61b Simulator: Fix keyboard input (#24320)
* Fix keyboard input for simulator

* add unblock_stdout() to test

* Revert import change
2022-04-25 07:26:30 -07:00
Gijs Koning
9be23cbdb9 Simulator Tests (#24274)
* squash #24009

* Fix from other pr
Add low-quality arg

* Update tools/sim/test/test_carla_integration.py

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

* Updates for comments. Not finished yet

* commit

* fix arguments

* Final changes for comments

* Final fixes

* increase carla client timeout to 10

* make test executable

* actually wait for controlsd to send messages

* Error proof test. Starting up carla at each test and closing down using docker (tried many things).

* commit test carla

* Removed some time.sleeps
Add some more retries for bridge.

* Stop while loop on shutdown

* Increase teardown waiting time

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-22 18:00:49 +02:00
grekiki
b8b15d5cf1 mypy: enable --warn-unreachable (#24282)
* Optional solves mypy assuming None is always None

* oops

* spaces

* Update registration.py

* fix local error

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-04-21 18:27:45 +02:00
George Hotz
8d24655787 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>
2022-04-20 14:51:24 -07:00
Lukas Petersson
e063f77acc Latencylogger list logreader (#24276) 2022-04-20 12:02:05 -07:00
Gijs Koning
13254cef2f Add wide camera to Carla (#23989)
* Add c3 camera flag to bridge.py

* Set c3_cameras to default

* add runtime error message

* Remove c2 arg

* Update to 163 fov to not see through car

* update comment

* Update tools/sim/bridge.py

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

* Revert camera.py changes

* Remove focal_length

* cleanup

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2022-04-20 08:06:56 -07:00
Gijs Koning
e95a250bca Carla pip dependency and fix for git init (#24258)
* Add carla pip dependency for dev

* Revert other packages in pipfile

* Remove redundant carla install in docker

* Fix CI
Remove broken openpilot_build

* New run command
2022-04-20 05:23:27 -07:00
Lukas Petersson
397bd25e97 Disambiguate frame id in latencylogger (#24164)
* add tools to disambiguate frame id

* Update selfdrive/camerad/cameras/camera_qcom2.cc

Co-authored-by: Gijs Koning <gijs-koning@live.nl>

* bug fix

* remove duplicate code

* PR comments

* bug fix

Co-authored-by: Gijs Koning <gijs-koning@live.nl>
Co-authored-by: Comma Device <device@comma.ai>
2022-04-19 14:29:24 -07:00
Adeeb Shihadeh
76a8338197 manager: start bridge and web joystick for notcars (#24212)
* manager: start bridge and web joystick for notcars

* fix that

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
2022-04-19 14:13:05 -07:00
Adeeb Shihadeh
c5378cf8b9 improve tici thermal control (#24228)
* improve tici thermals

* more i

* always 70
2022-04-19 11:07:54 -07:00
George Hotz
13e18b605a joystickd: add send thread 2022-04-18 22:35:19 -07:00
George Hotz
e9ef650901 joystickd: add WEB support, add logitech joystick support 2022-04-18 22:13:09 -07:00
Adeeb Shihadeh
5c48e7bc86 remove comma two support (#24248)
* remove comma two support

* cleanup release files

* little more

* more libs

* no more gralloc

* add snpe back
2022-04-18 17:55:23 -07:00
George Hotz
df6c2b6af9 body: web joystick handle timeout 2022-04-14 16:12:30 -07:00
George Hotz
d7b849720c body: web joystick 2022-04-13 14:29:17 -07:00
Lukas Petersson
3ea92f6cd3 Latencylogger optimization (#24166) 2022-04-13 13:50:57 -07:00
George Hotz
dab978083b loggerd: broadcast encoder data (#24177)
* encode data try 1

* fix pc build

* low quality compressed streamer with pyav

* nvidia streamer

* timestamp support

* fix latency measurement

* refactor

* camerastream updates

* fix linter

* compressed to vipc, clean

* remove print

* touchups

Co-authored-by: Comma Device <device@comma.ai>
2022-04-12 12:08:50 -07:00
Lukas Petersson
7034888cdb latency logger usable in testing closet (#24183) 2022-04-11 16:44:24 -07:00
Lukas Petersson
fecaac8eda latencylogger graph design (#24165)
* latencylogger graph design

* Update tools/latencylogger/latency_logger.py

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

* quotes

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-07 13:18:26 -07:00
Lukas Petersson
65fca83abe Latency logging 2 (#24058)
* msg_order and gantt

* frameId in long/lat planner

* track frame id

* controls frame id

* graph tracked events

* graph json

* cloudlog timestamp

* c++ cloudlog

* add frame id

* bug fixes

* bug fixes

* frame id visionicp

* bug fixes and debug level

* timestamp log placement

* print timestamps in table

* translate events

* more logging

* bug fixes

* daemon boardd

* print logs with boardd

* more timestamp logs

* cleanup

* remove publish logs

* bug fix

* timestamp received

* timestamp received

* bug fixes

* use json lib

* ignore driver camera

* prep for new timestamp pipeline

* bug fix

* read new pipeline unfinnished

* read new pipeline

* bug fix

* add frame to controlsstate

* remove controlsstate

* print

* cleanup

* more cleanup + bug fix

* clock build issue

* remove unused imports

* format durations

* increase speed

* pr comments fixes

* conflicts

* set MANAGER_DAEMON for boardd

* clean script code

* bug fix + argparse

* remove rcv time

* bug fixes

* print without tabulate

* fix pre-commits

* plot gnatt

* color bug fix

* read without timestampextra

* bump panda

* mono time instead of frame id

* finnish script

* clean unused

* clean unused logging

* monotonic + json fixes

* del test

* remove whilelines

* bump laika

* cleanup

* remove deps

* logs nicer strings

* remove plotting from scirpt

* reset pipfile

* reset pipfile

* nicer strings

* bug fix

* bug fix

* pr comments cleaning

* remove plotting

* bug fix

* new demo route

* bump opendbc and panda

* cereal master

* cereal master

* script less komplex

* assertions

* matplotlib

* readme

* Update README.md

* graph html

* design fixes

* more code design

* Update common/logging_extra.py

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

* whitespace

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

* Update tools/latency_logger/latency_logger.py

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

* pr comments

* bug fix

* readme + env once

* clean swaglog

* bug fix

* Update tools/latencylogger/README.md

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

* revert

* revert

* clean swaglog with error

* remove typo file

* revert graph

* cereal

* submodules

* whitespaces

* update refs

Co-authored-by: Bruce Wayne <batman@workstation-openpilot2.internal>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-04-05 21:05:45 -07:00
Shane Smiskol
a953d8222d PlotJuggler: fix support for Cabana links (#24037)
* support Cabana links better

* not needed

* Update tools/plotjuggler/juggle.py
2022-04-05 11:24:03 -07:00
Erich Moraga
f861854e25 Added embedded tuning wiki hyperlink (#24133)
https://github.com/commaai/openpilot/wiki/Tuning
2022-04-05 10:30:09 -07:00
Adeeb Shihadeh
d1c3b7a20d sim: write params to enable in Dockerfile (#24113) 2022-04-04 09:05:20 -07:00
Adeeb Shihadeh
c95ec211e1 MultiLogIterator: add function to reset 2022-03-25 19:56:22 -07:00
Adeeb Shihadeh
bb36a1c8b2 sim: add ignition toggling (#24043) 2022-03-25 14:17:45 -07:00