Homework #4, Problem #1 template

This notebook assumes that the definitions in "manipulator_defs.nb" have already been evaluated. Sections that need to be modified are highlighted as cell boxes.

Manipulator definition

DH parameters

Adjust DH parameter definition for three-link manipulator.

DH  =  {{0, 0, 0, θ1, 0}, {0, L1,  0,  θ2, 
            0},  {0,  L2,  0, 0, 0}}; 
DH  // TraditionalForm

Inertia tensors (links 0 through 2): point-mass assumption

Adjust inertias to (1) reflect three-link manipulator, and (2) to reflect inertia tensors for thin, uniform-density rods. (What are (Subscript[I, xx]), (Subscript[I, yy])and (Subscript[I, zz])for a thin, uniform-density rod?)

in0 =  DiagonalMatrix[{0, 0, 0}];
in1  =  DiagonalMatrix[{Ixx1,  Iyy1,  Izz1}];
in2  =  DiagonalMatrix[{Ixx2,  Iyy2,  Izz2}];
in  =  {in0, in1, in2};
in  //  TraditionalForm

Link masses

Adjust mass definition for three-link manipulator.

mass  =  {0, m1, m2};  mass  //  TraditionalForm

Center-of-mass vectors

Adjust (^i)(Subscript[P, (Subscript[C, i])])for thin, uniform-density rods.

Pc  =  {{0, 0, 0}, {L1, 0, 0}, {L2, 0, 0}};  
    Pc  //  TraditionalForm

Gravity vector

Adjust gravity vector for robot.

gravityVector  =  {0, g, 0};

Group parameters

dyn  =  {DH,  in,  mass,  Pc};

Assignment of gravity vector

a[dh_, 0, 0] := gravityVector

Derivation example

Dynamic model [part (a)]

{mm,  vv,  gv}  =  τMatrix[dyn];

mm  // DisplayMatrixOrVector

vv  //  DisplayMatrixOrVector

gv  // DisplayMatrixOrVector

Mass matrix [part (b)]

Adjust to reflect three-link robot.

mm1  =  
        mm  /.  {L1  ->  L,  L2 -> L,  Ixx1  ->  Ixx,  
            Ixx2  ->  Ixx,  Iyy1 -> Iyy,  Iyy2 -> Iyy,  Izz1 -> Izz,  
            Izz2 -> Izz,  m1 -> m,  m2 -> m};
mm1  //  DisplayMatrixOrVector

Det[mm1]  //  Simplify  //  TraditionalForm