ADDED mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/TwoLink/twolink_lbl.txt Index: mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/TwoLink/twolink_lbl.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/TwoLink/twolink_lbl.txt @@ -0,0 +1,48 @@ +%SUMMARY twolink: two-link manipulator from Section 10.5 of "Metamodelling" +%DESCRIPTION This is a heirachical version of the +%DESCRIPTION example from Section 10.5 of "Metamodelling". +%DESCRIPTION It uses two compound components: ROD and GRA +%DESCRIPTION ROD is essentially as described in Figure 10.2 +%DESCRIPTION GRAV represents gravity by a vertical accelleration +%DESCRIPTION as in Section 10.9 of "Metamodelling" +%DESCRIPTION Note that the rfe rep is not appropriate here - see +%DESCRIPTION twolinkM for more details + +%% Label (twolink_lbl.txt) + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %% Revision 1.1 1996/11/14 10:48:42 peterg +% %% Initial revision +% %% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Each line should be of one of the following forms: +% a comment (ie starting with %) +% Component-name CR_name arg1,arg2,..argn +% blank + +%Rod parameters - identical rods +rod1 none l;l;j;m +rod2 none l;l;j;m + +%Zero velocity sources +v_x internal 0 + + +%Zero force/torque sources +F_x 0 internal +F_a 0 internal +F_y 0 internal + + +%Torque at joints +f_a1 external external +f_a2 external external + + +%Gravity +g ADDED mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/TwoLink/twolink_params.r Index: mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/TwoLink/twolink_params.r ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/TwoLink/twolink_params.r @@ -0,0 +1,24 @@ +%% Parameter file for system twolink (twolink_params.r) +%% This file provides symbolic parameters for simplification + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Useful trig simplifications + + + trig1 := {cos(~x)*cos(~y) => (cos(x+y)+cos(x-y))/2, + cos(~x)*sin(~y) => (sin(x+y)-sin(x-y))/2, + sin(~x)*sin(~y) => (cos(x-y)-cos(x+y))/2, + cos(~x)^2 => (1+cos(2*x))/2, + sin(~x)^2 => (1-cos(2*x))/2}; + LET trig1; + +% Some simplifications -- see book +j := m*l*l/3; + +END; ADDED mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/TwoLink/twolink_simp.r Index: mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/TwoLink/twolink_simp.r ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/TwoLink/twolink_simp.r @@ -0,0 +1,14 @@ +%% Reduce comands to simplify output for system twolink (twolink_simp.r) + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%simplify the output equations +% Joint angles +mttx2 := theta_1; +mttx4 := theta_1 + theta_2; +END; ADDED mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/gTwoLink/twolink_lbl.txt Index: mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/gTwoLink/twolink_lbl.txt ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/gTwoLink/twolink_lbl.txt @@ -0,0 +1,48 @@ +%SUMMARY twolink: two-link manipulator from Section 10.5 of "Metamodelling" +%DESCRIPTION This is a heirachical version of the +%DESCRIPTION example from Section 10.5 of "Metamodelling". +%DESCRIPTION It uses two compound components: ROD and GRA +%DESCRIPTION ROD is essentially as described in Figure 10.2 +%DESCRIPTION GRAV represents gravity by a vertical accelleration +%DESCRIPTION as in Section 10.9 of "Metamodelling" +%DESCRIPTION Note that the rfe rep is not appropriate here - see +%DESCRIPTION twolinkM for more details + +%% Label (twolink_lbl.txt) + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %% Revision 1.1 1996/11/14 10:48:42 peterg +% %% Initial revision +% %% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%% Each line should be of one of the following forms: +% a comment (ie starting with %) +% Component-name CR_name arg1,arg2,..argn +% blank + +%Rod parameters - identical rods +rod1 none l;l;j;m +rod2 none l;l;j;m + +%Zero velocity sources +v_x internal 0 + + +%Zero force/torque sources +F_x 0 internal +F_a 0 internal +F_y 0 internal + + +%Torque at joints +f_a1 external external +f_a2 external external + + +%Gravity +g ADDED mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/gTwoLink/twolink_params.r Index: mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/gTwoLink/twolink_params.r ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/gTwoLink/twolink_params.r @@ -0,0 +1,24 @@ +%% Parameter file for system twolink (twolink_params.r) +%% This file provides symbolic parameters for simplification + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% Useful trig simplifications + + + trig1 := {cos(~x)*cos(~y) => (cos(x+y)+cos(x-y))/2, + cos(~x)*sin(~y) => (sin(x+y)-sin(x-y))/2, + sin(~x)*sin(~y) => (cos(x-y)-cos(x+y))/2, + cos(~x)^2 => (1+cos(2*x))/2, + sin(~x)^2 => (1-cos(2*x))/2}; + LET trig1; + +% Some simplifications -- see book +j := m*l*l/3; + +END; ADDED mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/gTwoLink/twolink_simp.r Index: mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/gTwoLink/twolink_simp.r ================================================================== --- /dev/null +++ mttroot/mtt/lib/examples/Mechanical/Mechanical-2D/gTwoLink/twolink_simp.r @@ -0,0 +1,14 @@ +%% Reduce comands to simplify output for system twolink (twolink_simp.r) + +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% Version control history +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% %% $Id$ +% %% $Log$ +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%simplify the output equations +% Joint angles +mttx2 := theta_1; +mttx4 := theta_1 + theta_2; +END;