clear functions
close all
clear all
addpath ../mr
global link ToRad ToAngle
ToRad =pi/180;
ToAngle =180/pi;link(1).name ='link1';link(1).child =2;link(1).mother =0;link(2).name ='link2';link(2).child =3;link(2).mother =1;link(3).name ='end_effector';link(3).child =0;link(3).mother =2;%% define the screw axis of each joint% In this case, there are 2 joints. Both are the rotation about z axis.
N =3;link(1).ScrewAxis =[001000]'; % [angular_velocity linear_velocity]'link(2).ScrewAxis =[001000]';link(3).ScrewAxis =[000000]';%% joint realtive position (relative to parent)link(1).b =[000]';link(2).b =[001]';link(3).b =[001]';%% mass of each linklink(1).m =1;link(2).m =1;link(3).m =0;%% CoM positioinlink(1).c =[000.5]';link(2).c =[000.5]';link(