Main Content

homeConfiguration

回家configuration of robot

Description

example

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

Examples

collapse all

Show different configurations of a robot created using aRigidBodyTreemodel. Use thehomeConfigurationorrandomConfiguationfunctions to generate the structure that defines all the joint positions.

Load example robots asRigidBodyTreeobjects.

loadexampleRobots.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=1×6 struct array with fields:JointName JointPosition

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

显示(puma1);

Figure contains an axes object. The axes object contains 13 objects of type patch, line. These objects represent base, L1, L2, L3, L4, L5, L6.

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

配置(2)。JointPosition = pi/2; show(puma1,config);

Figure contains an axes object. The axes object contains 13 objects of type patch, line. These objects represent base, L1, L2, L3, L4, L5, L6.

Create random configurations and show them.

show(puma1,randomConfiguration(puma1));

Figure contains an axes object. The axes object contains 13 objects of type patch, line. These objects represent base, L1, L2, L3, L4, L5, L6.

Input Arguments

collapse all

Robot model, specified as arigidBodyTreeobject.

Output Arguments

collapse 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 usinghomeConfiguration(robot),randomConfiguration(robot), or by specifying your own joint positions in a structure. To use the vector form ofconfiguration, set theDataFormatproperty for therobotto either'row'or'column'.

Extended Capabilities

Version History

Introduced in R2016b