(self)
| 93 | return self._intrinsics |
| 94 | |
| 95 | def start(self) -> None: |
| 96 | rs = _rs() |
| 97 | pipeline = rs.pipeline() |
| 98 | config = rs.config() |
| 99 | config.enable_device(self._serial) |
| 100 | config.enable_stream(rs.stream.depth, self._width, self._height, rs.format.z16, self._fps) |
| 101 | config.enable_stream(rs.stream.color, self._width, self._height, rs.format.bgr8, self._fps) |
| 102 | |
| 103 | profile = pipeline.start(config) |
| 104 | self._pipeline = pipeline |
| 105 | self._align = rs.align(rs.stream.color) |
| 106 | self._depth_scale = float(profile.get_device().first_depth_sensor().get_depth_scale()) |
| 107 | self._intrinsics = CameraIntrinsics.from_realsense( |
| 108 | profile.get_stream(rs.stream.color).as_video_stream_profile().get_intrinsics() |
| 109 | ) |
| 110 | self._info.update( |
| 111 | { |
| 112 | "width": str(self._width), |
| 113 | "height": str(self._height), |
| 114 | "fps": str(self._fps), |
| 115 | "depth_scale_m": f"{self._depth_scale:.12g}", |
| 116 | } |
| 117 | ) |
| 118 | |
| 119 | def wait_frame(self, timeout_ms: int) -> RgbdFrame | None: |
| 120 | if self._pipeline is None or self._align is None: |
nothing calls this directly
no test coverage detected