refactor: remove discovery code

This commit is contained in:
Cyrille Nofficial 2022-01-28 12:22:11 +01:00
parent 5948706773
commit 35dd8d957a
3 changed files with 1 additions and 6 deletions

View File

@ -5,7 +5,6 @@ import events.events_pb2
from google.protobuf.timestamp_pb2 import Timestamp from google.protobuf.timestamp_pb2 import Timestamp
import depthai as dai import depthai as dai
from depthai_sdk import getDeviceInfo
import cv2 import cv2
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -18,7 +17,6 @@ class FramePublisher:
self._img_width = img_width self._img_width = img_width
self._img_height = img_height self._img_height = img_height
self._pipeline = self._configure_pipeline() self._pipeline = self._configure_pipeline()
self._device_info = getDeviceInfo("18443010012F6C1200")
def _configure_pipeline(self) -> dai.Pipeline: def _configure_pipeline(self) -> dai.Pipeline:
logger.info("configure pipeline") logger.info("configure pipeline")
@ -42,9 +40,8 @@ class FramePublisher:
return pipeline return pipeline
def run(self): def run(self):
logger.debug("device %s", self._device_info)
# Connect to device and start pipeline # Connect to device and start pipeline
with dai.Device(self._pipeline, devInfo=self._device_info, usb2Mode=False) as device: with dai.Device(self._pipeline) as device:
logger.info('MxId: %s', device.getDeviceInfo().getMxId()) logger.info('MxId: %s', device.getDeviceInfo().getMxId())
logger.info('USB speed: %s', device.getUsbSpeed()) logger.info('USB speed: %s', device.getUsbSpeed())
logger.info('Connected cameras: %s', device.getConnectedCameras()) logger.info('Connected cameras: %s', device.getConnectedCameras())

View File

@ -1,7 +1,6 @@
paho-mqtt~=1.6.1 paho-mqtt~=1.6.1
docopt~=0.6.2 docopt~=0.6.2
depthai==2.14.1.0 depthai==2.14.1.0
depthai-sdk
opencv-python~=4.5.5.62 opencv-python~=4.5.5.62
google~=3.0.0 google~=3.0.0
google-api-core~=2.4.0 google-api-core~=2.4.0

View File

@ -28,7 +28,6 @@ setup(name='robocar-oak-camera',
}, },
setup_requires=['pytest-runner'], setup_requires=['pytest-runner'],
install_requires=['depthai', install_requires=['depthai',
'depthai-sdk',
'docopt', 'docopt',
'paho-mqtt', 'paho-mqtt',
'protobuf3', 'protobuf3',