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

📄 accel.html

📁 Robot tool box - provides many functions that are useful in robotics including such things as kinem
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"                "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head>  <title>Description of accel</title>  <meta name="keywords" content="accel">  <meta name="description" content="ACCEL Compute manipulator forward dynamics">  <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; accel.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>accel</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="./up.png"></a></h2><div class="box"><strong>ACCEL Compute manipulator forward dynamics</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 qdd = accel(robot, Q, qd, torque) </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">ACCEL Compute manipulator forward dynamics    QDD = ACCEL(ROBOT, Q, QD, TORQUE)    QDD = ACCEL(ROBOT, [Q QD TORQUE]) Returns a vector of joint accelerations that result from applying the  actuator TORQUE to the manipulator ROBOT in state Q and QD. Uses the method 1 of Walker and Orin to compute the forward dynamics. This form is useful for simulation of manipulator dynamics, in conjunction with a numerical integration function. See also: <a href="rne.html" class="code" title="function tau = rne(robot, a1, a2, a3, a4, a5)">RNE</a>, ROBOT, ODE45.</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="rne.html" class="code" title="function tau = rne(robot, a1, a2, a3, a4, a5)">rne</a>	RNE	Compute inverse dynamics via recursive Newton-Euler formulation</li></ul>This function is called by:<ul style="list-style-image:url(./matlabicon.gif)"><li><a href="fdyn2.html" class="code" title="function xd = fdyn2(t, x, flag, robot, torqfun, varargin)">fdyn2</a>	FDYN2  private function called by FDYN</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">%ACCEL Compute manipulator forward dynamics</span>0002 <span class="comment">%</span>0003 <span class="comment">%    QDD = ACCEL(ROBOT, Q, QD, TORQUE)</span>0004 <span class="comment">%    QDD = ACCEL(ROBOT, [Q QD TORQUE])</span>0005 <span class="comment">%</span>0006 <span class="comment">% Returns a vector of joint accelerations that result from applying the</span>0007 <span class="comment">% actuator TORQUE to the manipulator ROBOT in state Q and QD.</span>0008 <span class="comment">%</span>0009 <span class="comment">% Uses the method 1 of Walker and Orin to compute the forward dynamics.</span>0010 <span class="comment">% This form is useful for simulation of manipulator dynamics, in</span>0011 <span class="comment">% conjunction with a numerical integration function.</span>0012 <span class="comment">%</span>0013 <span class="comment">% See also: RNE, ROBOT, ODE45.</span>0014 0015 <span class="comment">% MOD HISTORY</span>0016 <span class="comment">% 4/99 add object support</span>0017 <span class="comment">% 1/02 copy rne code from inertia.m to here for speed</span>0018 <span class="comment">% $Log: not supported by cvs2svn $</span>0019 <span class="comment">% $Revision: 1.3 $</span>0020 0021 <span class="comment">% Copyright (C) 1999-2008, by Peter I. Corke</span>0022 <span class="comment">%</span>0023 <span class="comment">% This file is part of The Robotics Toolbox for Matlab (RTB).</span>0024 <span class="comment">%</span>0025 <span class="comment">% RTB is free software: you can redistribute it and/or modify</span>0026 <span class="comment">% it under the terms of the GNU Lesser General Public License as published by</span>0027 <span class="comment">% the Free Software Foundation, either version 3 of the License, or</span>0028 <span class="comment">% (at your option) any later version.</span>0029 <span class="comment">%</span>0030 <span class="comment">% RTB is distributed in the hope that it will be useful,</span>0031 <span class="comment">% but WITHOUT ANY WARRANTY; without even the implied warranty of</span>0032 <span class="comment">% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>0033 <span class="comment">% GNU Lesser General Public License for more details.</span>0034 <span class="comment">%</span>0035 <span class="comment">% You should have received a copy of the GNU Leser General Public License</span>0036 <span class="comment">% along with RTB.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>0037 0038 0039 <a name="_sub0" href="#_subfunctions" class="code">function qdd = accel(robot, Q, qd, torque)</a>0040     n = robot.n;0041 0042     <span class="keyword">if</span> nargin == 2,0043             q = Q(1:n);0044         qd = Q(n+1:2*n);0045         torque = Q(2*n+1:3*n);0046     <span class="keyword">else</span>0047         q = Q;0048         <span class="keyword">if</span> length(q) == robot.n,0049             q = q(:);0050             qd = qd(:);0051         <span class="keyword">end</span>0052     <span class="keyword">end</span>0053 0054     <span class="comment">% compute current manipulator inertia</span>0055     <span class="comment">%   torques resulting from unit acceleration of each joint with</span>0056     <span class="comment">%   no gravity.</span>0057     M = <a href="rne.html" class="code" title="function tau = rne(robot, a1, a2, a3, a4, a5)">rne</a>(robot, ones(n,1)*q', zeros(n,n), eye(n), [0;0;0]);0058 0059     <span class="comment">% compute gravity and coriolis torque</span>0060     <span class="comment">%    torques resulting from zero acceleration at given velocity &amp;</span>0061     <span class="comment">%    with gravity acting.</span>0062     tau = <a href="rne.html" class="code" title="function tau = rne(robot, a1, a2, a3, a4, a5)">rne</a>(robot, q', qd', zeros(1,n));    0063 0064     qdd = inv(M) * (torque(:) - tau');0065</pre></div><hr><address>Generated on Sun 15-Feb-2009 18:09:29 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address></body></html>

⌨️ 快捷键说明

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