(extrinsic: dict)
| 283 | |
| 284 | |
| 285 | def print_extrinsic_info(extrinsic: dict): |
| 286 | if right_h2c: |
| 287 | T_head_camera_r = matrix_from_array(right_h2c) |
| 288 | T_camera_in_head_r = np.linalg.inv(T_head_camera_r) |
| 289 | right_cam_pos = get_position(T_camera_in_head_r) |
| 290 | print(f"\nRight Camera pose in head frame:") |
| 291 | print(f" Position: x={right_cam_pos[0]*100:.2f}cm, y={right_cam_pos[1]*100:.2f}cm, z={right_cam_pos[2]*100:.2f}cm") |
| 292 | |
| 293 | if left_cam_pos is not None: |
| 294 | baseline = np.linalg.norm(right_cam_pos - left_cam_pos) |
| 295 | x_baseline = right_cam_pos[0] - left_cam_pos[0] |
| 296 | midpoint_x = (left_cam_pos[0] + right_cam_pos[0]) / 2 |
| 297 | print(f"\nStereo baseline: {baseline*100:.2f} cm (X separation: {x_baseline*100:.2f} cm)") |
| 298 | print(f"Midpoint X: {midpoint_x*100:.2f} cm (ideally ~0)") |
| 299 | |
| 300 | print("=" * 35) |
| 301 | |
| 302 | |
| 303 | class TrackingVisualizer: |
nothing calls this directly
no test coverage detected