ARA95 - A computer tool for simulation and analysis - the Robotics ToolBox for MATLAB (779827), страница 2
Текст из файла (страница 2)
However the Toolbox isgiven only a generalized description of the manipulator in terms of kinematic parametersso an iterative numerical solution must be used. Such a procedure can be slow, andthe choice of starting value aects both the search time and the solution found, since ingeneral a manipulator may have several poses which result in the same transform for thelast link. The starting point for the solution may be specied, or else it defaults to zero(which is not a particularly good choice in this case), and provides limited control over theparticular solution that will be found.
Note that a solution is not possible if the speciedtransform describes a point out of reach of the manipulator | in such a case the functionwill return with an error.The manipulator's Jacobian matrix, Jq , maps dierential motion or velocity betweenconguration and Cartesian space. For an n-axis manipulator the end-eector Cartesianvelocity is0x_ = 0 Jq (q ) q_(3)nTn x_ = Tn J (q ) q_(4)qnin base or end-eector coordinates respectively and where x_ is the Cartesian velocityrepresented by a 6-vector as above.
The two Jacobians are computed by the Toolboxfunctions jacob0() and jacobn() respectively. For an n-axis manipulator the Jacobianis a 6 n matrix.>> q = [0.1 0.75 -2.25 0 .75 0];>> J = jacob0(p560, q)J =0.0501-0.3031-0.01020.7569-0.0304-0.00100.00000.74810.43220000000000.00000.00001.00000.0998-0.99500.00000.0998-0.99500.00000.99250.09960.07070.0998-0.99500.00000.67820.06810.73170000.6816-0.00000.73170000-1.00000.0000000001.0000or in the end-eector coordinate frame>> J = jacobn(p560, q)J =0.0918-0.7328-0.30210.74810.00000.00000.08550.33970.3092-0.681600-0.0000-1.0000-1.00000.73170.00000.0000Note the top right 3 3 block is all zero.
This indicates, correctly, that motion of joints 4to 6 does not cause any translational motion of the robot's end-eector | a characteristicof the spherical wrist.Many control schemes require the inverse of the Jacobian, which in this example isnot singular>> det(J)ans =-0.0632and may be inverted. One such control scheme is resolved rate motion control proposedby Whitney[5]q_ = 0Jq 1 0x_ n(5)which gives the joint velocities required to to achieve the desired Cartesian velocity. In thisexample, in order to achieve 0:1 m=s translational motion in the end-eector X-directionthe required joint velocities would be>> vel = [0.1 0 0 0 0 0]'; % xlational motion in X directn>> qvel = inv(J) * vel;>> qvel'ans =0.0000-0.24950.27410.0000-0.02460.0000which requires approximately equal and opposite motion of the shoulder and elbow joints.At a kinematic singularity the Jacobian becomes singular, and such simple controltechniques will fail.
As already discussed, at the Puma's `READY' position two of thewrist joints are aligned resulting in the loss of one degree of freedom. This is revealed bythe rank of the Jacobian>> rank( jacobn(p560, qr) )ans =5which is less than that needed for independent motion along each Cartesian degree offreedom. The null space of this Jacobian is>> n = null(J);>> n'ans =0.00000.00000.0000-0.70710.00000.7071which indicates that equal and opposite motion of joints 4 and 6 will result in zero motionof the end-eector.When not actually at a singularity the condition of the Jacobian can provide information about how `well-positioned' the manipulator is for making certain motions, andis referred to as `manipulability'.
A number of scalar manipulability measures have beenproposed. One by Yoshikawa>> maniplty(p560(:,1:5), q)ans =0.0632is based purely on kinematic parameters of the manipulator and would indicate, in thiscase, that the pose is not well conditioned.4 TrajectoriesAs we have seen, homogeneous transforms or unit-quaternions can be used to representthe pose, position and orientation, of a coordinate frame in Cartesian space. In roboticswe frequently need to deal with paths or trajectories, that is, a sequence of Cartesianframes or joint angles. Consider the example of a path which will move the Puma robotfrom its zero angle pose to the upright (or READY) pose.
First create a time vector,completing the motion in 2 seconds with a sample interval of 56 ms.>> t = [0:.056:2]';and then compute a joint space trajectory>> q = jtraj(qz, qr, t);is a matrix with one row per time step, and each row a joint angle vector as above.The trajectory is a fth order polynomial which has continuous acceleration and jerk. Bydefault the initial and nal velocities are zero, but these may be specied by additionalarguments.
For this particular trajectory most of the motion is done by joints 2 and 3,and this can be conveniently plotted using standard MATLAB plotting commandsq>> subplot(2,1,1); plot(t,q(:,2))>> subplot(2,1,2); plot(t,q(:,3))to give Figure 2. We can also look at the velocity and acceleration proles. We coulddierentiate the angle trajectory using diff, but more accurate results can be obtainedby requesting that jtraj return angular velocity and acceleration as follows>> [q,qd,qdd] = jtraj(qz, qr, t);which can then be plotted as before to give Figure 2.A number of Toolbox functions can operate on trajectories, for instance forward kinematics.
The homogeneous transform for each point of the trajectory is given by>> Ttg = fkine(p560, q);Joint 2 accel (rad/s2)Joint 2 (rad)21.510.5000.20.40.60.81Time (s)1.21.41.6Joint 3 accel (rad/s2)Joint 3 (rad)0-1-1.5-200.20.40.60.81Time (s)1.21.41.61.850-5-1001.8-0.5100.20.40.60.81Time (s)1.21.41.61.80.20.40.60.81Time (s)1.21.41.61.81050-5-100Figure 2: Joint space trajectory generated by jtraj(). Left: joint 2 and 3 angles; right:joint 2 and 3 acceleration.Since MATLAB does not yet support 3-dimensional matrices, each row of Ttg is a `attened' 4x4 homogeneous transform corresponding to the equivalent row of q, which canbe restored by means of the reshape function.
Columns 13, 14 and 15 of T correspond tothe X-, Y- and Z- coordinates respectively, and could be plotted against time>> subplot(3,1,1); plot(t, Ttg(:,13))>> subplot(3,1,2); plot(t, Ttg(:,14))>> subplot(3,1,3); plot(t, Ttg(:,15))to give Figure 3, or we could plot X against Z to get some idea of the Cartesian pathfollowed by the manipulator>> subplot(1,1,1); plot(Ttg(:,13), Ttg(:,15))The function plotbot introduced above, will when invoked on a trajectory, display a stickgure animation of the robot moving along the path>> plotbot(p560, q);Straight line, or `Cartesian', paths can be generated in a similar way between twopoints specied by homogeneous transforms.>>>>>>>>t = [0:.056:2];T0 = transl(0.6, -0.5, 0.0);T1 = transl(0.4, 0.5, 0.2);Ts = ctraj(T0, T1, t);%%%%create a time vectordefine the start pointand destinationcompute a Cartesian pathThe resulting trajectory, Ts, has one row per time step and that row is again a `attened' homogeneous transform.
Inverse kinematics can then be applied to determine thecorresponding joint angle motion using>> qc = ikine(p560, T);When solving for a trajectory, the starting joint coordinates for each inverse kinematicsolution is taken as the result of the previous solution. Once again the joint space trajectory could be plotted against time or animated using plotbot. Clearly this approach isslow, and would not be suitable be for a real robot controller where an inverse kinematicsolution would be required in a few milliseconds.X (m)0.40.200.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.8Y (m)0-0.20Z (m)0.80.60Figure 3: Cartesian coordinates of wrist for the trajectory of Figure 2.5 DynamicsManipulator dynamics is concerned with the equations of motion, the way in which themanipulator moves in response to torques applied by the actuators, or external forces.The history and mathematics of the dynamics of serial-link manipulators is well coveredby Paul[2] and Hollerbach[6].
The equations of motion for an n-axis manipulator are givenby(6)Q = M(q)q + C(q; q_)q_ + F(q_) + G(q)whereq is the vector of generalized joint coordinates describing the pose of themanipulatorq_ is the vector of joint velocities;q is the vector of joint accelerationsM is the symmetric joint-space inertia matrix, or manipulator inertiatensorC describes Coriolis and centripetal eects | centripetal torques are proportional to q_i2, while the Coriolis torques are proportional to q_iq_jF describes viscous and Coulomb friction and is not generally consideredpart of the rigid-body dynamicsG is the gravity loadingQ is the vector of generalized forces associated with the generalized coordinates q.Within the Toolbox the manipulator's kinematics and dynamics are represented in ageneral way by a dyn matrix which is given as the rst argument to Toolbox dynamicfunctions.
Each row represents one link of the manipulator and the columns are assignedaccording to Table 1. The dyn matrix is in fact a dh matrix augmented with additionalcolumns for the inertial and mass parameters of each link, as well as the motor inertia andfriction parameters. Such a denition allows a dyn matrix to be passed to any Toolboxfunction in place of a dh matrix but not vice versa. For an n-axis manipulator dyn is ann 20 matrix. This structure does not allow for joint cross-coupling, as found in the PumaColumn SymbolDescription6mmass of the link7rxlink COG with respect to the link coordinate frame8ry9rz10Ixx elements of link inertia tensor about the link COG11Iyy12Izz13Ixy14Iyz15Ixz16Jm armature inertia17Greduction gear ratio; joint speed/link speed18Bviscous friction, motor referred+19ccoulomb friction (positive rotation), motor referred20ccoulomb friction (negative rotation), motor referredTable 1: Augmented column assigments for the Toolbox dyn matrix.robot's wrist, joint angle limits, or motor electrical parameters such as torque constantand driver current or voltage limits.Inverse dynamics computes the joint torques required to achieve the specied state ofjoint position, velocity and acceleration.














