Difference between revisions of "Robotic Arm: Team November"
(7 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
[[User:Jnolan1 | Jared Nolan]], | [[User:Jnolan1 | Jared Nolan]], | ||
[[User:Ddannun1 | David D'Annunzio]], | [[User:Ddannun1 | David D'Annunzio]], | ||
− | [[User: | + | [[User:Dcabre1 | Daniel Cabrera]], |
[[User:Ablekic1 | Tony Blekicki]] | [[User:Ablekic1 | Tony Blekicki]] | ||
+ | |||
+ | ==SolidWorks Image== | ||
+ | [[Image:RobotArmPic.jpg]] | ||
+ | |||
+ | ==SolidWorks Files== | ||
+ | [[Image:RobotArm.zip | SolidWorks Arm Files]] | ||
+ | |||
+ | ==The Actual Arm and the Design it drew: A Circle Inscribed in a Square== | ||
+ | [[Image:RobotArm 1535.JPG]] | ||
+ | |||
+ | There really is a circle in a square. I swear. | ||
+ | [[Image:Design 1537.JPG]] | ||
==MatLab Code for Physical Model== | ==MatLab Code for Physical Model== | ||
Line 31: | Line 43: | ||
% loop through all the values of phi | % loop through all the values of phi | ||
for i=1:length(phi), | for i=1:length(phi), | ||
− | + | x2=x0+r*cos(phi(i)); %x2 and y2 trace out a circle. | |
− | + | y2=y0+r*sin(phi(i)); | |
− | + | %First do inverse kinematics to find angles... | |
− | + | la=4.5; | |
− | + | lb=3.75; | |
− | + | [theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2, y2); | |
− | + | %Then do forward kinematics to find arm locations. | |
− | + | %[xa ya xb yb] = forwardKinematics(la, lb, theta_a, theta_b); | |
− | + | pause(0.1); %delay 1/10 second | |
− | + | gotoAngles(s,theta_a,theta_b-theta_a,750); | |
end | end | ||
Line 52: | Line 64: | ||
%Draw and animate the arm; | %Draw and animate the arm; | ||
numPts = 10; %the number of points in the animation | numPts = 10; %the number of points in the animation | ||
+ | |||
x2=linspace(6.5+r,6.5+r,numPts) %generate an array of x2 ... | x2=linspace(6.5+r,6.5+r,numPts) %generate an array of x2 ... | ||
y2=linspace(r,-r,numPts) %... and y2 values to define a line. | y2=linspace(r,-r,numPts) %... and y2 values to define a line. | ||
Line 57: | Line 70: | ||
% loop through all the values of x2 and y2 | % loop through all the values of x2 and y2 | ||
for i=0:numPts, | for i=0:numPts, | ||
− | + | x2=6.5+r | |
− | + | y2=r-(i*(2*r/numPts)) | |
− | + | %First do inverse kinematics to find angles... | |
− | + | la=4.5; | |
− | + | lb=3.75; | |
− | + | [theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2, y2); | |
− | + | pause(0.1); %delay 1/10 second | |
− | + | gotoAngles(s,theta_a,theta_b-theta_a,750); | |
end | end | ||
Line 79: | Line 92: | ||
for i=1:length(x2), | for i=1:length(x2), | ||
− | + | %First do inverse kinematics to find angles... | |
− | + | la=4.5; | |
− | + | lb=3.75; | |
− | + | [theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2(i), y2(i)); | |
− | + | pause(0.1); %delay 1/10 second | |
− | + | gotoAngles(s,theta_a,theta_b-theta_a,750); | |
end | end | ||
Line 98: | Line 111: | ||
for i=1:length(x2), | for i=1:length(x2), | ||
− | + | %First do inverse kinematics to find angles... | |
− | + | la=4.5; | |
− | + | lb=3.75; | |
− | + | [theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2(i), y2(i)); | |
− | + | pause(0.1); %delay 1/10 second | |
− | + | gotoAngles(s,theta_a,theta_b-theta_a,750); | |
end | end | ||
Line 117: | Line 130: | ||
for i=1:length(x2), | for i=1:length(x2), | ||
− | + | %First do inverse kinematics to find angles... | |
− | + | la=4.5; | |
− | + | lb=3.75; | |
− | + | [theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2(i), y2(i)); | |
− | + | pause(0.1); %delay 1/10 second | |
− | + | gotoAngles(s,theta_a,theta_b-theta_a,750); | |
end | end |
Latest revision as of 22:25, 13 November 2008
Contents
Members
Jared Nolan, David D'Annunzio, Daniel Cabrera, Tony Blekicki
SolidWorks Image
SolidWorks Files
The Actual Arm and the Design it drew: A Circle Inscribed in a Square
There really is a circle in a square. I swear.
MatLab Code for Physical Model
%[thetaA, thetaB] = inverseKinematicsfunction(4.5, 3.75,6.5,-1.5);
% This script takes input from the user and uses it to test the function % gotoAngles
s=instrfind; %Find any serial links (we can have only 1) delete(s); %... and delete. %Create a new serial communications link s=serial('COM1','Baudrate',115200,'Terminator','CR'); fopen(s); %... and open it
% set pulsewidth on channels 1 & 2to 1500 microseconds (over 200 mS) fprintf(s,'#1P1500#2P1500T200');
%Draw and animate the arm; numPts = 20; %the number of points in the animation phi = linspace(0,2*pi,numPts); %angle goes from 0 to 2*pi.
x0=6.5; %Define center (x0,y0) of circle and radius (r) y0=0; r=1.06066;
% loop through all the values of phi for i=1:length(phi), x2=x0+r*cos(phi(i)); %x2 and y2 trace out a circle. y2=y0+r*sin(phi(i));
%First do inverse kinematics to find angles... la=4.5; lb=3.75; [theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2, y2);
%Then do forward kinematics to find arm locations. %[xa ya xb yb] = forwardKinematics(la, lb, theta_a, theta_b);
pause(0.1); %delay 1/10 second
gotoAngles(s,theta_a,theta_b-theta_a,750);
end
%Draw and animate the arm;
numPts = 10; %the number of points in the animation
x2=linspace(6.5+r,6.5+r,numPts) %generate an array of x2 ... y2=linspace(r,-r,numPts) %... and y2 values to define a line.
% loop through all the values of x2 and y2 for i=0:numPts, x2=6.5+r y2=r-(i*(2*r/numPts))
%First do inverse kinematics to find angles... la=4.5; lb=3.75;
[theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2, y2);
pause(0.1); %delay 1/10 second
gotoAngles(s,theta_a,theta_b-theta_a,750); end
%Draw the second side; numPts = 10; %the number of points in the animation x2=linspace(6.5+r,6.5-r,numPts) %generate an array of x2 ... y2=linspace(-r,-r,numPts) %... and y2 values to define a line.
% loop through all the values of x2 and y2 for i=1:length(x2),
%First do inverse kinematics to find angles... la=4.5; lb=3.75;
[theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2(i), y2(i));
pause(0.1); %delay 1/10 second
gotoAngles(s,theta_a,theta_b-theta_a,750); end
%Draw the third side; numPts = 10; %the number of points in the animation x2=linspace(6.5-r,6.5-r,numPts) %generate an array of x2 ... y2=linspace(-r,r,numPts) %... and y2 values to define a line.
% loop through all the values of x2 and y2 for i=1:length(x2),
%First do inverse kinematics to find angles... la=4.5; lb=3.75;
[theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2(i), y2(i));
pause(0.1); %delay 1/10 second
gotoAngles(s,theta_a,theta_b-theta_a,750); end
%Draw the fourth side; numPts = 10; %the number of points in the animation x2=linspace(6.5-r,6.5+r,numPts) %generate an array of x2 ... y2=linspace(r,r,numPts) %... and y2 values to define a line.
% loop through all the values of x2 and y2 for i=1:length(x2),
%First do inverse kinematics to find angles... la=4.5; lb=3.75;
[theta_a, theta_b]= inverseKinematicsfunction(la, lb, x2(i), y2(i));
pause(0.1); %delay 1/10 second
gotoAngles(s,theta_a,theta_b-theta_a,750); end