Develop a simulation of a SCARA robot using \"standard form\" as well as \"modified form\" with 4m and 2m link length for the first two links using Robotics Toolbox for MATLAB. The third link associated with the prismatic joint should have joint limits of 0 and 3(or pi if you so desire, but no negative values, this can be achieved by commands like link.qlim = joint limits --see Robotics Toolbox Manual). Use the Link() and SerialLink() functions. Use robot_name.teach() function to move the links after creating the simulated robot. With the prismatic link extended to position corresponding to joint variable = 3 and the first and second joint angle at 1 and -1 radians perform a forward kinematics operation using fkine() function to obtain 4 by 4 transformation (T) with the Cartesian position and orientation. Subsequently using ikine () appropriately with the same transformation T obtain the lefty as well as the righty joint solutions for T. Develop a joint trajectory for moving from 10 degree to 110 degree in 4 seconds using (i) cubic spline, (ii) jtraj() and (iii) linear trajectory with parabolic blend with an acceleration for blend region = 50 deg/sec^2. Plot these trajectories on the same graph for comparison. Modify the SCARA robot to include the following dynamic parameters (i) mass of link 1 and 2 as 1kg each (ii) all masses should be considered at the distal ends of the links (iii) you can either ignore the mass of the prismatic link or set it to 1 kg as well....remember to include gravity term for the third link if you use a mass for the third link. Ignore all inertia and friction terms. Use the gear ratios to be 1. Using these dynamic parameters and using same trajectories for both joint 1 and joint2 developed in part 3 and assuming the link 3 to be always fully extended to the joint limit 3.... Plot the animation of the joint motion (try to make videos of the screen animation for use with presentation). Also compare the joint torques developed using rne() for the different trajectories. Demonstrate the use of ctraj() or any other Cartesian trajectory such as square or elliptical trajectory with the SCARA robot developed.
Controlling commands
SCARA30 = vrworld(\'SCARA30.wrl\');
open(SCARA30)
View(SCARA30)
radian=T1*pi/180, radian=-T2*pi/180, radian=T4*pi/180;
SCARA30.a1.rotation = [1, 0, 0, radian]
SCARA30.a2.rotation = [1, 0, 0, radian];
SCARA30.d4b.rotation = [0, 1, 0, radian]
SCARA30.d4b.translation = [0, d4b, 0];
EndV1=SCARA30.EndV1.translation;
EndV2=SCARA30.EndV2.translation;
x1=EndV1(1);
x2=EndV2(1);
y1=-.5*dist;
y2=.5*dist;
SCARA30.EndV1.translation = [x1, y1, 0];
SCARA30.EndV2.translation = [x2, y2, 0];
To plan the path
To move the robotic arm
1 P1=[280,280,10,112]; % Defines position P1
2 move(P1); % Moves to P1
3
4 P=[280,280,10,112; % Defines a matrix P of 4 positions
5 300,280,10,112;
6 400,0,60,200;
7 0,300,10,112];
8 move(P); % Moves to the positions defined in P
9 % in row order