docs: add visualization conventions and update visualizer defaults
This commit is contained in:
@@ -6,7 +6,7 @@ import json
|
||||
import click
|
||||
import numpy as np
|
||||
import plotly.graph_objects as go
|
||||
from typing import Any, Dict, Optional, List
|
||||
from typing import Any, Dict, Optional, List, Literal
|
||||
import configparser
|
||||
from pathlib import Path
|
||||
import re
|
||||
@@ -22,6 +22,10 @@ RESOLUTION_MAP = {
|
||||
}
|
||||
|
||||
|
||||
ResolutionLiteral = Literal["FHD1200", "FHD", "2K", "HD", "SVGA", "VGA"]
|
||||
EyeLiteral = Literal["left", "right"]
|
||||
|
||||
|
||||
def parse_pose(pose_str: str) -> np.ndarray:
|
||||
"""Parses a 16-float pose string into a 4x4 matrix."""
|
||||
try:
|
||||
@@ -48,7 +52,7 @@ def world_to_plot(points: np.ndarray) -> np.ndarray:
|
||||
|
||||
|
||||
def load_zed_configs(
|
||||
paths: List[str], resolution: str, eye: str
|
||||
paths: List[str], resolution: ResolutionLiteral, eye: EyeLiteral
|
||||
) -> Dict[str, Dict[str, float]]:
|
||||
"""
|
||||
Loads ZED intrinsics from config files.
|
||||
@@ -373,8 +377,8 @@ def main(
|
||||
frustum_scale: float,
|
||||
fov: float,
|
||||
zed_configs: List[str],
|
||||
resolution: str,
|
||||
eye: str,
|
||||
resolution: ResolutionLiteral,
|
||||
eye: EyeLiteral,
|
||||
show_ground: bool,
|
||||
ground_y: float,
|
||||
ground_size: float,
|
||||
@@ -544,7 +548,7 @@ def main(
|
||||
)
|
||||
|
||||
fig.update_layout(
|
||||
title=f"Camera Extrinsics<br><sup>World Basis: CV (+Y down, +Z fwd)</sup>",
|
||||
title=f"Camera Extrinsics",
|
||||
scene=scene_dict,
|
||||
margin=dict(l=0, r=0, b=0, t=60),
|
||||
legend=dict(x=0, y=1),
|
||||
|
||||
Reference in New Issue
Block a user