Skip to content
Design System
GitHub

Robot model

v0.24.2Beta

A robot's pose in 3D from its URDF and live joint values (ROS sensor_msgs/JointState), for monitoring: neutral greys from the theme, a ground grid and axes named in words; highlighted joints in a status colour with a callout naming them; orbit, pan and zoom by pointer and keys; loading, error with the failing file, empty, stale and no-WebGL states in words. The kit's one three.js item.

API reference

Generated from the types. Every part also takes className.

RobotModel

urdf
stringThe URDF as text. Use urdf or urdfUrl.
loading
boolean = falseThe app is still getting the URDF (from a parameter server, say): shows loading until urdf or urdfUrl arrives.
urdfUrl
stringWhere to fetch the URDF. Relative mesh paths resolve against its folder unless meshBaseUrl says otherwise.
packages
Record<string, string>Where each package:// package lives: { arm_description: "/robots/arm_description" }.
meshBaseUrl
stringThe folder relative mesh paths resolve against, and that holds any package not in packages (<meshBaseUrl>/<package>/…).
joints
Record<string, RobotModelJointValue>The joints' positions, as ROS sends them (sensor_msgs/JointState): radians, or metres for prismatic joints. jointStateToRecord converts a message. A planar joint takes [x, y, θ] and a floating one [x, y, z, roll, pitch, yaw].
highlight
string[]Joint or link names to emphasise: a joint near its limit, a link in fault. Each is drawn in the status colour and named in words.
highlightStatus
"warning" | "danger" = "warning"The status colour of the highlight. warning (needs attention) by default; danger for a fault.
up
"y" | "z" = "z"Which axis of the URDF is up. ROS uses z.
label
stringThe robot's name in the header and the summary. Defaults to the URDF's <robot name>.
updatedAt
number | DateWhen the joint values were measured (the message's stamp). Without it, the time they last changed here.
staleAfterMs
numberWith no update for this long, the view says "Stale" with the last update's time over the last pose. Off by default.
webgl
booleanWhether to draw in 3D. Defaults to whether the browser can (WebGL); false shows the words fallback, for a device that should not draw 3D.
onRetry
() => voidCalled by "Load again" after an error, instead of reloading the same files.
aspectRatio
number = 4 / 3Width over height of the view, so it holds its size while loading. 4 / 3 by default.
labels
Partial<RobotModelLabels>