Commit Graph

140 Commits

Author SHA1 Message Date
grekiki
0393f8b99c Carla simulator: set driver orientation (#27363)
old-commit-hash: 202eb06a05
2023-02-16 14:51:25 -08:00
Adeeb Shihadeh
b3e47c691b move all third party stuff into third_party/ (#26853)
* mv fastcluster

* move msm_kgsl.h

* camerad include

* update path

* mv pyextra

* fix tici build

* add acados_template to release build

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: cd8e03d53e
2022-12-31 21:00:50 -08:00
Hamid Ebadi
1ba96c78a8 carla sim: fix accelerometer sensor data (#26794)
old-commit-hash: 49ae806534
2022-12-20 13:45:06 -08:00
Adeeb Shihadeh
5f4cc55c2c sim: disable micd (#26653)
old-commit-hash: 996a6c06d4
2022-11-30 23:12:35 -08:00
James
beadbb1b39 Fixed typo in CARLA README.md (#26615)
old-commit-hash: 67fb344146
2022-11-29 01:05:38 -08:00
Ricardo Nuno
9e033f6d7e sim: add docker kill to openpilot docker (#26310)
add docker kill to openpilot docker
old-commit-hash: d1cf31bced
2022-11-01 08:09:47 -07:00
Rohit Bernard
bf27021719 sim: Converting RGB frames to NV12 format in OpenCL (#26169)
* convert carla rgb frames to nv12

* code cleanup

* move kernel

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 9377448888
2022-10-29 13:20:37 -07:00
wjxjmj
dbd5cd3341 Add ip and port arguments to /tools/sim/bridge.py (#26011)
* Add ip and port arguments

* Add descriptions of ip and port arguments

* Update README.md

* Update README.md

* prefer host/port options

Co-authored-by: Cameron Clough <cameronjclough@gmail.com>
old-commit-hash: dbdb3a02a8
2022-10-11 14:16:40 -07:00
Adeeb Shihadeh
3e2f436d4c auto-detect pigeon or quectel (#25991)
* auto-detect pigeon or quectel

* persistent

* fix sim

* fix process replay

* fix locationd unit tests

* fix that

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 01d05f66fe
2022-10-06 16:46:15 -07:00
Shane Smiskol
984134be0e FPv2: fixed fingerprint overrides query result (#25990)
* query FW versions if fixed (override after)

* skip here

* also skip here

* and here
old-commit-hash: e7805eb5c5
2022-10-06 15:24:52 -07:00
Adeeb Shihadeh
1cb4cdab24 sim: fix sensor freq and timestamps (#25937)
* sim: fix sensor freq and timestamps

* 100hz

* fix that too
old-commit-hash: 5d33199905
2022-09-29 22:36:09 -07:00
Kurt Nistelberger
fb06d2769f Sensor events splitup (#25714)
* PoC of reading sensors via interrupts instead of polling

* add Gyro and draft for magn

* add more functionality to gpio.cc

* change LSM gyro to interrupt

* resolve rebase conflict

* update BMX accel interrupt impl

* add interrupt collector thread to fetch in parallel

* change get_event interface to return true on successful read

* update BMX gyro interrupt impl

* update gpio.h/.cc according to comments

* address comments, rename Edgetype enum

* Edgetype to EdgeType

* update sensor interrupt interface

* add error handling, and read fd on trigger

* avoid sending empty messages

* fix build

* use gpiochip

* less diff

* gpiochip on both edges, but skip falling edge if rising edge is detected

* init last_ts with 0

* update sensord testcases

* update sensord testsweet

* test for pipeline

* readd with_process

* add null check

* move tests update to seperate PR

* sensord: improve test coverage (#25683)

* update sensord-interrupt testsweet

* address review comments

* inc stddev threshold

* fix format string

* add version 0 check again

* relax strictness after c3 with bmx tests

* relax strictness after tests

Co-authored-by: Kurt Nistelberger <kurt.nistelberger@gmail.com>

* address PR comments

* fix typo

* remove 4ms limit, and skip first 0.5sec of data

* revert disable_interuppt change to destructor

* fix and remove timing skip

* make gpiochip generic

* sensord port

* change from sensorEvents to separated events

* fix gyro usage

* add splitted sensor tests

* modify debug script sensor_data_to_hist.py

* refactor get_event interface to remove sensorEvent message type

* update locationd to non sensorEvent usage

* tmp commit

* fix replay

* fix accelerometer type

* fix sensor to hist debug script

* update sensord tests to split events

* remove rebase artifacts

* port test_sensord.py

* small clean up

* change cereal to sensorEvents-splitup branch

* upate sensorEvents in regen

* fix route generation for splitted sensor events

* regen cleanUp from sensorEvents change

* .

* remove light and temp from locationd

* add generic init delay per sensor

* .

* update routes

* move bmx gyro/accel to its own channel

* adopt sensor tests to bmx channel

* remove rebase artifacts

* fix sensord test

* handle bmx not present

* add bmx sockets to regen

* .

* .

* code cleanUp

* .

* address PR comments

* address PR comments

* address PR comments

* lsm clean up

* readd sensorEvents

* rever regen.py

* .

* update replay refs

* move channels

* fix artifact

* bump cereal

* update refs

* fix timing issue

Co-authored-by: Bruce Wayne <batman@workstation-eu-intern2.eu.local>
Co-authored-by: gast04 <kurt.nistelberger@gmail.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 29d3ed2ce6
2022-09-29 14:31:54 -07:00
Adeeb Shihadeh
35ff65121e pre-commit: add codespell (#25571)
old-commit-hash: 6590fb2b93
2022-08-30 11:20:55 -07:00
Adeeb Shihadeh
d9c279aea9 params: make python and c++ API match (#25573)
* params: make python and c++ API match

* few more
old-commit-hash: 90a4565eb2
2022-08-26 20:46:19 -07:00
Cameron Clough
25236f1f79 sim: fix gps message (#25521)
fix gps timestamp field renamed

bug introduced in https://github.com/commaai/cereal/pull/341
old-commit-hash: f65547fbe2
2022-08-22 16:23:36 -07:00
Shane Smiskol
2bd8ee0974 controls: block resume if cruise not previously engaged (#25402)
* see if this works at all

* can revert this

* think adding a no entry conditionally is nicer

* then we can revert this

* 0 makes more sense

* Revert "0 makes more sense"

This reverts commit efc89e8a2389ef58fbc0cec0a2872d24db524867.

* gm CC uses > 70

* bump cereal

* comment

* test on Honda

* whoops

* works

* add exception with todo

* moved button enable events to controlsd

* get rid of that

get rid of that

* different values for now

* car interfaces add enable event, controlsd can block it

* Regen and update refs

* delete if not set

* One place

one place

* regen routes are uninitialized first few frames

* Trim start of segment so it's like original segment

* stash

* regen

* not working

* clean up

* more cleanup

* revert

* bump ceral

* actually check resume button

* whoops

* pcmCruise cars don't use setSpeed, so we're good

* engage correctly in sim

* Update ref_commit

* Update refs
old-commit-hash: 5ed587ebef
2022-08-17 18:03:33 -07:00
Adeeb Shihadeh
18b4b1e73e remove old tools script
old-commit-hash: 49044b5399
2022-08-07 17:10:14 -07:00
Jeroen
e215317cf0 sim: role_name attribute used by ScenarioRunner for CARLA (#25315)
old-commit-hash: 26d29d2138
2022-07-31 13:18:02 -07:00
Adeeb Shihadeh
04af978260 let can packer handle counter (#25240)
* let can packer handle counter

* diff is expected

* update refs

* clean that up

* bump opendbc

* fix sim
old-commit-hash: 0ca62bf7df
2022-07-21 20:54:53 -07:00
Adeeb Shihadeh
b73f02bf45 controlsd: handle radar missing + cleanup system error handling (#25179)
* controlsd: handle radar missing + cleanup system erorr handling

* fix carla

* update refs
old-commit-hash: 505bbce29d
2022-07-14 19:55:18 -07:00
ZwX1616
3e2828c9bb fix carla test fake driverState (#24959)
use driverstatev2
old-commit-hash: 6721f0ef57
2022-06-24 14:29:46 -07:00
Adeeb Shihadeh
f06bb9d5f2 CANParser: invalid until valid (#24945)
* CANParser: invalid until valid

* bump opendbc

* bump opendbc

* fix counter in sim
old-commit-hash: 569a39ff76
2022-06-22 15:38:38 -07:00
Gijs Koning
5494622601 Improve laikad cpu usage. Less pos fix. Less local imports (#24887)
* Improve laikad cpu usage. Less pos fix. Not local imports

* Add laika to files_common

* Add laika to dockerfile sim

* Fix

* Fix

* undo
old-commit-hash: 1c4b145aa4
2022-06-20 14:24:11 +02:00
Adeeb Shihadeh
5fcc792527 sim: update cl kernel path
old-commit-hash: 1baf0e3f4a
2022-06-19 15:49:38 -07:00
Adeeb Shihadeh
5425336963 misc jenkins fixups (#24840)
* bump cereal

* remove that

* pull cl image

* lil docker cleanup
old-commit-hash: 39da6912ea
2022-06-12 18:00:00 -07:00
Jeroen
75a30612b0 Updated CARLA to v0.9.13 (#24575)
* Updated CARLA to v0.9.13

* pipenv lock

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 1c29b20e72
2022-06-12 09:32:18 -07:00
Maxime Desroches
9a003e9b29 simulator: run simulator test in ci (#24691)
* run simulator test in ci

* block navd process

* block ui

* fix jenkins

* build docker

* remove tty

* remove tty for carla

* detach carla_sim

* more retries

* only build once

* add more time for bridge

* cleanup

* use qt offscreen

* expose to docker

* block ui

* use new dockerimage

* fix

* from ubuntu20.04

* install curl

* add ssh

* add locales

* noninteractive

* syntax

* use base

* smaller image

* add git + git lfs

* kill carla

* run in parallel

* fix missing agents

* default agent?

* little cleanup

* default doesn't work

* not in ci

* fix path

* fix path

* new msg

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 5add0c6159
2022-06-11 15:32:12 -07:00
HaraldSchafer
7c4645f227 Fix onnx model replay (#24702)
* No more C2

* Add test

* Various fixups

* Use ONNXCPU

* rm prints

* LFS pull

* Use sim docker

* Try sim docker again

* Print counter

* Make sure it can fail

* Fails correctly

* comments

* Add more install to opencl base docker

* vim not needed in base
old-commit-hash: a2c6b30c98
2022-06-03 10:43:09 -07:00
HaraldSchafer
cf0564382a CL in docker (#24718)
* Move CL to base docker

* Different docker for cl

* add cl base docker

* add to tool

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dc4d4f875b
2022-06-02 18:26:12 -07:00
Adeeb Shihadeh
3dd10e51e1 Create system/ for generic services (#24717)
* Create system/ for generic services

* logcatd joins the party

* fix those up
old-commit-hash: afd16b2ade
2022-06-02 17:02:25 -07:00
HaraldSchafer
edb35600b7 Update README.md
old-commit-hash: c2b334acb5
2022-06-02 16:45:11 -07:00
Gijs Koning
6a53db981b Simulator: Speed up process by removing second camera (#24679)
* simulator: support running wide camera only

* proper frame id

* use param name that makes more sense

* do some cleanup

* Update tools/sim/bridge.py

Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: b5aed2bf67
2022-05-30 15:25:07 +02:00
Willem Melching
e45155f592 sim no encoderd, move to BLOCK env variable
old-commit-hash: 85b07bf3e8
2022-05-30 11:49:15 +02:00
Adeeb Shihadeh
3e8625e50b visionipc python shim (#24660)
old-commit-hash: 32a9ccfc37
2022-05-25 20:49:56 -07:00
Adeeb Shihadeh
39de4d80b4 move models to selfdrive/modeld/ (#24539)
* move models to selfdrive/modeld/

* two more refs
old-commit-hash: 319f3d1475
2022-05-15 17:29:09 -07:00
Adeeb Shihadeh
29a516bed8 replay: cleanup unused RGB buffers (#24537)
* replay: cleanup unused RGB buffers

* update replay cam

* little more
old-commit-hash: ab75c53792
2022-05-14 19:55:12 -07:00
grekiki
7cd23af9b1 Mypy fixes for --check-untyped-defs (#24372)
more type fixes
old-commit-hash: 17e33978cd
2022-05-12 14:08:11 +02:00
Gijs Koning
d0fc9afa48 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
old-commit-hash: ee433dfa57
2022-04-29 07:15:05 -07:00
Gijs Koning
0112f4212f Simulator: Fix keyboard input (#24320)
* Fix keyboard input for simulator

* add unblock_stdout() to test

* Revert import change
old-commit-hash: 01968ca61b
2022-04-25 07:26:30 -07:00
Gijs Koning
4ed3a158af 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>
old-commit-hash: 9be23cbdb9
2022-04-22 18:00:49 +02:00
grekiki
cc943ac9a5 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>
old-commit-hash: b8b15d5cf1
2022-04-21 18:27:45 +02:00
Gijs Koning
8ddeb3f531 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>
old-commit-hash: 13254cef2f
2022-04-20 08:06:56 -07:00
Gijs Koning
7b4b8d3f58 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
old-commit-hash: e95a250bca
2022-04-20 05:23:27 -07:00
Adeeb Shihadeh
69bfa59a81 sim: write params to enable in Dockerfile (#24113)
old-commit-hash: d1c3b7a20d
2022-04-04 09:05:20 -07:00
Adeeb Shihadeh
0c9aa1570b sim: add ignition toggling (#24043)
old-commit-hash: bb36a1c8b2
2022-03-25 14:17:45 -07:00
Jack Huang
d44266bed4 CARLA: fix setting camera EOF (#24034)
* Fix Openpilot in Carla isn't accelerating

The scalars of the timestamp are different in real-world and simulation,
which will cause an infinite loop in selfdrive/modeld/modeld.cc.

* Set eof based on the frame ID

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

* remove global

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: db93275d87
2022-03-25 13:45:08 -07:00
Adeeb Shihadeh
bd71c594a2 pylint: enforce indentation (W0311) (#24039)
* pylint: enforce indentation (W0311)

* few more
old-commit-hash: 8af20af66d
2022-03-24 23:23:29 -07:00
Gijs Koning
772cbb7753 Update carla script to easier install docker and nvidia-docker (#23986)
* Easier docker and nvidia-docker install in carla script

* Small cleanup

* cleanuo

* cleanup

* More comments

* Remove adding usergroup step
old-commit-hash: 3d8537ab23
2022-03-18 14:07:39 -07:00
Gijs Koning
cedd8abc05 Rename RGB vision streams to match YUV streams (#23961)
* Renaming VISION_STREAM_RGB_.. to match yuv names like VISION_STREAM_ROAD
VISION_STREAM_RGB_BACK -> VISION_STREAM_RGB_ROAD
VISION_STREAM_RGB_FRONT -> VISION_STREAM_RGB_DRIVER

* little more

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: 57b6fdc17a
2022-03-14 14:03:54 -07:00
Adeeb Shihadeh
05ba2a5866 sim: fix bridge after default values removed from CANParser
old-commit-hash: 36a3ec04be
2022-01-29 18:22:14 -08:00