Create tree-structured robot
The rigidBodyTree
is a representation of the connectivity
of rigid bodies with joints. Use this class to build robot manipulator models in
MATLAB®. If you have a robot model specified using the Unified Robot Description
Format (URDF), use importrobot
to import your robot
model.
A rigid body tree model is made up of rigid bodies as rigidBody
objects. Each rigid body has a rigidBodyJoint
object associated with it that defines how it can move
relative to its parent body. Use setFixedTransform
to define the fixed transformation between the frame of
a joint and the frame of one of the adjacent bodies. You can add, replace, or remove
rigid bodies from the model using the methods of the RigidBodyTree
class.
Robot dynamics calculations are also possible. Specify the Mass
,
CenterOfMass
, and Inertia
properties for each
rigidBody
in the robot model. You can
calculate forward and inverse dynamics with or without external forces and compute
dynamics quantities given robot joint motions and joint inputs. To use the
dynamics-related functions, set the DataFormat
property to
"row"
or "column"
.
For a given rigid body tree model, you can also use the robot model to calculate joint
angles for desired end-effector positions using the robotics inverse kinematics
algorithms. Specify your rigid body tree model when using inverseKinematics
or generalizedInverseKinematics
.
The show
method supports visualization of
body meshes. Meshes are specified as .stl
files and can be added to
individual rigid bodies using addVisual
. Also, by default, the importrobot
function loads all the accessible .stl
files specified in your URDF robot model.
creates a
tree-structured robot object. Add rigid bodies to it using robot
= rigidBodyTreeaddBody
.
specifies an upper bound on the number of bodies allowed in the robot when
generating code. You must also specify the robot
= rigidBodyTree("MaxNumBodies",N,"DataFormat",dataFormat)DataFormat
property as a name-value pair.
addBody | Add body to robot |
addSubtree | Add subtree to robot |
centerOfMass | Center of mass position and Jacobian |
checkCollision | Check if robot is in collision |
copy | Copy robot model |
externalForce | Compose external force matrix relative to base |
forwardDynamics | Joint accelerations given joint torques and states |
geometricJacobian | Geometric Jacobian for robot configuration |
gravityTorque | Joint torques that compensate gravity |
getBody | Get robot body handle by name |
getTransform | Get transform between body frames |
homeConfiguration | Get home configuration of robot |
inverseDynamics | Required joint torques for given motion |
massMatrix | Joint-space mass matrix |
randomConfiguration | Generate random configuration of robot |
removeBody | Remove body from robot |
replaceBody | Replace body on robot |
replaceJoint | Replace joint on body |
show | Show robot model in figure |
showdetails | Show details of robot model |
subtree | Create subtree from robot model |
velocityProduct | Joint torques that cancel velocity-induced forces |
[1] Craig, John J. Introduction to Robotics: Mechanics and Control. Reading, MA: Addison-Wesley, 1989.
[2] Siciliano, Bruno, Lorenzo Sciavicco, Luigi Villani, and Giuseppe Oriolo. Robotics: Modelling, Planning and Control. London: Springer, 2009.
generalizedInverseKinematics
| importrobot
| inverseKinematics
| rigidBody
| rigidBodyJoint