Caasi v0.2.0 Review: replay · view

Review: replay & view

Look at results without re-simulating. replay opens recorded run data in an existing viewer; view launches viewers directly or attaches one to a run that is still going. Caasi never renders anything itself — it orchestrates RViz 2, Foxglove Studio or Open3D, whichever you have.

Viewer resolution

Both commands support the same three viewers, resolved as follows:

ViewerBinaryHow it is found
rvizrviz2on PATH (ROS 2 desktop)
foxglovefoxglove / foxglove-studioon PATH
open3dthe CLI's Pythonpip metadata open3d / open3d-cpu

When you don't pass --viewer, Caasi auto-detects in the order rviz → foxglove → open3d. If none is available:

shellcaasi replay latest
Error: No viewer found. Install RViz 2, Foxglove Studio or Open3D first.

caasi replay

caasi replay QUERY [--speed FLOAT] [--episode N] [--viewer NAME] [--dry-run] [--json]
ParameterKindTypeDefaultDescription
QUERYargumentstrrequiredRun id, unique prefix, name or latest (query semantics).
--speedoptionfloat1.0Replay speed multiplier, exported to the viewer as CAASI_REPLAY_SPEED.
--episodeoptionintEpisode to replay, exported as CAASI_REPLAY_EPISODE.
--vieweroptionstrautorviz, foxglove or open3d.
--dry-runoptionflagoffShow the viewer command and artifacts without launching.
--jsonoptionflagoffMachine-readable result.

What counts as “recorded data”

Everything in the run directory except the five bookkeeping files (manifest.yaml, run.sh, stdout.log, stderr.log, exit_code). So any file your script wrote into its run directory — trajectories, point clouds, meshes, rosbags — is replayable. A run with no such files fails with Error: Run <id> has no recorded data to replay.

How the viewer is launched

Examples

shellcaasi replay latest --dry-run
wave (20260905-142301-wave)
Recorded data: recordings/traj.txt, scan.pcd
Dry run — nothing was launched:
  command: rviz2
caasi replay wave --viewer rviz --speed 0.5
Viewer 'rviz' launched (pid 53310).
caasi replay latest --viewer open3d --json
{
  "id": "20260905-142301-wave",
  "viewer": "open3d",
  "command": ["/home/you/caasi/.venv/bin/python", "-c", "…", "/home/you/.caasi/runs/20260905-142301-wave/scan.pcd"],
  "artifacts": ["recordings/traj.txt", "scan.pcd"],
  "pid": 53344
}

Exit codes: 0 launched or dry-run; 1 unknown run, no recorded data, unknown/unavailable viewer, or no 3D file for Open3D. pid is absent from JSON in dry-run mode.

caasi view

Direct viewer launchers. All five subcommands support --dry-run (print the command instead of launching); view run is the only one that also supports --json. Launched viewers are detached; the reported PID is the viewer's.

SubcommandWhat it does
rvizOpen RViz 2 for a run.
foxgloveOpen Foxglove Studio for a run.
open3dOpen an Open3D viewer for recorded data.
attachAttach a viewer to a running simulation.
runOpen a run's recorded artifacts in the best available viewer.

Descriptions are the CLI's own — caasi view --help prints this list.

caasi view rviz

caasi view rviz [CONFIG_FILE] [--dry-run]

Launches rviz2, optionally with a saved layout: rviz2 -d my_layout.rviz. Without RViz 2 installed:

shellcaasi view rviz
Error: Viewer 'rviz' not found. Install ROS 2 desktop (caasi setup ros2) for rviz2.
caasi view rviz configs/nav.rviz
Viewer 'rviz' launched (pid 53401).

caasi view foxglove

caasi view foxglove [--dry-run]

Launches Foxglove Studio (foxglove or foxglove-studio on PATH). Missing → Error: Viewer 'foxglove' not found. Install Foxglove Studio from foxglove.dev.

caasi view open3d

caasi view open3d TARGET [--dry-run]

Opens one 3D file — mesh formats (.obj .stl .gltf .glb .fbx .off) are read as triangle meshes, everything else (.ply .pcd .pts .xyz .xyzn, …) as a point cloud — in an inline Open3D viewer. Requires pip open3d; a missing file fails with Error: No such file: <path>.

shellcaasi view open3d /home/you/.caasi/runs/20260905-142301-wave/scan.pcd
Viewer 'open3d' launched (pid 53488).

caasi view attach

caasi view attach QUERY [--viewer NAME] [--dry-run]

Attaches a viewer to a live run — the visualization counterpart to headless simulation. The run must be running or paused; anything else fails with Error: Run <id> is not running (status: succeeded). Viewer selection works exactly like replay, and the viewer receives CAASI_RUN_DIR so live outputs (streams, recordings being written) are reachable.

shellcaasi sim run experiments/wave.yaml
Run 20260905-181233-wave started in the background.
caasi view attach latest
Viewer 'rviz' launched (pid 53512).
# done watching? the sim keeps running:
caasi run status latest
wave (20260905-181233-wave)
  Status     running

caasi view run

caasi view run QUERY [--viewer NAME] [--dry-run] [--json]

Opens a run's recorded artifacts in the best available viewer — replay without the replay knobs. The artifacts are picked the same way (everything in the run directory except the five bookkeeping files), viewer resolution is the same rviz → foxglove → open3d, and the viewer only receives CAASI_RUN_DIR: there are no --speed/--episode options here, so no CAASI_REPLAY_* variables are exported. Unlike view attach, the run does not have to be active.

shellcaasi view run latest --dry-run
wave (20260905-142301-wave)
  Recorded data: recordings/traj.txt, scan.pcd
Dry run — nothing was launched:
  command: rviz2
caasi view run wave
Viewer 'rviz' launched (pid 53604).
caasi view run latest --viewer open3d --json --dry-run
{
  "id": "20260905-142301-wave",
  "viewer": "open3d",
  "command": ["/home/you/caasi/.venv/bin/python", "-c", "…", "/home/you/.caasi/runs/20260905-142301-wave/scan.pcd"],
  "artifacts": ["recordings/traj.txt", "scan.pcd"]
}

Exit codes mirror replay: 0 launched or dry-run, 1 for an unknown run, Error: Run <id> has no recorded data to replay., an unknown or unavailable viewer, or — with --viewer open3d — no 3D file among the artifacts. pid is absent from the JSON in dry-run mode.

Headless-first in practice

Run on the server without a display (sim run is headless by default), then review from your workstation: caasi replay latest --viewer foxglove against the recorded data — or view attach while it still runs. No simulation is ever re-executed for review.