6 views

Uploaded by Hamza Ali Imran

Robotics Lab manuals

- Cuadrivectores Diego Saa
- Three-Dimensional Object Recognition from Single Two-Dimensional Images
- 4-Rigid
- tutHomography04
- Cambridge International Examinations General Certificate of Education Ordinary Level
- Indirect Perception Chap11
- SPRK Lightning Lab Programming Block Hints _ Sphero
- 1376
- Advance Steel 2011 Training Manual
- Microtexture Tracking in Hot-Deformed Polycrystalline Aluminium- Experimental Results
- 00042140.pdf
- Transformations
- Intro To Robotics (Grubler's formula practice Question)
- Lecture+34
- Average load, load+factor, demand factor and diversity factor easy slides
- Lab_08_itr Intro to robotics
- Lecture+39
- entrepreneurship
- Load Characteristics, load curve, load factor and max demand detals slides
- Lecture1_DSP_16012017

You are on page 1of 11

EL424

LABORATORY MANUAL

Spring 2018

LAB 01

Coordinate Transformations in Robotics Using MATLAB

Engr. Iqra Akram

STUDENT NAME ROLL NO SEC

______________________________________

LAB ENGINEER SIGNATURE & DATE

________________________________________________________________

NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES (NUCES), ISLAMABAD

Last Edited by: Engr. Iqra Akram Date: 22Jan, 2018

Verified by: Dr. Mukhtar Ullah Date: 22Jan, 2018

Coordinate Transformations in Robotics LAB: 01

LAB: 01 Coordinate Transformations in Robotics

1. Learning Objectives:

a. Introduction To MATLAB Robotics Toolbox

b. Understanding of Translation Vector

c. Understanding Rotation Matrix

d. Understanding of Euler Angles

e. Coordinates trnasformation

2. Equipment Required:

MATLAB

PC

3. Introduction

In robotics applications, many different coordinate systems can be used to define where

robots, sensors, and other objects are located. In general, the location of an object in 3-D

space is defined by its position and orientation. There are multiple possible representations

for these quantities, some of which are specific to certain applications. Translation and

rotation are alternative terms for position and orientation. Robotics System Toolbox™

supports representations that are commonly used in robotics and allows you to convert

between them. You can transform between coordinate systems when you apply these

representations to 3-D points. These supported representations are detailed below with brief

explanations of their usage and numeric equivalent in MATLAB®. Each representation has

an abbreviation for its name. This is used in the naming of arguments and conversion

functions that are supported in this toolbox. Robotics System Toolbox assumes that positions

and orientations are defined in a right-handed Cartesian coordinate system.

What is Translation:

In a translation transformation all the points in the object are moved in a straight line in the

same direction. The size, the shape and the orientation of the image are the same as that of the

original object. Same orientation means that the object and image are facing the same

direction.

Coordinate Transformations in Robotics LAB: 01

What is Rotation:

In linear algebra, a rotation matrix is a matrix that is used to perform a rotation in Euclidean

space. For example, using the convention below, the matrix rotates points in the xy-plane

counterclockwise through an angle θ about the origin of the Cartesian coordinate system. To

perform the rotation using a rotation matrix R, the position of each point must be represented

by a column vector v, containing the coordinates of the point. A rotated vector is obtained by

using the matrix multiplication Rv.

Rotation in 3D:

Coordinate Transformations in Robotics LAB: 01

Euler Angle:

Syntax

rotm = axang2rotm(axang)

Description

rotm = axang2rotm(axang) converts a rotation given in axis-angle form, axang, to an orthonormal

rotation matrix,rotm. When using the rotation matrix, premultiply it with the coordinates to be rotated

(as opposed to postmultiplying).

Syntax

tform = axang2tform(axang)

Description

tform = axang2tform(axang) converts a rotation given in axis-angle form, axang, to a homogeneous

transformation matrix, tform. When using the transformation matrix, premultiply it with the

coordinates to be transformed (as opposed to postmultiplying).

Syntax

rotm = eul2rotm(eul)

rotm = eul2rotm(eul,sequence)

Description

Coordinate Transformations in Robotics LAB: 01

rotm = eul2rotm(eul) converts a set of Euler angles,eul, to the corresponding rotation matrix, rotm.

When using the rotation matrix, premultiply it with the coordinates to be rotated (as opposed to

postmultiplying). The default order for Euler angle rotations is 'ZYX'.

Syntax

eul = eul2tform(eul)

tform = eul2tform(eul,sequence)

Description

eul = eul2tform(eul) converts a set of Euler angles,eul, into a homogeneous transformation

matrix, tform. When using the transformation matrix, premultiply it with the coordinates to be

transformed (as opposed to postmultiplying). The default order for Euler angle rotations is 'ZYX'.

Syntax

axang = rotm2axang(rotm)

Description

axang = rotm2axang(rotm) converts a rotation given as an orthonormal rotation matrix, rotm, to the

corresponding axis-angle representation, axang. The input rotation matrix must be in the premultiply

form for rotations.

Syntax

eul = rotm2eul(rotm)

eul = rotm2eul(rotm,sequence)

Description

eul = rotm2eul(rotm) converts a rotation matrix, rotm, to the corresponding Euler angles, eul. The

input rotation matrix must be in the premultiply form for rotations. The default order for Euler angle

rotations is 'ZYX'.

Syntax

tform = rotm2tform(rotm)

Description

tform = rotm2tform(rotm) converts the rotation matrix,rotm, into a homogeneous transformation

matrix, tform. The input rotation matrix must be in the premultiply form for rotations. When using the

transformation matrix, premultiply it with the coordinates to be transformed (as opposed to

postmultiplying).

Syntax

axang = tform2axang(tform)

Description

axang = tform2axang(tform) converts the rotational component of a homogeneous

transformation, tform, to an axis-angle rotation, axang. The translational components

Introduction to Robotics NUCES, ISLAMABAD Page 5 of 11

Coordinate Transformations in Robotics LAB: 01

oftform are ignored. The input homogeneous transformation must be in the premultiply form

for transformations.

Syntax

eul = tform2eul(tform)

eul = tform2eul(tform, sequence)

Description

eul = tform2eul(tform) extracts the rotational component from a homogeneous

transformation, tform, and returns it as Euler angles, eul. The translational components

of tform are ignored. The input homogeneous transformation must be in the premultiply form

for transformations. The default order for Euler angle rotations is 'ZYX'.

Syntax

rotm = tform2rotm(tform)

Description

rotm = tform2rotm(tform) extracts the rotational component from a homogeneous

transformation, tform, and returns it as an orthonormal rotation matrix, rotm. The

translational components of tform are ignored. The input homogeneous transformation must

be in the pre-multiply form for transformations. When using the rotation matrix, premultiply

it with the coordinates to be rotated (as opposed to postmultiplying).

Syntax

trvec = tform2trvec(tform)

Description

trvec = tform2trvec(tform) extracts the Cartesian representation of translation vector, trvec ,

from a homogeneous transformation, tform. The rotational components of tform are ignored.

The input homogeneous transformation must be in the premultiply form for transformations.

Syntax

hom = cart2hom(cart)

Description

hom = cart2hom(cart) converts a set of points in Cartesian coordinates to homogeneous

coordinates.

Syntax

cart = hom2cart(hom)

Description

cart = hom2cart(hom) converts a set of homogeneous points to Cartesian coordinates.

Coordinate Transformations in Robotics LAB: 01

14- Convert translation vector to homogeneous transformation

Syntax

tform = trvec2tform(trvec)

Description

tform = trvec2tform(trvec) converts the Cartesian representation of a translation vector, trvec,

to the corresponding homogeneous transformation, tform. When using the transformation

matrix, premultiply it with the coordinates to be transformed (as opposed to postmultiplying).

MATLAB Toolbox

Task 1.

i. [1 0 0 pi]

Task 2.

Convert axis-angle rotation to homogeneous transformation

i. [0 1 0 pi/2]

Task 3.

i. [0 0 pi/2]

Task 4.

i. [0 0 pi/2]

Task 5.

i. [1 0 0 ; 0 -1 0; 0 0 -1]

Task 6.

i. [1 0 0 ; 0 -1 0; 0 0 -1]

Task 7.

Introduction to Robotics NUCES, ISLAMABAD Page 7 of 11

Coordinate Transformations in Robotics LAB: 01

Convert rotation matrix to homogeneous transformation

i. [1 0 0 ; 0 -1 0; 0 0 -1]

Task 8.

i. [1 0 0 0; 0 0 -1 0; 0 1 0 0; 0 0 0 1]

Task 9.

i. [1 0 0 0.5; 0 -1 0 5; 0 0 -1 -1.2; 0 0 0 1]

Task 10.

i. [1 0 0 0.5; 0 -1 0 5; 0 0 -1 -1.2; 0 0 0 1]

Task 11.

i. [1 0 0 0.5; 0 -1 0 5; 0 0 -1 -1.2; 0 0 0 1]

Task 12.

Task 13.

Task 14.

Coordinate Transformations in Robotics LAB: 01

i. [0.5 6 100];

Coordinate Transformations in Robotics LAB: 01

Submission Declaration by the Student:

In submitting this lab write-up to the Lab Engineer/Instructor, I hereby declare that:

I have performed all the practical work myself

I have noted down actual measurements in this writeup from my own working

I have written un-plagarised answers to various questions

I have/have not obtained the desired objectives of the lab.

Reasons of not obtaining objectoves (if applicable): _________________________________

___________________________________________________________________________

___________________________________________________________________________

___________________________________________________________________________

___________________________

Student’s signature and Date

The Lab Engineer can separate this page from the writeup and keep it for his/her own record.

It must be signed by the student with date on it.

Lab Work: objectives achieved (correctness of measurements, calculations, answers to

questions posed, conclusion) ________/30

Lab Writeup: Neatness, appropriateness, intime submission ________/10

Troubleshooting: Were the student able to troubleshoot his/her work when it was

purposedly changed? ________/10

TOTAL: ________/50

Encircle your choice. -2 means poorest/worst/extremely inadequate/irrevlevant, 0 gives an

average score, and +2 means best/most relevant/most adequate.

Did the student remain focused on his/her work during lab? -2 -1 0 1 2

Rate student's behaviour with fellows/staff/Lab Engineer? -2 -1 0 1 2

Did the student cause any distraction during the Lab?-2 -1 0 1 2

Was the student found in any sort of plagiarism? -2 -1 0 1 2

__________________________________________________________________________

__________________________________________________________________________

__________________________________________________________________________

__________________________________________________________________________

___________________________

Lab Engineer’s signature and Date

Coordinate Transformations in Robotics LAB: 01

Student's feedback:[Separate this page; fill it; drop in the Drop Box.]

Providing feedback for every lab session is optional. No feedback means you are

satisified

The Lab Committee will consider only duly filled forms submitted within one week after

the lab

This feedabck is for LAB session: LAB Number: _____, Date: _____________________

General (to provide feedback on a persistent practice/ocurrence in LABs).

Your current CGPA is in the range 4.00 to 3.00/2.99 to 2.00/1.99 to 1.00/0.99 to 0.00

For a Particular

Who conducted the LAB? __________________________________________________

Actual Start time: _______________ Total Duration of Lab: _______________________

Instruction Duration: _________________ Practical Duration: _____________________

LAB writeup available before LAB?Yes/No with the Photocopier/in LAB/in SLATE

Had the theory related to lab been covered in theory class?Yes/No

Encircle your choice. -2 means poorest/worst/extremely inadequate/irrevlevant, 0 gives an

average score, and +2 means best/most relevant/most adequate.

Instruction How much did you understand about the practical? -2 -1 0 +1 +2

Session How much content was irrelevant to the practical? -2 -1 0 +1 +2

Did the instructor allowed Q/A and discussion? -2 -1 0 +1 +2

Practical Did you get sufficient time for practical? -2 -1 0 +1 +2

Presence in lab at all time? -2 -1 0 +1 +2

Ability to convey? -2 -1 0 +1 +2

Lab Readiness to help during practical? -2 -1 0 +1 +2

Engineer Readiness to discuss theoretical aspects? -2 -1 0 +1 +2

Helps in troubleshooting? -2 -1 0 +1 +2

Guides hows & whys of troubleshooting? -2 -1 0 +1 +2

How friendly was the lab staff? -2 -1 0 +1 +2

Staff Presence of staff throughout the lab session? -2 -1 0 +1 +2

Impact of availability of staff on your practical? -2 -1 0 +1 +2

Performance of Electronic Instruments? -2 -1 0 +1 +2

Equipment Performance of Breadboard/experiment kit? -2 -1 0 +1 +2

Performance of circuit components esp. ICs? -2 -1 0 +1 +2

Overall Your overall rating for the whole lab session? -2 -1 0 +1 +2

__________________________________________________________________________

__________________________________________________________________________

- Cuadrivectores Diego SaaUploaded byquiksilver21
- Three-Dimensional Object Recognition from Single Two-Dimensional ImagesUploaded byinaveen
- 4-RigidUploaded byMarfizal
- tutHomography04Uploaded byrajibe
- Cambridge International Examinations General Certificate of Education Ordinary LevelUploaded byVarun Panicker
- Indirect Perception Chap11Uploaded bycamiloventuri
- SPRK Lightning Lab Programming Block Hints _ SpheroUploaded byseagull70
- 1376Uploaded byArun Kumar Singh
- Advance Steel 2011 Training ManualUploaded byBeratErtekin
- Microtexture Tracking in Hot-Deformed Polycrystalline Aluminium- Experimental ResultsUploaded bywalidnasri
- 00042140.pdfUploaded byLabo Dolon
- TransformationsUploaded byVersha Rustagi

- Intro To Robotics (Grubler's formula practice Question)Uploaded byHamza Ali Imran
- Lecture+34Uploaded byHamza Ali Imran
- Average load, load+factor, demand factor and diversity factor easy slidesUploaded byHamza Ali Imran
- Lab_08_itr Intro to roboticsUploaded byHamza Ali Imran
- Lecture+39Uploaded byHamza Ali Imran
- entrepreneurshipUploaded byHamza Ali Imran
- Load Characteristics, load curve, load factor and max demand detals slidesUploaded byHamza Ali Imran
- Lecture1_DSP_16012017Uploaded byHamza Ali Imran
- Lab_09_itr (2)Intro to roboticsUploaded byHamza Ali Imran
- Lab_07_itr (1)Intro to roboticsUploaded byHamza Ali Imran
- Lab_06_itr (1)Intro to roboticsUploaded byHamza Ali Imran
- Lecture+30Uploaded byHamza Ali Imran
- electromagentic problemsUploaded byHamza Ali Imran
- Packet Sniffing and IPv4 HeaderUploaded byHamza Ali Imran
- Q1 sol part 1 aUploaded byHamza Ali Imran
- Lecture+29Uploaded byHamza Ali Imran
- Lecture+31Uploaded byHamza Ali Imran
- HW2EMT.pdfUploaded byHamza Ali Imran
- Lecture+28Uploaded byHamza Ali Imran
- A Survey of Transport Protocols ForWireless SensorUploaded byHamza Ali Imran
- Lecture+27Uploaded byHamza Ali Imran

- unit-7-gyroscope-english.pdfUploaded byChiến Thần
- AP Equilibrium TorqueUploaded byManP13
- 06 TranslationsAndRotationsCombinedUploaded bytamustafa85
- Chapter+11fallUploaded byEdgar
- Rotational Motion NotesUploaded byTvissha Goel
- GyroscopeUploaded bymayank3478
- rotational_motion_paper-3.pdfUploaded byBhardwaj Rajinder Sippy
- AttitudeUploaded byShreya Jaiswal
- Robotics Lab Manual FinalUploaded bySanthosh
- Multiple Choice RotationUploaded byJohnathan Brown
- Kinematics of Rigid BodyUploaded byKhairul Yahyah
- 810T OperatingUploaded byJose Maria Castro
- catia v5 detail drafting1Uploaded byPramod Guruswamy
- Transformation MatrixUploaded byStephanie Fleming
- Blender 3DUploaded byatxranchhand
- dilara-teaching resource 2Uploaded byapi-400216304
- Abb KinematicsUploaded byAndres Auza
- ch10Uploaded byDeep Narula
- Torue Wrench Calibration ProcedureUploaded bySantosh Mulay
- GyroscopeUploaded byShaik Himam Saheb
- Practice Tesraewdsfewqt - Chapter 9Uploaded byMatthew Stein
- translation and rotationUploaded bygbonete
- CG Manual 2011 OnlyUploaded byabhiraj1234
- homogene.pdfUploaded bymilltonny
- 557Uploaded byNeev Tighnavard
- HW2_0329Uploaded byShu Shujaat Lin
- 11 Rotation and torque.pptUploaded byPutri S
- RM-5Uploaded bySoumen Goswami
- Rotational_Equilibrium_and_Rotational_DynamicsUploaded byAbdullah Arabiyat
- Kinematics P_ME_KNM_20_21_22.pdfUploaded byRaghav Mishra