plot display graphical representation of robot plot3d display3D graphical model of robot teach drive the graphical robot getpos get position of graphical robot jtraj a joint space trajectory edit displayand edit kinematic and dynamic parameters isspherical test if robot has spherical wrist islimit test if robot at joint limit isconfig test robot joint configuration fkine forward kinematics A link transforms trchain forward kinematics as a chain of elementary transforms ikine6s inverse kinematics for 6-axis spherical wrist revolute robot ikine inverse kinematics using iterative numerical method ikunc inverse kinematics using optimisation ikcon inverse kinematics using optimisation with joint limits ikine_sym analytic inverse kinematics obtained symbolically jacob0 Jacobian matrix in world frame jacobn Jacobian matrix in tool frame jacob_dot Jacobian derivative maniplty manipulability vellipse display velocity ellipsoid fellipse display force ellipsoid qmincon null space motion to centre joints between limits accel joint acceleration coriolis Coriolis joint force dyn show dynamic properties of links friction friction force gravload gravity joint force inertia joint inertia matrix cinertia Cartesian inertia matrix nofriction set friction parameters to zero rne inverse dynamics fdyn forward dynamics payload add a payload in end-effector frame perturb randomly perturb link dynamic parameters gravjac gravity load and Jacobian paycap payload capacity pay payload effect sym a symbolic version of the object gencoords symbolic generalized coordinates genforces symbolic generalized forces issym test if object is symbolic
Properties (read/write) links vector of Link objects (1xN) gravity direction of gravity [gx gy gz] base pose of robot's base (4x4 homog xform) tool robot's tool transform, T6 to tool tip (4x4 homog xform) qlim joint limits, [qmin qmax] (Nx2) offset kinematic joint coordinate offsets (Nx1) name name of robot, used for graphical display manuf annotation, manufacturer's name comment annotation, general comment plotopt options for plot() method (cell array) fast use MEX version of RNE. Can only be set trueif the mex file exists. Defaultistrue.
只读属性有
Properties (read only) n number of joints config joint configuration string, eg. 'RRRRRR' mdh kinematic convention boolean (0=DH, 1=MDH) theta kinematic: joint angles (1xN) d kinematic: link offsets (1xN) a kinematic: link lengths (1xN) alpha kinematic: link twists (1xN)
选项
Options 'name', NAME set robot name property to NAME 'comment', COMMENT set robot comment property to COMMENT 'manufacturer', MANUF set robot manufacturer property to MANUF 'base', T set base transformation matrix property to T 'tool', T set tool transformation matrix property to T 'gravity', G set gravity vector property to G 'plotopt', P set default options for .plot() to P 'plotopt3d', P set default options for .plot3d() to P 'nofast' don't use RNE MEX file
下面介绍重要的函数 1, Robobt.plot
Graphical display and animation
R.plot(q, options) displays a graphical animation of a robot based on the kinematic model. A stick figure polyline joins the origins of the link coordinate frames. The robot is displayed at the joint angle q (1xN), orif a matrix (MxN) it is animated as the robot moves along the M-point trajectory.
Options 'workspace', W Size of robot 3D workspace, W = [xmn, xmx ymn ymx zmn zmx] 'floorlevel', L Z-coordinate of floor (default-1) 'delay', D Delay betwen frames for animation (s) 'fps', fps Number of frames per second for display, inverse of'delay'option '[no]loop'Loopover the trajectory forever '[no]raise' Autoraise the figure 'movie', M Save frames as files in the folder M 'trail', L Draw a line recording the tip path, withline style L 'scale', S Annotation scale factor 'zoom', Z Reduce size of auto-computed workspace by Z, makes robot look bigger 'ortho' Orthographic view 'perspective' Perspective view (default) 'view', V Specify view V='x', 'y', 'top'or [az el] for side elevations, plan view, or general viewby azimuth and elevation angle. 'top'Viewfrom the top. '[no]shading'Enable Gouraud shading (defaulttrue) 'lightpos', L Position of the light source (default [0020]) '[no]name' Display the robot's name '[no]wrist' Enable display of wrist coordinate frame 'xyz' Wrist axis label is XYZ 'noa' Wrist axis label is NOA '[no]arrow' Display wrist frame with 3D arrows '[no]tiles' Enable tiled floor (default true) 'tilesize', S Side length of square tiles on the floor (default 0.2) 'tile1color', C Color of even tiles [r g b] (default [0.5 1 0.5] light green) 'tile2color', C Color of odd tiles [r g b] (default [1 1 1] white) '[no]shadow' Enable display of shadow (default true) 'shadowcolor', C Colorspec of shadow, [r g b] 'shadowwidth', W Width of shadow line (default 6) '[no]jaxes' Enable display of joint axes (default false) '[no]jvec' Enable display of joint axis vectors (default false) '[no]joints' Enable display of joints 'jointcolor', C Colorspec for joint cylinders (default [0.7 0 0]) 'jointdiam', D Diameter of joint cylinder in scale units (default 5) 'linkcolor', C Colorspec of links (default 'b') '[no]base' Enable display of base 'pedestal' 'basecolor', C Color of base (default 'k') 'basewidth', W Width of base (default 3)
根据这些选项能够自定义绘图连杆的颜色,地板颜色,轴的局部坐标系等信息了。
2, SerialLink.rne
Inverse dynamics
tau = R.rne(q, qd, qdd) isthe joint torque required forthe robot R to achieve the specified joint position q (1xN), velocity qd (1xN) and acceleration qdd (1xN), where N isthenumberof robot joints.
tau = R.rne(q, qd, qdd, grav) asabovebut overriding the gravitational acceleration vector (3x1) inthe robot object R.
tau = R.rne(q, qd, qdd, grav, fext) asabovebut specifying a wrench acting ontheendofthe manipulator which is a 6-vector [Fx Fy Fz Mx My Mz].
tau = R.rne(x) asabovewhere x=[q,qd,qdd] (1x3N).
tau = R.rne(x, grav) asabovebut overriding the gravitational acceleration vector inthe robot object R.
tau = R.rne(x, grav, fext) asabovebut specifying a wrench acting ontheendofthe manipulator which is a 6-vector [Fx Fy Fz Mx My Mz].