Report Robotics - MINI PROJECT - MCTE 4352 (2023)
Report Robotics - MINI PROJECT - MCTE 4352 (2023)
ROBOTICS
MCTE 4352
4. APPENDIX .......................................................................................................................... 14
2
1. FORWARD KINEMATICS ANALYSIS
From the frame analysis above, a Denavit–Hartenberg (DH) parameters can be obtained as
the following:
Table 1 DH Table
a α d θ
Link 0 - 1 a1 0 d1 θ1 *
Link 1 – 2 a2 0 0 θ2 *
Link 2 - 3 0 0 d3* 0
Link 3 -4 0 0 0 θ3 *
• a1 = 225
• a2 = 225
3
• d1 = 337
• d3 = 526
Robotics Toolbox (v10) by Peter Corke is used for all the numerical analyses. The SCARA
robot can be set up by defining all the links according to the DH parameters. Then, the links
MATLAB output
+---+-----------+-----------+-----------+-----------+-----------+
+---+-----------+-----------+-----------+-----------+-----------+
| 3| 0| q3| 0| 0| 0|
| 4| q4| 0| 0| 0| 0|
+---+-----------+-----------+-----------+-----------+-----------+
q1, q2, q3, q4 are links variable. They correspond to θ1*, θ2*, d3*, θ3* respectively.
MATLAB output
4
T =
1 0 0 450
0 -1 0 0
0 0 -1 335.4
0 0 0 1
T is a 4x4 matrix
5
2. PATH PLANNING
First, the coordinate for the letters (FAR) is determined. The resultant output of the outer
coordinate of the letters is in XY space. Hence, some adjustments are made in Microsoft
Excel to connect the incomplete path (to make it a closed loop) and addition of Z space.
6
The coordinates are then used to calculate inverse kinematics of the end-effector using
non-zeros.
The z position to write the text is set to be 106 to take into account the tip of the pen which is
Table 2 below shown the glyphs coordinates with the value of the joint variable that has been
calculated.
Table 2 Glyphs coordinate and joint variables (q1 and q2 are in radians)
7
27.90 -61.59 106.00 0.27 -2.84 231.00 0.00
28.65 -62.02 106.00 0.28 -2.84 231.00 0.00
29.68 -62.58 106.00 0.29 -2.83 231.00 0.00
30.76 -62.86 106.00 0.30 -2.83 231.00 0.00
31.89 -62.86 106.00 0.31 -2.83 231.00 0.00
33.61 -62.86 106.00 0.33 -2.82 231.00 0.00
33.61 -64.16 106.00 0.32 -2.82 231.00 0.00
13.15 -64.16 106.00 0.06 -2.85 231.00 0.00
13.15 -62.86 106.00 0.06 -2.86 231.00 0.00
14.84 -62.86 106.00 0.09 -2.85 231.00 0.00
16.80 -62.86 106.00 0.12 -2.85 231.00 0.00
18.23 -62.29 106.00 0.14 -2.85 231.00 0.00
19.13 -61.14 106.00 0.16 -2.86 231.00 0.00
19.69 -60.39 106.00 0.17 -2.86 231.00 0.00
19.97 -58.58 106.00 0.19 -2.87 231.00 0.00
19.97 -55.72 106.00 0.21 -2.88 231.00 0.00
19.97 -24.93 106.00 0.60 -3.00 231.00 0.00
19.97 -22.51 106.00 0.66 -3.01 231.00 0.00
19.82 -20.92 106.00 0.69 -3.01 231.00 0.00
19.51 -20.14 106.00 0.71 -3.02 231.00 0.00
19.28 -19.56 106.00 0.72 -3.02 231.00 0.00
18.80 -19.05 106.00 0.72 -3.02 231.00 0.00
18.07 -18.63 106.00 0.71 -3.03 231.00 0.00
17.06 -18.07 106.00 0.70 -3.03 231.00 0.00
15.98 -17.79 106.00 0.68 -3.04 231.00 0.00
14.84 -17.79 106.00 0.64 -3.04 231.00 0.00
13.15 -17.79 106.00 0.59 -3.04 231.00 0.00
13.15 -16.49 106.00 0.63 -3.05 231.00 0.00
48.62 -16.49 106.00 1.13 -2.91 231.00 0.00
49.08 -26.96 106.00 0.94 -2.89 231.00 0.00
47.85 -26.96 106.00 0.94 -2.90 231.00 0.00
47.24 -24.74 106.00 0.97 -2.90 231.00 0.00
46.53 -23.10 106.00 0.99 -2.91 231.00 0.00
45.72 -22.06 106.00 1.01 -2.92 231.00 0.00
44.91 -21.02 106.00 1.02 -2.92 231.00 0.00
43.92 -20.26 106.00 1.03 -2.93 231.00 0.00
42.73 -19.79 106.00 1.03 -2.93 231.00 0.00
41.55 -19.32 106.00 1.03 -2.94 231.00 0.00
39.71 -19.09 106.00 1.02 -2.95 231.00 0.00
37.23 -19.09 106.00 1.00 -2.96 231.00 0.00
26.72 -19.09 106.00 0.88 -3.00 231.00 0.00
26.72 -19.09 200.00 0.88 -3.00 137.00 0.00
80.68 -48.20 200.00 0.82 -2.72 137.00 0.00
80.68 -48.20 106.00 0.82 -2.72 231.00 0.00
62.23 -48.20 106.00 0.74 -2.79 231.00 0.00
58.99 -55.72 106.00 0.63 -2.78 231.00 0.00
8
58.20 -57.57 106.00 0.61 -2.78 231.00 0.00
57.80 -58.96 106.00 0.59 -2.77 231.00 0.00
57.80 -59.87 106.00 0.58 -2.77 231.00 0.00
57.80 -60.60 106.00 0.57 -2.77 231.00 0.00
58.14 -61.24 106.00 0.57 -2.76 231.00 0.00
58.83 -61.79 106.00 0.57 -2.76 231.00 0.00
59.53 -62.34 106.00 0.57 -2.76 231.00 0.00
61.02 -62.70 106.00 0.58 -2.75 231.00 0.00
63.32 -62.86 106.00 0.59 -2.74 231.00 0.00
63.32 -64.16 106.00 0.58 -2.74 231.00 0.00
48.30 -64.16 106.00 0.47 -2.78 231.00 0.00
48.30 -62.86 106.00 0.48 -2.79 231.00 0.00
50.30 -62.51 106.00 0.50 -2.78 231.00 0.00
51.59 -62.05 106.00 0.51 -2.78 231.00 0.00
52.17 -61.49 106.00 0.52 -2.78 231.00 0.00
53.37 -60.36 106.00 0.54 -2.78 231.00 0.00
54.69 -58.08 106.00 0.58 -2.79 231.00 0.00
56.14 -54.63 106.00 0.62 -2.79 231.00 0.00
72.91 -15.40 106.00 1.20 -2.81 231.00 0.00
74.14 -15.40 106.00 1.20 -2.80 231.00 0.00
90.74 -55.05 106.00 0.79 -2.67 231.00 0.00
92.07 -58.24 106.00 0.76 -2.65 231.00 0.00
93.29 -60.31 106.00 0.75 -2.64 231.00 0.00
94.38 -61.26 106.00 0.74 -2.64 231.00 0.00
95.47 -62.21 106.00 0.74 -2.63 231.00 0.00
96.98 -62.74 106.00 0.74 -2.62 231.00 0.00
98.93 -62.86 106.00 0.74 -2.61 231.00 0.00
98.93 -64.16 106.00 0.73 -2.61 231.00 0.00
80.12 -64.16 106.00 0.67 -2.68 231.00 0.00
80.12 -62.86 106.00 0.68 -2.69 231.00 0.00
82.02 -62.77 106.00 0.69 -2.68 231.00 0.00
83.30 -62.45 106.00 0.69 -2.67 231.00 0.00
83.97 -61.91 106.00 0.70 -2.67 231.00 0.00
84.64 -61.37 106.00 0.71 -2.67 231.00 0.00
84.97 -60.71 106.00 0.72 -2.67 231.00 0.00
84.97 -59.94 106.00 0.72 -2.68 231.00 0.00
84.97 -58.91 106.00 0.73 -2.68 231.00 0.00
84.50 -57.28 106.00 0.75 -2.68 231.00 0.00
83.57 -55.05 106.00 0.76 -2.69 231.00 0.00
79.70 -45.60 106.00 0.85 -2.73 231.00 0.00
71.61 -26.33 106.00 1.05 -2.80 231.00 0.00
63.32 -45.60 106.00 0.77 -2.79 231.00 0.00
79.68 -45.60 106.00 0.85 -2.73 231.00 0.00
79.68 -45.60 200.00 0.85 -2.73 137.00 0.00
149.94 -64.16 200.00 0.80 -2.40 137.00 0.00
149.94 -64.16 106.00 0.80 -2.40 231.00 0.00
9
137.21 -64.16 106.00 0.79 -2.45 231.00 0.00
121.08 -41.87 106.00 0.95 -2.56 231.00 0.00
119.88 -41.92 106.00 0.95 -2.57 231.00 0.00
118.91 -41.94 106.00 0.95 -2.57 231.00 0.00
118.16 -41.94 106.00 0.95 -2.58 231.00 0.00
117.86 -41.94 106.00 0.95 -2.58 231.00 0.00
117.53 -41.94 106.00 0.95 -2.58 231.00 0.00
117.18 -41.92 106.00 0.95 -2.58 231.00 0.00
116.82 -41.91 106.00 0.95 -2.58 231.00 0.00
116.46 -41.89 106.00 0.95 -2.58 231.00 0.00
116.09 -41.87 106.00 0.95 -2.59 231.00 0.00
116.09 -55.72 106.00 0.83 -2.56 231.00 0.00
116.09 -58.72 106.00 0.81 -2.56 231.00 0.00
116.41 -60.59 106.00 0.79 -2.55 231.00 0.00
117.07 -61.31 106.00 0.79 -2.55 231.00 0.00
117.96 -62.34 106.00 0.78 -2.54 231.00 0.00
119.30 -62.86 106.00 0.78 -2.53 231.00 0.00
121.08 -62.86 106.00 0.78 -2.53 231.00 0.00
122.94 -62.86 106.00 0.79 -2.52 231.00 0.00
122.94 -64.16 106.00 0.78 -2.52 231.00 0.00
102.52 -64.16 106.00 0.74 -2.60 231.00 0.00
102.52 -62.86 106.00 0.75 -2.60 231.00 0.00
104.31 -62.86 106.00 0.75 -2.59 231.00 0.00
106.32 -62.86 106.00 0.76 -2.59 231.00 0.00
107.77 -62.20 106.00 0.77 -2.58 231.00 0.00
108.63 -60.89 106.00 0.78 -2.58 231.00 0.00
109.13 -60.16 106.00 0.79 -2.58 231.00 0.00
109.37 -58.44 106.00 0.80 -2.58 231.00 0.00
109.37 -55.72 106.00 0.82 -2.59 231.00 0.00
109.37 -24.93 106.00 1.09 -2.64 231.00 0.00
109.37 -21.93 106.00 1.12 -2.64 231.00 0.00
109.04 -20.06 106.00 1.14 -2.64 231.00 0.00
108.39 -19.34 106.00 1.15 -2.65 231.00 0.00
107.47 -18.30 106.00 1.16 -2.65 231.00 0.00
106.11 -17.79 106.00 1.16 -2.66 231.00 0.00
104.31 -17.79 106.00 1.16 -2.67 231.00 0.00
102.52 -17.79 106.00 1.17 -2.67 231.00 0.00
102.52 -16.49 106.00 1.18 -2.68 231.00 0.00
119.88 -16.49 106.00 1.16 -2.60 231.00 0.00
124.95 -16.49 106.00 1.16 -2.57 231.00 0.00
128.68 -16.86 106.00 1.15 -2.56 231.00 0.00
131.08 -17.60 106.00 1.14 -2.54 231.00 0.00
133.48 -18.33 106.00 1.13 -2.53 231.00 0.00
135.52 -19.69 106.00 1.12 -2.52 231.00 0.00
137.20 -21.67 106.00 1.10 -2.51 231.00 0.00
138.87 -23.65 106.00 1.08 -2.50 231.00 0.00
10
139.71 -26.02 106.00 1.07 -2.50 231.00 0.00
139.71 -28.76 106.00 1.05 -2.50 231.00 0.00
139.71 -31.69 106.00 1.02 -2.49 231.00 0.00
138.76 -34.23 106.00 1.01 -2.50 231.00 0.00
136.85 -36.39 106.00 0.99 -2.50 231.00 0.00
134.94 -38.54 106.00 0.98 -2.51 231.00 0.00
131.98 -40.07 106.00 0.96 -2.52 231.00 0.00
127.97 -40.96 106.00 0.96 -2.54 231.00 0.00
137.81 -54.63 106.00 0.86 -2.47 231.00 0.00
140.06 -57.77 106.00 0.84 -2.45 231.00 0.00
142.00 -59.86 106.00 0.82 -2.44 231.00 0.00
143.61 -60.89 106.00 0.82 -2.43 231.00 0.00
145.23 -61.92 106.00 0.81 -2.42 231.00 0.00
147.34 -62.58 106.00 0.81 -2.41 231.00 0.00
149.94 -62.86 106.00 0.80 -2.40 231.00 0.00
149.94 -64.16 106.00 0.80 -2.40 231.00 0.00
149.94 -64.16 200.00 0.80 -2.40 137.00 0.00
116.09 -39.66 200.00 0.97 -2.59 137.00 0.00
116.09 -39.66 106.00 0.97 -2.59 231.00 0.00
116.53 -39.66 106.00 0.97 -2.59 231.00 0.00
116.92 -39.66 106.00 0.97 -2.59 231.00 0.00
117.25 -39.67 106.00 0.97 -2.58 231.00 0.00
117.57 -39.69 106.00 0.97 -2.58 231.00 0.00
117.84 -39.69 106.00 0.97 -2.58 231.00 0.00
118.05 -39.69 106.00 0.97 -2.58 231.00 0.00
122.60 -39.69 106.00 0.97 -2.56 231.00 0.00
126.03 -38.71 106.00 0.98 -2.55 231.00 0.00
128.34 -36.74 106.00 0.99 -2.54 231.00 0.00
130.65 -34.77 106.00 1.01 -2.53 231.00 0.00
131.80 -32.26 106.00 1.02 -2.53 231.00 0.00
131.80 -29.21 106.00 1.05 -2.53 231.00 0.00
131.80 -26.24 106.00 1.07 -2.54 231.00 0.00
130.87 -23.82 106.00 1.09 -2.54 231.00 0.00
129.01 -21.96 106.00 1.11 -2.55 231.00 0.00
127.14 -20.09 106.00 1.12 -2.56 231.00 0.00
124.68 -19.16 106.00 1.13 -2.57 231.00 0.00
121.61 -19.16 106.00 1.14 -2.59 231.00 0.00
120.25 -19.16 106.00 1.14 -2.59 231.00 0.00
118.41 -19.38 106.00 1.14 -2.60 231.00 0.00
116.09 -19.83 106.00 1.14 -2.61 231.00 0.00
116.09 -39.66 106.00 0.97 -2.59 231.00 0.00
116.09 -39.66 200.00 0.97 -2.59 137.00 0.00
11
Figure 5 FInal frame of the simulation
12
3. JOINT VARIABLES MOTION
13
4. APPENDIX
FontData= System.Drawing.Drawing2D.GraphicsPath();
text='FAR';
font=System.Drawing.FontFamily('Times New Roman');
disp(System.Drawing.FontStyle.Regular);
style=cast(System.Drawing.FontStyle.Regular,'int32');
emSize=72;
origin=System.Drawing.Point(0,0);
format=System.Drawing.StringFormat();
FontData.AddString(text,font,style,emSize,origin,format);
for i=1:FontData.PathPoints.Length
x(i)=FontData.PathPoints(i).X;
y(i)=-FontData.PathPoints(i).Y;
end
% plot(x,y)
result_matrix = [x ; y ];
14
%% Define the initial joint angles
theta = [0, 0, 1, 0]; % [theta1, theta2, theta3, theta4]
figure
plot3(path(:,1), path(:,2), path(:,3), ".-", "LineWidth", 1,
'MarkerSize',15); grid;
%[X Y Z]
15
16