Code covered by the BSD License
-
DYN_CL_B1(t,X)
DYNAMIC ANALYSIS : CLOSED LOOP B1
-
DYN_CL_B2(t,X)
DYNAMIC ANALYSIS : CLOSED LOOP B2
-
DYN_CL_B3(t,X)
DYNAMIC ANALYSIS : DYNAMIC ANALYSIS CLOSED LOOP B3
-
DYN_OL(t,X)
DYNAMIC ANALYSIS : Open Loop
-
ERROR_PLOT_1(tspan,X,h,txt1)
ERROR CALCULATION FOR KINEMATIC ANALYSIS
-
ERROR_PLOT_2(tspan,X,h,txt1)
ERROR CALCULATION FOR DYNAMIC ANALYSIS
-
TAU_SIM=FIND_TAU_SIM(tspan,X)
CALCULATES TORQUE BASED ON JOINT SPACE INFORMATION FROM KINEMATIC
-
TH=invbot(X)
RETURN JOINT SPACE ANGLES FOR A GIVEN END EFFECTOR POSITION
-
TH=invbot2(X,th)
RETURN JOINT SPACE ANGLES FOR A GIVEN END EFFECTOR POSITION AND AN
-
[THETA_DES]=TH_DES_INFO(t,X)
EVALUATES DESIRED THETA, THETA_DOT, THETA_DOTDOT AT ANY GIVEN TIME
-
[dX]=KIN_CLJS(t,X)
KINEMATIC ANALYSIS: CLOSED LOOP JOINT SPACE CONTROL
-
[dX]=KIN_CLTS(t,X)
KINEMATIC ANALYSIS CLOSED LOOP TASK SPACE CONTROL
-
[dX]=KIN_OL(t,X)
KINEMATIC ANALYSIS: OPEN LOOP
-
plotbot_js(t,X,index,txt1)
FUNCTION FOR PLOTTING THE SIMULATED OUTPUT FOR A GIVEN TIME VECTOR AND
-
dyn_main.m
-
DYN-CLOSED LOOP-B1 (Kp=10000,...
-
DYN-CLOSED LOOP-B2 (Kp=1000,K...
-
DYN-CLOSED LOOP-B3 (Kp=100,Kd...
-
DYN-OPEN LOOP.avi
-
KIN-CLOSED LOOP-JS (Kp=100,10...
-
KIN-CLOSED LOOP-TS (Kx=100,10...
-
OPEN LOOP.avi
-
View all files
from
Kinematic/Dynamic Control of a Two Link Manipulator
by Hrishi Shah
Kinematic and Dynamic models of a Two Link Manipulator undergo non-linear feedback linearization.
|
| plotbot_js(t,X,index,txt1)
|
%%% FUNCTION FOR PLOTTING THE SIMULATED OUTPUT FOR A GIVEN TIME VECTOR AND
%%% JOINT SPACE ANGLE VECTORS
% Course: Robotic Manipulation and Mobility
% Advisor: Dr. V. Krovi
%
% Homework Number: 4
%
% Names: Sourish Chakravarty
% Hrishi Lalit Shah
function plotbot_js(t,X,index,txt1)
global l1 l2 rx ry ell_an start_an w A B
aviobj = avifile([txt1,'.avi'],'compression','Cinepak'); % Declare an avi object
h=figure(index*3-2);
cla('reset');
axis manual;
axis([-3 3 -3 3]);
hold on;
grid on;
c_ell_an=cos(ell_an);
s_ell_an=sin(ell_an);
plot(A+rx*cos(w*t)*c_ell_an-ry*sin(w*t)*s_ell_an,...
B+rx*cos(w*t)*s_ell_an+ry*sin(w*t)*c_ell_an,'-k');
title(txt1);
for i=1:length(t)
th1=X(i,1);
th2=X(i,2);
x1=l1*cos(th1);
y1=l1*sin(th1);
x2=x1+l2*cos(th2);
y2=y1+l2*sin(th2);
% plot([0 x1 x2],[0 y1 y2]);
plot(x2,y2,'ro');
% pause(0.03);
pause(0.1); %Stop execution for 0.01 to make animation visible
frame= getframe(gcf); %Step 2: Grab the frame
aviobj = addframe(aviobj,frame); % Step 3: Add frame to avi object
end
aviobj = close(aviobj) % Close the avi object
hold off
% axis equal;
|
|
Contact us at files@mathworks.com