Main Content

setfixedtransform.

设置关节的固定变换属性

Description

setfixedtransform(Thepobj.tform的)sets theTheChtToparentTransform.property of the刚性足迹目的D.irectly with the specified homogenous transformation,tform

例子

setfixedtransform(Thepobj.dhparams那"dh")sets theChildToJointTransform属性使用Denavit-Hartenberg(DH)参数。这TheChtToparentTransform.属性设置为身份矩阵。DH参数按顺序提供[alpha d theta]

For revolute joints, theθ.当指定关节之间的固定变换时,忽略输入,因为该角度取决于联合配置。对于棱镜关节,D.输入被忽略。有关更多信息,请参阅刚体树机器人模型

setfixedtransform(Thepobj.mdhparams那"mdh")sets theTheChtToparentTransform.property using modified DH parameters. TheChildToJointTransform属性设置为身份矩阵。Modified DH parameters are given in the order[alpha d theta]

Examples

collapse all

使用Puma560®机器人的Denavit-Hartenberg(DH)参数来构建机器人。一次添加一个刚性主体,其中一个由关节对象指定的子到父变换。

这DH parameters define the geometry of the robot with relation to how each rigid body is attached to its parent. For convenience, setup the parameters for the Puma560 robot in a matrix[1]。这Puma robot is a serial chain manipulator. The DH parameters are relative to the previous line in the matrix, corresponding to the previous joint attachment.

dhparams = [0 pi / 2 0 0;0.4318 0 0 0 0.0203-PI / 2 0.15005 0;0 PI / 2 0.4318 0;0 -pi / 2 0 0;0 0 0 0];

创建一个刚体树对象以构建机器人。

robot =刚性小组特;

创建第一个刚体并将其添加到机器人中。添加刚体:

  1. 创建一个rigidBody对象并给它一个唯一的名字。

  2. 创建一个刚性足迹对象并给它一个唯一的名字。

  3. Usesetfixedtransform.使用DH参数指定身体到体变换。DH参数的最后一个元素,θ.,被忽略,因为角度取决于接合位置。

  4. 称呼加法人将第一主体接头连接到机器人的基架上。

Body1 =刚体('body1');jnt1 = rigidbodejoint('jnt1''revolute');setfixedTransform(JNT1,DHParams(1,:),'DH');body1.joint = jnt1;加法人(机器人,Body1,'base'的)

创建并添加其他刚体到机器人。调用时指定先前的正文名称加法人to attach it. Each fixed transform is relative to the previous joint coordinate frame.

Body2 =刚体('body2');jnt2 = rigidbodejoint('JNT2''revolute');body3 = rigidBody('body3');jnt3 = rigidbodejoint('JNT3''revolute');Body4 =刚体('body4');jnt4 = rigidodejoint('JNT4''revolute');body5 = rigidBody('body5');jnt5 = rigidbodejoint('JNT5''revolute');body6 = rigidBody('body6');jnt6 = rigidbodejoint('JNT6''revolute');setfixedTransform(JNT2,DHPARAMS(2,:),'DH');setfixedTransform(JNT3,DHParams(3,:),'DH');setfixedtransform(jnt4,dhparams(4,:),'DH');setfixedTransform(JNT5,DHPARAMS(5,:),'DH');: setFixedTransform (jnt6 dhparams (6),'DH');body2.Joint = jnt2; body3.Joint = jnt3; body4.Joint = jnt4; body5.Joint = jnt5; body6.Joint = jnt6; addBody(robot,body2,'body1')加法人(机器人,Body3,'body2')加法人(机器人,Body4,'body3')加法人(机器人,Body5,'body4'的)加法人(robot,body6,'body5'的)

Verify that your robot was built properly by using the显示详细资料or显示功能。显示详细资料列出MATLAB®命令窗口中的所有主体。显示D.isplays the robot with a given configuration (home by default). Calls toaxis修改轴限制并隐藏轴标签。

显示详细资料(robot)
---------------------------------- ---------- ---------- --------------------------- 1 body1 JNT1旋转底座(0)BODY2(2)2 body2 JNT2旋转体1(1)BODY3(3)3 BODY3 JNT3旋转BOST2(2)BODY4(4)4 BODY4 JNT4旋转体3(3)BODD5(5)5 body5 JNT5旋转体4(4)主体6(6)6 BODY6 JNT6旋转体5(5)--------------------
展示(机器人);轴([ -  0.5,0.5,-0.5,0.5,-0.5,0.5])轴off

References

[1] Corke,P. I.和B. Armstrong-Helouvry。“在Puma 560机器人报告的模型参数中搜索共识。”1994年IEEE机器人和自动化国际会议的诉讼程序,IEEE计算。SOC。新闻,1994,PP。1608-13。doi.org(crossref)那D.oi:10.1109/ROBOT.1994.351360.

输入参数

collapse all

刚性足迹目的那specified as a handle.

均匀变换,指定为4×4矩阵。变换设置为ChildToJointTransform财产。这TheChtToparentTransform.属性设置为身份矩阵。

Denavit-Hartenberg(DH)参数那specified as a four-element vector,[alpha d theta]。这se parameters are used to set theChildToJointTransform财产。这TheChtToparentTransform.属性设置为身份矩阵。

θ.当指定关节之间的固定变换时,忽略输入,因为该角度取决于联合配置。有关更多信息,请参阅刚体树机器人模型

修改Denavit-Hartenberg(DH)参数那specified as a four-element vector,[alpha d theta]。这se parameters are used to set theTheChtToparentTransform.财产。这ChildToJointTransformis set to an identity matrix.

θ.当指定关节之间的固定变换时,忽略输入,因为该角度取决于联合配置。有关更多信息,请参阅刚体树机器人模型

References

[1] Craig, John J.Introduction to Robotics: Mechanics and Control。Reading, MA: Addison-Wesley, 1989.

[2] Siciliano, Bruno.机器人:建模,规划和控制。伦敦:斯普林斯,2009年。

扩展能力

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

版本历史记录

介绍在R2016B.