Main Content

vrupdaterobot

(To be removed) Update rigidBodyTree robot pose

vrupdaterobot will be removed in a future release. For more information, see Version History.

Description

vrupdaterobot(RBT, tforms, config) updates the robot pose from its current configuration using the config argument.

example

Examples

collapse all

This example shows you how to insert a robot into a virtual world and update its pose

Import the Robot and Set up 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);

Figure Simple Robot Scene contains objects of type hgjavacomponent, uimenu, uipanel, uitoolbar.

Change the Pose of the Robot

vrupdaterobot(RBT, tforms, randomConfiguration(RBT));
vrdrawnow;
vrfigure(robotWorld);

Figure Simple Robot Scene contains objects of type hgjavacomponent, uimenu, uipanel, uitoolbar.

Figure Simple Robot Scene contains objects of type hgjavacomponent, uimenu, uipanel, uitoolbar.

Input Arguments

collapse all

Robotics System Toolbox™ rigidBodyTree object. For more information, see rigidBodyTree (Robotics System Toolbox).

List of robot transforms, specified as a cell array of vrnode objects.

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

collapse all

R2023b: To be removed

The vrupdaterobot will be removed in a future release. Instead, use sim3d classes and Simulation 3D blocks to interface MATLAB® and Simulink® with the Unreal Engine® 3D simulation environment. To get started, see Create 3D Simulations in Unreal Engine Environment.

See Also

| (Robotics System Toolbox)