KEMBAR78
Lab 1 Robotics | PDF | Cartesian Coordinate System | Rotation
0% found this document useful (0 votes)
13 views9 pages

Lab 1 Robotics

The document outlines the assessment rubrics for a Biomedical Robotics Lab course, focusing on students' ability to use software tools for kinematic modeling and simulation of robotic manipulators. It details performance indicators ranging from exemplary to unsatisfactory in conducting experiments and simulations. Additionally, it provides an overview of transformation matrices, rotation matrices, and tasks related to MATLAB programming for robotic applications.

Uploaded by

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

Lab 1 Robotics

The document outlines the assessment rubrics for a Biomedical Robotics Lab course, focusing on students' ability to use software tools for kinematic modeling and simulation of robotic manipulators. It details performance indicators ranging from exemplary to unsatisfactory in conducting experiments and simulations. Additionally, it provides an overview of transformation matrices, rotation matrices, and tasks related to MATLAB programming for robotic applications.

Uploaded by

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

Assessment Rubrics

BME-411L BIOMEDICAL ROBOTICS LAB


LAB NUMBER __________ DATE:

[a] The students will be able to use Matlab/RoboAnalyzer and other softwares for kinematic modelling,
trajectory generation and simulation of robotic manipulators (P2) PLO5.

Sr Performance Exemplary Satisfactory Developing Unsatisfactory (0 Marks


.# Indicator (5-4 Marks) (3-2 Marks) (2-1 Marks) Marks)
Realization of Fully understands Need guidance to Poor Incapable of
1 Experiments the software tools understands the understanding understanding the tool
[a] including its software tools of software tools and conducting the
purpose and able including its purpose including its experiment
to conduct the and need help to purpose and
experiment conduct the conduct the
experiment experiment with
errors

Simulation Accurately Conducts simulation Conducts Unable to conducts


2 and Results conducts with minor error simulation with simulation
[a] simulation and major error
accounts for
errors and
parameters that
affect
experimental
results
Lab#1
Transformation Matrices In MATLAB
1.1 Aim And Objectives
The main objectives of this lab are the following:
• To learn the homogenous transformation matrix that represents rotation and translation
in space.
1.2 Rotation matrix
In robotics, the orientation of a robotic system can be represented in mathematical terms
using rotation matrices. The orientation of a body in space can be described by attaching a
coordinate system to it and then describing the vectors of its coordinate axes relative to a known
frame of reference. The three vectors in three-dimensional space can be combined to achieve a
3x3 matrix called a rotation matrix. If we are working in 2-dimensional space then the order of
a rotation matrix will be 2 x 2. Similarly, the order of a rotation matrix in n-dimensional space
is n x n.
In transforming vectors in three-dimensional space, rotation matrices are often encountered.
Rotation matrices are used in two senses: they can be used to rotate a vector into a new position
or they can be used to rotate a coordinate basis (or coordinate system) into a new one. In this
case, the vector is left alone but its components in the new basis will be different from those in
the original basis. In Euclidean space, there are three basic rotations: one each around the x, y,
and z axes. Each rotation is specified by an angle of rotation. The rotation angle is defined to
be positive for a rotation that is counterclockwise when viewed by an observer looking along
the rotation axis toward the origin. Any arbitrary rotation can be composed of a combination
of these three.
1.2.1 Rotation about x-axis
The Counterclockwise rotation around x-axis:

𝟏 𝟎 𝟎
Rx(α) =[𝟎 𝒄𝒐𝒔𝜶 −𝒔𝒊𝒏𝜶]
𝟎 𝒔𝒊𝒏𝜶 𝒄𝒐𝒔𝜶

Figure 1.1 Rotation about x-axis


1.2.2 About y-axis:
Counterclockwise rotation around y-axis:

𝒄𝒐𝒔𝜷 𝟎 𝒔𝒊𝒏𝜷
Ry(β) = [ 𝟎 𝟏 𝟎 ]
−𝒔𝒊𝒏𝜷 𝟎 𝒄𝒐𝒔𝜷

Figure 1.2 Rotation about y-axis


1.2.3 About z-axis
Counterclockwise rotation around z-axis

𝟎 𝟎 𝟏
Rz(γ) = [𝒄𝒐𝒔𝜸 −𝒔𝒊𝒏𝜸 𝟎]
𝒔𝒊𝒏𝜸 𝒄𝒐𝒔𝜸 𝟎

Figure 1.3 Rotation about z-axis


➢ In MATLAB:
• Syntax
R = rotx(ang)
It creates a 3-by-3 matrix for rotating a 3-by-1 vector or 3-by-N matrix of vectors around the
x-axis by ang degrees. When acting on a matrix, each column of the matrix represents a
different vector. For the rotation matrix R and vector v, the rotated vector is given by R*v.

Rx=rotx(90) %matrix for a rotation of a vector around the x-axis by 90°.


Ry=roty(90) %matrix for a rotation of a vector around the y-axis by 90°.
Rz=rotz(90) %matrix for a rotation of a vector around the z-axis by 90°.

Rx =
1 0 0
0 0 -1
0 1 0
Ry =
0 0 1
0 1 0
-1 0 0
Rz =
0 -1 0
1 0 0
0 0 1
1.3 Transformation Matrix
In the field of robotics there are many possible ways of representing positions and orientations,
but the homogeneous transformation is well matched to MATLAB’s powerful tools for matrix
manipulation. Homogeneous transformations describe the relationships between Cartesian
coordinate frames in terms of translation and orientation. The transformation matrix has the
following structure:

It is a 4-by-4 matrix, which represent the rotation as well as the translation. The first three
columns present the rotation and fourth column present the translation. The transformation
matrix is found by multiplying the translation matrix by the rotation matrix.

It can be written as:


AP=A T.BP
B

➢ In MATLAB
• Syntax:
tform = rotm2tform(rotm)
It converts the rotation matrix, rotm, into a homogeneous transformation matrix, tform. The
input rotation matrix must be in the pre-multiply form for rotations. When using the
transformation matrix, pre-multiply it with the coordinates to be transformed (as opposed to
post-multiplying).
Example:
The given shows a frame {B}, which is rotated relative to frame (A} about z by 30 degrees,
translated 10 units in XA, and translated 5 units in YA . Find Ap, where Bp =[3 0.07 0]T
Figure 1.4 Frame{B} rotated and translated

rotm=rotz(30)% rotation of[B] relative to {A} around the z-axis by 30°.


trans=[10;5;0;1] %transation of {B} 10 units in XA and 5 unit in YA .
Pb=[3;7;0;1]
tform = rotm2tform(rotm)%transformation matrix of rotm.
tform(:,4)=trans %adding trans as row 4 in tform
Pa=tform*Pb%

tform =
0.8660 -0.5000 0 10.0000
0.5000 0.8660 0 5.0000
0 0 1.0000 0
0 0 0 1.0000
Pa =
9.0981
12.5622
0
1.0000
1.4 Tasks:
1. A vector Ap is rotated about YA by 30 degrees and is subsequently rotated about XA by
45 degrees. Give the rotation matrix that accomplishes these rotations in the given order
by using MATLAB.
2. The given figure shows a frame {B} that is rotated relative to frame {A} about Z by 30
degrees. Here, Z is pointing out of the page. Given Bp=[0 2 0]T . Calculate AP =ABR.BP
using MATLAB.

Figure 1.5 {B} rotated about Z by 30°

A -1 B A T
a. By using the rotation matrix generated in above problem prove that BR = AR= BR

using MATLAB.
3. A velocity vector is given by
10
[20]
30
0.866 −0.500 0 11
0.50 0.866 0 −3
[ ]
0 0 1 9
0 0 0 1
Compute AV.
4. The above figure shows a frame {B} that is rotated relative to frame {A} about Z by
30 degrees and translated four units in XA and three units in Thus, we have a description
A
BT obtained from above problem, Find BAT.
5. Consider a frame {B}, which is rotated relative to frame (A} about y by 10 degrees,
translated 2 units in XA, and translated 3 units in YA . Find Ap, where Bp =[2 1.07 1]T .
1.4 Tasks:

Task 1:

The total rotation matrix is found by multiplying the rotation matrices for Y and X.

MATLAB Code & Output:

Task 2:

Given:

 Bp=[0,2,0]T
 Rotation about Z by 30°

MATLAB Code & Output:


Part a:

MATLAB Code & Output:

Task 3:

MATLAB Code & Output:


Task 4:

Given:

 Rotation about Z by 30°


 Translation of 4 units in XA and 3 units in YA

MATLAB Code & Output:

Task 5:

 Rotation about Y by 10°


 Translation: 2 units in XA , 3 units in YA
 Bp=[2,1.07,1]T

MATLAB Code & Output:

You might also like