Arm Type Robots - DH

Code author: Jesse Haviland

Revolute

@author: Jesse Haviland

class ropy.robot.Revolute.Revolute(d=0.0, alpha=0.0, a=0.0, mdh=0.0, offset=0.0, qlim=array([0.0, 0.0]), flip=False, m=0.0, r=array([0.0, 0.0, 0.0]), I=array([[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]), Jm=0.0, B=0.0, Tc=array([0.0, 0.0]), G=1.0)[source]

Bases: ropy.robot.Link.Link

A class for revolute link types

Parameters
  • d (float) – kinematic - link offset

  • alpha (float) – kinematic - link twist

  • a (float) – kinematic - link length

  • sigma (int) – kinematic - 0 if revolute, 1 if prismatic

  • mdh (int) – kinematic - 0 if standard D&H, else 1

  • offset (float) – kinematic - joint variable offset

  • qlim (float ndarray(1,2)) – joint variable limits [min max]

  • flip (bool) – joint moves in opposite direction

  • m (float) – dynamic - link mass

  • r (float ndarray(3)) – dynamic - position of COM with respect to link frame

  • I (float ndarray(3,3)) – dynamic - inertia of link with respect to COM

  • Jm (float) – dynamic - motor inertia

  • B (float) – dynamic - motor viscous friction (1x1 or 2x1)

  • Tc (float ndarray(2)) – dynamic - motor Coulomb friction (1x2 or 2x1)

  • G (float) – dynamic - gear ratio

References
  • Robotics, Vision & Control, P. Corke, Springer 2011, Chap 7.

A(q)

Link transform matrix

T = 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)

Parameters

q (float) – Joint angle (radians)

Return T

link homogeneous transformation matrix

Rtype T

float numpy.ndarray((4, 4))

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.

property B
property G
property I
property Jm
property Tc
property a
property alpha
property d
dyn()

Show inertial properties of link

s = dyn() returns a string representation 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.

Return s

The string representation of the link dynamics

Rtype s

string

property flip
friction(qd)

tau = friction(qd) Calculates the joint friction force/torque (n) for joint velocity qd (n). The friction model includes:

  • Viscous friction which is a linear function of velocity.

  • Coulomb friction which is proportional to sign(qd).

Parameters

qd (float) – The joint velocity

Return tau

the friction force/torque

Rtype tau

float

Notes
  • The friction value should be added to the motor output torque, it has a negative value when qd > 0.

  • The returned friction value is referred to the output of the gearbox.

  • The friction parameters in the Link object are referred to the motor.

  • Motor viscous friction is scaled up by G^2.

  • Motor Coulomb friction is scaled up by G.

  • The appropriate Coulomb friction value to use in the non-symmetric case depends on the sign of the joint velocity, not the motor velocity.

  • The absolute value of the gear ratio is used. Negative gear ratios are tricky: the Puma560 has negative gear ratio for joints 1 and 3.

islimit(q)

Checks if the joint is exceeding a joint limit

Returns

True if joint is exceeded

Return type

bool

isprismatic()

Checks if the joint is of prismatic type

Returns

Ture if is prismatic

Return type

bool

isrevolute()

Checks if the joint is of revolute type

Returns

Ture if is revolute

Return type

bool

property m
property mdh
nofriction(coulomb=True, viscous=False)

l2 = nofriction(coulomb, viscous) copies the link and returns a link with the same parameters except, the Coulomb and/or viscous friction parameter to zero.

l2 = nofriction() as above except the the Coulomb parameter is set to zero.

Parameters
  • coulomb (bool) – if True, will set the coulomb friction to 0

  • viscous (bool) – if True, will set the viscous friction to 0

property offset
property qlim
property r
property sigma
property theta

Prismatic

@author: Jesse Haviland

class ropy.robot.Prismatic.Prismatic(alpha=0.0, theta=0.0, a=0.0, mdh=0.0, offset=0.0, qlim=array([0.0, 0.0]), flip=False, m=0.0, r=array([0.0, 0.0, 0.0]), I=array([[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]), Jm=0.0, B=0.0, Tc=array([0.0, 0.0]), G=1.0)[source]

Bases: ropy.robot.Link.Link

A class for prismatic link types

A subclass of the Link class for a prismatic joint: holds all information related to a robot link such as kinematics parameters, rigid-body inertial parameters, motor and transmission parameters.

Parameters
  • theta (float) – kinematic: joint angle

  • d (float) – kinematic - link offset

  • alpha (float) – kinematic - link twist

  • a (float) – kinematic - link length

  • sigma (int) – kinematic - 0 if revolute, 1 if prismatic

  • mdh (int) – kinematic - 0 if standard D&H, else 1

  • offset (float) – kinematic - joint variable offset

  • qlim (float ndarray(1,2)) – joint variable limits [min max]

  • flip (bool) – joint moves in opposite direction

  • m (float) – dynamic - link mass

  • r (float ndarray(3)) – dynamic - position of COM with respect to link frame

  • I (float ndarray(3,3)) – dynamic - inertia of link with respect to COM

  • Jm (float) – dynamic - motor inertia

  • B (float) – dynamic - motor viscous friction (1x1 or 2x1)

  • Tc (float ndarray(2)) – dynamic - motor Coulomb friction (1x2 or 2x1)

  • G (float) – dynamic - gear ratio

References
  • Robotics, Vision & Control, P. Corke, Springer 2011, Chap 7.

A(q)

Link transform matrix

T = 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)

Parameters

q (float) – Joint angle (radians)

Return T

link homogeneous transformation matrix

Rtype T

float numpy.ndarray((4, 4))

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.

property B
property G
property I
property Jm
property Tc
property a
property alpha
property d
dyn()

Show inertial properties of link

s = dyn() returns a string representation 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.

Return s

The string representation of the link dynamics

Rtype s

string

property flip
friction(qd)

tau = friction(qd) Calculates the joint friction force/torque (n) for joint velocity qd (n). The friction model includes:

  • Viscous friction which is a linear function of velocity.

  • Coulomb friction which is proportional to sign(qd).

Parameters

qd (float) – The joint velocity

Return tau

the friction force/torque

Rtype tau

float

Notes
  • The friction value should be added to the motor output torque, it has a negative value when qd > 0.

  • The returned friction value is referred to the output of the gearbox.

  • The friction parameters in the Link object are referred to the motor.

  • Motor viscous friction is scaled up by G^2.

  • Motor Coulomb friction is scaled up by G.

  • The appropriate Coulomb friction value to use in the non-symmetric case depends on the sign of the joint velocity, not the motor velocity.

  • The absolute value of the gear ratio is used. Negative gear ratios are tricky: the Puma560 has negative gear ratio for joints 1 and 3.

islimit(q)

Checks if the joint is exceeding a joint limit

Returns

True if joint is exceeded

Return type

bool

isprismatic()

Checks if the joint is of prismatic type

Returns

Ture if is prismatic

Return type

bool

isrevolute()

Checks if the joint is of revolute type

Returns

Ture if is revolute

Return type

bool

property m
property mdh
nofriction(coulomb=True, viscous=False)

l2 = nofriction(coulomb, viscous) copies the link and returns a link with the same parameters except, the Coulomb and/or viscous friction parameter to zero.

l2 = nofriction() as above except the the Coulomb parameter is set to zero.

Parameters
  • coulomb (bool) – if True, will set the coulomb friction to 0

  • viscous (bool) – if True, will set the viscous friction to 0

property offset
property qlim
property r
property sigma
property theta