test(cameras): add minimal realsense test
This commit is contained in:
@@ -217,7 +217,7 @@ class RealSenseCamera(Camera):
|
||||
def _configure_realsense_settings(self) -> rs.config:
|
||||
"""Creates and configures the RealSense pipeline configuration object."""
|
||||
rs_config = rs.config()
|
||||
rs_config.enable_device(self.serial_number)
|
||||
rs.config.enable_device(rs_config, self.serial_number)
|
||||
|
||||
if self.capture_width and self.capture_height and self.fps:
|
||||
logger.debug(
|
||||
@@ -300,6 +300,7 @@ class RealSenseCamera(Camera):
|
||||
self.width, self.height = self.capture_width, self.capture_height
|
||||
logger.debug(f"Final image dimensions set to: {self.width}x{self.height} (after rotation if any)")
|
||||
|
||||
# NOTE(Steven): Add a wamr-up period time config
|
||||
def connect(self):
|
||||
"""
|
||||
Connects to the RealSense camera specified in the configuration.
|
||||
|
||||
@@ -36,7 +36,7 @@ class RealSenseCameraConfig(CameraConfig):
|
||||
name: str | None = None
|
||||
serial_number: int | None = None
|
||||
fps: int | None = None
|
||||
width: int | None = None
|
||||
width: int | None = None # NOTE(Steven): Make this not None allowed!
|
||||
height: int | None = None
|
||||
color_mode: ColorMode = ColorMode.RGB
|
||||
channels: int | None = 3
|
||||
|
||||
Reference in New Issue
Block a user