University of Sana’a
Faculty of Engineering
Mechatronics Eng. Department
MT502 - Robotics
Lab.1 : Introduction to Robotics Laboratory
Eng. Yahya AL-Lathi
Topics Covered In This Course
➢ Introduction to Robotics Laboratory:
- Introduction.
- Robot Position and Orientation.
➢ Robot kinematics (forward kinematics).
➢ Robot kinematics (Inverse kinematics).
➢ Differential Motions, Velocities and static forces.
➢ Robot Dynamic.
➢ Trajectory Planning.
➢ Force Control of manipulator.
Term Project:
➢ Chose any robot manipulator, and do the following:
1. Kinematics(Forward/Inverse).
2. Simulate and analysis the performance of the robot in Cartesian
space. (velocity analysis, trajectory planning )
3. Figures of the torque at each joint during the task.(Dynamic
Analysis).
4. Force Control of the robot.
Resources:
➢ Robotics, Vision & Control, second edition (Corke, 2017).
➢ Introduction to Robotics (3rd edition), John Craig, Wiley, 2004.
➢ Matlab Robotic Toolbox Documentation.
Robotic Toolbox Introduction
➢ Uses a very general method of representing the kinematics and dynamics of serial-link
manipulators as MATLAB® objects.
➢ Robot objects can be created by the user for any serial-link manipulator and a number of
examples are provided for well known robots from Kinova, Universal Robotics, Rethink as
well as classical robots such as the Puma 560 and the Stanford arm.
➢ The book Robotics, Vision & Control, second edition (Corke, 2017) is a detailed introduction
to mobile robotics, navigation, localization; and arm robot kinematics, Jacobians and
dynamics illustrated using the Robotics Toolbox for MATLAB.
➢ Introduction to Robotics (3rd edition), John Craig, Wiley, 2004. The exercises in this book
are based on an earlier version of the Robotics Toolbox for MATLAB.
➢ Matlab Robotic Toolbox Documentation. The detail documentation of the Robotics toolbox.
Robotic Toolbox
➢ Installation:
- Add the path of the library to the Matlab search path.
- Then enter the following command [startup_rvc].
>> startup_rvc
Robotics, Vision & Control: (c) Peter Corke 19922011
http://www.petercorke.com
− Robotics Toolbox for Matlab (release 9.10)
− pHRIWARE (release 1.1): pHRIWARE is
Copyrighted by Bryan Moutrie (2013-2017) (c)
Run rtbdemo to explore the toolbox
Robot Position and Orientation
➢ Position, Orientation and Transformation in 2-Dimension.
➢ Position, Orientation and Transformation in 3-Dimension
Position, Orientation and Transformation in 2-Dimension
2D – Position Representation (Point)
➢ We can define a point (3, 2) relative to the world frame, and then
plot the point, by the following code lines:
>> p=[4;7];
>>plot_point(p,'*');
2D – Position Representation (Frame)
➢ Create a translational transformation matrix:
>> transl2(4, 5) ans =
1 0 4
0 1 5
0 0 1
>> trplot2(transl2(4, 5));
2D –Rotation
➢ Rotation matrix representing a rotation of theta in radians:
>> rot2(pi/2) ans =
0.0000 -1.0000
1.0000 0.0000
➢ Homogeneous transformation (3 ×3) representing a rotation of
theta in radians:
>> trot2(pi/2)
ans =
0.0000 -1.0000 0
1.0000 0.0000 0
0 0 1.0000
2D-Planar Translation and Rotation Transformation
➢ We create a homogeneous transformation using the function se2:
which represents a translation of (1, 2) and a rotation of 30°:
>> T1=se2(2,3,60*pi/180)
T1 =
0.5000 -0.8660 2.0000
0.8660 0.5000 3.0000
0 0 1.0000
➢ We can plot this, relative to the world coordinate frame, by
>> axis([0 5 0 5])
>> trplot2(T1, 'frame', '1', 'color', 'b')
2D-Planar Translation and Rotation Transformation
➢ We can plot this, relative to the world coordinate frame, by
>> axis([0 5 0 5])
>> trplot2(T1, 'frame', '1', 'color', 'b')
Example
➢ Create the four homogeneous transformation with dimension as shown.
- Frame 1: Translation of (1,2) and rotation by 30.
- Frame 2: (see the Figure)
- Frame 3: is T1*T2
- Frame 4: is T2*T1
- point: (see the Figure).
➢ Create the point as a homogeneous form.
➢ Determine the coordinate of the point
with respect to frame {3}. P3 = ??
➢ Determine the coordinate of the point
with respect to frame {4}. P4 = ??
Example
➢ Create the four homogeneous transformation with dimension as shown.
- Frame 1: Translation of (1,2) and rotation by 30.
>> T1 = se2(1, 2, 30*pi/180);
- Frame 2: (see the Figure) >> T2 = se2(2, 1, 0);
- Frame 3: is T1*T2 >> T3 = T1*T2;
>> T4 = T2*T1;
- Frame 4: is T2*T1 >> P = [3 ; 2 ;1];
- point: (see the Figure). >> P3=inv(T3)*P
➢ Create the point as a homogeneous form. >> P4=inv(T4)*P
➢ Determine the coordinate of the point P3 =
-0.2679
with respect to frame {3}. -2.0000
1.0000
➢ Determine the coordinate of the point P4 =
with respect to frame {4}. -0.5000
-0.8660
1.0000
2D–Combine Translation and Rotation Transformation
➢ Example:
-translation of (3,4)
-rotation of -30 degrees
➢ Example:
-translation of (3,4)
-rotation of -30 degrees around the generated axis.
2D–Combine Translation and Rotation Transformation
➢ Example:
-translation of (3,4)
-rotation of -30 degrees
>> trot2(-pi/6)*transl2(3,4)
➢ Example:
-translation of (3,4)
-rotation of -30 degrees around the generated axis.
>>transl2(3,4)*trot2(-pi/6)
2D–Combine Translation and Rotation Transformation
➢ Compounding a number of elementary transformations:
1-rotation of -60 degrees.
2-translation of (2,1).
3-translation of (-1,2) along the generated axis.
4-rotation of 45.
2D–Combine Translation and Rotation Transformation
➢ Compounding a number of elementary transformations:
1-rotation of -60 degrees.
2-translation of (2,1).
3-translation of (-1,2) along the generated axis.
4-rotation of 45.
<<trot2(pi/4)*transl2(2,1)*trot2(-pi/3)*transl2(-1,2)
2D–Combine Translation and Rotation Transformation
Example:
➢ Find:
1-rotation of 180 degrees.
2-translation of (0,1).
3-translation of (-1,-1) along the generated axis.
4-rotation of -30 along the generated axis.
➢ Interpret the following :
>>transl2(2,4) * trot2(pi)* transl2(2,0)
2D–Combine Translation and Rotation Transformation
Example:
➢ Find:
1-rotation of 180 degrees.
2-translation of (0,1).
3-translation of (-1,-1) along the generated axis.
4-rotation of -30 along the generated axis.
<<transl2(0,1)*trot2(pi)*transl2(-1,-1)*trot2(-pi/6)
➢ Interpret the following :
>>transl2(2,4) * trot2(pi)* transl2(2,0)
Right to left: Left to Right: Another way(easy way start with rotation)
1-translation of (2,0) 1-translation of (2,4) 1-rotation of 180
2-rotation of 180 .(about fixed axis) 2-rotation of 180 (about moving axis) 2-translation of (2,4) (along fixed axis)
3-translation of (2,4) (along fixed axis) 3-translation of (2,0) (along moving axis) 3-translation of (2,0) (along moving axis)
2D–Combine Translation and Rotation Transformation
Exercise:
A-Find:
1-rotation of 90 degrees.
2-translation of (2,3).
3-rotation of -90 degrees about the generated axis.
4-translation of (-1,-2) along the generated axis.
5-rotation of -15.
>> trot2(-15*pi/180) * transl2(2,3) * trot2(pi/2)*trot2(-pi/2)* transl2(-1, -2)
B -Interpret the following (three different way)
>> trot2(-pi/6) * transl2(0,-3) * trot2(pi/4)* transl2(-5, 2)
Any Questions ?!
Eng. Yahya AL-Lathi