⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rne.html

📁 Robot tool box - provides many functions that are useful in robotics including such things as kinem
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"                "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head>  <title>Description of rne</title>  <meta name="keywords" content="rne">  <meta name="description" content="RNE	Compute inverse dynamics via recursive Newton-Euler formulation">  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">  <meta name="robots" content="index, follow">  <link type="text/css" rel="stylesheet" href="./m2html.css"></head><body><a name="_top"></a><div><a href="./index.html">Home</a> &gt;  <a href="index.html">.</a> &gt; rne.m</div><!--<table width="100%"><tr><td align="left"><a href="./index.html"><img alt="<" border="0" src="./left.png">&nbsp;Master index</a></td><td align="right"><a href="index.html">Index for .&nbsp;<img alt=">" border="0" src="./right.png"></a></td></tr></table>--><h1>rne</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="./up.png"></a></h2><div class="box"><strong>RNE	Compute inverse dynamics via recursive Newton-Euler formulation</strong></div><h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="./up.png"></a></h2><div class="box"><strong>function tau = rne(robot, a1, a2, a3, a4, a5) </strong></div><h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="./up.png"></a></h2><div class="fragment"><pre class="comment">RNE    Compute inverse dynamics via recursive Newton-Euler formulation    TAU = RNE(ROBOT, Q, QD, QDD)    TAU = RNE(ROBOT, [Q QD QDD])    Returns the joint torque required to achieve the specified joint position,    velocity and acceleration state.    Gravity vector is an attribute of the robot object but this may be     overriden by providing a gravity acceleration    vector [gx gy gz].    TAU = RNE(ROBOT, Q, QD, QDD, GRAV)    TAU = RNE(ROBOT, [Q QD QDD], GRAV)    An external force/moment acting on the end of the manipulator may also be    specified by a 6-element vector [Fx Fy Fz Mx My Mz].    TAU = RNE(ROBOT, Q, QD, QDD, GRAV, FEXT)    TAU = RNE(ROBOT, [Q QD QDD], GRAV, FEXT)    where    Q, QD and QDD are row vectors of the manipulator state; pos, vel, and accel.    The torque computed also contains a contribution due to armature    inertia.    See also ROBOT, FROBOT, <a href="accel.html" class="code" title="function qdd = accel(robot, Q, qd, torque)">ACCEL</a>, <a href="gravload.html" class="code" title="function tg = gravload(robot, q, grav)">GRAVLOAD</a>, <a href="inertia.html" class="code" title="function M = inertia(robot, q)">INERTIA</a>.    Should be a MEX file.</pre></div><!-- crossreference --><h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="./up.png"></a></h2>This function calls:<ul style="list-style-image:url(./matlabicon.gif)"><li><a href="numcols.html" class="code" title="function c = numcols(m)">numcols</a>	NUMCOLS(m)</li><li><a href="numrows.html" class="code" title="function r = numrows(m)">numrows</a>	NUMROWS(m)</li><li><a href="t2r.html" class="code" title="function R = tr2rot(T)">t2r</a>	TR2ROT Return rotational submatrix of a homogeneous transformation</li></ul>This function is called by:<ul style="list-style-image:url(./matlabicon.gif)"><li><a href="accel.html" class="code" title="function qdd = accel(robot, Q, qd, torque)">accel</a>	ACCEL Compute manipulator forward dynamics</li><li><a href="coriolis.html" class="code" title="function c = coriolis(robot, q, qd)">coriolis</a>	CORIOLIS Compute the manipulator Coriolis matrix</li><li><a href="gravload.html" class="code" title="function tg = gravload(robot, q, grav)">gravload</a>	GRAVLOAD Compute the gravity loading on manipulator joints</li><li><a href="inertia.html" class="code" title="function M = inertia(robot, q)">inertia</a>	INERTIA Compute the manipulator inertia matrix</li><li><a href="itorque.html" class="code" title="function it = itorque(robot, q, qdd)">itorque</a>	ITORQUE Compute the manipulator inertia torque</li></ul><!-- crossreference --><h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="./up.png"></a></h2><div class="fragment"><pre>0001 <span class="comment">%RNE    Compute inverse dynamics via recursive Newton-Euler formulation</span>0002 <span class="comment">%</span>0003 <span class="comment">%    TAU = RNE(ROBOT, Q, QD, QDD)</span>0004 <span class="comment">%    TAU = RNE(ROBOT, [Q QD QDD])</span>0005 <span class="comment">%</span>0006 <span class="comment">%    Returns the joint torque required to achieve the specified joint position,</span>0007 <span class="comment">%    velocity and acceleration state.</span>0008 <span class="comment">%</span>0009 <span class="comment">%    Gravity vector is an attribute of the robot object but this may be</span>0010 <span class="comment">%    overriden by providing a gravity acceleration    vector [gx gy gz].</span>0011 <span class="comment">%</span>0012 <span class="comment">%    TAU = RNE(ROBOT, Q, QD, QDD, GRAV)</span>0013 <span class="comment">%    TAU = RNE(ROBOT, [Q QD QDD], GRAV)</span>0014 <span class="comment">%</span>0015 <span class="comment">%    An external force/moment acting on the end of the manipulator may also be</span>0016 <span class="comment">%    specified by a 6-element vector [Fx Fy Fz Mx My Mz].</span>0017 <span class="comment">%</span>0018 <span class="comment">%    TAU = RNE(ROBOT, Q, QD, QDD, GRAV, FEXT)</span>0019 <span class="comment">%    TAU = RNE(ROBOT, [Q QD QDD], GRAV, FEXT)</span>0020 <span class="comment">%</span>0021 <span class="comment">%    where    Q, QD and QDD are row vectors of the manipulator state; pos, vel, and accel.</span>0022 <span class="comment">%</span>0023 <span class="comment">%    The torque computed also contains a contribution due to armature</span>0024 <span class="comment">%    inertia.</span>0025 <span class="comment">%</span>0026 <span class="comment">%    See also ROBOT, FROBOT, ACCEL, GRAVLOAD, INERTIA.</span>0027 <span class="comment">%</span>0028 <span class="comment">%    Should be a MEX file.</span>0029 0030 <span class="comment">%</span>0031 <span class="comment">% verified against MAPLE code, which is verified by examples</span>0032 <span class="comment">%</span>0033 0034 <span class="comment">% Copyright (C) 1992-2008, by Peter I. Corke</span>0035 <span class="comment">%</span>0036 <span class="comment">% This file is part of The Robotics Toolbox for Matlab (RTB).</span>0037 <span class="comment">%</span>0038 <span class="comment">% RTB is free software: you can redistribute it and/or modify</span>0039 <span class="comment">% it under the terms of the GNU Lesser General Public License as published by</span>0040 <span class="comment">% the Free Software Foundation, either version 3 of the License, or</span>0041 <span class="comment">% (at your option) any later version.</span>0042 <span class="comment">%</span>0043 <span class="comment">% RTB is distributed in the hope that it will be useful,</span>0044 <span class="comment">% but WITHOUT ANY WARRANTY; without even the implied warranty of</span>0045 <span class="comment">% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>0046 <span class="comment">% GNU Lesser General Public License for more details.</span>0047 <span class="comment">%</span>0048 <span class="comment">% You should have received a copy of the GNU Leser General Public License</span>0049 <span class="comment">% along with RTB.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>0050 0051 <a name="_sub0" href="#_subfunctions" class="code">function tau = rne(robot, a1, a2, a3, a4, a5)</a>0052     <span class="keyword">if</span> robot.mdh ~= 0,0053         error(<span class="string">'rne only valid for standard D&amp;H parameters'</span>)0054     <span class="keyword">end</span>0055 8880056     z0 = [0;0;1];0057     grav = robot.gravity;    <span class="comment">% default gravity from the object</span>0058     fext = zeros(6, 1);0059 0060     n = robot.n;0061     <span class="keyword">if</span> <a href="numcols.html" class="code" title="function c = numcols(m)">numcols</a>(a1) == 3*n,0062         Q = a1(:,1:n);0063         Qd = a1(:,n+1:2*n);0064         Qdd = a1(:,2*n+1:3*n);0065         np = <a href="numrows.html" class="code" title="function r = numrows(m)">numrows</a>(Q);0066         <span class="keyword">if</span> nargin &gt;= 3,    0067             grav = a2;0068         <span class="keyword">end</span>0069         <span class="keyword">if</span> nargin == 4,0070             fext = a3;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -