vrupdaterobot
Update RigidBodyTree robot pose
Description
Examples
Add Robot to World and Change its Pose
This example shows you how to insert a robot into a virtual world and update its pose
Import the Robot and Setup the World
Import the KUKA LFR iiwa robot from its URDF definition and insert it to the virtual world created from robot_scene.x3d.
RBT = importrobot('iiwa7.urdf'); RBT.DataFormat = 'row'; robotWorld = vrworld('robot_scene'); open(robotWorld);
Get Transforms of Current Pose of the Robot
The tforms
output argument contains a list of transforms that describe the robot pose in its initial or 'home' configuration.
[node, W, tforms] = vrinsertrobot(robotWorld, RBT); vrfigure(robotWorld);
Change the Pose of the Robot
vrupdaterobot(RBT, tforms, randomConfiguration(RBT)); vrdrawnow; vrfigure(robotWorld);
Input Arguments
RBT
— Robot description
rigidBodyTree
object
Robotics System Toolbox™
rigidBodyTree
object. For more information, see rigidBodyTree
(Robotics System Toolbox).
tforms
— Robot transforms
cell array
List of robot transforms, specified as a cell array of vrnode
objects.
config
— Desired end configuration
structure | vector
Desired pose of the robot, specified in the same format as the
RBT.DataFormat
field of the rigidBodyTree
object.
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| struct
Version History
Introduced in R2018b
See Also
vrinsertrobot
| rigidBodyTree
(Robotics System Toolbox)
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
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)