Commit Graph

33 Commits (master)

Author SHA1 Message Date
Adeeb Shihadeh bb36a1c8b2
sim: add ignition toggling (#24043) 2022-03-25 14:17:45 -07:00
Adeeb Shihadeh 8af20af66d
pylint: enforce indentation (W0311) (#24039)
* pylint: enforce indentation (W0311)

* few more
2022-03-24 23:23:29 -07:00
Adeeb Shihadeh 36a3ec04be sim: fix bridge after default values removed from CANParser 2022-01-29 18:22:14 -08:00
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
jimw a58d272ae4
CARLA: send YUV and RGB over visionipc from bridge.py (#23012)
* CARLA: send YUV and RGB over visionipc

* CARLA: send YUV and RGB over visionipc-fix pipfile

* CARLA: send YUV and RGB over visionipc-Camerad class

* relock pipfile

* small bridge cleanup

* use tici camera resolution

* update vof

* HUD_SETTING has no counter

* no loggerd

Co-authored-by: jwolffe <wolffja@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
2021-11-26 16:58:25 +01:00
Adeeb Shihadeh 45ced84acf sim: fix CAN error and block loggerd 2021-11-13 12:21:24 -08:00
Adeeb Shihadeh e556d3d3d3
sim: set fingerprint with environment variable (#22679) 2021-10-24 21:59:50 -07:00
orphen 325cabd4da
fix: sim: gracefully shutdown the bridge (#21413) 2021-06-29 13:45:34 -07:00
HaraldSchafer 234971203b
Simplify longitudinal tests (#21337)
* first pass

* passes!

* little more cleanup

* little more

* fix sim

* remove more plot stuff

* fix crash check

* fcw

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-06-24 21:03:18 -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
Cameron Reikes 12ce822252
Set standstill bit in sim (#20921) 2021-05-15 21:09:17 -07:00
iejMac 072cdcad6b
minor bug fixes in sim (#20286)
* order doensn't matter

* order doensn't matter

* minor fixes

* minor fixes

* not blocking ctrl-c

* removing weather params

* removing type ignore
2021-03-09 19:52:43 -08:00
Adeeb Shihadeh fe7f3f0ec6
remove gpsd (#20027) 2021-02-10 16:39:39 -08:00
Marcos S c03a95f7f9
Carla fixes (#19824)
* use carla provided frame_number

* fix carla comm issues error

* add minimal W-A-S-D keyboard controls

* fix window from carla docker not showing

* carla 0.9.7 uses `frame`, not `frame_number`

* set safetyModel on health for simulator

* safetyModel check now works with simulator

* ignore ubloxRaw and frontFrame when running sim

* Update selfdrive/controls/controlsd.py

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

* added WINDOW flag for optional show carla window

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-18 17:16:32 -08:00
Adeeb Shihadeh cc1bca542d
update simulator to ubuntu 20.04 (#2463)
* fix sim build in 20.04

* run ci

* fix docker build

* restore ci cofnig

Co-authored-by: Willem Melching <willem.melching@gmail.com>
2020-11-18 13:10:37 -08:00
Vivek Aithal c5dfbe7a72
dockerize carla + openpilot (#2011)
* dockerize carla + openpilot

* separate dockerfile

* bring back CI dockerfile

* cleanup bridge

* add op docker build and start script

* build container in CI

* fix camerad hack

* remove most magic numbers from bridge.py

* openpilot-sim docker build and run scripts

* fix dmonitoring hacks

* revert controlsd hacks

* clean up build scripts

* singular

* fix path

* fix image name

* modify sim readme

* sim readme and start script changes

* dockerfile with working opengl

* working opengl + passing panda build_st in docker

* fix bug in sim docker file

* bugfix sim docker file

* bugfix all op-sim docker issues

* modify readme + run script

* IT DRIVES

* clean this up

* more cleanup

* cleanup docker stuff

* more cleanup

* start with openpilot-base

* install carla python package

* Script is not in lib

* chmod

* everything should be running in docker now, the code may not be nice though

* works locally...

* rhdChecked is deprecated

* Checkout using git lfs when building sim container

* try to pass the tests

* pull latest docker

* gps should not throw an error on openpilot launch in bridge.py

* fixed a coding style error

* Only start ubloxd in car

* fixed more style problems

* revert typo

* Use enviromental variable to prevent errors in a simulator

* Remove unused import

* Attempt to fix missing enviromental variable

* fix typo

* less work for users, auto tmux engagement

* less work for users, auto tmux engagement

* fix check for nvidia

* clean up nvidia check

* remove typo, shorted dockerfile

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Bruce Wayne <batman@workstation-eu-gregor.eu.local>
Co-authored-by: Gregor Kikelj <gregor1234567890@gmail.com>
2020-09-10 12:14:49 +02:00
Adeeb Shihadeh 20162f7a4a fix counter mismatch in sim 2020-08-06 13:23:20 -07:00
Willem Melching 843a64c72f
Make pylint more strict (#1626)
* make pylint more strict

* cleanup in progress

* done cleaning up

* no opendbc
2020-06-02 16:29:32 -07:00
Adeeb Shihadeh 27754a277c enable E261 in flake8: two spaces before inline comment 2020-05-31 14:07:29 -07:00
Adeeb Shihadeh efd5dffb1e enable flake8 E231: missing whitespace after comma 2020-05-31 12:49:11 -07:00
Adeeb d9bf9f0a40
Enable more flake8 checks (#1602)
* enable some more flake8 checks

* some more quick ones

* bump opendbc

* e401

* e711 e712

* e115 e116

* e222

* e301

* remove that

* e129

* e701 e702

* e125 e131

* e227

* e306

* e262

* W503

* e713

* e704

* e731

* bump opendbc

* fix some e722
2020-05-30 20:14:58 -07:00
Willem Melching ba2ac1207a
Running pre-commit in CI (#1590)
* Running pre-commit in CI

* fix dockerfile syntax

* dont run on submodule repo folders

* Fix some import errors in ci

* more stuff

* That should be the last one
2020-05-28 15:40:48 -07:00
Willem Melching 3d08dcc3b2
Run mypy commit hook (#1591)
* run mypy commit hook

* fix mypy errors
2020-05-28 15:05:04 -07:00
Willem Melching 29aaa44740
flake8 in pre-commit(#1583) 2020-05-27 20:33:05 -07:00
Willem Melching bd06434243
pre-commit pylint (#1580)
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
-  pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344

* add pylint to pre-commit and make everything pass

* Remove uncommented stuff

Co-authored-by: J <user@4800.lan>
2020-05-27 20:00:14 -07:00
Adeeb Shihadeh 10ae22a192 delete unused lines 2020-05-10 11:25:42 -07:00
Adeeb 008700a6b3
LGTM fixes (#1480) 2020-05-09 16:40:43 -07:00
George Hotz 1295cfe06c
Using lgtm.com and fixing found alerts (#1452)
* lgtm in readme, and mac nui fixes

* call super inits in radars

* unused imports, dup lines

* more radars, more unused imports

* pass CP into RadarInterfaceBase

* more fixups

* unused imports

* delete unused lines

* ugh, new unused import

Co-authored-by: George Hotz <geohot@gmail.com>
2020-05-02 12:07:34 -07:00
ZwX1616 a95e61edf4
add webcam to cameras (#1201) 2020-03-26 19:19:47 -07:00
littlemountainman a32fe80d39
Make Nui tests work. Framereader moved to tools/clib (#1185)
* add more deps

* setup is now working,removing brackets

* Fixing tests in nui

* make it eveno

* readme markdown and town not needed since set via client

* adding explanations for sim in readme

* make it markdown buildable

* revert changes in setup

* work now
2020-03-01 10:50:03 -08:00
George Hotz 9d8d7ade3e
Simulator running with keyboard (#1176)
* sim with keyboard

* write calibration

* need recv

* use readchar

* doesn't accelerate

* queue, not zmq

* fix line wrap

* fix physics

* add BLOCK to manager
2020-02-29 10:51:39 -08:00
ZwX1616 78ba94a977
WIP: sim, need to unhack openpilot (#1174)
* comma hackathon

* update readme

* update readme

* Update README.md

* Update README.md

* Update README.md

* add more to readme

* Update README.md

* unhack

* Delete README.md

* Delete get_carla_095.sh

* Delete run_carla_095.sh

* remove NO_FLIP, and fix imu destroy

* remove pipfile

* make ui match

* actually match ui

Co-authored-by: George Hotz <geohot@gmail.com>
2020-02-29 02:18:17 -08:00
George Hotz c50c718293
Cleanup simulator and add usage instructions (#1050)
* cleanup simulator files

* minor updates

* update readme

* keras runner builds

* hmm, still doesn't work

* keras runner works

* should work with python3 keras mod

* touchups
2020-02-04 19:46:57 -08:00