A custom HTML element that loads and displays a URDF robot model in a THREE.js scene.
On this page
Events
{ type: 'urdf-change' }Fires when the URDF has changed and a new one is starting to load.
{ type: 'ignore-limits-change' }Fires when the ignore-limits attribute changes.
{ type: 'urdf-processed' }Fires when the URDF has finished loading and getting processed.
{ type: 'geometry-loaded' }Fires when all the geometry has been fully loaded.
Properties
package: string
Corresponds to the package parameter in URDFLoader.load.
urdf: string
Corresponds to the urdfpath parameter in URDFLoader.load.
ignoreLimits: boolean
Whether or not the display should ignore the joint limits specified in the model when updating angles.
up: string
The axis to associate with "up" in THREE.js. Values can be [+-][XYZ].
displayShadow: boolean
Whether or not to render the shadow under the robot.
ambientColor: string
The color of the ambient light specified with css colors.
autoRedraw: boolean
Automatically redraw the model every frame instead of waiting to be dirtied.
noAutoRecenter: boolean
Recenter the camera only after loading the model.
jointValues: Object
Sets or gets the jointValues of the robot as a dictionary of joint-name to radian pairs.
Methods
redraw(): voidDirty the renderer so the element will redraw next frame.
recenter(): voidRecenter the camera to the model and redraw.
setJointValue(
// The name of the joint to set
jointName: string,
// The value(s) to set
...jointValues: number | null
): voidSets the given joint to the provided value(s). See URDFJoint.setJointValue.
setJointValues(
// A dictionary of joint names to values
jointValueDictionary: Object
): voidSets all joint names specified as keys to radian angle value.