Skip to content

Commit

Permalink
Improved handling of uncalibrated oak-Ds, where viewer wouldn't even …
Browse files Browse the repository at this point in the history
…start if the device was uncalibrated.
  • Loading branch information
Filip Jeretina committed Sep 30, 2024
1 parent 3e74a89 commit fcd57ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rerun_py/depthai_viewer/_backend/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,9 +506,14 @@ def update_pipeline(self, runtime_only: bool) -> Message:
else: # Should never happen
print("Couldn't find camera config for ToF, can't create ToF.")

# Make sure that it's possible to create stereo depth
try:
stereo_pair = config.stereo.stereo_pair
self._oak.device.readCalibration2().getCameraExtrinsics(stereo_pair[0], stereo_pair[1])
except RuntimeError:
config.stereo = None
if config.stereo:
print("Creating depth")
stereo_pair = config.stereo.stereo_pair
left_cam = self._get_component_by_socket(stereo_pair[0])
right_cam = self._get_component_by_socket(stereo_pair[1])
if not left_cam or not right_cam:
Expand Down

0 comments on commit fcd57ff

Please sign in to comment.