Main Content

subtree

Create subtree from robot model

Description

newSubtree = subtree(robot,bodyname) creates a new robot model using the parent name of the body specified by bodyname as the base name. All subsequently attached bodies (including the body with bodyname specified) are added to the subtree. The original robot model is unaffected.

Input Arguments

collapse all

Robot model, specified as a rigidBodyTree object.

Body name, specified as a string scalar or character vector. This body must be on the robot model specified in robot.

Data Types: char | string

Output Arguments

collapse all

Robot subtree, returned as a rigidBodyTree object. This new subtree uses the parent name of the body specified by bodyname as the base name. All bodies that are attached in the previous robot model (including the body with bodyname specified) are added to the subtree.

Extended Capabilities

Version History

Introduced in R2016b