exportrobot
Description
exportrobot(
writes the unified robot
description format (URDF) details in file format by parsing the robotRBT
)rigidBodyTree
object robotRBT
. For more information about
the rigid body tree robot model, see Rigid Body Tree Robot Model.
exportrobot(___,
specifies options using one or more name-value arguments in addition to the input argument
from the previous syntax.Name=Value
)
Examples
Export Modified URDF Details with Packaged Mesh Files
This example shows how to load a robot as a rigid body tree model and export the URDF details.
Load a rigidBodyTree
robot model. The rigidBodyTree
contains kinematic and dynamic constraints and visual meshes for the specified robot geometry.
robotModel = loadrobot("universalUR10");
Visualize the robot model.
figure; robotModel.show();
Load gripper model.
gripperModel = loadrobot("robotiq2F85");
Visualize the gripper model.
figure; gripperModel.show();
Add gripper to the existing robot model.
robotModel.addSubtree("tool0",gripperModel,ReplaceBase=false);
Visualize the modified robot model with the added gripper model.
figure; robotModel.show();
Export the modified URDF details of the robot model with packaged mesh files.
exportrobot(robotModel,OutputFileName="universalUR10Gripper.urdf",ExportMesh=true);
Input Arguments
robotRBT
— Rigid body tree robot model
rigidBodyTree
object
Rigid body tree robot model, specified as a rigidBodyTree
object.
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: exportrobot(robotRBT,OutputFileName="abbIrb120.urdf",ExportMesh=True)
OutputFileName
— Name of generated URDF file
input variable name (default) | string scalar | character vector
Name of the generated URDF file, specified as a string scalar or character vector. You can also specify this input as a pathname corresponding to the location at which you want to generate the URDF file.
Example: "abbIrb120.urdf"
,
"C:/URDF/abbIrb120.urdf"
Data Types: char
| string
RobotName
— Robot name attribute
"Robot"
(default) | string scalar | character vector
Robot name attribute corresponding to the robot name
tag in the
generated URDF file, specified as a string scalar or character vector. The function
returns as a valid robot model name such as "abbIrb120"
,
"abbIrb120T"
, "abbIrb1600"
.
Example: "abbIrb120"
Data Types: char
| string
VisualMeshFileLocation
— Visual mesh files location
path in rigidBodyTree
object (default) | string scalar | character vector
Visual mesh files location corresponding to the filename
attribute under the mesh
tag of the visual
tag
in the generated URDF file, specified as a string scalar or character vector.
The default location corresponds to the path you specify in the rigidBodyTree
object. You can also modify the visual mesh path from
generated URDF file to a location of your preference.
Example: "C:/URDF/abb_irb120_support/meshes/"
Data Types: char
| string
CollisionMeshFileLocation
— Collision mesh files location
path in rigidBodyTree
object (default) | string scalar | character vector
Collision mesh files location corresponding to the filename
attribute under the mesh
tag of the collision
tag in the generated URDF file, specified as a string scalar or character
vector.
The default location corresponds to the path you specify in the rigidBodyTree
object. You can also modify the collision mesh path from
generated URDF file to a location of your preference.
Example: "C:/URDF/abb_irb120_support/meshes/"
Data Types: char
| string
ExportMesh
— Option to enable mesh file export
false
or 0
(default) | true
or 1
Option to enable mesh file export, specified as a numeric or logical value of
0 (false)
or 1 (true)
. The generated ZIP
package contains the output URDF files and mesh files.
Data Types: logical
| numeric
AbsoluteTolerance
— Maximum permissible difference in exported values
sqrt(eps)
(default) | positive scalar
Maximum permissible difference in the values under tags in exported URDF,
specified as a positive scalar. The default value is sqrt(eps)
,
where eps
returns the distance from 1.0
to the
next largest double-precision number, which is equal to
2-52
. For more information, see
eps
.
Data Types: single
| double
Version History
Introduced in R2023b
See Also
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)