Commit Graph

50 Commits

Author SHA1 Message Date
Kacper Rączy 6f7102581f
visionipc: support OPENPILOT_PREFIX (#497)
* OPENPILOT_PREFIX support in visionipc

* Use prefix as filename prefix

* Remove unnecessary import
2023-07-17 19:17:09 -07:00
Adeeb Shihadeh 5a822f43ca visionipc: expose extra's valid field in cython 2023-07-16 14:58:51 -07:00
Mitchell Goff c94c7c61cc
Added LLK timestamp to navModel and modelV2 (#494) 2023-07-08 17:09:18 -07:00
Adeeb Shihadeh 1b0f22f30b
visionipc: fix getAvailableStreams for server with no streams (#492)
* visionipc: fix getAvailableStreams for server with no streams

* still check that

* cleanup
2023-06-29 17:32:46 -07:00
Mitchell Goff 67af14c30d
Remove memcpy in cython VisionIpcClient.recv (#470) 2023-06-21 13:05:50 -07:00
Mitchell Goff a1f562bccb
Refactor buffer properties in python VisionIpcClient (#480)
* Refactor buffer properties in python VisionIpcClient

* mapsd -> navd
2023-06-21 12:44:21 -07:00
mitchellgoffpc 1a56b09a0d Create both client and server in TestVisionIpc setup 2023-06-20 17:04:17 -07:00
Mitchell Goff 96626cae1f
Added VisionIpcBufExtra properties to python VisionIpcClient (#479)
* Added VisionIpcBufExtra properties to python VisionIpcClient

* Check frame_id in test_send_single_buffer
2023-06-20 16:55:51 -07:00
Mitchell Goff 662206899d
Added minimal set of tests for python VisionIpc (#478)
* Started work on tests for python visionipc

* Added a bunch more tests

* Added conflate/no_conflate tests

* Added basic python visionipc tests

* Added create_vipc_server helper function

* Added create_vipc_server as a method

* Added teardown

* Add zmq_sleep

* Try removing teardown
2023-06-20 16:31:28 -07:00
Kacper Rączy c8884295b9
visionipc: get_endpoint_name python binding (#463)
Expose get_endpoint_name in py bindings
2023-06-07 10:36:00 -07:00
Dean Lee a3e66d284e
VisionIpcServer: unlink path after closing socket (#457) 2023-06-05 15:21:00 -07:00
Dean Lee 494cd28f3b
add function available_streams to visionipc_pyx.pyx (#424) 2023-03-21 10:52:27 -07:00
Adeeb Shihadeh 959ff79963
add cpplint (#401)
* add cpplint

* include what you use

* whitespace fixes

* passes
2022-12-31 16:33:09 -08:00
Dean Lee da48ed5b54
vipc: add function to get available streams (#400)
* add function to get available streams

* add test case

* cleanup

* use set

* public type

* Update visionipc_server.cc

* apply review

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2022-12-31 14:59:24 -08:00
Adeeb Shihadeh 6e58b293ee
include from project root (#402) 2022-12-31 14:19:29 -08:00
Willem Melching 1c2cba75d6
VISION_STREAM_RGB_MAP -> VISION_STREAM_MAP (#334) 2022-07-19 15:55:55 +02:00
Willem Melching a4c1afa3bf
VisionIPC: remove RGB camera streams (#332)
* VisionIPC remove RGB streams

* remove on python side

* fix test
2022-07-14 19:24:16 +02:00
Willem Melching 153483fbd7 visionbuf_cl: allocate space for frame id 2022-06-02 14:50:32 +02:00
Joost Wooning bf4960f83c
use nv12 for visionipc (#308)
* use nv12 for visionipc

* add uv_offet to python

* add more visionipc python functions

Co-authored-by: Comma Device <device@comma.ai>
2022-06-01 17:16:56 +02:00
Adeeb Shihadeh 35979b7e2e visionipc python shim 2022-05-25 20:43:31 -07:00
George Hotz 67e5c5ca37 visionipc_pyx: set the frame id in the buffer itself 2022-05-09 20:17:50 -07:00
Adeeb Shihadeh 1b342ce4e0 cleanup comma two stuff 2022-04-19 10:58:17 -07:00
George Hotz d6c3cf6b33 visionipc_pyx: allow bytes or memoryviews to be passed in 2022-04-11 13:47:53 -07:00
Adeeb Shihadeh e2a813144f
Rename RGB vision streams to match YUV streams (#256)
* 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

* wide too

Co-authored-by: GijsKoning <gijs-koning@live.nl>
2022-03-14 13:31:03 -07:00
Willem Melching 28d458a9af visionipc: navd is valid name 2022-02-23 14:02:53 +01:00
Dean Lee d6f233bf7b
rename yuv streams (#226) 2021-11-29 18:12:50 -08:00
Willem Melching 8cbd71836e vipc_client: zero buffers is fine 2021-11-26 14:48:58 +01:00
Willem Melching 5edffa0f49
Add stream type for maps (#221) 2021-11-16 14:21:48 +01:00
Willem Melching c3a50a3a5d fix shadow in visionbuf_ion 2021-11-02 17:15:06 +01:00
Mayfield d46f37c314
fix wshadow errors (#214)
* fix wshadow errors

* ignore cython
2021-11-02 14:23:08 +01:00
Willem Melching 7ae52a7d83
Add frame id into VisionIPC image buffer (#210)
* wip: add frame id to vipc

* set pointer and add test

* fix frameid on import
2021-10-26 15:23:30 +02:00
Dean Lee d5a85fe5d7
VisionIpcClient: add function is_connected (#203) 2021-10-05 09:42:21 +02:00
Dean Lee af1f366527
VisionIPC: close socket_fd after connected (#201) 2021-09-28 11:13:11 +02:00
Willem Melching d5758b71b0 fix buid: include errno.h 2021-09-14 18:32:03 -07:00
Dean Lee dff95acd10
retry ioctls while errno == EINTR (#191) 2021-09-13 12:21:29 -07:00
Adeeb Shihadeh aa38a5fe34 expose stride in cython vipc 2021-09-01 15:13:05 -07:00
Adeeb Shihadeh 77142a4e7a
visionipc: add cython client (#193) 2021-08-29 22:00:09 -07:00
Willem Melching e137c5731e
Less open file permissions (#187) 2021-08-28 18:20:54 -07:00
Willem Melching aa2a1e9d80
Improve VisionIPC error handling (#184)
* add return values to visionbuf

* add mock logger and log prints

* add logging to server

* unused

* link in common
2021-07-29 10:32:29 +02:00
Willem Melching 487ec1a6a4 ignore failures on ION buffer free 2021-07-28 14:35:59 +02:00
Willem Melching 9c7dbf81e9
Always free ION buffer (#183)
* always free ION buffer

* remove unused owner field
2021-07-26 14:49:22 +02:00
Adeeb Shihadeh e68da2f7d6 visionipc: increase max fds to 128 2021-07-10 14:30:59 -07:00
Dean Lee fe5690347e
cleanup include paths (#165)
cleanup
2021-06-10 11:44:59 -07:00
Adeeb Shihadeh d87e7e56d9 fix cython visionipc for qcom 2021-05-28 20:34:11 -07:00
Adeeb Shihadeh 3be0bf50c8 rename headers: hpp -> h 2021-05-03 20:40:36 -07:00
Willem Melching dc406553eb
Cython wrapper for VisionIpc server (#117)
* vipc cython wrapper

* send some data

* start listener

* fix extra datatype
2021-02-09 17:15:18 +01:00
Robbe Derks 2547d3348e don't crash on invalid buffer type 2021-01-19 15:28:50 +01:00
Willem Melching 610fa77bc4 visionipc add timeout param 2021-01-19 14:45:59 +01:00
Willem Melching 38f12b99e0 only free ION buffer in server 2021-01-11 16:07:31 +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