Robotics Lab
Robotics Lab
Lab Report # 5
Submitted to: Engr. Shehbaz Khan
Submitted by: Abdul Moiz Qarni
Section: A
Registration # 17PWMCT0564
Due Date: 20th January 2021
1
Contents
Introduction .................................................................................................................................... 3
Objective ......................................................................................................................................... 3
Solution ........................................................................................................................................... 3
1) Current Reference Frame: ................................................................................................... 3
2) Fixed Frame: ........................................................................................................................... 6
Conclusion ....................................................................................................................................... 9
References .................................................................................................................................... 10
2
Rigid Motions and Homogeneous
Transformation
Introduction
In robotics, the orientation of a robotic system can be represented in mathematical terms using
rotation matrices. Rotation matrices transform the coordinate axes (e.g. x, y, and z)
representing the orientation of a 3D object in one frame to the coordinate axes of another
frame. These matrices can help us determine how the end effector of a robot changes its
orientation due to changes in a robotic arm’s angle [1]
These matrix manipulation can very well be doing by hand using basic mathematics but gets
impractical in practice, therefore we can use premade toolboxes such as “Robotics, Vision and
Control” toolbox, which is an add-on in Matlab, developed by Peter Corke. [2]
Objective
The main objective of this lab is to proof through graphical representation, calculation and
Matlab commands:
Solution
1) Current Reference Frame:
Let’s start off with initially a robotic manipulation, as an example let’s consider the following
robotic manipulation in the attachment below.
3
Figure 1 Current Frame graphical representation pt1
4
Figure 2 Current Frame graphical representation pt2
1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0
0 1 0 2 0 1 0 0 0 0 −1 0 0 1 0 0
𝐻 = ∗ ∗ ∗
0 0 1 0 0 0 1 3 0 1 0 0 0 0 1 5
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
1 0 0 0
0 0 1 7
𝑝0 =
0 −1 0 3
0 0 0 1
Finally for the Matlab part:
We write the following code in our Matlab:
5
R = transl(0,2,0)*transl(0,0,3)*trotx(-90,'deg')*transl(0,0,5)
trplot(R)
tranimate(R)
2) Fixed Frame:
The same robotic manipulation would be used as in the part 1:
6
Figure 5 Fixed Frame graphical representation pt1
7
Figure 6 Fixed Frame graphical representation pt2
1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0
0 0 −1 0 0 1 0 0 0 1 0 −3 0 1 0 0
𝐻 = ∗ ∗ ∗
0 1 0 0 0 0 1 2 0 0 1 0 0 0 1 5
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
1 0 0 0
0 0 1 7
𝑝0 =
0 −1 0 3
0 0 0 1
Finally for the Matlab part:
We write the following code in our Matlab:
R = trotx(-90,'deg')*transl(0,0,2)*transl(0,-3,0)*transl(0,0,5)
trplot(R)
tranimate(R)
8
This gives us two outputs:
1) The transformation Matrix
Conclusion
As noticeable that both the results from fixed and from current frame are equal this normally
shouldn’t be the case if there is more than one rotation matrix, but since in the case of this
example, there was only one rotation matrix, both conditions of having a fixed frame versus
current frame yielded the same result.
9
References
10