Institut de Robòtica i Informàtica Industrial

get

PURPOSE ^

Get function for poses.

SYNOPSIS ^

function out=get(P,field)

DESCRIPTION ^

 Get function for poses.

 Retrives information from a pose. In the current implementation poses
 are defined in SO(2) thus, the fiels you can query are 'x', 'y', and
 'orientation'

CROSS-REFERENCE INFORMATION ^

This function calls:
This function is called by:

SOURCE CODE ^

0001 function out=get(P,field)
0002 % Get function for poses.
0003 %
0004 % Retrives information from a pose. In the current implementation poses
0005 % are defined in SO(2) thus, the fiels you can query are 'x', 'y', and
0006 % 'orientation'
0007 
0008   switch field
0009     case 'spaceDim'
0010       out=2; % 2D poses are defined in a 2D space
0011     case 'x'
0012       out=P.data(1);
0013     case 'y'
0014       out=P.data(2);
0015     case 'orientation'
0016       out=P.data(3);
0017     otherwise
0018       error('Unknow field in Pose get');
0019   end
0020


Institut de Robòtica i Informàtica Industrial

Generated on Fri 24-Jul-2009 12:32:50 by m2html © 2003