Skip to content

Commit

Permalink
Fixed deprecated CameraBoardSockets (#476)
Browse files Browse the repository at this point in the history
Co-authored-by: Oogway <[email protected]>
  • Loading branch information
vedarshshah and duke-robotics authored Oct 26, 2023
1 parent 11bd200 commit 51d92df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def build_pipeline(self):
if self.publish_rgb_video or self.publish_rgb_preview or self.save_rgb_video or self.save_rgb_preview:
camRgb = self.pipeline.create(dai.node.ColorCamera)
camRgb.setResolution(dai.ColorCameraProperties.SensorResolution.THE_1080_P)
camRgb.setBoardSocket(dai.CameraBoardSocket.RGB)
camRgb.setBoardSocket(dai.CameraBoardSocket.CAM_A)

if self.publish_rgb_video or self.save_rgb_video:
camRgb.setVideoSize(self.rgb_video_resolution)
Expand Down Expand Up @@ -174,7 +174,7 @@ def build_pipeline(self):
if self.publish_left or self.publish_disparity or self.publish_depth or self.save_left or self.save_disparity:
camLeft = self.pipeline.create(dai.node.MonoCamera)
camLeft.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P) # Resolution: 640 x 400
camLeft.setBoardSocket(dai.CameraBoardSocket.LEFT)
camLeft.setBoardSocket(dai.CameraBoardSocket.CAM_B)
camLeft.setFps(self.framerate)

if self.save_left:
Expand All @@ -187,7 +187,7 @@ def build_pipeline(self):
if self.publish_right or self.publish_disparity or self.publish_depth or self.save_right or self.save_disparity:
camRight = self.pipeline.create(dai.node.MonoCamera)
camRight.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P) # Resolution: 640 x 400
camRight.setBoardSocket(dai.CameraBoardSocket.RIGHT)
camRight.setBoardSocket(dai.CameraBoardSocket.CAM_C)
camRight.setFps(self.framerate)

if self.save_right:
Expand Down
6 changes: 3 additions & 3 deletions onboard/catkin_ws/src/cv/scripts/depthai_spatial_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ def build_pipeline(self, nn_blob_path, sync_nn):
cam_rgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.BGR)

mono_left.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
mono_left.setBoardSocket(dai.CameraBoardSocket.LEFT)
mono_left.setBoardSocket(dai.CameraBoardSocket.CAM_B)
mono_right.setResolution(dai.MonoCameraProperties.SensorResolution.THE_400_P)
mono_right.setBoardSocket(dai.CameraBoardSocket.RIGHT)
mono_right.setBoardSocket(dai.CameraBoardSocket.CAM_C)

# setting node configs
stereo.setDefaultProfilePreset(dai.node.StereoDepth.PresetMode.HIGH_DENSITY)
stereo.setDepthAlign(dai.CameraBoardSocket.RGB)
stereo.setDepthAlign(dai.CameraBoardSocket.CAM_A)

spatial_detection_network.setBlobPath(nn_blob_path)
spatial_detection_network.setConfidenceThreshold(model['confidence_threshold'])
Expand Down

0 comments on commit 51d92df

Please sign in to comment.