esc
Start typing to search the docs
Navigate Open

Getting Started

Rerun helps robotics and Physical AI teams iterate faster: log from any sensor, visualize in the Viewer, query with dataframes, and train with a dataloader tailored to robotic learning — across one recording or many.

Installation

pip install rerun-sdk[dataplatform, dataloader] bundles the SDK (log/query from code) and the Viewer (visualizer app). The optional dependencies support queries and training below. For Rust, C++, see Install Rerun and Set up a project.

Open the Viewer

rerun launches the Viewer. Pass a file to open it directly:

rerun path/to/recording.rrd

Supports .rrd, .mcap, and more. Also available in-browser at rerun.io/viewer.

Scale across many recordings

Rerun's catalog organizes recordings as queryable segments. The workflow: log (or convert) data to an .rrd, start a catalog server (or connect to an existing one if using the commercial Rerun Hub), register the .rrd as a segment, then visualize and query across recordings.

Log

Save data to an .rrd see Log and Ingest for more details. If you already have data in another format see our how-to for various examples converting to .rrd.

import math

import rerun as rr

with rr.RecordingStream(
    "rerun_example_getting_started", recording_id="run-1", send_properties=False
) as rec:
    rec.save("run-1.rrd")
    for t in range(10):
        rec.set_time("step", sequence=t)
        rec.log("/arm/shoulder", rr.Scalars(math.sin(t * 0.5)))
        rec.log("/arm/elbow", rr.Scalars(math.cos(t * 0.5)))

Start a catalog server

rerun server starts a local catalog on port 51234 (use Rerun Hub for persistent, multi-user storage), then connect from your code:

rerun server
# `server_url` is the catalog URL — defaults to "rerun+http://127.0.0.1:51234"
# when running `rerun server` locally.
client = rr.catalog.CatalogClient(server_url)

Ingest

Register an .rrd with a dataset so it shows up as a queryable segment.

dataset = client.create_dataset("demo", exist_ok=True)
dataset.register([Path("run-1.rrd").absolute().as_uri()]).wait()

Visualize

Point the Viewer at your server to browse every recording in the catalog. See Configure the Viewer.

rerun rerun+http://127.0.0.1:51234

Query

Query the catalog into a DataFusion DataFrame. See Query and Transform.

df = dataset.filter_contents(["/arm/**"]).reader(index="step")
print(
    df.select(
        "rerun_segment_id",
        "/arm/shoulder:Scalars:scalars",
        "/arm/elbow:Scalars:scalars",
    )
)

Train

Connect a Dataloader to the server to generate training batches. See Train.

from torch.utils.data import DataLoader

from rerun.experimental.dataloader import (
    DataSource,
    Field,
    NumericDecoder,
    RerunIterableDataset,
)

ds = RerunIterableDataset(
    source=DataSource(dataset=dataset),
    index="step",
    fields={
        "shoulder": Field(
            "/arm/shoulder:Scalars:scalars", decode=NumericDecoder()
        ),
        "elbow": Field("/arm/elbow:Scalars:scalars", decode=NumericDecoder()),
    },
)

for batch in DataLoader(ds, batch_size=4):
    print(batch)

If you're stuck