Home > arte3.2.0 > RAPID > functions > transform_to_homogeneous.m

transform_to_homogeneous

PURPOSE ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

SYNOPSIS ^

function T=transform_to_homogeneous(robtarget)

DESCRIPTION ^

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   T=transform_to_homogeneous(robtarget)

   Given a robot target specified in RAPID as a position and quaternion.
   Transform it to a position/orientation specified by a matrix T of position/orientation
   
   Author: Arturo Gil. Universidad Miguel Hernández de Elche
   Date: 05/05/2012
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0002 %   T=transform_to_homogeneous(robtarget)
0003 %
0004 %   Given a robot target specified in RAPID as a position and quaternion.
0005 %   Transform it to a position/orientation specified by a matrix T of position/orientation
0006 %
0007 %   Author: Arturo Gil. Universidad Miguel Hernández de Elche
0008 %   Date: 05/05/2012
0009 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0010 
0011 % Copyright (C) 2012, by Arturo Gil Aparicio
0012 %
0013 % This file is part of ARTE (A Robotics Toolbox for Education).
0014 %
0015 % ARTE is free software: you can redistribute it and/or modify
0016 % it under the terms of the GNU Lesser General Public License as published by
0017 % the Free Software Foundation, either version 3 of the License, or
0018 % (at your option) any later version.
0019 %
0020 % ARTE is distributed in the hope that it will be useful,
0021 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0022 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0023 % GNU Lesser General Public License for more details.
0024 %
0025 % You should have received a copy of the GNU Leser General Public License
0026 % along with ARTE.  If not, see <http://www.gnu.org/licenses/>.
0027 function T=transform_to_homogeneous(robtarget)
0028 
0029 %position, do not transform to meters
0030 pos = robtarget(1:3); 
0031 Q = robtarget(4:7);
0032 
0033 T = quaternion2T(Q);
0034 T(1:3,4)=pos';

Generated on Fri 03-Jan-2014 12:20:01 by m2html © 2005