Commit Graph

115 Commits

Author SHA1 Message Date
Walter Morales e52b26f886
Fixed cereal bug for simulation in Carla (#277) 2022-04-08 10:13:33 -07:00
Willem Melching 1620ce54ee
add SubMaster.freq_ok (#274)
* add SubMaster.freq_ok

* actually check freq_ok

* include freq ok into alive again

* revert those changes

* split out from alive
2022-04-06 16:07:18 -07:00
Dylan Herman bacb0604fc
refactor Union[None, ...] with Optional (#264) 2022-03-24 11:05:50 -07:00
Willem Melching e137c5731e
Less open file permissions (#187) 2021-08-28 18:20:54 -07:00
Dean Lee b366ea46a7
SubMaster: set traversalLimitInWords to max (#188)
* set traversalLimitInWords to max

* NO_TRAVERSAL_LIMIT

space

* log_from_bytes
2021-08-17 16:47:26 +02:00
ShaneSmiskol 127edd520f
Unbridge - for republishing msgs sent from your laptop to openpilot (#160)
* duplicate bridge

* unbridge!

* some fixes

* combine bridge

* one if

* rm unbridge

* add --unbridge arg

* ip and unbridge arg parsing. segfaults if not given any ip value

* this is better than a python cli interface for now

* where did those tabs come from?

* bridge --unbridge is a little cumbersome to type...

...and only republish test messages

* more clear

* update

* only check --ip

* assume reverse if anything specified as ip

* refactor

* better ordering

* order imports

* use a whitelist

* combine into get_services
2021-06-07 18:11:25 -07:00
Adeeb Shihadeh eb204d4a55 msgq: bump num readers to 10 2021-05-20 23:03:54 -07:00
ShaneSmiskol 284468e3cc
SubMaster - allow dynamic service lists (#150) 2021-05-18 12:09:54 -07:00
Adeeb Shihadeh 3c895e7b33 construct pubmaster with vector instead of initializer list 2021-05-15 14:12:42 -07:00
Dean Lee a6f4b6351d
C++ SubMaster: make readers always valid (#139)
* refactor submaster

* cleanup
2021-05-14 22:24:40 -07:00
Willem Melching bab2f2b95e SubMaster: Don't check alive when SIMULATION env variable is set 2021-05-05 15:25:02 +02:00
Willem Melching 9d83b15104 msgq_all_readers_updated: only return true when at least one reader is connected 2021-05-05 14:10:58 +02:00
Adeeb Shihadeh 3be0bf50c8 rename headers: hpp -> h 2021-05-03 20:40:36 -07:00
iejMac 8e5eb3ba4d
SubMaster: split socket recv and update (#133)
* add update_msgs

* works, need to find a way to pair socket to message without map

* works with strings

* save changes

* fix

* style

* remove fixMaybe

* style

* void update

* removing dynamic_struct

* comments

* dont need include anymore

* map -> vector<pair>

* move to update_msgs

* uint64

* change

* refrence

* whitepsace after if
2021-04-22 21:45:26 -07:00
Shane Smiskol c92be0564c
Automatically generate service ports (#136)
* make sure specified port isn't reserved

* only sshd

* Add check to tests as well and test

* commonly define these safety check numbers in services and check in both places

* add function to generate new ports that aren't reserved

* port is guaranteed to not be a reserved port and above 8000 now

asserting the rate on runtime isn't necessary, just for testing

* create service_list dynamically

* redundant

* just add an offset equal to length of services dict

* fix test?

* only one reserved

* ignore the argument type error

* rm line

* Add back tests

* starts at 8001
2021-04-20 17:57:54 +02:00
Joost Wooning 957147cb84
some fixes and small changes for locationd in c++ (#135)
* Added getters

* extra service to ack messages in process replay

* fix allAliveAndValid ignoring ignoreValid services

* check if readers are updated

* default message valid true
2021-04-19 17:28:06 +02:00
Willem Melching c803eddb33
add list for average frequency ignore (#132)
* add list for averge frequency ignore

* not simulation

* cleanup
2021-04-08 18:04:11 +02:00
Willem Melching 5980517cc9 dont check avg freq in simulation 2021-04-08 14:07:34 +02:00
Willem Melching dffb99383e
Add check for average frequency (#128)
* add check for average frequency

* fix mypy

* more type errors

* make less strict

* only check polled services

* add flag to disable avg check
2021-04-06 10:09:07 +02:00
Willem Melching 8203d55702 AlignedBuffer remove operator() to prevent out of scope usage 2021-03-17 14:22:59 +01:00
Dean Lee 97bfe99980
Added new util class AlignedBuffer (#125)
* AlignedBuffer

* rename function aligned to get

* add overloaded function for convenience
2021-03-15 17:27:20 +01:00
Willem Melching a9290aa1d0 msgq: fixup larger queue size for frames 2021-02-22 10:12:04 +01:00
HaraldSchafer a034837924
Best practice (#107)
* Update README.md

* Update README.md

* Split out sensors

* no duplicate ports

* not used

* misc cleanup

* fix tests

* only catch import error

* celcius is not SI

* better temp

* update servicespy

* add explicit

* -data

* save sensors for later

* more thermal

* little more

* thermal -> deviceState

* steering

* forgot deg

* explicit ids

Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-02-16 21:09:50 -08:00
Willem Melching 2748048829 Revert "lower alive threshold to 5x"
This reverts commit 8bf83edb7a.
2021-01-29 13:02:11 +01:00
Willem Melching 95e32803cd
Visionipc v2.0 (#101)
* add visionbuf

make static

ignore that

* Needs decleration

* add test binary

* c++

* create some structure

* some impl

* socket stuff

* Accept socket connection

* Alloc some buffers

* Create pub sockets and send buffer id

* make listener private

* Implement receive

* use error check macros in cl_helpers

* constructors to pass in opencl context

* add some convenience values in struct

* refactor creating buffers

* rgb is not so simple

* add fake stride and expose buffers

* add comment

* add extra data struct

* support conflate

* init opencl on all buffers

* make ion compile

* fix qcom2

* correctly setup yuv pointers when importing buffer

* also included from c

* Remove send print statements

* send metadata

* reveive metadata

* also used in c code

* dont start listener automatically

* Was started in 2 places

* set 100ms timeout on socket

* verify server id to detect reconnects

* handle reconnect

* buffer cleanup

* let user handle opencl creation

* add default values

* Add support for aligned rgb buffers

* add align macro

* dont use namespace

* use poller

* apple ifdef in ipc.cc

* VisionBuf is C++ class

* Install opencl headers

* cppcheck c++

* remove c header guard

* fix mac build

* simplify constructors

* Update visionipc/visionipc.h

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

* Update visionipc/visionbuf_ion.cc

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

* add brackets

* s/VIPCBufExtra/VisionIpcBufExtra/g

* Add unittesting harness

* remove vipc demo

* very basic tests

* add conflate test

* Install opencl

* suppress msgq warnings

* Make it work using zmq

* cl in qcom replay

* run unittests in zmq mode as well

* non blocking connect

* always larger frame queues

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-01-08 14:54:41 +01:00
Adeeb Shihadeh 484edb6cab remove azure build status from msgq doc 2021-01-06 15:21:16 -08:00
Adeeb Shihadeh 8bf83edb7a lower alive threshold to 5x 2020-12-18 13:46:09 -08:00
Adeeb Shihadeh 66a901b517 fix paths 2020-11-25 17:24:31 -08:00
grekiki adcbc666b6
cython scons builder (#100)
* improve building

* numpy will probably not be needed

* remove unnedded lines

* guessing what static analysis wants to pass

* fix the test by removing it

* Update __init__.py

* Update SConstruct

* Update SConscript

* style

* pre commit

* cleanup

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-11-25 17:14:50 -08:00
Willem Melching 5c7e91abb7
c++17 (#95)
* c++17

* 1z
2020-10-17 12:40:42 -07:00
Alexander Litzenberger 32024acdc0
Switch send to using bytes. (#93) 2020-10-06 17:15:01 -07:00
Dean Lee 16f10b6a9d
free reosurces after failed (#91)
* free reosurces aftet fail

* remove delete
2020-10-06 10:54:43 +02:00
Willem Melching 42e66ba92e use bytes in messaging tests 2020-10-05 11:28:26 +02:00
Willem Melching 5a60e76670 fix tici detection 2020-09-25 11:32:14 +02:00
Adeeb Shihadeh adac83269c fix mac build 2020-09-13 13:38:23 -07:00
Adeeb Shihadeh 2d48c23ca5
fix blocking msgq poll (#64)
* remove unnecessary condition on msqg poll

* fix blocking msgq poll
2020-09-12 22:59:12 -07:00
Dean Lee ba61dbdf46
Custom message builder (#72)
* add an simple class MessageBuilder

* remove member function toArray()

* fix extra spaces

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2020-09-12 20:25:57 -07:00
grekiki 177bc413f7
fix the isssue 41 (#87)
* fix the isssue

* Improve code style

* Improve code style2, remove failing test

* less changes

* style3
2020-09-11 14:45:47 +02:00
Willem Melching 1646e84af8 fix mac build 2020-09-09 17:39:55 +02:00
Adeeb Shihadeh 626679d1a5
allow prioritization of services in SubMaster (#84)
* allow blocking on a service in SubMaster update

* more descriptive name

* more generic

* fix

* fix mypy

* priority poller

* only use one poller
2020-09-01 16:17:24 -07:00
Willem Melching 78b8887198 larger shared memory size on computer for frames 2020-08-28 13:16:12 +02:00
Adeeb Shihadeh b9a54adaf4
Add type hints to messaging (#82)
* start adding types to messaging lib

* more return types

* that could be none
2020-08-23 00:14:25 -07:00
Adeeb Shihadeh 9cd1934a9c parallelize cython extension build 2020-08-02 13:26:44 -07:00
Adeeb Shihadeh 10a25c8b98
expose frame and rcv_frame in C++ submaster (#76)
* expose rcv_frame in C++ submaster

* expose frame too
2020-08-01 16:59:46 -07:00
Adeeb Shihadeh 566152fc29 fix linter 2020-07-29 14:09:00 -07:00
Adeeb Shihadeh 87c10d3346 fix test file path 2020-07-29 13:57:24 -07:00
Adeeb Shihadeh 17c3ad78f2 test generated services.h 2020-07-29 13:45:03 -07:00
Adeeb Shihadeh 3020c2b925 simple service tests 2020-07-29 13:38:36 -07:00
Adeeb Shihadeh 430cc73a3b remove get_one_can 2020-07-28 23:15:03 -07:00
Adeeb Shihadeh 06c7f72a2c
Tests for lower level messaging functions (#73)
* start messaging tests

* test drain sock

* recv with retry

* test retry blocking

* fix zmq
2020-07-27 17:30:45 -07:00