Skip to content

Commit

Permalink
OAK D SR POE and some reliability improvements (#35)
Browse files Browse the repository at this point in the history
* WIP add support for tof (oak d sr poe)

* Accommodate new sdk, make tof stream show up, more or less properly. Still need to fix a few gui bugs.

* Fixed gui bugs with which sensors are "AI capable" improved a bit on resolution search stability.  did py-lints

* install wheel from artifactory

* Update rerun_py/depthai_viewer/_backend/device.py

* Update rerun_py/depthai_viewer/_backend/device.py
  • Loading branch information
zrezke committed Jun 21, 2024
1 parent 7d253c9 commit 3aa06b5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
5 changes: 2 additions & 3 deletions rerun_py/depthai_viewer/_backend/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
from typing import Dict, List, Optional, Tuple

import depthai as dai
import depthai_viewer as viewer
import numpy as np
from depthai_sdk import OakCamera
from depthai_sdk.classes.packet_handlers import ComponentOutput
from depthai_sdk.components import CameraComponent, NNComponent, StereoComponent
from depthai_sdk.components.camera_helper import getClosestIspScale
from depthai_sdk.components.tof_component import Component, ToFComponent
from numpy.typing import NDArray

import depthai_viewer as viewer
from depthai_viewer._backend.device_configuration import (
ALL_NEURAL_NETWORKS,
CameraConfiguration,
Expand Down Expand Up @@ -52,6 +50,7 @@
)
from depthai_viewer._backend.store import Store
from depthai_viewer.install_requirements import model_dir
from numpy.typing import NDArray


class XlinkStatistics:
Expand Down
10 changes: 4 additions & 6 deletions rerun_py/depthai_viewer/_backend/device_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ def to_runtime_controls(self) -> Dict[str, Any]:
"align": (
"RECTIFIED_LEFT"
if self.align == dai.CameraBoardSocket.LEFT
else "RECTIFIED_RIGHT"
if self.align == dai.CameraBoardSocket.RIGHT
else "CENTER"
else "RECTIFIED_RIGHT" if self.align == dai.CameraBoardSocket.RIGHT else "CENTER"
),
"lr_check": self.lr_check,
"lrc_check_threshold": self.lrc_threshold,
Expand Down Expand Up @@ -334,9 +332,9 @@ class DeviceProperties(BaseModel): # type: ignore[misc]
id: str
cameras: List[CameraFeatures] = []
imu: Optional[ImuKind]
stereo_pairs: List[
Tuple[dai.CameraBoardSocket, dai.CameraBoardSocket]
] = [] # Which cameras can be paired for stereo
stereo_pairs: List[Tuple[dai.CameraBoardSocket, dai.CameraBoardSocket]] = (
[]
) # Which cameras can be paired for stereo
default_stereo_pair: Optional[Tuple[dai.CameraBoardSocket, dai.CameraBoardSocket]] = None
info: DeviceInfo = DeviceInfo()

Expand Down
6 changes: 2 additions & 4 deletions rerun_py/depthai_viewer/_backend/packet_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import cv2
import depthai as dai
import depthai_viewer as viewer
import numpy as np
from ahrs.filters import Mahony
from depthai_sdk.classes.packets import ( # PointcloudPacket,
Expand All @@ -22,13 +23,10 @@
StereoComponent,
)
from depthai_sdk.components.tof_component import ToFComponent
from numpy.typing import NDArray
from pydantic import BaseModel

import depthai_viewer as viewer
from depthai_viewer._backend.store import Store
from depthai_viewer._backend.topic import Topic
from depthai_viewer.components.rect2d import RectFormat
from numpy.typing import NDArray


class PacketHandlerContext(BaseModel): # type: ignore[misc]
Expand Down

0 comments on commit 3aa06b5

Please sign in to comment.