Main Content

addVisual

Add visual geometry data to rigid body

Description

addVisual(body,"Mesh",filename) adds a polygon mesh on top of any current visual geometry using the specified .stl 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.

.stl file name, specified as a string scalar or character vector.

Data Types: char | string

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

Introduced in R2017b