This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

homeConfiguration

Class: robotics.RigidBodyTree
Package: robotics

Get home configuration of robot

Syntax

configuration = homeConfiguration(robot)

Description

configuration = homeConfiguration(robot) returns the home configuration of the robot model. The home configuration is the ordered list of HomePosition properties of each nonfixed joint.

Input Arguments

expand all

Robot model, specified as a RigidBodyTree object.

Output Arguments

expand all

Robot configuration, returned as a vector of joint positions or a structure with joint names and positions for all the bodies in the robot model. You can generate a configuration using homeConfiguration(robot), randomConfiguration(robot), or by specifying your own joint positions in a structure. To use the vector form of configuration, set the DataFormat property for the robot to either 'row' or 'column' .

Examples

expand all

Show different configurations of a robot created using a RigidBodyTree model. Use the homeConfiguration or randomConfiguation functions to generate the structure that defines all the joint positions.

Load example robots as RigidBodyTree objects.

load exampleRobots.mat

Create a structure for the home configuration of a Puma robot. The structure has joint names and positions for each body on the robot model.

config = homeConfiguration(puma1)
config = 1x6 struct array with fields:
    JointName
    JointPosition

Show the home configuration using show. You do not need to specify a configuration input.

show(puma1);

Modify the configuration and set the second joint position to pi/2. Show the resulting change in the robot configuration.

config(2).JointPosition = pi/2;
show(puma1,config);

Create random configurations and show them.

show(puma1,randomConfiguration(puma1));

Introduced in R2016b