API Reference

Visualizer

Rerun-based per-frame visualizer for Stera sessions. Drives the blueprint, static map geometry, IMU traces, frustum, and overlays.

class Visualizer:
    def __init__(
        self,
        session,
        output: Optional[str] = None,
        app_id: str = "stera",
        max_viz: bool = False,
        overlay_size: tuple[int, int] | None = None,
        jpeg_quality: int = 50,
        trail_len: int = 30,
        frustum_depth: float = 0.15,
        live_pc_max: int = 50_000,
        live_pc_radius: float = 0.005,
        max_map_points: int = 200_000,
        dense_map: bool = False,
        dense_every_n: int = 10,
        dense_cam_exclude: float = 1.0,
        dense_voxel_size: float = 0.02,
        map_3d: str = "auto",
        mesh_refine: bool | dict = False,
    )

Visualizer was previously called RerunVisualizer. The old name is preserved as an alias — existing scripts keep working — but new code should use Visualizer.

See the Visualization guide for what gets logged and the blueprint layout.

Constructor

ParamDefaultNotes
sessionrequiredMCAPReader instance.
outputauto tempPath to write the .rrd. If None, a tempfile is created and .export() promotes it.
app_id"stera"Rerun application id.
map_3d"auto""auto" / "mesh" / "mesh_cloud" / "point_cloud" / "both" / "none". See below.
mesh_refineFalseRun the mesh through MeshRefiner before logging. True for defaults or a dict of MeshRefiner kwargs. Used when map_3d ∈ {"auto","mesh","both"}.
max_vizFalsePer-frame live RGB-D point cloud.
dense_mapFalseBuild dense depth-derived cloud at setup.
dense_every_n10
dense_voxel_size0.02
dense_cam_exclude1.0
max_map_points200_000Subsample cap for any logged cloud.
live_pc_max50_000
live_pc_radius0.005metres.
overlay_sizeNoneResize RGB before logging.
jpeg_quality50
trail_len30
frustum_depth0.15metres.

Raises ValueError if map_3d is not in the allowed set.

map_3d modes

ValueBehavior
"auto"Triangle mesh if /map/mesh is present, otherwise the point-cloud fallback chain.
"mesh"Triangle mesh only; skipped if missing.
"mesh_cloud"Accumulated point cloud from /map/mesh_cloud only.
"point_cloud"Raw point cloud from /map/point_cloud only.
"both"Both the mesh AND the point cloud. PC is logged but hidden by default in the blueprint (eye-icon toggle to reveal).
"none"Skip the 3D map entirely.

Whenever a mesh is logged (auto / mesh / both), the raw, unrefined mesh from /map/mesh is also logged to world/mesh_raw and starts hidden in the blueprint. Kept around as an A/B reference against the refined mesh — toggle from the entity tree.

Methods

setup

def setup(self) -> None

Initialise Rerun, send the blueprint, log static data (3D map, optical-frame transform, IMU traces). Called lazily on the first log_frame.

log_frame

def log_frame(
    self,
    frame,                  # SyncedFrame
    hands: list[HandPose] | None = None,
    skeleton: SkeletonFrame | None = None,
    enable_pointcloud: bool | None = None,
) -> None

Stream a single synchronised frame to Rerun. If setup hasn't run, it runs on the first call.

export

def export(self, path: str) -> str

Flush pending logs and copy the backing .rrd to path. Returns the destination string.

show

def show(self, block: bool = False) -> None

Spawn the Rerun viewer on the saved file. block=True waits for it to exit.

See also