The Robot and mRobot classes are composed of the following data elements:
The Link class (see table 2.1) encapsulates all
the data and functionality required to characterize a single ``link''
as it is defined by Denavit and Hartenberg (standard notation
[3], or modified notation [4]). It is initialized
by providing the joint type (int joint_type: revolute=0,
prismatic=1) and the parameters ,
,
,
( Real theta, d, a, alpha) and a boolean value Bool DH
(true=standard false=modified) It also contains the
inertial parameters data: mass
(Real m), center of mass
position vector
(ColumnVector r) and inertia tensor
matrix
(Matrix I). In this case,
is
given with respect to the link coordinate frame and
is
with respect to a coordinate frame parallel to the link coordinate
frame and located at the center of mass of
. The dynamic model
takes into account the motors inertia, gear ratio and frictions. The
values Im and Gr representing respectively the
motors rotor inertia
and gear ratio
; B and
Cf representing respectively the motors viscous
and
Coulomb friction
coefficients:
On initialization, the constructor sets up the matrices
and
such that
![]() |
![]() |
![]() |
(2.28) |
![]() |
![]() |
![]() |
(2.29) |
![]() |
![]() |
![]() |
(2.30) |
![]() |
![]() |
![]() |
(2.31) |
If the link corresponds to a revolute (prismatic) joint, then
only (
) can be changed after the link definition. This is done through
the member function transform which sets the new value of
(
or
) and
updates the matrices
and
which compose the link homogeneous transform:
![]() |
![]() |
![]() |
(2.32) |