0% found this document useful (0 votes)
53 views20 pages

Robots and Manipulators Matlab® Tutorials: Presentations

Uploaded by

Jeanne Daher
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views20 pages

Robots and Manipulators Matlab® Tutorials: Presentations

Uploaded by

Jeanne Daher
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Robots and Manipulators

Matlab® Tutorials
Presentations:
1. Introduction
2. 2D Geometry
3. 3D Geometry
4. Forward Kinematics
5. Inverse Kinematics
6. Velocity Kinematics in 3D
7. Paths and Trajectories
8. Robot Joint Control
9. Rigid Body Dynamics

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
• Creating a simple one link robot
• Define
• a1=1;
• q1=0.2; (in radians)
• In order to compute end-effector
pose a chain of elementary
homogeneous transformations to
be performed using the “trchain”
function in this case a rotation of
angle “q1” followed by a translation
along the link x-direction “a1”.
Finally passing the angle of interest
which is as well in this case “q1”

• You can import a defined planar


one link robot model using
“mdl_planar1” as displayed in the
right-window
• “p1” appears in the work
space as one-link serial-link
• You can experiment with this
robot thru the operation
“p1.teach” and varying the
“q1” at the bottom of the
window

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics

• Creating a simple two-links robot


• Define a1, a2, q1, and q2 whereby the “a”s are lengths of links and “q”s are joints’ angles
• In order to compute end-effector pose for this robot a chain of elementary homogeneous transformations should be performed
using the “trchain” function in this case
• Link 1
• a rotation by angle “q1” followed by a
• translation along the link x-direction “a1”.
• Link 2
• A rotation by angle “q2” followed by a
• translation along the link x-direction by “a2”
We pass [q1 q2] that represent the end-effector angles
• We can define the variables as symbols using the function “syms” and the whole transformation matrix will be represented
symbolically as shown
Prof. Dr.-Ing. Saleh M. Chehade
Forward Kinematics
• Importing a two-links robot with
having the name “p2”
• The instruction “p2.teach” will allow
to experiment with robot throw the
two joint angles “q1” and “q2”

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
• In the plotting examples of the 2-
links robot an interesting point is
that the robot can reach the same
position but with two different
orientations

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics

• For a 3-links robot


• Using a symbolic representation to show the position of the end-effector
• Defining in a symbolic form using the function “syms” the links
• Lengths “a1”, “a2”, and “a3”
• Angles “q1”, “q2”, and “q3”
• Finding the expression of the end-effector position symbolically using the function “trchain2”
• Extracting the x-component of the position of the end-effector which is the 1 st raw and 3rd column by using
• x=ans(1,3)

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
• Import a 3-links planar model
• The name “p3” represents the robot
• Use the instruction “p3.teach” to experiment with the
robot thru the angles “q1”, “q2”, and “q3”

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
• The end-effector position and orientation in 3D Joint 4
of this 4-degrees of freedom, i.e. 4-joints robot
is expressed by the below transformation E in
the picture Joint 3
• Below is the symbolic expression of the
transformation in Matlab Joint 2
• All the below are 3D transformations
• The sequence in the 3D chain function Joint 1
“trchain”
• Joint 1
• Rotate about z-axis (q1)
• Translate along z-axis (a1)
• Joint 2
• Rotate about y-axis (q2)
• Translate along z-axis (a2)
• Joint 3
• Rotate about y-axis (q3)
• Translate along z-axis (a3)
• Joint 4
• Rotate about y-axis (q4)
• Translate along z-axis (a4)

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 2-Links Planar Robot

Planar 2-links Robot


DH Parameters
i ai-1 di
1 0 a1 0 q1
2 0 a2 0 q2

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 2-Links Planar Robot

• Define the DH
parameters of the 2-
links planar Robot
and store them in
“dh” which is a 2x4
matrix
• Create a serial link
“r” based on the DH
table using the
“SerialLink” function

• The output of the function is a table showing the DH kinematics table (note the organization
of the table is different)
• Plot the 2-links robot with a [0.2 0.3] radians orientation using the function “r.plot([0.2 0.2])”
• The result is shown to the right

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 2-Links Planar Robot

• You can add a teach pendant to the robot using the function “r.teach”
• The robot will a appear with a teach pendant with the variable parameters in the bottom “q1”
and “q2” for experimentation

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 2-Links Planar Robot

• Using the forward kinematics function “fkine” for robot “r” in the form “r.fkine”
with joint angles [0.2 0.3] in radians will result in the position & orientation
for the end-effector
• The resulting transformation matrix is orientation red square and
position blue square

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 6-degrees of Freedom Robot

Planar 2-links Robot


DH Parameters
i ai-1 di
1 0.0000 0.0000 q1
2 0 0.4318 0.0000 q2
3 - 0.0203 0.1500 q3
4 0.0000 0.4318 q4
5 - 0.0000 0.0000 q5
6 0 0.0000 0.0000 q6

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 6-degrees of Freedom Robot

• Load the robot model Puma560 using the instruction “mdl_puma560”


• Keying in “p560” will result of the current DH table of the robot
• In the workspace far right there are the stored variables
• qz representing zero angle configuration of the robot
• qr representing the ready configuration: the arm is straight and vertical
• qs representing the stretch configuration: the arm is straight and horizontal
• qn representing the nominal configuration: the arm is in a dextrous working pose
• Plotting the p560 using the instruction “p560.plot()” with the option of “qz” representing the zero-angle configuration

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 6-degrees of Freedom Robot

• You can add a teach pendant using the instruction “p560.teach”


• The six joint angles q1, q2, q3, q4, q5, and q6 will appear giving the possibility to experiment with the robot through
varying these angles.

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 6-degrees of Freedom Robot
• Define “qc” as a new
orientation of the Robot
• Use the “fkine” function to find
the end-effector position and
orientation for joint angle set
“qc”
• Plot “qc” using the function
“p560.plot(qc)” to see the
robot in this configuration

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 6-degrees of Freedom Robot
• Using the entry “p560.base” will give the position and
orientation of the base of the robot.
• As apparent in the red square the base is
positioned at the origin of world coordinate frame
with no orientation
• Defining a new position for the base by allocating new
values to “p560.base”,
• i.e. 10 in the x-direction, 15 in the y-direction, and
2 in the z-direction (blue square)

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 6-degrees of Freedom Robot
• Having changes the base position of the robot in the
previous slide, we recalculate the new position of the
end-effector using the forward kinematics function
“fkine” in the form “p560.fkine” with the same rotation
angles used previously (red square)

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 6-degrees of Freedom Robot
• We can perform a compounded transformation to the
position of the base of the robot
• a translation of [10, 15, 2] using the “transl”
function
• a rotation of 90o about the x-axis using the
function “trotx”
• the functions and the result are in the red box
• Afterwards, we can compute the position and
orientation of the end-effector taking into consideration
the new base position and orientation and the set of
joints’ angles [0.1 0.2 0.3 0 0 0] by the using the forward
kinematics function “fkine” in the form “p560.fkine” (see
the green box)
• Under this base change the robot will be upside
down

Prof. Dr.-Ing. Saleh M. Chehade


Forward Kinematics
Denavit-Hartenberg Parameters
• 6-degrees of Freedom Robot
• We can perform a transformation to the tool position of
the robot
• a translation of [0, 0, 0.2] in the z-direction using
the “transl” functionthe functions and the result
are in the red box
• Afterwards, we can compute the position and
orientation of the end-effector taking into consideration
the new tool position and orientation using the same set
of joints’ angles [0.1 0.2 0.3 0 0 0] by the using the
forward kinematics function “fkine” in the form
“p560.fkine” (see the green box)
• You can observe a slight change only in the
position portion in the end-effector position and
orientation compared to the previous cases (see
blue box)

Prof. Dr.-Ing. Saleh M. Chehade

You might also like