Skip to main content

Capsule

A 3D capsule shape that captures colliders with curvilinear geometric properties.

capsule
ParameterTypeDescription
typestringThe Capsule shape class
namestringA user-defined name of the shape
framestringThe coordinateshe frame this shape belongs to. Can either be world or robot frame
physicalbooleanTrue if the collision with this shape is phyiscal, else false
lengthfloatThe length of length of the capsule, not including caps
radiusfloatThe length of radius of the capsule
localTransformisometry consisted of translation and rotationDefines the position and rotation of the shape relevant to the specific frame
let shape = {
type:'Capsule',
name:'pill',
frame: 'world',
physical: true,
length:0.2,
radius:0.1,
localTransform: {translation:[0.0,0.0,0.0],rotation:[1.0,0.0,0.0,0.0]} // [x, y, z, w] ordering for quaternion
}