loadrobot
Load predefined robot model and specifications from Robot Library
Syntax
Description
This function loads a predefined robot model and specifications from the Robot
Library as a rigidBodyTree
object. Robot models in the Robot
Library include visual meshes and physical attributes. If you additionally need the source
mesh data, like DAE or STL files, for use in functions like smimport
(Simscape Multibody), you must download and install the
Robotics System Toolbox Robot Library Data
support package. For more information, see Install Robotics System Toolbox Robot Library Data Support Package.
Note
To import your own robot model from a Unified Robot Description Format (URDF), XML
Macros (Xacro), or Simulation Description Format (SDF) file or Simscape™
Multibody™ model, see the importrobot
function.
loads a predefined robot model from the Robot Library as a robotRBT
= loadrobot(robotname
)rigidBodyTree
object specified by robot model name
robotname
.
[
specifies additional options using one or more name-value arguments. For example,
robotRBT
,robotData
] = loadrobot(robotname
,Name=Value
)'Gravity',[0 0 –9.81]
sets the gravity property to –9.81
m/s2 in the z-direction for the robot
model.
Examples
Load Provided Robot Model
This example shows how to load an included robot model using loadrobot
. Specify one of the select robot names to get a rigidBodyTree
robot model that contains kinematic and dynamic constraints and visual meshes for the specified robot geometry.
gen3 = loadrobot("kinovaGen3");
Show the robot model in a figure.
show(gen3);
Input Arguments
robotname
— Name of robot model
"abbIrb120"
| "abbIrb120T"
| "abbIrb1600"
| ...
Name of robot model, specified as one of these valid robot model names:
Robot Model | Mesh Visualization | Description |
---|---|---|
"abbIrb120" | ABB IRB 120 6-axis robot | |
"abbIrb120T" | ABB IRB 120T 6-axis robot | |
"abbIrb1600" | ABB IRB 1600 6-axis robot | |
"abbYuMi" | ABB YuMi 2-armed robot | |
"amrPioneer3AT" | Adept MobileRobots Pioneer 3-AT mobile robot | |
"amrPioneer3DX" | Adept MobileRobots Pioneer 3-DX mobile robot | |
"amrPioneerLX" | Adept MobileRobots Pioneer LX mobile robot | |
"atlas" | Boston Dynamics ATLAS® Humanoid robot | |
"clearpathHusky" | Clearpath Robotics Husky mobile robot | |
"clearpathJackal" | Clearpath Robotics Jackal mobile robot | |
"clearpathTurtleBot2" | Clearpath Robotics TurtleBot 2 mobile robot | |
"fanucLRMate200ib" | FANUC LR Mate 200iB 6-axis robot | |
"fanucM16ib" | FANUC M-16iB 6-axis robot | |
"frankaEmikaPanda" | Franka Emika Panda 7-axis robot | |
"kinovaGen3" | Version 1: Version 2: | KINOVA® Gen3 7-axis robot |
"kinovaJacoJ2N6S200" | KINOVA JACO® 2-fingered 6 DOF robot with non-spherical wrist | |
"kinovaJacoJ2N6S300" | KINOVA JACO® 3-fingered 6 DOF robot with non-spherical wrist | |
"kinovaJacoJ2N7S300" | KINOVA JACO® 3-fingered 7 DOF robot with non-spherical wrist | |
"kinovaJacoJ2S6S300" | KINOVA JACO® 3-fingered 6 DOF robot with spherical wrist | |
"kinovaJacoJ2S7S300" | KINOVA JACO® 3-fingered 7 DOF robot with spherical wrist | |
"kinovaJacoTwoArmExample" | Two KINOVA JACO® 3-fingered 6 DOF robots with non-spherical wrist | |
"kinovaMicoM1N4S200" | KINOVA MICO® 2-fingered 4 DOF robot | |
"kinovaMicoM1N6S200" | KINOVA MICO® 2-fingered 6 DOF robot | |
"kinovaMicoM1N6S300" | KINOVA MICO® 3-fingered 6 DOF robot | |
"kinovaMovo" | KINOVA MOVO® 2-armed mobile robot | |
"kukaIiwa7" | KUKA LBR iiwa 7 R800 7-axis robot | |
"kukaIiwa14" | KUKA LBR iiwa 14 R820 7-axis robot | |
"meca500r3" | Mecademic Meca500 R3 6-axis robot | |
"omronEcobra600" |
| Omron eCobra 600 4-axis SCARA robot |
"puma560" |
| PUMA 560 6-axis robot |
"quanserQArm" | Quanser QArm 4 DOF robot | |
"quanserQBot2e" | Quanser QBot 2e mobile robot | |
"quanserQCar" | Quanser QCar mobile robot | |
"rethinkBaxter" | Rethink Robotics Baxter 2-armed robot | |
"rethinkSawyer" | Rethink Robotics Sawyer 7-axis robot | |
"robotiq2F85" | Robotiq 2F-85 2-finger gripper The gripper can be used with the following list of manipulators:
| |
"robotiqEPick4CupVacuumAssembly" |
| Robotiq EPick Gripper with 4 Cup Vacuum Assembly |
"robotiqEPick2CupVacuumAssembly" |
| Robotiq EPick Gripper with 2 Cup Vacuum Assembly |
"robotiqEPickVacuumCup" |
| Robotiq EPick Gripper with Vacuum Cup |
"robotiqEPickVacuumCup200mm" |
| Robotiq EPick Gripper with 200mm Vacuum Cup Extension |
"robotisOP2" | ROBOTIS OP2 Humanoid robot | |
"robotisOpenManipulator" | ROBOTIS OpenMANIPULATOR 4-axis robot with gripper | |
"robotisTurtleBot3Burger" | ROBOTIS TurtleBot 3 Burger robot | |
"robotisTurtleBot3Waffle" | ROBOTIS TurtleBot 3 Waffle robot | |
"robotisTurtleBot3WaffleForOpenManipulator" | ROBOTIS TurtleBot 3 Waffle robot for OpenMANIPULATOR | |
"robotisTurtleBot3WafflePi" | ROBOTIS TurtleBot 3 Waffle Pi robot | |
"robotisTurtleBot3WafflePiForOpenManipulator" | ROBOTIS TurtleBot 3 Waffle Pi robot for OpenMANIPULATOR | |
"techmanTM5-700" |
| Techman TM5-700 6-axis robot with Camera |
"techmanTM5x-700" |
| Techman TM5X-700 6-axis robot without Camera |
"techmanTM5-900" |
| Techman TM5-900 6-axis robot with Camera |
"techmanTM5x-900" |
| Techman TM5X-900 6-axis robot without Camera |
"techmanTM12" |
| Techman TM12 6-axis robot with Camera |
"techmanTM12x" |
| Techman TM12X 6-axis robot without Camera |
"techmanTM14" |
| Techman TM14 6-axis robot with Camera |
"techmanTM14x" |
| Techman TM14X 6-axis robot without Camera |
"universalUR3" | Universal Robots UR3 6-axis robot | |
"universalUR3e" | Universal Robots UR3e 6-axis robot | |
"universalUR5" | Universal Robots UR5 6-axis robot | |
"universalUR5e" | Universal Robots UR5e 6-axis robot | |
"universalUR10" | Universal Robots UR10 6-axis robot | |
"universalUR10e" | Universal Robots UR10e 6-axis robot | |
"universalUR16e" | Universal Robots UR16e 6-axis robot | |
"valkyrie" | NASA Valkyrie Humanoid robot | |
"willowgaragePR2" | Willow Garage PR2 mobile robot | |
"yaskawaMotomanMH5" | Yaskawa Motoman MH5 6-axis robot |
Data Types: char
| string
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'Gravity',[0 0 -9.81]
sets the gravity property to -9.81
m/s2 in the z-direction for the robot
model.
DataFormat
— Input/output data format for kinematics and dynamics functions
"struct"
(default) | "row"
| "column"
Input/output data format for the kinematics and dynamics functions of the robot
model, specified as the comma-separated pair consisting of
'DataFormat'
and "struct"
,
"row"
, or "column"
. To use dynamics functions,
you must specify either "row"
or "column"
. This
name-value pair sets the DataFormat property of the
rigidBodyTree
robot model.
Gravity
— Gravitational acceleration experienced by robot
[0 0 0]
m/s2 (default) | three-element vector of the form [x
y
z]
Gravitational acceleration experienced by robot, specified as the comma-separated
pair consisting of 'Gravity'
and a three-element vector of the form
[x
y
z]
in m/s2. Each element
corresponds to the acceleration of the base robot frame in the x-,
y-, and z-direction, respectively. This
name-value pair sets the Gravity property of the
rigidBodyTree
robot model.
Version
— URDF version of robot model
1
(default) | numeric scalar
URDF version of the robot model, specified as a numeric scalar.
Robot Model | Versions |
---|---|
"kinovaGen3" | 1 –– Loads the kinovaGen3.urdf
robot model |
2 –– Loads the kinovaGen3V12.urdf
robot model |
Example: loadrobot("kinovaGen3","Version",2)
Output Arguments
robotRBT
— Rigid body tree robot model
rigidBodyTree
object
Rigid body tree robot model, returned as a rigidBodyTree
object. This model contains all the kinematic and dynamic
constraints based on the robot source files specified in robotData
.
Some models also contain visual meshes for visualizing robot trajectories.
robotData
— Robot model information
structure
Robot model information, returned as a structure containing these fields. Whether
the function returns a value for a field is based on the type of robot specified by the
robotname
input. Non-relevant fields for that robot are
empty.
This table describes the fields of the robot model information structure.
Field | Description |
---|---|
(relevant for all robot types) | Name of the returned robot model |
(relevant for all robot types) | File path of the URDF file that is used to create the rigid body tree model |
(relevant for all robot types) | URL source of the robot model |
(relevant for all robot types) | Version number of the robot model |
WheelRadius | Wheel radius of the robot in meters |
WheelBase | Distance between front and rear axles in meters |
TrackWidth | Distance between wheels on axle in meters |
MaxTranslationalVelocity | Maximum linear velocity of the robot in m/s |
MaxRotationalVelocity | Maximum angular velocity of the robot in rad/s |
DriveType | All robots are modeled with a fixed base, but this field describes the actual drive type of the robot base. The drive type can be any one of the following based on the specified robot:
|
ManipulatorMotionModel | Motion model of a manipulator robot
|
MobileBaseMotionModel | Kinematic motion model of the mobile base. The motion model can be any one of the following based on the specified robot:
|
HasBodyInertias | Flag indicating if the robot model has inertias, indicated as a
1 (true ) if the robot model has at least
one body with body inertia or 0 (false ) if
the robot model has no bodies with inertia. |
Data Types: struct
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2019bR2021b: Code generation support
The loadrobot
function supports code generation.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)