acerobotics2025's picture
Upload Calibration
a3e20d8 verified
|
Raw History Blame Contribute Delete
4.47 kB

ZED + Homie + OptiTrack/SMPL Rerun viewer

This tool shows all calibrated camera poses in the OptiTrack Y-up world, places the synchronized RGB stream on every camera frustum, and animates the pre-baked SMPL-X mesh.

By default only one JPEG frame per camera is transferred and placed on its frustum. Pass --full-video only when complete video playback is needed.

The default view includes all eight ZED cameras, twelve calibrated OptiTrack IR cameras, and one virtual forehead Homie camera. The Homie camera uses the front-left RGB image and the midpoint pose of the calibrated front-left/right optical cameras.

The individual room object meshes are the opaque, colorful primary geometry, except table_cook.obj, which is intentionally excluded. When present, scene.obj is also loaded as a translucent neutral context layer to fill geometry missing from the individual parts. Pass --no-room-assets to disable all room geometry.

Floor and horizontal center alignment are enabled by default. Add a measured correction with --asset-translation DX DY DZ (meters), use --no-auto-asset-align to disable only the center heuristic, or --no-room-alignment to disable all alignment and CLI offsets.

Persist a manual rotation with --asset-rotation-deg RX RY RZ; angles are degrees about world X/Y/Z and compose as Rz @ Ry @ Rx.

The Gradio translation/rotation panel starts by default on web-port + 2. Use --no-room-controls to disable it. Its offsets are applied on top of the automatic alignment result.

When room assets are enabled, the accumulated default correction is --asset-translation 0.12 -0.52 0.79 --asset-rotation-deg 0 62 0. Camera frustums use moderately compact image-plane distances: 0.32 m for ZED/OptiTrack and 0.24 m for Homie.

Install

cd /home/acerobotics/visualize
python -m venv .venv
.venv/bin/pip install -r requirements.txt

Run

The server is headless, so run the logger there:

.venv/bin/python visualize_case.py /mnt/Datasets/2026-06-27-12:26:35

It first writes a temporary .rrd, then starts a persistent Web Viewer for that file on server port 9090. On your local machine, create an SSH tunnel (replace the host if needed):

ssh -N \
  -L 9090:127.0.0.1:9090 \
  acerobotics@AceRobotics-Server01

The data proxy uses the next port, so for --web-port 9091, forward both 9091 and 9092. Open the exact URL printed by the script.

If 9090 is occupied by an older server, add --web-port 9091 and tunnel/open port 9091 instead.

Keep both the SSH tunnel and the server-side logger running while viewing. After logging completes, the logger deliberately stays alive to host the recording; press Ctrl+C when finished.

To use a separately managed Rerun server instead, start it with .venv/bin/rerun --serve-web, then pass --connect rerun+http://127.0.0.1:9876/proxy to the logger.

Useful options:

# Quick 10-second check with fewer cameras and a 10 Hz body mesh
.venv/bin/python visualize_case.py DATA_CASE --zed 0,1 --homie front_left,front_right --duration 10 --mesh-fps 10

# Save a recording instead of opening the viewer
.venv/bin/python visualize_case.py DATA_CASE --save output.rrd

# Camera-only or mesh-only variants
.venv/bin/python visualize_case.py DATA_CASE --no-smpl
.venv/bin/python visualize_case.py DATA_CASE --no-video
.venv/bin/python visualize_case.py DATA_CASE --full-video

The default calibration snapshots in config/ correspond to the rig calibration used by this case. Override them with --zed-calib, --homie-calib, and --homie-camchain for a case recorded with different hardware calibration.

Notes:

  • The full 225-second case is large. --mesh-fps 15 is the default compromise; use 5–10 Hz for fast inspection or 60 Hz for every SMPL frame.
  • Default web mode writes a temporary RRD under /tmp; use --save PATH.rrd if you want to keep the recording permanently.
  • Single-frame mode is the default and needs little proxy memory. Full-video mode can be several GiB; adjust --server-memory according to server RAM.
  • ZED images contain lens distortion while Rerun's 3D textured pinhole plane is an ideal pinhole. The supplied calibrated intrinsic matrix provides the correct camera pose and a close frustum; exact distortion-aware reprojection belongs in a separate 2D overlay.
  • Homie videos are the case's 1024×1024 rectified pinhole views, so their image planes use the same rectification as the exported RGB.