Rigid Body Tree Robot Model
目录
Rigid Body Tree Robot Model
body1 = rigidBody('body1');
jnt1 = rigidBodyJoint('jnt1','revolute');
jnt1.HomePosition = pi/4;
tform = trvec2tform([0.25, 0.25, 0]); % User defined
setFixedTransform(jnt1,tform);
body1.Joint = jnt1;
robot = rigidBodyTree;
addBody(robot,body1,'base')
刚体树模型是机器人结构的一种表示,你可以用它来表示机器人,如机械手或其他运动学树。
Use rigidBodyTreeobjects to create these models. A rigid body tree is made up of rigid bodies (rigidBody) that are attached via joints (rigidBodyJoint).
每个刚体都有一个关节,这个关节定义了这个刚体相对于它在树中的父刚体的运动方式。通过在每个关节上设置固定的转换(setFixedTransform)来指定从一个主体到下一个主体的转换。



Rigid Body Tree Components
Base
底座定义了世界坐标系,是刚体的第一个附着点.
Rigid Body
每个刚体都有一个与其相关的坐标系,并包含一个刚体关节对象。
Joint
rigidBodyJoint对象支持固定关节、转动关节和移动关节
- 'fixed'——没有动作。身体被刚性地连接到它的父母。
- 'revolute'——只做旋转运动。身体相对于母体围绕这个关节旋转。位置限制定义了围绕运动轴的弧度中的最小和最大角位置。
- 'prismatic'——只有平移的运动。身体沿着运动轴,相对于父体作线性运动。
每个关节都有一个由关节轴属性定义的运动轴。关节轴是一个三维单位向量,它可以定义旋转轴(转动关节)或平移轴(移动关节)。HomePosition属性定义了特定关节的home位置,它是位置限制内的一个点。
使用homeConfiguration返回机器人的home配置,它是模型中所有关节home位置的集合。
关节还具有定义父坐标系和子坐标系之间的固定转换的属性。只能使用setFixedTransform方法设置这些属性。取决于您输入转换参数的方法,使用该方法可设置关节的Parenttransform或ChildToJointTransform属性。
rigidBodyJoint Create a joint
% rigidBodyJoint properties:
% Type - Type of the joint
% Name - Name of the joint
% PositionLimits - Position limits of the joint 关节的位置限制
% HomePosition - Home Position of the joint 关节的位置
% JointAxis - Axis of motion for revolute/prismatic joint
% JointToParentTransform - Fixed transform from joint to parent frame
% ChildToJointTransform - Fixed transform from child to joint frame
% rigidBodyJoint methods:
% copy - Create a copy of the joint
% setFixedTransform - Set fixed transform properties of the joint
%
% Example:
%
% % Create a revolute joint named 'joint1'
% jnt1 = rigidBodyJoint('joint1','revolute');
%
% % Create a prismatic joint named 'joint2'
% jnt2 = rigidBodyJoint('joint2','prismatic');
H = trvec2tform( t )
将三维平移向量T的笛卡尔表示法转换为相应的齐次变换H。输入T是一个包含N个平移向量的N×3矩阵。每个向量的形式是t = [x y z]。输出H是一个4乘4乘N的齐次变换矩阵。
>> trvec = [0.25, 0.25, 0];
>> tform = trvec2tform(trvec)
tform =
1.0000 0 0 0.2500
0 1.0000 0 0.2500
0 0 1.0000 0
0 0 0 1.0000
setFixedTransform(obj, input, notation)
设置关节的固定变换属性

浙公网安备 33010602011771号