M-File Help: Link | View code for Link

# Link

Robot manipulator Link class

A Link object holds all information related to a robot link such as kinematics parameters, rigid-body inertial parameters, motor and transmission parameters.

## Methods

A | link transform matrix
RP | joint type: 'R' or 'P'
friction | friction force
nofriction | Link object with friction parameters set to zero
dyn | display link dynamic parameters
islimit | test if joint exceeds soft limit
isrevolute | test if joint is revolute
isprismatic | test if joint is prismatic
display | print the link parameters in human readable form
char | convert to string

## Properties (read/write)

theta | kinematic: joint angle
d | kinematic: link offset
a | kinematic: link length
alpha | kinematic: link twist
sigma | kinematic: 0 if revolute, 1 if prismatic
mdh | kinematic: 0 if standard D&H, else 1
offset | kinematic: joint variable offset
qlim | kinematic: joint variable limits [min max]
m | dynamic: link mass
r | dynamic: link COG wrt link coordinate frame 3x1
I | dynamic: link inertia matrix, symmetric 3x3, about link COG.
B | dynamic: link viscous friction (motor referred)
Tc | dynamic: link Coulomb friction

S

G | actuator: gear ratio
Jm | actuator: motor inertia (motor referred)

## Notes

- This is a reference class object
- Link objects can be used in vectors and arrays

## References

- Robotics, Vision & Control, Chap 7, P. Corke, SprinSger 2011.

## See also

Link, Revolute, Prismatic, SerialLink

# Link.Link

Create robot link object

This is class constructor function which has several call signatures.

L = Link() is a Link object with default parameters.

L = Link(l1) is a Link object that is a deep copy of the link object l1.

L = Link(options) is a link object with the kinematic and dynamic parameters specified by the key/value pairs.

## Key/value pairs

'theta', TH | joint angle, if not specified joint is revolute
'd', D | joint extension, if not specified joint is prismatic
'a', A | joint offset (default 0)
'alpha', A | joint twist (default 0)
'standard' | defined using standard D&H parameters (default).
'modified' | defined using modified D&H parameters.
'offset', O | joint variable offset (default 0)
'qlim', L | joint limit (default [])
'I', I | link inertia matrix (3x1, 6x1 or 3x3)
'r', R | link centre of gravity (3x1)
'm', M | link mass (1x1)
'G', G | motor gear ratio (default 1)
'B', B | joint friction, motor referenced (default 0)
'Jm', J | motor inertia, motor referenced (default 0)
'Tc', T | Coulomb friction, motor referenced (1x1 or 2x1), (default [0 0])
'revolute' | for a revolute joint (default)

'prismatic' for a prismatic joint 'p'

'standard' | for standard D&H parameters (default).
'modified' | for modified D&H parameters.
'sym' | consider all parameter values as symbolic not numeric

- It is an error to specify 'theta' and 'd'
- The link inertia matrix (3x3) is symmetric and can be specified by giving a 3x3 matrix, the diagonal elements [Ixx Iyy Izz], or the moments and products of inertia [Ixx Iyy Izz Ixy Iyz Ixz].
- All friction quantities are referenced to the motor not the load.
- Gear ratio is used only to convert motor referenced quantities such as friction and interia to the link frame.

## Old syntax

L = Link(dh, options) is a link object using the specified kinematic convention and with parameters:

- DH = [THETA D A ALPHA SIGMA OFFSET] where OFFSET is a constant displacement between the user joint angle vector and the true kinematic solution.
- DH = [THETA D A ALPHA SIGMA] where SIGMA=0 for a revolute and 1 for a prismatic joint, OFFSET is zero.
- DH = [THETA D A ALPHA], joint is assumed revolute and OFFSET is zero.

## Options

'standard' | for standard D&H parameters (default).
'modified' | for modified D&H parameters.
'revolute' | for a revolute joint, can be abbreviated to 'r' (default)

'prismatic' for a prismatic joint, can be abbreviated to 'p'

## Examples

A standard Denavit-Hartenberg link

    L3 = Link('d', 0.15005, 'a', 0.0203, 'alpha', -pi/2);

since 'theta' is not specified the joint is assumed to be revolute, and since the kinematic convention is not specified it is assumed 'standard'.

Using the old syntax

    L3 = Link([ 0, 0.15005, 0.0203, -pi/2], 'standard');

the flag 'standard' is not strictly necessary but adds clarity. Only 4 parameters are specified so sigma is assumed to be zero, ie. the joint is revolute.

    L3 = Link([ 0, 0.15005, 0.0203, -pi/2, 0], 'standard');

the flag 'standard' is not strictly necessary but adds clarity. 5 parameters are specified and sigma is set to zero, ie. the joint is revolute.

    L3 = Link([ 0, 0.15005, 0.0203, -pi/2, 1], 'standard');

the flag 'standard' is not strictly necessary but adds clarity. 5 parameters are specified and sigma is set to one, ie. the joint is prismatic.

For a modified Denavit-Hartenberg revolute joint

    L3 = Link([ 0, 0.15005, 0.0203, -pi/2, 0], 'modified');

## Notes

- Link object is a reference object, a subclass of Handle object.
- Link objects can be used in vectors and arrays.
- The parameter D is unused in a revolute joint, it is simply a placeholder in the vector and the value given is ignored.
- The parameter THETA is unused in a prismatic joint, it is simply a placeholder in the vector and the value given is ignored.
- The joint offset is a constant added to the joint angle variable before forward kinematics and subtracted after inverse kinematics. It is useful if you want the robot to adopt a 'sensible' pose for zero joint angle configuration.
- The link dynamic (inertial and motor) parameters are all set to zero. These must be set by explicitly assigning the object properties: m, r, I, Jm, B, Tc, G.

## See also

: revolute, Prismatic

# Link.A

Link transform matrix

T = L.A(q) is the link homogeneous transformation matrix (4x4) corresponding to the link variable q which is either the Denavit-Hartenberg parameter THETA (revolute) or D (prismatic).

## Notes

- For a revolute joint the THETA parameter of the link is ignored, and Q used instead.
- For a prismatic joint the D parameter of the link is ignored, and Q used instead.
- The link offset parameter is added to Q before computation of the transformation matrix.

# Link.char

Convert to string

s = L.char() is a string showing link parameters in a compact single line format. If L is a vector of Link objects return a string with one line per Link.

## See also

Link.display

# Link.display

Display parameters

L.display() displays the link parameters in compact single line format. If L is a vector of Link objects displays one line per element.

## Notes

- This method is invoked implicitly at the command line when the result of an expression is a Link object and the command has no trailing semicolon.

## See also

Link.char, Link.dyn, SerialLink.showlink

# Link.dyn

Show inertial properties of link

L.dyn() displays the inertial properties of the link object in a multi-line format. The properties shown are mass, centre of mass, inertia, friction, gear ratio and motor properties.

If L is a vector of Link objects show properties for each link.

## See also

SerialLink.dyn

# Link.friction

Joint friction force

f = L.friction(qd) is the joint friction force/torque for link velocity qd.

## Notes

- Friction values are referred to the motor, not the load.
- Viscous friction is scaled up by G^2.
- Coulomb friction is scaled up by G.
- The sign of the gear ratio is used to determine the appropriate Coulomb friction value in the non-symmetric case.

# Link.islimit

Test joint limits

L.islimit(q) is true (1) if q is outside the soft limits set for this joint.

## Note

- The limits are not currently used by any Toolbox functions.

# Link.isprismatic

Test if joint is prismatic

L.isprismatic() is true (1) if joint is prismatic.

## See also

Link.isrevolute

# Link.isrevolute

Test if joint is revolute

L.isrevolute() is true (1) if joint is revolute.

## See also

Link.isprismatic

# Link.nofriction

Remove friction

ln = L.nofriction() is a link object with the same parameters as L except nonlinear (Coulomb) friction parameter is zero.

ln = L.nofriction('all') as above except that viscous and Coulomb friction are set to zero.

ln = L.nofriction('coulomb') as above except that Coulomb friction is set to zero.

ln = L.nofriction('viscous') as above except that viscous friction is set to zero.

## Notes

- Forward dynamic simulation can be very slow with finite Coulomb friction.

## See also

SerialLink.nofriction, SerialLink.fdyn

# Link.RP

Joint type

c = L.RP() is a character 'R' or 'P' depending on whether joint is revolute or prismatic respectively. If L is a vector of Link objects return a string of characters in joint order.

# Link.set.I

Set link inertia

L.I = [Ixx Iyy Izz] set link inertia to a diagonal matrix.

L.I = [Ixx Iyy Izz Ixy Iyz Ixz] set link inertia to a symmetric matrix with specified inertia and product of intertia elements.

L.I = M set Link inertia matrix to M (3x3) which must be symmetric.

# Link.set.r

Set centre of gravity

L.r = R set the link centre of gravity (COG) to R (3-vector).

# Link.set.Tc

Set Coulomb friction

L.Tc = F set Coulomb friction parameters to [F -F], for a symmetric Coulomb friction model.

L.Tc = [FP FM] set Coulomb friction to [FP FM], for an asymmetric Coulomb friction model. FP&gt;0 and FM&lt;0.

## See also

Link.friction

© 1990-2014 Peter Corke.