Skip to content

experimental.py

rerun.experimental

Experimental features for Rerun.

These features are not yet stable and may change in future releases without going through the normal deprecation cycle.

class Points2D

Bases: Archetype

A 2D point cloud with positions and optional colors, radii, labels, etc.

Example
import rerun as rr
import rerun.experimental as rr_exp

rr.init("points", spawn=True)

rr_exp.log_any("simple", rr_exp.Points2D([[0, 0], [1, 1]]))

# Log an extra rect to set the view bounds
rr.log_rect("bounds", [0, 0, 4, 3], rect_format=rr.RectFormat.XCYCWH)
points: components.Point2DArray = field(metadata={'component': 'primary'}, converter=components.Point2DArray.from_similar) class-attribute instance-attribute

All the actual 2D points that make up the point cloud.

radii: components.RadiusArray | None = field(metadata={'component': 'secondary'}, default=None, converter=components.RadiusArray.from_similar) class-attribute instance-attribute

Optional radii for the points, effectively turning them into circles.

colors: components.ColorArray | None = field(metadata={'component': 'secondary'}, default=None, converter=components.ColorArray.from_similar) class-attribute instance-attribute

Optional colors for the points.

The colors are interpreted as RGB or RGBA in sRGB gamma-space, As either 0-1 floats or 0-255 integers, with separate alpha.

labels: components.LabelArray | None = field(metadata={'component': 'secondary'}, default=None, converter=components.LabelArray.from_similar) class-attribute instance-attribute

Optional text labels for the points.

draw_order: components.DrawOrderArray | None = field(metadata={'component': 'secondary'}, default=None, converter=components.DrawOrderArray.from_similar) class-attribute instance-attribute

An optional floating point value that specifies the 2D drawing order. Objects with higher values are drawn on top of those with lower values.

The default for 2D points is 30.0.

class_ids: components.ClassIdArray | None = field(metadata={'component': 'secondary'}, default=None, converter=components.ClassIdArray.from_similar) class-attribute instance-attribute

Optional class Ids for the points.

The class ID provides colors and labels if not specified explicitly.

keypoint_ids: components.KeypointIdArray | None = field(metadata={'component': 'secondary'}, default=None, converter=components.KeypointIdArray.from_similar) class-attribute instance-attribute

Optional keypoint IDs for the points, identifying them within a class.

If keypoint IDs are passed in but no class IDs were specified, the class ID will default to 0. This is useful to identify points within a single classification (which is identified with class_id). E.g. the classification might be 'Person' and the keypoints refer to joints on a detected skeleton.

instance_keys: components.InstanceKeyArray | None = field(metadata={'component': 'secondary'}, default=None, converter=components.InstanceKeyArray.from_similar) class-attribute instance-attribute

Unique identifiers for each individual point in the batch.

def new_blueprint(application_id, *, blueprint_id=None, make_default=False, make_thread_default=False, spawn=False, add_to_app_default_blueprint=False, default_enabled=True)

Creates a new blueprint with a user-chosen application id (name) to configure the appearance of Rerun.

If you only need a single global blueprint, rerun.init might be simpler.

Parameters:

Name Type Description Default
application_id str

Your Rerun recordings will be categorized by this application id, so try to pick a unique one for each application that uses the Rerun SDK.

For example, if you have one application doing object detection and another doing camera calibration, you could have rerun.init("object_detector") and rerun.init("calibrator").

required
blueprint_id Optional[str]

Set the blueprint ID that this process is logging to, as a UUIDv4.

The default blueprint_id is based on multiprocessing.current_process().authkey which means that all processes spawned with multiprocessing will have the same default blueprint_id.

If you are not using multiprocessing and still want several different Python processes to log to the same Rerun instance (and be part of the same blueprint), you will need to manually assign them all the same blueprint_id. Any random UUIDv4 will work, or copy the blueprint_id for the parent process.

None
make_default bool

If true (not the default), the newly initialized blueprint will replace the current active one (if any) in the global scope.

False
make_thread_default bool

If true (not the default), the newly initialized blueprint will replace the current active one (if any) in the thread-local scope.

False
spawn bool

Spawn a Rerun Viewer and stream logging data to it. Short for calling spawn separately. If you don't call this, log events will be buffered indefinitely until you call either connect, show, or save

False
add_to_app_default_blueprint bool

Should the blueprint append to the existing app-default blueprint instead instead of creating a new one.

False
default_enabled bool

Should Rerun logging be on by default? Can overridden with the RERUN env-var, e.g. RERUN=on or RERUN=off.

True

Returns:

Type Description
RecordingStream

A handle to the rerun.RecordingStream. Use it to log data to Rerun.

def log_text_box(entity_path, text, *, ext=None, timeless=False)

Log a textbox.

This is intended to be used for multi-line text entries to be displayed in their own view.

Parameters:

Name Type Description Default
entity_path str

The object path to log the text entry under.

required
text str

The text to log.

required
ext dict[str, Any] | None

Optional dictionary of extension components. See rerun.log_extension_components

None
timeless bool

Whether the text-box should be timeless.

False

def add_space_view(*, origin, name, entity_paths, blueprint=None)

Add a new space view to the blueprint.

Parameters:

Name Type Description Default
origin str

The EntityPath to use as the origin of this space view. All other entities will be transformed to be displayed relative to this origin.

required
name Optional[str]

The name of the space view to show in the UI. Will default to the origin if not provided.

required
entity_paths Optional[List[str]]

The entities to be shown in the space view. If not provided, this will default to [origin]

required
blueprint Optional[RecordingStream]

The blueprint to add the space view to. If None, the default global blueprint is used.

None

def log_any(entity_path, entity, ext=None, timeless=False, recording=None)

Log an entity.

Parameters:

Name Type Description Default
entity_path str

Path to the entity in the space hierarchy.

required
entity Loggable

The archetype object representing the entity.

required
ext dict[str, Any] | None

Optional dictionary of extension components. See rerun.log_extension_components

None
timeless bool

If true, the entity will be timeless (default: False).

False
recording RecordingStream | None

Specifies the rerun.RecordingStream to use. If left unspecified, defaults to the current active data recording, if there is one. See also: rerun.init, rerun.set_global_data_recording.

None

def set_panels(*, all_expanded=None, blueprint_view_expanded=None, selection_view_expanded=None, timeline_view_expanded=None, blueprint=None)

Change the visibility of the view panels.

Parameters:

Name Type Description Default
all_expanded Optional[bool]

Expand or collapse all panels.

None
blueprint_view_expanded Optional[bool]

Expand or collapse the blueprint view panel.

None
selection_view_expanded Optional[bool]

Expand or collapse the selection view panel.

None
timeline_view_expanded Optional[bool]

Expand or collapse the timeline view panel.

None
blueprint Optional[RecordingStream]

The blueprint to add the space view to. If None, the default global blueprint is used.

None

def set_auto_space_views(enabled, blueprint=None)

Change whether or not the blueprint automatically adds space views for all entities.

Parameters:

Name Type Description Default
enabled Optional[bool]

Whether or not to automatically add space views for all entities.

required
blueprint Optional[RecordingStream]

The blueprint to add the space view to. If None, the default global blueprint is used.

None