ARA95 - A computer tool for simulation and analysis - the Robotics ToolBox for MATLAB (779827), страница 3
Текст из файла (страница 3)
The recursive Newton-Euler formulation is an efcient matrix oriented algorithm for computing the inverse dynamics, and is implementedby the Toolbox function rne(). Using the joint space trajectory from the trajectory example above, Figure 2, the required joint torques can be computed for each point of thetrajectory by>> tau = rne(q, qd, qdd);As with all Toolbox functions the result has one row per time step, and each row is a jointtorque vector.
Joint torque for the base axes is plotted as a function of time in Figure 4.Much of the torque on joints 2 and 3 of a Puma 560 (mounted conventionally) is due togravity. That component can be computed separately>> tau_g = gravload(p560, q);>> plot(t, taug(:,1:3))and is plotted as the dashed lines in Figure 4. The torque component due to velocityterms, Coriolis and centripetal torques, can be computed separately by the coriolis()function.Forward dynamics is the computation of joint accelerations given position and velocitystate, and applied actuator torques and is particularly useful in simulation of a robotcontrol system. The Toolbox uses Method 1 of Walker and Orin[7] which uses repeatedcalls to the inverse dynamics function rne().
Consider a Puma 560 at rest in the zeroangle pose, with zero applied joint torques. The joint acceleration would be given by>> a=accel(p560, qz, zeros(1,6), zeros(1,6))Torque 1 (Nm)420Torque 2 (Nm)00.20.40.60.81Time (s)1.21.41.61.80.20.40.60.81Time (s)1.21.41.61.80.20.40.60.81Time (s)1.21.41.61.86040200-20Torque 3 (Nm)020-20Figure 4: Joint torques for the joint space trajectory example of Figure 2.>> a'a = -0.2463 -8.7020 2.5442 0.0021 0.0672 0.0001To be useful for simulation this function must be integrated, and this is achieved by theToolbox function fdyn() which uses the MATLAB function ode45.
It also allows for auser written function to return the applied joint torque as a function of manipulator stateand this can be used to model arbitrary axis control strategies | if not specied zerotorques are applied. To simulate the motion of the Puma 560 from rest in the zero anglepose with zero applied joint torques>> tic>> [t q qd] = fdyn(p560, 0, 2);elapsed_time =1.6968e+003% on a 33MHz 486 PCThe resulting motion is plotted versus time in Figure 5.
which clearly shown that therobot is collapsing under gravity. An animation using plotbot() clearly depicts this.It is interesting to note that rotational velocity of the upper and lower arm result incentripetal and Coriolis torques on the waist joint, causing it to rotate. This simulationtakes nearly half an hour to execute on a reasonable PC and is due to the very largenumber of calls to the rne() function (ideally the rne() function should be implementedby a computationally more ecient MEX le).6 ConclusionThis short paper has demonstrated, in tutorial form, the principle features of the RoboticsToolbox for MATLAB. The Toolbox provides many of the essential tools necessary forrobotic modelling and simulation, as well as analyzing experimental results or teaching.A key feature is the use of a single matrix to completely describe the kinematics anddynamics of any serial-link manipulator.0.2Joint 3 (rad)Joint 2 (rad)Joint 1 (rad)0.4000.51Time (s)1.52-400.51Time (s)1.520-2-4-6-800.51Time (s)1.520-2Figure 5: Simulated joint angle trajectory of Puma robot with zero applied joint torquecollapsing under gravity.The Robotics Toolbox is freely available from ftp.mathworks.com, the MathWorksFTP server, in the directory pub/contrib/misc/robot.
It is best to download all lesin that directory since the Toolbox functions are quite interdependent. A comprehensivemanual, in PostScript format, provides details of each Toolbox function. A menu-drivendemonstration can be invoked by the function rtdemo.References[1] The MathWorks, Inc., 24 Prime Park Way, Natick, MA 01760, Matlab User's Guide,Jan. 1990.[2] R. P.
Paul, Robot Manipulators: Mathematics, Programming, and Control. Cambridge,Massachusetts: MIT Press, 1981.[3] J. Funda, R. Taylor, and R. Paul, \On homogeneous transforms, quaternions, andcomputational eciency," IEEE Trans. Robot. Autom., vol. 6, pp. 382{388, June 1990.[4] R. P. Paul and H.
Zhang, \Computationally ecient kinematics for manipulators withspherical wrists," Int. J. Robot. Res., vol. 5, no. 2, pp. 32{44, 1986.[5] D. Whitney and D. M. Gorinevskii, \The mathematics of coordinated control of prosthetic arms and manipulators," ASME Journal of Dynamic Systems, Measurementand Control, vol. 20, no. 4, pp. 303{309, 1972.[6] J. M. Hollerbach, \Dynamics," in Robot Motion - Planning and Control (M. Brady,J. M. Hollerbach, T. L. Johnson, T. Lozano-Perez, and M. T. Mason, eds.), pp. 51{71,MIT, 1982.[7] M.
W. Walker and D. E. Orin, \Ecient dynamic computer simulation of roboticmechanisms," ASME Journal of Dynamic Systems, Measurement and Control,vol. 104, pp. 205{211, 1982..















