Record3D + URDF Helpers

Extra utilities. Used for example scripts.

class viser.extras.Record3dFrame[source]

A single frame from a Record3D capture.

K: ndarray[tuple[int, ...], dtype[float32]]
rgb: ndarray[tuple[int, ...], dtype[uint8]]
depth: ndarray[tuple[int, ...], dtype[float32]]
mask: ndarray[tuple[int, ...], dtype[bool]]
T_world_camera: ndarray[tuple[int, ...], dtype[float32]]
get_point_cloud(downsample_factor: int = 1) Tuple[ndarray[tuple[int, ...], dtype[float32]], ndarray[tuple[int, ...], dtype[uint8]]][source]
Parameters:

downsample_factor (int)

Return type:

Tuple[ndarray[tuple[int, …], dtype[float32]], ndarray[tuple[int, …], dtype[uint8]]]

class viser.extras.Record3dLoader[source]

Helper for loading frames for Record3D captures.

num_frames() int[source]
Return type:

int

get_frame(index: int) Record3dFrame[source]
Parameters:

index (int)

Return type:

Record3dFrame

class viser.extras.ViserUrdf[source]

Helper for rendering URDFs in Viser.

Parameters:
  • target – ViserServer or ClientHandle object to add URDF to.

  • urdf_or_path – Either a path to a URDF file or a yourdfpy URDF object.

  • scale – Scale factor to apply to resize the URDF.

  • root_node_name – Viser scene tree name for the root of the URDF geometry.

  • mesh_color_override – Optional color to override the URDF’s mesh colors.

remove() None[source]

Remove URDF from scene.

Return type:

None

update_cfg(configuration: ndarray) None[source]

Update the joint angles of the visualized URDF.

Parameters:

configuration (ndarray)

Return type:

None

get_actuated_joint_limits() dict[str, tuple[float | None, float | None]][source]

Returns an ordered mapping from actuated joint names to position limits.

Return type:

dict[str, tuple[float | None, float | None]]

get_actuated_joint_names() Tuple[str, ...][source]

Returns a tuple of actuated joint names, in order.

Return type:

Tuple[str, …]