Documentation
Update RigidBodyTree robot pose
vrupdaterobot(RBT, tforms, config)
example
vrupdaterobot(RBT,tforms,config)updates the robot pose from its current configuration using theconfigargument.
vrupdaterobot(RBT,tforms,config)
RBT
tforms
config
collapse all
This example uses:
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 fromrobot_scene.wrl.
robot_scene.wrl.
RBT = importrobot('iiwa7.urdf'); RBT.DataFormat ='row'; robotWorld = vrworld('robot_scene.wrl'); open(robotWorld);
Get Transforms of Current Pose of the Robot
Thetformsoutput 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);
robotics.RigidBodyTree
Robotics System Toolbox™RigidBodyTreeobject. For more information, seerigidBodyTree.
RigidBodyTree
rigidBodyTree
List of robot transforms, specified as a cell array ofvrnodeobjects.
vrnode
Desired pose of the robot, specified in the same format as theRBT.DataFormatfield of theRigidBodyTreeObject.
RBT.DataFormat
RigidBodyTreeObject
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|struct
single
double
int8
int16
int32
int64
uint8
uint16
uint32
uint64
struct
rigidBodyTree|vrinsertrobot
vrinsertrobot
A modified version of this example exists on your system. Do you want to open this version instead? (ja_JP)
MATLAB のコマンドを実行するリンクがクリックされました。
このリンクは、Web ブラウザーでは動作しません。MATLAB コマンド ウィンドウに以下を入力すると、このコマンドを実行できます。
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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office
無料評価版のダウンロード