M-File Help: SerialLink | View code for SerialLink |
Serial-link robot class
r = SerialLink(dh, options) is a serial-link robot object from a table (matrix) of Denavit-Hartenberg parameters. The columns of the matrix are theta, d, alpha, a. An optional fifth column sigma indicate revolute (sigma=0, default) or prismatic (sigma=1).'name', name | set robot name property |
'comment', comment | set robot comment property |
'manufacturer', manuf | set robot manufacturer property |
'base', base | set base transformation matrix property |
'tool', tool | set tool transformation matrix property |
'gravity', g | set gravity vector property |
'plotopt', po | set plotting options property |
plot | display graphical representation of robot |
teach | drive the graphical robot |
fkine | return forward kinematics |
ikine6s | return inverse kinematics for 6-axis spherical wrist robot |
ikine | return inverse kinematics using iterative method |
jacob0 | return Jacobian matrix in world frame |
jacobn | return Jacobian matrix in tool frame |
jtraj | return a joint space trajectory |
dyn | show dynamic properties of links |
isspherical | true if robot has spherical wrist |
islimit | true if robot has spherical wrist |
payload | add a payload in end-effector frame |
coriolis | return Coriolis joint force |
gravload | return gravity joint force |
inertia | return joint inertia matrix |
accel | return joint acceleration |
fdyn | return joint motion |
rne | return joint force |
perturb | return SerialLink object with perturbed parameters |
showlink | return SerialLink object with perturbed parameters |
friction | return SerialLink object with perturbed parameters |
maniplty | return SerialLink object with perturbed parameters |
links | vector of Link objects |
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, [qlower qupper] 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(robot), cell array |
n | number of joints |
config | joint configuration string, eg. 'RRRRRR' |
mdh | kinematic convention boolean (0=DH, 1=MDH) |
islimit | joint limit boolean vector |
q | joint angles from last plot operation |
handle | graphics handles in object |
Create a SerialLink robot object
R = SerialLink(R1, options) is a deep copy of the robot object R1, with all the same properties. R = SerialLink(links, options) is a robot object defined by a vector of Link objects.'name', name | set robot name property |
'comment', comment | set robot comment property |
'manufacturer', manuf | set robot manufacturer property |
'base', base | set base transformation matrix property |
'tool', tool | set tool transformation matrix property |
'gravity', g | set gravity vector property |
'plotopt', po | set plotting options property |
R = R1 * R2; R = SerialLink([R1 R2]);which is equivalent to R2 mounted on the end of R1. Note that tool transform of R1 and the base transform of R2 are lost, constant transforms cannot be represented in Denavit-Hartenberg notation.
Manipulator forward dynamics
qdd = R.ACCEL(x) as above but x=[q,qd,torque].SerialLink.rne, SerialLink, ode45
String representation of parametesrs
s = R.Cartesian inertia matrix
m = R.SerialLink.inertia, SerialLink.rneClone a robot object
r2 = R.Coriolis matrix
C = R.SerialLink.rneDisplay parameters
R.SerialLink.char, SerialLink.dynDisplay inertial properties
R.SerialLink object in a multi-line format. The properties shown are mass, centre of mass, inertia, gear ratio, motor inertia and motor friction.Integrate forward dynamics
[T,q,qd] = R.fdyn(T, torqfun, q0, qd0) as above but allows the initial joint position and velocity to be specified. The control torque is computed by a user defined 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. [T,q,qd] = R.SerialLink.accel, SerialLink.nofriction, SerialLink.RNE, ode45Forward kinematics
T = R.SerialLink.ikine, SerialLink.ikine6sFriction force
tau = R.friction forces/torques for the robot moving with joint velocities qd. The friction (linear with velocity) and Coulomb Link.frictionGravity loading
taug = R.gravload(q, grav) is as above but the gravitational acceleration vector grav is given explicitly.SerialLink.rne, SerialLink.itorque, SerialLink.coriolis
Inverse manipulator kinematics
q = R.ikine(T, q0, options) specifies the initial estimate of the joint coordinates. q = R.ikine() returns the joint coordinates corresponding to each of the transforms in the sequence. q is MxN where N is the number of robot joints. The initial estimate of q for each time step is taken as the solution from the previous time step.SerialLink.fkine, tr2delta, SerialLink.jacob0, SerialLink.ikine6s
Inverse kinematics for 6-axis robot with spherical wrist
q = R.IKINE6S(T, config) as above but specifies the configuration of the arm in the form of a string containing one or more of the configuration codes:'l' | arm to the left (default) |
'r' | arm to the right |
'u' | elbow up (default) |
'd' | elbow down |
'n' | wrist not flipped (default) |
'f' | wrist flipped (rotated by 180 deg) |
SerialLink.FKINE, SerialLink.IKINE
Manipulator inertia matrix
i = R.inertia matrix which relates joint torque to joint acceleration for the robot at joint configuration q. The diagonal elements i(j,j) are the inertia for the corresponding row of q.SerialLink.RNE, SerialLink.CINERTIA, SerialLink.ITORQUE
Joint limit test
v = R.Test for spherical wrist
R.SerialLink.ikine6sInertia torque
taui = R.SerialLink.rne, SerialLink.inertiaJacobian in world coordinates
j0 = R.SerialLink.jacobn, deltatr, tr2delta
Hessian in end-effector frame
jdq = R.: SerialLink.jacob0, diff2tr, tr2diffJacobian in end-effector frame
jn = R.SerialLink.jacob0, delta2tr, tr2delta
Create joint space trajectory
q = R.jtraj, SerialLink.ikine, SerialLink.ikine6sManipulability measure
m = R.SerialLink.inertia, SerialLink.jacob0
Join robots
R = R1 * R2 is a robot object that is equivalent to mounting robot R2 on the end of robot R1.Remove friction
rnf = R.nofriction('all') as above but all friction coefficients set to zero. Notes:SerialLink.fdyn, Link.nofriction
Add payload to end of manipulator
R.payload with point mass m at position p in the end-effector coordinate frame.Perturb robot parameters
rp = R. r2 = p560.perturb(0.1);Graphical display and animation
R.plot, by using "hold on" before calls to SerialLink object and can be accessed by the read only object property R.q.'workspace', W | size of robot 3D workspace, W = [xmn, xmx ymn ymx zmn zmx] |
'delay', d | delay betwen frames for animation (s) |
'cylinder', C | color for joint cylinders, C=[r g b] |
'mag', scale | annotation scale factor |
'perspective'|'ortho' | type of camera view |
'raise'|'noraise' | controls autoraise of current figure on plot |
'render'|'norender' | controls shaded rendering after drawing |
'loop'|'noloop' | controls endless loop mode |
'base'|'nobase' | controls display of base 'pedestal' |
'wrist'|'nowrist' | controls display of wrist |
'shadow'|'noshadow' | controls display of shadow |
'name'|'noname' | display the robot's name |
'xyz'|'noa' | wrist axis label |
'jaxes'|'nojaxes' | control display of joint axes |
'joints'|'nojoints' | controls display of joints |
Inverse dynamics
tau = R.rne(q, qd, qdd, grav) as above but overriding the gravitational acceleration vector in the robot object R. tau = R.rne(x) as above where x=[q,qd,qdd]. tau = R.rne(x, grav, fext) as above but specifying a wrench acting on the end of the manipulator which is a 6-vector [Fx Fy Fz Mx My Mz]. If q,qd and qdd, or x are matrices with M rows representing a trajectory then tau is an MxN matrix with rows corresponding to each trajectory state. Notes:SerialLink.accel, SerialLink.gravload, SerialLink.inertia
Show parameters of all links
R.Link.showlink, LinkGraphical teach pendant
R.teach(q) specifies the initial joint angle, otherwise it is taken from one of the existing graphical robots.© 1990-2011 Peter Corke.