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
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.spawn() |
Spawn a Rerun Viewer, listening on the given port. |
rerun.serve() |
Serve log-data over WebSockets and serve a Rerun web viewer over HTTP. |
rerun.save() |
Stream all log-data to a file. |
rerun.memory_recording() |
Streams all log-data to a memory buffer. |
Viewer Control
Function | Description |
---|---|
rerun.save() |
Stream all log-data to a file. |
Time
Function | Description |
---|---|
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. |
Spatial Primitives
Function | Description |
---|---|
rerun.log_point() |
Log a 2D or 3D point, with a position and optional color, radii, label, etc. |
rerun.log_points() |
Log 2D or 3D points, with positions and optional colors, radii, labels, etc. |
rerun.log_rect() |
Log a 2D rectangle. |
rerun.log_rects() |
Log multiple 2D rectangles. |
rerun.log_obb() |
Log a 3D Oriented Bounding Box, or OBB. |
rerun.log_line_strip() |
Log a line strip through 2D or 3D space. |
rerun.log_line_segments() |
Log many 2D or 3D line segments. |
rerun.log_arrow() |
Log a 3D arrow. |
rerun.log_mesh() |
Log a raw 3D mesh by specifying its vertex positions, and optionally indices, normals and albedo factor. |
rerun.log_meshes() |
Log multiple raw 3D meshes by specifying their different buffers and albedo factors. |
rerun.log_mesh_file() |
Log the contents of a mesh file (.gltf, .glb, .obj, …). |
Images
Function | Description |
---|---|
rerun.log_image() |
Log a gray or color image. |
rerun.log_image_file() |
Log an image file given its contents or path on disk. |
rerun.log_depth_image() |
Log a depth image. |
rerun.log_segmentation_image() |
Log an image made up of integer class-ids. |
Tensors
Function | Description |
---|---|
rerun.log_tensor() |
Log an n-dimensional tensor. |
Annotations
Function | Description |
---|---|
rerun.log_annotation_context() |
Log an annotation context made up of a collection of ClassDescriptions. |
Class | Description |
---|---|
rerun.ClassDescription |
Metadata about a class type identified by an id. |
rerun.AnnotationInfo |
Annotation info annotating a class id or key-point id. |
Extension Components
Function | Description |
---|---|
rerun.log_extension_components() |
Log an arbitrary collection of extension components. |
Plotting
Function | Description |
---|---|
rerun.log_scalar() |
Log a double-precision scalar that will be visualized as a timeseries plot. |
Transforms
Function | Description |
---|---|
rerun.log_transform3d() |
Log an (affine) 3D transform between this entity and the parent. |
rerun.log_pinhole() |
Log a perspective camera model. |
rerun.log_unknown_transform() |
Log that this entity is NOT in the same space as the parent, but you do not (yet) know how they relate. |
rerun.log_disconnected_space() |
Log that this entity is NOT in the same space as the parent. |
rerun.log_view_coordinates() |
Log the view coordinates for an entity. |
rerun.log_rigid3() |
Log a proper rigid 3D transform between this entity and the parent (deprecated). |
Text
Function | Description |
---|---|
rerun.log_text_entry() |
Log a text entry, with optional level. |
Class | Description |
---|---|
rerun.LogLevel |
Represents the standard log levels. |
rerun.LoggingHandler |
Provides a logging handler that forwards all events to the Rerun SDK. |
Clearing Entities
Function | Description |
---|---|
rerun.log_cleared() |
Indicate that an entity at a given path should no longer be displayed. |
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. |
Experimental
Function | Description |
---|---|
rerun.experimental.log_text_box() |
Log a textbox. |
rerun.experimental.new_blueprint() |
Creates a new blueprint with a user-chosen application id (name) to configure the appearance of Rerun. |
rerun.experimental.add_space_view() |
Add a new space view to the blueprint. |
rerun.experimental.set_panels() |
Change the visibility of the view panels. |
rerun.experimental.set_auto_space_views() |
Change whether or not the blueprint automatically adds space views for all entities. |
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.