---runscript
D:\matlab\toolbox\robot\rvctools\robot\demos\idyn.m
%Inverse dynamics【逆向动力学】
computes the joint
torques【转矩】required
toachieve
% thespecified state of joint position, velocity and
acceleration.【逆向动力学用来计算达到一定关节位置、速度以及加速度状态的转矩。】
% Therecursive【递归的】Newton-Euler
formulation is an efficient matrix oriented
%algorithm for computing the inverse dynamics, and is
implemented in the
%function
rne().【牛顿-欧拉递归公式是以矩阵为主导的有效演算法,用以计算逆向动力学,在函数rne()里实施】
%
%Inverse dynamics requires inertial and
mass【惯量与质量】 parameters ofeach link, as
well
% as thekinematic parameters. This is
achievedby augmenting the kinematic
�scription matrix with additional
columns for the inertial and mass
%parameters for each
link.【逆向动力学需要每个连杆link的惯量、质量已及运动学参数。它通过对每个link的运动学表达矩阵增加额外的表示惯量与质量的列得以实现。】
%
% Forexample, for a Puma 560 in the zero angle pose, with
all joint velocities
% of5rad/s and accelerations of 1rad/s/s, the joint
torques required are
>>mdl_puma560
>>tau = p560.rne(qz,
5*ones(1,6), ones(1,6))
njoints6
FastRNE: (c) Peter Corke 2002-2011
tau =
-79.4048 9.1192
13.5455
-0.6846 -0.4515
-0.1236
% Aswith other functions the inverse dynamics