Main Content


Add visual geometry data to rigid body


addVisual(body,"Mesh",filename) adds a polygon mesh on top of any current visual geometry using the specified .stl or .dae file, filename. Multiple visual geometries can be added to a single body. The coordinate frame is assumed to coincide with the frame of body. You can view the meshes for an entire rigid body tree using show.

addVisual(body,"Mesh",filename,tform) specifies a homogeneous transformation for the polygon mesh relative to the body frame.

Input Arguments

collapse all

RigidBody object, specified as a handle. Create a rigid body object using rigidBody.

Name of mesh file, specified as a string scalar or character vector. This file must be a valid .stl or .dae file.

Data Types: char | string

Mesh transformation relative to the body coordinate frame, specified as a 4-by-4 homogeneous transformation.

Version History

Introduced in R2017b