Robotics Homework 2
Robotics Homework 2
Kuka KR 5 ARC, a 6 DOF industrial robot, is given in Fig. 1. For this robot manipulator system:
It can be seen from figure 3 that the type of the joints is revolute -shown in figure 2- which
constrains the motion of two bodies to pure rotation along a common axis.
1
For the dimensions, figure 4 shows the dimensions which is given in the data-sheet.
To assign the coordinate frames, the kinematic diagram is sketched due to the rules given below
and the positive directions were taken the same as figure 3.
Start:
for i = 0 to n − 1
end
STEP 2: Establish the base frame
for i = 0 to n − 1
end
STEP 6: Establish the ”Tool Frame”
STEP 7: Create DH Table
end
2
Figure 5: Kinematic diagram
c. DH-table.
By applying the rules given above, the DH-table is found as given below.
3
n ai /mm αi / (◦ ) di /mm θi / (◦ ) θn / (◦ )
For the given table above, the initial condition of the joints is drawn using MATLAB and given
below,
4
d. The forward kinematic model of the robot manipulator by means of the DH
table
Where,
cθi −sθi cαi sθi sαi ai cθi
cos (θi ) − sin (θi ) cos (αi ) sin (θi ) sin (αi ) ai cos (θi )
sθi cθi cαi −cθi sαi ai sθi
sin (θi ) cos (θi ) cos (αi ) − cos (θi ) sin (αi ) ai sin (θi )
Ai = =
(2)
0 sin (αi ) cos (αi ) di
0 s αi cαi di
0 0 0 1
0 0 0 1
By substituting in equation 2 (using the code given in page 7), A1 , A2 , A3 , A4 , A5 & A6 are found
as,
cos [θ1 ] 0 sin [θ1 ] 0.18cos [θ1 ] cos [θ2 ] −sin [θ2 ] 0 0.6cos [θ2 ]
sin [θ1 ] θ −cos [θ1 ] 0.18sin [θ1 ] sin [θ2 ] cos [θ2 ] 0 0.6sin [θ2 ]
A1 =
, A2
=
0 1 0 0.4 0 0 1 0
0 0 0 1 0 0 0 1
cos [θ3 ] 0 sin [θ3 ] 0.12cos [θ3 ] cos [θ4 ] 0 sin [θ4 ] 0
sin [θ3 ] 0 −cos [θ3 ] 0.12sin [θ3 ] sin [θ4 ] 0 −cos [θ4 ] 0
A3 =
, A4
=
0 1 0 0 0 1 0 0.62
0 0 0 1 0 0 0 1
cos [θ5 ] 0 sin [θ5 ] 0 cos [θ6 ] −sin [θ6 ] 0 0
sin [θ5 ] θ −cos [θ5 ] 0 sin [θ6 ] cos [θ6 ] 0 0
A5 =
, A6 =
0 1 0 0 0 0 1 0.115
0 0 0 1 0 0 0 1
T60 = A1 A2 A3 A4 A5 A6 (3)
5
e. Proving that the forward kinematic model is correct.
i. Choosing two separate suitable operating points for all joints considering the range
of motion of the axes listed in the data-sheet of the robot manipulator.
Using the data-sheet, the table below is giving the range of the motion for each axis.
6
ii. Calculating the position and orientation of the tip point with respect to the base
frame for each case using MATLAB symbolic toolbox.
The code given below is used to calculate the position and orientation of the tip point with respect
to the base frame for each case.
7
The results of the code are given below, For,
cos (θi ) − cos (αi ) sin (θi ) sin (αi ) sin (θi ) ai cos (θi )
sin (θi ) cos (αi ) cos (θi ) − sin (αi ) cos (θi ) ai sin (θi )
A=
(5)
0 sin (αi ) cos (αi ) di
0 0 0 1
(6)
sin (θ1 ) (sin (θ4 ) cos (θ5 ) cos (θ6 ) − sin (θ6 ) cos (θ4 )) + cos (θ1 ) (sin (θ2 + θ3 ) sin (θ5 ) cos (θ6 ) + cos (θ2 + θ3 ) (sin (θ4 ) sin (θ6 ) + cos (θ4 ) cos (θ5 ) cos (θ6 ))) cos (θ6 ) (sin (θ4 ) cos (θ1 ) cos (θ2 + θ3 ) − sin (θ1 ) cos (θ4 )) − sin (θ6 ) (sin (θ1 ) sin (θ4 ) cos (θ5 ) + cos (θ1 ) (sin (θ2 + θ3 ) sin (θ5 ) + cos (θ2 + θ3 ) cos (θ4 ) cos (θ5 ))) sin (θ1 ) sin (θ4 ) sin (θ5 ) + cos (θ1 ) (sin (θ5 ) cos (θ2 + θ3 ) cos (θ4 ) − sin (θ2 + θ3 ) cos (θ5 )) 0.115 sin (θ1 ) sin (θ4 ) sin (θ5 ) + cos (θ1 ) (−0.12 sin (θ2 ) sin (θ3 ) + 0.62 sin (θ2 + θ3 ) + cos (θ2 ) (0.12 cos (θ3 ) + 0.6) − 0.115 sin (θ2 + θ3 ) cos (θ5 ) + 0.115 sin (θ5 ) cos (θ2 + θ3 ) cos (θ4 ) + 0.18)
T06 =
sin (θ1 ) sin (θ2 + θ3 ) sin (θ5 ) cos (θ6 ) + cos (θ1 ) (sin (θ6 ) cos (θ4 ) − sin (θ4 ) cos (θ5 ) cos (θ6 )) + sin (θ1 ) cos (θ2 + θ3 ) (sin (θ4 ) sin (θ6 ) + cos (θ4 ) cos (θ5 ) cos (θ6 )) cos (θ1 ) (cos (θ4 ) cos (θ6 ) + sin (θ4 ) sin (θ6 ) cos (θ5 )) + sin (θ1 ) (cos (θ2 + θ3 ) (sin (θ4 ) cos (θ6 ) − sin (θ6 ) cos (θ4 ) cos (θ5 )) − sin (θ2 + θ3 ) sin (θ5 ) sin (θ6 )) sin (θ5 ) (sin (θ1 ) cos (θ2 + θ3 ) cos (θ4 ) − sin (θ4 ) cos (θ1 )) − sin (θ1 ) sin (θ2 + θ3 ) cos (θ5 ) sin (θ1 ) (−0.12 sin (θ2 ) sin (θ3 ) + 0.62 sin (θ2 + θ3 ) + cos (θ2 ) (0.12 cos (θ3 ) + 0.6) − 0.115 sin (θ2 + θ3 ) cos (θ5 ) + 0.115 sin (θ5 ) cos (θ2 + θ3 ) cos (θ4 ) + 0.18) − 0.115 sin (θ4 ) sin (θ5 ) cos (θ1 )
sin (θ2 + θ3 ) sin (θ4 ) sin (θ6 ) + cos (θ6 ) (sin (θ2 + θ3 ) cos (θ4 ) cos (θ5 ) − sin (θ5 ) cos (θ2 + θ3 )) sin (θ2 + θ3 ) sin (θ4 ) cos (θ6 ) + sin (θ6 ) (sin (θ5 ) cos (θ2 + θ3 ) − sin (θ2 + θ3 ) cos (θ4 ) cos (θ5 )) sin (θ2 ) (sin (θ3 ) (0.62 − 0.115 cos (θ5 )) + 0.12 cos (θ3 ) + 0.6) + cos (θ2 ) (0.12 sin (θ3 ) + cos (θ3 ) (0.115 cos (θ5 ) − 0.62)) + 0.115 sin (θ2 + θ3 ) sin (θ5 ) cos (θ4 ) + 0.4
cos (θ2 + θ3 ) cos (θ5 ) + sin (θ2 + θ3 ) sin (θ5 ) cos (θ4 )
0. 0. 0. 1.
The determinant of both homogeneous transformation matrices are equal to one which proves the
correctness of the calculations.
8
Question 2
Joint No Joint Type Joint Offset (b) m Joint Angle (θ) deg Link Length (a) m Twist Angle (α) deg Initial Value (JV) deg or m Final Value (JV) deg or m
1 Revolute 0.4 Variable 0.18 90 0 60
2 Revolute 0.135 Variable 0.6 180 0 60
3 Revolute 0.135 Variable 0.12 −90 0 60
4 Revolute 0.62 Variable 0 90 0 60
5 Revolute 0 Variable 0 −90 0 60
6 Revolute 0.115 Variable 0 0 0 60
There are three major differences between the previously found DH-table and the table defined in
the program. The first one is the initial values, which are by default taken as 0 for all joints. The
second difference is the twist angle (α), which is due to the different axis assignments. The positive
rotation in the data-sheet is different from the built-in on RoboAnalyzer program which results
this different values. The third one is the distance offset appearing in joint 2 and 3 that did not
taken into considirations while writing the D-H table given in table 1.
9
b. Defining an initial configuration for the joint parameters and calculating the
position and orientation of tip point with respect to base frame
n θi / ( ◦ ) θn / ( ◦ )
1 0 +/ − 155◦
2 90 +65◦ to −180◦
3 0 +158◦ to −15◦
4 0 +/ − 350◦
5 90 +/ − 130◦
6 0 +/ − 350◦
10
i. calculating the position and orientation of tip point with respect to base frame
in MATLAB using the forward kinematic model.
1 J0 =[0,90,0,0,90,0]*(pi/180);
2 AJ0=subs(forwardModel,thetavec,J0)
ii. calculating the position and orientation of tip point with respect to base
frame in RoboAnalyzer program.
Joint No Joint Type Joint Offset (b) m Joint Angle (θ) deg Link Length (a) m Twist Angle (α) deg Initial Value (JV) deg or m Final Value (JV) deg or m
1 Revolute 0.4 Variable 0.18 90 0 60
2 Revolute 0.135 Variable 0.6 180 90 60
3 Revolute 0.135 Variable 0.12 −90 0 60
4 Revolute 0.62 Variable 0 90 0 60
5 Revolute 0 Variable 0 −90 90 60
6 Revolute 0.115 Variable 0 0 0 60
11
The difference appearing in orientation and position matrices is due to the different frame assignments.
This is proved by giving the angle that makes the RoboAnalyzer Kuka KR 5 ARC Manipulator
tool frame in the same initial position for the pre-assigned axis frames as shown below,
By changing the initial value of revolute joint 5 to -90, the same position matrix is found as shown
below,
−1 0 0 0.800
0 −1 0 0
Ti =
0 0 1 1.235
0 0 0 1
−1 0 0 0.800
Figure 10: Changed the tool frame in
Ri = 0 −1 0 , Oi =
0
RoboAnalyzer to match MATLAB model
0 0 1 1.235
12
c. Assigning two separate suitable trajectories starting from initial configuration
for all joints considering the range of motion of the axes listed in the datasheet
of the robot [Link] plotting tip point trajectories with respect to base
frame for each case.
i. plotting tip point trajectories with respect to base frame for each case in
MATLAB using the forward kinematic model.
13
For J1,
For J2,
14
ii. plotting tip point trajectories with respect to base frame for each case in
RoboAnalyzer program via graph mode.
Although they having similarities, the graphs are not the same due to the difference in the initial
operating point orientation and position. Moreover, the acceleration information is not added to
the MATLAB plot.
15