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

📄 fdyn.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 fdyn</title>  <meta name="keywords" content="fdyn">  <meta name="description" content="FDYN Integrate 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; fdyn.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>fdyn</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="./up.png"></a></h2><div class="box"><strong>FDYN Integrate 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 [t, q, qd] = fdyn(robot, t0, t1, torqfun, q0, qd0, varargin) </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">FDYN Integrate forward dynamics    [T Q QD] = FDYN(ROBOT, T0, T1)    [T Q QD] = FDYN(ROBOT, T0, T1, TORQFUN)    [T Q QD] = FDYN(ROBOT, T0, T1, TORQFUN, Q0, QD0)    [T Q QD] = FDYN(ROBOT, T0, T1, TORQFUN, Q0, QD0, ARG1, ARG2, ...) Integrates the dynamics of manipulator ROBOT dynamics over the time  interval T0 to T1 and returns vectors of joint position and velocity. ROBOT is a robot object and describes the manipulator dynamics and  kinematics, and Q is an n element vector of joint state. A control torque may be specified by a user specified function     TAU = TORQFUN(T, Q, QD, ARG1, ARG2, ...) where Q and QD are the manipulator joint coordinate and velocity state  respectively], and T is the current time. Optional arguments passed to FDYN will be passed through to the user function. If TORQFUN is not specified, or is given as 0,  then zero torque is  applied to the manipulator joints. See also: <a href="accel.html" class="code" title="function qdd = accel(robot, Q, qd, torque)">ACCEL</a>, NOFRICTION, <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)"></ul>This function is called by:<ul style="list-style-image:url(./matlabicon.gif)"></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">%FDYN Integrate forward dynamics</span>0002 <span class="comment">%</span>0003 <span class="comment">%    [T Q QD] = FDYN(ROBOT, T0, T1)</span>0004 <span class="comment">%    [T Q QD] = FDYN(ROBOT, T0, T1, TORQFUN)</span>0005 <span class="comment">%    [T Q QD] = FDYN(ROBOT, T0, T1, TORQFUN, Q0, QD0)</span>0006 <span class="comment">%    [T Q QD] = FDYN(ROBOT, T0, T1, TORQFUN, Q0, QD0, ARG1, ARG2, ...)</span>0007 <span class="comment">%</span>0008 <span class="comment">% Integrates the dynamics of manipulator ROBOT dynamics over the time</span>0009 <span class="comment">% interval T0 to T1 and returns vectors of joint position and velocity.</span>0010 <span class="comment">% ROBOT is a robot object and describes the manipulator dynamics and</span>0011 <span class="comment">% kinematics, and Q is an n element vector of joint state.</span>0012 <span class="comment">%</span>0013 <span class="comment">% A control torque may be specified by a user specified function</span>0014 <span class="comment">%</span>0015 <span class="comment">%     TAU = TORQFUN(T, Q, QD, ARG1, ARG2, ...)</span>0016 <span class="comment">%</span>0017 <span class="comment">% where Q and QD are the manipulator joint coordinate and velocity state</span>0018 <span class="comment">% respectively], and T is the current time. Optional arguments passed to FDYN</span>0019 <span class="comment">% will be passed through to the user function.</span>0020 <span class="comment">%</span>0021 <span class="comment">% If TORQFUN is not specified, or is given as 0,  then zero torque is</span>0022 <span class="comment">% applied to the manipulator joints.</span>0023 <span class="comment">%</span>0024 <span class="comment">% See also: ACCEL, NOFRICTION, RNE, ROBOT, ODE45.</span>0025 0026 <span class="comment">% Copyright (C) 1993-2008 Peter Corke</span>0027 <span class="comment">%</span>0028 <span class="comment">% This file is part of The Robotics Toolbox for Matlab (RTB).</span>0029 <span class="comment">%</span>0030 <span class="comment">% RTB is free software: you can redistribute it and/or modify</span>0031 <span class="comment">% it under the terms of the GNU Lesser General Public License as published by</span>0032 <span class="comment">% the Free Software Foundation, either version 3 of the License, or</span>0033 <span class="comment">% (at your option) any later version.</span>0034 <span class="comment">%</span>0035 <span class="comment">% RTB is distributed in the hope that it will be useful,</span>0036 <span class="comment">% but WITHOUT ANY WARRANTY; without even the implied warranty of</span>0037 <span class="comment">% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>0038 <span class="comment">% GNU Lesser General Public License for more details.</span>0039 <span class="comment">%</span>0040 <span class="comment">% You should have received a copy of the GNU Leser General Public License</span>0041 <span class="comment">% along with RTB.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>0042 0043 <a name="_sub0" href="#_subfunctions" class="code">function [t, q, qd] = fdyn(robot, t0, t1, torqfun, q0, qd0, varargin)</a>0044 0045     <span class="comment">% check the Matlab version, since ode45 syntax has changed</span>0046     v = ver;0047     <span class="keyword">if</span> str2num(v(1).Version)&lt;6,0048         <span class="comment">%error('fdyn now requires Matlab version &gt;= 6');</span>0049     <span class="keyword">end</span>0050 0051     n = robot.n;0052     <span class="keyword">if</span> nargin == 3,0053         torqfun = 0;0054         x0 = zeros(2*n,1);0055     <span class="keyword">elseif</span> nargin == 4,0056         x0 = zeros(2*n, 1);0057     <span class="keyword">elseif</span> nargin &gt;= 6,0058         x0 = [q0(:); qd0(:)];0059     <span class="keyword">end</span>0060         0061     [t,y] = ode45(<span class="string">'fdyn2'</span>, [t0 t1], x0, [], robot, torqfun, varargin{:});0062     q = y(:,1:n);0063     qd = y(:,n+1:2*n);0064</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 + -