Skip to content

Deprecated Logging Methods

rerun

def log_annotation_context(entity_path, class_descriptions, *, timeless=True, recording=None)

Log an annotation context made up of a collection of ClassDescriptions.

Deprecated

Please migrate to rerun.log with rerun.AnnotationContext

See the migration guide for more details.

Any entity needing to access the annotation context will find it by searching the path upward. If all entities share the same you can simply log it to the root ("/"), or if you want a per-entity ClassDescriptions log it to the same path as your entity.

Each ClassDescription must include an annotation info with an id, which will be used for matching the class and may optionally include a label and color. Colors should either be in 0-255 gamma space or in 0-1 gamma space. Colors can be RGB or RGBA.

These can either be specified verbosely as:

[AnnotationInfo(id=23, label='foo', color=(255, 0, 0)), ...]

Or using short-hand tuples.

[(23, 'bar'), ...]

Unspecified colors will be filled in by the visualizer randomly.

PARAMETER DESCRIPTION
entity_path

The path to the annotation context in the space hierarchy.

TYPE: str

class_descriptions

A single ClassDescription or a collection of ClassDescriptions.

TYPE: ClassDescriptionArrayLike

timeless

If true, the annotation context will be timeless (default: True).

TYPE: bool DEFAULT: True

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_arrow(entity_path, origin, vector, *, color=None, label=None, width_scale=None, ext=None, timeless=False, recording=None)

Log a 3D arrow.

Deprecated

Please migrate to rerun.log with rerun.Arrows3D.

See the migration guide for more details.

An arrow is defined with an origin, and a vector. This can also be considered as start and end positions for the arrow.

The shaft is rendered as a cylinder with radius = 0.5 * width_scale. The tip is rendered as a cone with height = 2.0 * width_scale and radius = 1.0 * width_scale.

PARAMETER DESCRIPTION
entity_path

The path to store the entity at.

TYPE: str

origin

The base position of the arrow.

TYPE: ArrayLike

vector

The vector along which the arrow will be drawn.

TYPE: ArrayLike

color

Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.

TYPE: Color | None DEFAULT: None

label

An optional text to show beside the arrow.

TYPE: str | None DEFAULT: None

width_scale

An optional scaling factor, default=1.0.

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

The entity is not time-dependent, and will be visible at any time point.

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_cleared(entity_path, *, recursive=False, recording=None)

Indicate that an entity at a given path should no longer be displayed.

Deprecated

Please migrate to rerun.log with rerun.Clear.

See the migration guide for more details.

If recursive is True this will also clear all sub-paths

PARAMETER DESCRIPTION
entity_path

The path of the affected entity.

TYPE: str

recursive: Should this apply to all entity paths below entity_path?

recording: 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.

def log_depth_image(entity_path, image, *, draw_order=None, meter=None, ext=None, timeless=False, recording=None)

Log a depth image.

Deprecated

Please migrate to rerun.log with rerun.DepthImage.

See the migration guide for more details.

The image must be a 2D array.

Supported dtypes

float16, float32, float64, uint8, uint16, uint32, uint64, int8, int16, int32, int64

PARAMETER DESCRIPTION
entity_path

Path to the image in the space hierarchy.

TYPE: str

image

A Tensor representing the depth image to log.

TYPE: TensorDataLike

draw_order

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 images is -10.0.

TYPE: float | None DEFAULT: None

meter

How long is a meter in the given dtype? For instance: with uint16, perhaps meter=1000 which would mean you have millimeter precision and a range of up to ~65 meters (2^16 / 1000).

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_disconnected_space(entity_path, timeless=False, recording=None)

Log that this entity is NOT in the same space as the parent.

Deprecated

Please migrate to rerun.log with rerun.DisconnectedSpace.

See the migration guide for more details.

This is useful for specifying that a subgraph is independent of the rest of the scene. If a transform or pinhole is logged on the same path, this component will be ignored.

PARAMETER DESCRIPTION
entity_path

The path of the affected entity.

TYPE: str

timeless: Log the data as timeless.

recording: 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.

def log_extension_components(entity_path, ext, *, identifiers=None, timeless=False, recording=None)

Log an arbitrary collection of extension components.

Deprecated

Please migrate to rerun.log with rerun.AnyValues.

See the migration guide for more details.

Each item in ext will be logged as a separate component.

  • The key will be used as the name of the component
  • The value must be able to be converted to an array of arrow types. In general, if you can pass it to pyarrow.array, you can log it as a extension component.

All values must either have the same length, or be singular in which case they will be treated as a splat.

Extension components will be prefixed with "ext." to avoid collisions with rerun native components. You do not need to include this prefix; it will be added for you.

Note: rerun requires that a given component only take on a single type. The first type logged will be the type that is used for all future logs of that component. The API will make a best effort to do type conversion if supported by numpy and arrow. Any components that can't be converted will be dropped.

If you are want to inspect how your component will be converted to the underlying arrow code, the following snippet is what is happening internally:

np_value = np.atleast_1d(np.array(value, copy=False))
pa_value = pa.array(value)

PARAMETER DESCRIPTION
entity_path

Path to the extension components in the space hierarchy.

TYPE: str

ext

A dictionary of extension components.

TYPE: dict[str, Any]

identifiers

Optional identifiers for each component. If provided, must be the same length as the components.

TYPE: Sequence[int] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_image_file(entity_path, *, img_bytes=None, img_path=None, img_format=None, timeless=False, recording=None)

Log an image file given its contents or path on disk.

Deprecated

Please migrate to rerun.log with rerun.ImageEncoded.

See the migration guide for more details.

You must pass either img_bytes or img_path.

Only JPEGs and PNGs are supported right now.

JPEGs will be stored compressed, saving memory, whilst PNGs will currently be decoded before they are logged. This may change in the future.

If no img_format is specified, rerun will try to guess it.

PARAMETER DESCRIPTION
entity_path

Path to the image in the space hierarchy.

TYPE: str

img_bytes

Content of an image file, e.g. a .jpg.

TYPE: bytes | None DEFAULT: None

img_path

Path to an image file, e.g. a .jpg.

TYPE: Path | None DEFAULT: None

img_format

Format of the image file.

TYPE: ImageFormat | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_image(entity_path, image, *, draw_order=None, ext=None, timeless=False, recording=None, jpeg_quality=None)

Log a gray or color image.

Deprecated

Please migrate to rerun.log with rerun.Image.

See the migration guide for more details.

The image should either have 1, 3 or 4 channels (gray, RGB or RGBA).

Supported dtypes
  • uint8, uint16, uint32, uint64: color components should be in 0-max_uint sRGB gamma space, except for alpha which should be in 0-max_uint linear space.
  • float16, float32, float64: all color components should be in 0-1 linear space.
  • int8, int16, int32, int64: if all pixels are positive, they are interpreted as their unsigned counterparts. Otherwise, the image is normalized before display (the pixel with the lowest value is black and the pixel with the highest value is white).
PARAMETER DESCRIPTION
entity_path

Path to the image in the space hierarchy.

TYPE: str

image

A Tensor representing the image to log.

TYPE: TensorDataLike

draw_order

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 images is -10.0.

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

jpeg_quality

If set, encode the image as a JPEG to save storage space. Higher quality = larger file size. A quality of 95 still saves a lot of space, but is visually very similar. JPEG compression works best for photographs. Only RGB images are supported. Note that compressing to JPEG costs a bit of CPU time, both when logging and later when viewing them.

TYPE: int | None DEFAULT: None

def log_line_segments(entity_path, positions, *, stroke_width=None, color=None, draw_order=None, ext=None, timeless=False, recording=None)

Log many 2D or 3D line segments.

Deprecated

Please migrate to rerun.log with rerun.LineStrips2D or rerun.LineStrips3D.

See the migration guide for more details.

The points will be connected in even-odd pairs, like so:

       2------3     5
                   /
0----1            /
                 4
PARAMETER DESCRIPTION
entity_path

Path to the line segments in the space hierarchy

TYPE: str

positions

An Nx2 or Nx3 array of points. Even-odd pairs will be connected as segments.

TYPE: ArrayLike

stroke_width

Optional width of the line.

TYPE: float | None DEFAULT: None

color

Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.

TYPE: Color | None DEFAULT: None

draw_order

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 lines is 20.0.

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_line_strip(entity_path, positions, *, stroke_width=None, color=None, draw_order=None, ext=None, timeless=False, recording=None)

Log a line strip through 2D or 3D space.

Deprecated

Please migrate to rerun.log with rerun.LineStrips2D or rerun.LineStrips3D.

See the migration guide for more details.

A line strip is a list of points connected by line segments. It can be used to draw approximations of smooth curves.

The points will be connected in order, like so:

       2------3     5
      /        \   /
0----1          \ /
                 4

PARAMETER DESCRIPTION
entity_path

Path to the path in the space hierarchy

TYPE: str

positions

An Nx2 or Nx3 array of points along the path.

TYPE: ArrayLike

stroke_width

Optional width of the line.

TYPE: float | None DEFAULT: None

color

Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.

TYPE: Color | None DEFAULT: None

draw_order

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 lines is 20.0.

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_mesh_file(entity_path, mesh_format, *, mesh_bytes=None, mesh_path=None, transform=None, timeless=False, recording=None)

Log the contents of a mesh file (.gltf, .glb, .obj, …).

Deprecated

Please migrate to rerun.log with rerun.Asset3D.

See the migration guide for more details.

You must pass either mesh_bytes or mesh_path.

You can also use [rerun.log_mesh] to log raw mesh data.

Example:
# Move mesh 10 units along the X axis.
transform=np.array([
    [1, 0, 0, 10],
    [0, 1, 0, 0],
    [0, 0, 1, 0]])
PARAMETER DESCRIPTION
entity_path

Path to the mesh in the space hierarchy

TYPE: str

mesh_format

Format of the mesh file

TYPE: MeshFormat

mesh_bytes

Content of an mesh file, e.g. a .glb.

TYPE: bytes | None DEFAULT: None

mesh_path

Path to an mesh file, e.g. a .glb.

TYPE: Path | None DEFAULT: None

transform

Optional 3x4 affine transform matrix applied to the mesh

TYPE: ArrayLike | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_mesh(entity_path, positions, *, indices=None, normals=None, albedo_factor=None, vertex_colors=None, timeless=False, recording=None)

Log a raw 3D mesh by specifying its vertex positions, and optionally indices, normals and albedo factor.

Deprecated

Please migrate to rerun.log with rerun.Mesh3D.

See the migration guide for more details.

You can also use [rerun.log_mesh_file] to log .gltf, .glb, .obj, etc.

Example:
# A simple red triangle:
rerun.log_mesh(
    "world/mesh",
    positions = [
        [0.0, 0.0, 0.0],
        [1.0, 0.0, 0.0],
        [0.0, 1.0, 0.0]
    ],
    indices = [0, 1, 2],
    normals = [
        [0.0, 0.0, 1.0],
        [0.0, 0.0, 1.0],
        [0.0, 0.0, 1.0]
    ],
    albedo_factor = [1.0, 0.0, 0.0],
)
PARAMETER DESCRIPTION
entity_path

Path to the mesh in the space hierarchy

TYPE: str

positions

An array of 3D points. If no indices are specified, then each triplet of positions is interpreted as a triangle.

TYPE: Any

indices

If specified, is a flattened array of indices that describe the mesh's triangles, i.e. its length must be divisible by 3.

TYPE: Any | None DEFAULT: None

normals

If specified, is a (potentially flattened) array of 3D vectors that describe the normal for each vertex, i.e. the total number of elements must be divisible by 3 and more importantly, len(normals) should be equal to len(positions).

TYPE: Any | None DEFAULT: None

albedo_factor

Optional color multiplier of the mesh using RGB or unmuliplied RGBA in linear 0-1 space.

TYPE: Any | None DEFAULT: None

vertex_colors

Optional array of RGB(A) vertex colors, in sRGB gamma space, either as 0-1 floats or 0-255 integers. If specified, the alpha is considered separate (unmultiplied).

TYPE: Colors | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_meshes(entity_path, position_buffers, *, vertex_color_buffers, index_buffers, normal_buffers, albedo_factors, timeless=False, recording=None)

Log multiple raw 3D meshes by specifying their different buffers and albedo factors.

Deprecated

Please migrate to rerun.log with rerun.Mesh3D.

See the migration guide for more details.

To learn more about how the data within these buffers is interpreted and laid out, refer to the documentation for [rerun.log_mesh].

PARAMETER DESCRIPTION
entity_path

Path to the mesh in the space hierarchy

TYPE: str

position_buffers

A sequence of position buffers, one for each mesh.

TYPE: Sequence[ArrayLike]

vertex_color_buffers

An optional sequence of vertex color buffers, one for each mesh.

TYPE: Sequence[Colors | None]

index_buffers

An optional sequence of index buffers, one for each mesh.

TYPE: Sequence[ArrayLike | None]

normal_buffers

An optional sequence of normal buffers, one for each mesh.

TYPE: Sequence[ArrayLike | None]

albedo_factors

An optional sequence of albedo factors, one for each mesh.

TYPE: Sequence[ArrayLike | None]

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_obb(entity_path, *, half_size, position=None, rotation_q=None, color=None, stroke_width=None, label=None, class_id=None, ext=None, timeless=False, recording=None)

Log a 3D Oriented Bounding Box, or OBB.

Deprecated

Please migrate to rerun.log with rerun.Boxes3D.

See the migration guide for more details.

Example:
rr.log_obb("my_obb", half_size=[1.0, 2.0, 3.0], position=[0, 0, 0], rotation_q=[0, 0, 0, 1])
PARAMETER DESCRIPTION
entity_path

The path to the oriented bounding box in the space hierarchy.

TYPE: str

half_size

Array with [x, y, z] half dimensions of the OBB.

TYPE: ArrayLike | None

position

Optional array with [x, y, z] position of the OBB in world space.

TYPE: ArrayLike | None DEFAULT: None

rotation_q

Optional array with quaternion coordinates [x, y, z, w] for the rotation from model to world space.

TYPE: ArrayLike | None DEFAULT: None

color

Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.

TYPE: Color | None DEFAULT: None

stroke_width

Optional width of the line edges.

TYPE: float | None DEFAULT: None

label

Optional text label placed at position.

TYPE: str | None DEFAULT: None

class_id

Optional class id for the OBB. The class id provides colors and labels if not specified explicitly.

TYPE: int | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_pinhole(entity_path, *, width, height, focal_length_px=None, principal_point_px=None, child_from_parent=None, timeless=False, recording=None, camera_xyz=None)

Log a perspective camera model.

Deprecated

Please migrate to rerun.log with rerun.Pinhole.

See the migration guide for more details.

This logs the pinhole model that projects points from the parent (camera) space to this space (image) such that:

point_image_hom = child_from_parent * point_cam
point_image = point_image_hom[:,1] / point_image_hom[2]

Where point_image_hom is the projected point in the image space expressed in homogeneous coordinates.

Example
width = 640
height = 480
f_len = (height * width) ** 0.5

rerun.log_pinhole("world/camera/image",
                  width = width,
                  height = height,
                  focal_length_px = f_len)

# More explicit:
u_cen = width / 2
v_cen = height / 2
rerun.log_pinhole("world/camera/image",
                  width = width,
                  height = height,
                  child_from_parent = [[f_len, 0,     u_cen],
                                       [0,     f_len, v_cen],
                                       [0,     0,     1  ]],
                  camera_xyz="RDF")
PARAMETER DESCRIPTION
entity_path

Path to the child (image) space in the space hierarchy.

TYPE: str

focal_length_px

The focal length of the camera in pixels. This is the diagonal of the projection matrix. Set one value for symmetric cameras, or two values (X=Right, Y=Down) for anamorphic cameras.

TYPE: float | ArrayLike | None DEFAULT: None

principal_point_px

The center of the camera in pixels. The default is half the width and height. This is the last column of the projection matrix. Expects two values along the dimensions Right and Down

TYPE: ArrayLike | None DEFAULT: None

child_from_parent

Row-major intrinsics matrix for projecting from camera space to image space. The first two axes are X=Right and Y=Down, respectively. Projection is done along the positive third (Z=Forward) axis. This can be specified instead of focal_length_px and principal_point_px.

TYPE: ArrayLike | None DEFAULT: None

width

Width of the image in pixels.

TYPE: int

height

Height of the image in pixels.

TYPE: int

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

camera_xyz

Sets the view coordinates for the camera. The default is "RDF", i.e. X=Right, Y=Down, Z=Forward, and this is also the recommended setting. This means that the camera frustum will point along the positive Z axis of the parent space, and the cameras "up" direction will be along the negative Y axis of the parent space.

Each letter represents:

  • R: Right
  • L: Left
  • U: Up
  • D: Down
  • F: Forward
  • B: Back

The camera furstum will point whichever axis is set to F (or the oppositve of B). When logging a depth image under this entity, this is the direction the point cloud will be projected. With XYZ=RDF, the default forward is +Z.

The frustum's "up" direction will be whichever axis is set to U (or the oppositve of D). This will match the negative Y direction of pixel space (all images are assumed to have xyz=RDF). With RDF, the default is up is -Y.

The frustum's "right" direction will be whichever axis is set to R (or the oppositve of L). This will match the positive X direction of pixel space (all images are assumed to have xyz=RDF). With RDF, the default right is +x.

Other common formats are "RUB" (X=Right, Y=Up, Z=Back) and "FLU" (X=Forward, Y=Left, Z=Up).

Equivalent to calling rerun.log_view_coordinates(entity, xyz=…).

NOTE: setting this to something else than "RDF" (the default) will change the orientation of the camera frustum, and make the pinhole matrix not match up with the coordinate system of the pinhole entity.

The pinhole matrix (the child_from_parent argument) always project along the third (Z) axis, but will be re-oriented to project along the forward axis of the camera_xyz argument.

TYPE: str | None DEFAULT: None

def log_point(entity_path, position, *, radius=None, color=None, label=None, class_id=None, keypoint_id=None, draw_order=None, ext=None, timeless=False, recording=None)

Log a 2D or 3D point, with a position and optional color, radii, label, etc.

Deprecated

Please migrate to rerun.Points2D or rerun.Points3D

See the migration guide for more details.

Logging again to the same entity_path will replace the previous point.

Colors should either be in 0-255 gamma space or in 0-1 linear space. Colors can be RGB or RGBA represented as a 2-element or 3-element sequence.

Supported dtypes for color:
  • uint8: color components should be in 0-255 sRGB gamma space, except for alpha which should be in 0-255 linear space.
  • float32/float64: all color components should be in 0-1 linear space.
PARAMETER DESCRIPTION
entity_path

Path to the point in the space hierarchy.

TYPE: str

position

Any 2-element or 3-element array-like.

TYPE: ArrayLike

radius

Optional radius (make it a sphere).

TYPE: float | None DEFAULT: None

color

Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.

TYPE: Color | None DEFAULT: None

label

Optional text to show with the point.

TYPE: str | None DEFAULT: None

class_id

Optional class id for the point. The class id provides color and label if not specified explicitly. See rerun.log_annotation_context

TYPE: int | None DEFAULT: None

keypoint_id

Optional key point id for the point, identifying it within a class. If keypoint_id is passed but no class_id was specified, class_id will be set 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. See rerun.log_annotation_context

TYPE: int | None DEFAULT: None

draw_order

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

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_points(entity_path, positions, *, identifiers=None, colors=None, radii=None, labels=None, class_ids=None, keypoint_ids=None, draw_order=None, ext=None, timeless=False, recording=None)

Log 2D or 3D points, with positions and optional colors, radii, labels, etc.

Deprecated

Please migrate to rerun.Points2D or rerun.Points3D

See the migration guide for more details.

Logging again to the same entity_path will replace all the previous points.

Colors should either be in 0-255 gamma space or in 0-1 linear space. Colors can be RGB or RGBA. You can supply no colors, one color, or one color per point in a Nx3 or Nx4 numpy array.

Supported dtypes for colors:
  • uint8: color components should be in 0-255 sRGB gamma space, except for alpha which should be in 0-255 linear space.
  • float32/float64: all color components should be in 0-1 linear space.
PARAMETER DESCRIPTION
entity_path

Path to the points in the space hierarchy.

TYPE: str

positions

Nx2 or Nx3 array

TYPE: ArrayLike

identifiers

Unique numeric id that shows up when you hover or select the point.

TYPE: ArrayLike | None DEFAULT: None

colors

Optional colors of 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.

TYPE: Color | Colors | None DEFAULT: None

radii

Optional radii (make it a sphere).

TYPE: ArrayLike | None DEFAULT: None

labels

Optional per-point text to show with the points

TYPE: Sequence[str] | None DEFAULT: None

class_ids

Optional class ids for the points. The class id provides colors and labels if not specified explicitly. See rerun.log_annotation_context

TYPE: OptionalClassIds DEFAULT: None

keypoint_ids

Optional key point ids for the points, identifying them within a class. If keypoint_ids are passed in but no class_ids were specified, class_id will be set 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. See rerun.log_annotation_context

TYPE: OptionalKeyPointIds DEFAULT: None

draw_order

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

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_rect(entity_path, rect, *, rect_format=RectFormat.XYWH, color=None, label=None, class_id=None, draw_order=None, ext=None, timeless=False, recording=None)

Log a 2D rectangle.

Deprecated

Please migrate to rerun.log with rerun.Boxes2D.

See the migration guide for more details.

PARAMETER DESCRIPTION
entity_path

Path to the rectangle in the space hierarchy.

TYPE: str

rect

the rectangle in [x, y, w, h], or some format you pick with the rect_format argument.

TYPE: ArrayLike

rect_format

how to interpret the rect argument

TYPE: RectFormat DEFAULT: XYWH

color

Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.

TYPE: Color | None DEFAULT: None

label

Optional text to show inside the rectangle.

TYPE: str | None DEFAULT: None

class_id

Optional class id for the rectangle. The class id provides color and label if not specified explicitly. See rerun.log_annotation_context

TYPE: int | None DEFAULT: None

draw_order

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 rects is 10.0.

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_rects(entity_path, rects, *, rect_format=RectFormat.XYWH, identifiers=None, colors=None, labels=None, class_ids=None, draw_order=None, ext=None, timeless=False, recording=None)

Log multiple 2D rectangles.

Deprecated

Please migrate to rerun.log with rerun.Boxes2D.

See the migration guide for more details.

Logging again to the same entity_path will replace all the previous rectangles.

Colors should either be in 0-255 gamma space or in 0-1 linear space. Colors can be RGB or RGBA. You can supply no colors, one color, or one color per point in a Nx3 or Nx4 numpy array.

Supported dtypes for colors:
  • uint8: color components should be in 0-255 sRGB gamma space, except for alpha which should be in 0-255 linear space.
  • float32/float64: all color components should be in 0-1 linear space.
PARAMETER DESCRIPTION
entity_path

Path to the rectangles in the space hierarchy.

TYPE: str

rects

Nx4 numpy array, where each row is [x, y, w, h], or some format you pick with the rect_format argument.

TYPE: ArrayLike

rect_format

how to interpret the rect argument

TYPE: RectFormat DEFAULT: XYWH

identifiers

Unique numeric id that shows up when you hover or select the point.

TYPE: Sequence[int] | None DEFAULT: None

colors

Optional per-rectangle gamma-space RGB or RGBA as 0-1 floats or 0-255 integers.

TYPE: Color | Colors | None DEFAULT: None

labels

Optional per-rectangle text to show inside the rectangle.

TYPE: Sequence[str] | None DEFAULT: None

class_ids

Optional class ids for the rectangles. The class id provides colors and labels if not specified explicitly. See rerun.log_annotation_context

TYPE: OptionalClassIds DEFAULT: None

draw_order

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 rects is 10.0.

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_scalar(entity_path, scalar, *, label=None, color=None, radius=None, scattered=None, ext=None, recording=None)

Log a double-precision scalar that will be visualized as a timeseries plot.

Deprecated

Please migrate to rerun.log with rerun.TimeSeriesScalar.

See the migration guide for more details.

The current simulation time will be used for the time/X-axis, hence scalars cannot be timeless!

See here for a larger example.

Understanding the plot and attributes hierarchy

Timeseries come in three parts: points, lines and finally the plots themselves. As a user of the Rerun SDK, your one and only entrypoint into that hierarchy is through the lowest-level layer: the points.

When logging scalars and their attributes (label, color, radius, scattered) through this function, Rerun will turn them into points with similar attributes. From these points, lines with appropriate attributes can then be inferred; and from these inferred lines, plots with appropriate attributes will be inferred in turn!

In terms of actual hierarchy:

  • Each space represents a single plot.
  • Each entity path within a space that contains scalar data is a line within that plot.
  • Each logged scalar is a point.

E.g. the following:

t=1.0
rerun.log_scalar("trig/sin", math.sin(t), label="sin(t)", color=[255, 0, 0])
rerun.log_scalar("trig/cos", math.cos(t), label="cos(t)", color=[0, 0, 255])
will yield a single plot (space = trig), comprised of two lines (entity paths trig/sin and trig/cos).

PARAMETER DESCRIPTION
entity_path

The path to the scalar in the space hierarchy.

TYPE: str

scalar

The scalar value to log.

TYPE: float

label

An optional label for the point.

This won't show up on points at the moment, as our plots don't yet support displaying labels for individual points TODO(#1289). If all points within a single entity path (i.e. a line) share the same label, then this label will be used as the label for the line itself. Otherwise, the line will be named after the entity path. The plot itself is named after the space it's in.

TYPE: str | None DEFAULT: None

color

Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.

If left unspecified, a pseudo-random color will be used instead. That same color will apply to all points residing in the same entity path that don't have a color specified.

Points within a single line do not have to share the same color, the line will have differently colored segments as appropriate. If all points within a single entity path (i.e. a line) share the same color, then this color will be used as the line color in the plot legend. Otherwise, the line will appear gray in the legend.

TYPE: Color | None DEFAULT: None

radius

An optional radius for the point.

Points within a single line do not have to share the same radius, the line will have differently sized segments as appropriate.

If all points within a single entity path (i.e. a line) share the same radius, then this radius will be used as the line width too. Otherwise, the line will use the default width of 1.0.

TYPE: float | None DEFAULT: None

scattered

Specifies whether the point should form a continuous line with its neighbors, or whether it should stand on its own, akin to a scatter plot. Points within a single line do not have to all share the same scatteredness: the line will switch between a scattered and a continuous representation as required.

TYPE: bool | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_segmentation_image(entity_path, image, *, draw_order=None, ext=None, timeless=False, recording=None)

Log an image made up of integer class-ids.

Deprecated

Please migrate to rerun.log with rerun.SegmentationImage.

See the migration guide for more details.

The image should have 1 channel, i.e. be either H x W or H x W x 1.

See: rerun.log_annotation_context for information on how to map the class-ids to colors and labels.

Supported dtypes

uint8, uint16

PARAMETER DESCRIPTION
entity_path

Path to the image in the space hierarchy.

TYPE: str

image

A Tensor representing the segmentation image to log.

TYPE: ArrayLike

draw_order

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 images is -10.0.

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_tensor(entity_path, tensor, *, names=None, meter=None, ext=None, timeless=False, recording=None)

Log an n-dimensional tensor.

Deprecated

Please migrate to rerun.log with rerun.Tensor.

See the migration guide for more details.

PARAMETER DESCRIPTION
entity_path

Path to the tensor in the space hierarchy.

TYPE: str

tensor

A Tensor object.

TYPE: TensorDataLike

names

Optional names for each dimension of the tensor.

TYPE: Sequence[str | None] | None DEFAULT: None

meter

Optional scale of the tensor (e.g. meters per cell).

TYPE: float | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_text_entry(entity_path, text, *, level='INFO', color=None, ext=None, timeless=False, recording=None)

Log a text entry, with optional level.

Deprecated

Please migrate to rerun.log with rerun.TextLog.

See the migration guide for more details.

PARAMETER DESCRIPTION
entity_path

The object path to log the text entry under.

TYPE: str

text

The text to log.

TYPE: str

level

The level of the text entry. This can technically be an arbitrary string, but it's recommended to use one of "CRITICAL", "ERROR", "WARN", "INFO", "DEBUG".

TYPE: str | None DEFAULT: 'INFO'

color

Optional RGB or RGBA in sRGB gamma-space as either 0-1 floats or 0-255 integers, with separate alpha.

TYPE: Color | None DEFAULT: None

ext

Optional dictionary of extension components. See rerun.log_extension_components

TYPE: dict[str, Any] | None DEFAULT: None

timeless

Whether the text entry should be timeless.

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_transform3d(entity_path, transform, *, from_parent=False, timeless=False, recording=None)

Log an (affine) 3D transform between this entity and the parent.

Deprecated

Please migrate to rerun.log with rerun.Transform3D.

See the migration guide for more details.

If from_parent is set to True, the transformation is from the parent to the space of the entity_path, otherwise it is from the child to the parent.

Note that new transforms replace previous, i.e. if you call this function several times on the same path, each new transform will replace the previous one and does not combine with it.

Examples:

# Log translation only.
rr.log_transform3d("transform_test/translation", rr.Translation3D((2, 1, 3)))

# Log scale along the x axis only.
rr.log_transform3d("transform_test/x_scaled", rr.Scale3D((3, 1, 1)))

# Log a rotation around the z axis.
rr.log_transform3d("transform_test/z_rotated_object", rr.RotationAxisAngle((0, 0, 1), degrees=20))

# Log scale followed by translation along the Y-axis.
rr.log_transform3d(
    "transform_test/scaled_and_translated_object", rr.TranslationRotationScale3D([0.0, 1.0, 0.0], scale=2)
)

# Log translation + rotation, also called a rigid transform.
rr.log_transform3d("transform_test/rigid3", rr.Rigid3D([1, 2, 3], rr.RotationAxisAngle((0, 1, 0), radians=1.57)))

# Log translation, rotation & scale all at once.
rr.log_transform3d(
    "transform_test/transformed",
    rr.TranslationRotationScale3D(
        translation=[0, 1, 5],
        rotation=rr.RotationAxisAngle((0, 0, 1), degrees=20),
        scale=2,
    ),
)
PARAMETER DESCRIPTION
entity_path

Path of the child space in the space hierarchy.

TYPE: str

transform

Instance of a rerun data class that describes a three dimensional transform. One of: * TranslationAndMat3 * TranslationRotationScale3D * Rigid3D * RotationAxisAngle * Translation3D * Quaternion * Scale3D

TYPE: TranslationAndMat3 | TranslationRotationScale3D | RotationAxisAngle | Translation3D | Scale3D | Quaternion | Rigid3D

from_parent

If True, the transform is from the parent to the child, otherwise it is from the child to the parent.

TYPE: bool DEFAULT: False

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None

def log_view_coordinates(entity_path, *, xyz='', up='', right_handed=None, timeless=False, recording=None)

Log the view coordinates for an entity.

Deprecated

Please migrate to rerun.log with rerun.ViewCoordinates.

See the migration guide for more details.

Each entity defines its own coordinate system, called a space. By logging view coordinates you can give semantic meaning to the XYZ axes of the space.

This is particularly useful for 3D spaces, to set the up-axis.

For pinhole entities this will control the direction of the camera frustum. You should use rerun.log_pinhole(…, camera_xyz=…) for this instead, and read the documentation there.

For full control, set the xyz parameter to a three-letter acronym (xyz="RDF"). Each letter represents:

  • R: Right
  • L: Left
  • U: Up
  • D: Down
  • F: Forward
  • B: Back

Some of the most common are:

  • "RDF": X=Right Y=Down Z=Forward (right-handed)
  • "RUB" X=Right Y=Up Z=Back (right-handed)
  • "RDB": X=Right Y=Down Z=Back (left-handed)
  • "RUF": X=Right Y=Up Z=Forward (left-handed)

Currently Rerun only supports right-handed coordinate systems.

Example
rerun.log_view_coordinates("world/camera/image", xyz="RUB")

For world-coordinates it's often convenient to just specify an up-axis. You can do so by using the up-parameter (where up is one of "+X", "-X", "+Y", "-Y", "+Z", "-Z"):

rerun.log_view_coordinates("world", up="+Z", right_handed=True, timeless=True)
rerun.log_view_coordinates("world", up="-Y", right_handed=False, timeless=True)
PARAMETER DESCRIPTION
entity_path

Path in the space hierarchy where the view coordinate will be set.

TYPE: str

xyz

Three-letter acronym for the view coordinate axes.

TYPE: str DEFAULT: ''

up

Which axis is up? One of "+X", "-X", "+Y", "-Y", "+Z", "-Z".

TYPE: str DEFAULT: ''

right_handed

If True, the coordinate system is right-handed. If False, it is left-handed.

TYPE: bool | None DEFAULT: None

timeless

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

TYPE: bool DEFAULT: False

recording

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.

TYPE: RecordingStream | None DEFAULT: None