Skip to content

Getting Started

There are many different ways of sending data to the Rerun Viewer depending on what you're trying to achieve and whether the viewer is running in the same process as your code, in another process, or even as a separate web application.

Checkout SDK Operating Modes for an overview of what's possible and how.

APIs

Initialization functions

Function Description
rerun.init() Initialize the Rerun SDK with a user-chosen application id (name).
rerun.connect() Connect to a remote Rerun Viewer on the given ip:port.
rerun.disconnect() Closes all TCP connections, servers, and files.
rerun.save() Stream all log-data to a file.
rerun.serve() Serve log-data over WebSockets and serve a Rerun web viewer over HTTP.
rerun.spawn() Spawn a Rerun Viewer, listening on the given port.
rerun.memory_recording() Streams all log-data to a memory buffer.

Logging functions

Function Description
rerun.log() Log data to Rerun.
rerun.set_time_sequence() Set the current time for this thread as an integer sequence.
rerun.set_time_seconds() Set the current time for this thread in seconds.
rerun.set_time_nanos() Set the current time for this thread.

Custom Data

Class Description
rerun.AnyValues Helper to log arbitrary values as a bundle of components.

Clearing Entities

Class Description
rerun.Clear Archetype: Empties all the components of an entity.

Annotations

Class Description
rerun.AnnotationContext Archetype: The AnnotationContext provides additional information on how to display entities.
rerun.AnnotationInfo Datatype: Annotation info annotating a class id or key-point id.
rerun.ClassDescription Datatype: The description of a semantic Class.

Images

Class Description
rerun.DepthImage Archetype: A depth image.
rerun.Image Archetype: A monochrome or color image.
rerun.ImageEncoded A monochrome or color image encoded with a common format (PNG, JPEG, etc.).
rerun.SegmentationImage Archetype: An image made up of integer class-ids.

Plotting

Class Description
rerun.BarChart Archetype: A bar chart.
rerun.TimeSeriesScalar Archetype: Log a double-precision scalar that will be visualized as a time-series plot.

Spatial Archetypes

Class Description
rerun.Arrows3D Archetype: 3D arrows with optional colors, radii, labels, etc.
rerun.Asset3D Archetype: A prepacked 3D asset (.gltf, .glb, .obj, etc.).
rerun.Boxes2D Archetype: 2D boxes with half-extents and optional center, rotations, rotations, colors etc.
rerun.Boxes3D Archetype: 3D boxes with half-extents and optional center, rotations, rotations, colors etc.
rerun.LineStrips2D Archetype: 2D line strips with positions and optional colors, radii, labels, etc.
rerun.LineStrips3D Archetype: 3D line strips with positions and optional colors, radii, labels, etc.
rerun.Mesh3D Archetype: A 3D triangle mesh as specified by its per-mesh and per-vertex properties.
rerun.Points2D Archetype: A 2D point cloud with positions and optional colors, radii, labels, etc.
rerun.Points3D Archetype: A 3D point cloud with positions and optional colors, radii, labels, etc.

Tensors

Class Description
rerun.Tensor Archetype: A generic n-dimensional Tensor.

Text

Class Description
rerun.LoggingHandler Provides a logging handler that forwards all events to the Rerun SDK.
rerun.TextDocument Archetype: A text element intended to be displayed in its own text-box.
rerun.TextLog Archetype: A log entry in a text log, comprised of a text body and its log level.

Transforms and Coordinate Systems

Class Description
rerun.DisconnectedSpace Archetype: Specifies that the entity path at which this is logged is disconnected from its parent.
rerun.Pinhole Archetype: Camera perspective projection (a.k.a. intrinsics).
rerun.Transform3D Archetype: A 3D transform.
rerun.ViewCoordinates Archetype: How we interpret the coordinate system of an entity/space.
rerun.Quaternion Datatype: A Quaternion represented by 4 real numbers.
rerun.RotationAxisAngle Datatype: 3D rotation represented by a rotation around a given axis.
rerun.Scale3D Datatype: 3D scaling factor, part of a transform representation.
rerun.TranslationAndMat3x3 Datatype: Representation of an affine transform via a 3x3 affine matrix paired with a translation.
rerun.TranslationRotationScale3D Datatype: Representation of an affine transform via separate translation, rotation & scale.

Interfaces

Class Description
rerun.AsComponents Describes interface for interpreting an object as a bundle of Components.
rerun.ComponentBatchLike Describes interface for objects that can be converted to batch of rerun Components.

Script Helpers

Function Description
rerun.script_add_args() Add common Rerun script arguments to parser.
rerun.script_setup() Run common Rerun script setup actions. Connect to the viewer if necessary.
rerun.script_teardown() Run common post-actions. Sleep if serving the web viewer.

Troubleshooting

You can set RUST_LOG=debug before running your Python script and/or rerun process to get some verbose logging output.

If you run into any issues don't hesitate to open a ticket or join our Discord.