Institut de Robòtica i Informàtica Industrial

get

PURPOSE ^

Generic get for relative positioning sensors

SYNOPSIS ^

function out=get(S,field,varargin)

DESCRIPTION ^

 Generic get for relative positioning sensors

 Retrives information about a relative positioning sensor.

 The possible fields to retive are:
     - relativeDisplacements: The relative displacements of the robot
       according to this sensor.
     - absolutePoses: The pose of the robot along time according to this 
       sensor.
     - all the fields in a generic sensor.

CROSS-REFERENCE INFORMATION ^

This function calls:
  • get Get function for robots.
  • get Get function for trajectories.
  • size Number of poses in a trajectory.
  • get Get function for EKF filters.
  • get Generic get function for filters.
  • size Size of the state estimated in the filter
  • get Get function for TRO filters.
  • get Get function for BTrees.
  • get Get function for PoseData objects.
  • get Get function for Gaussians.
  • size Size (rows/columns) of an interval matrix.
  • Relative2Absolute Adds a displacement to a pose.
  • get Get function for poses.
  • size Number of parameters of the pose.
  • Pose Generic pose constructor.
  • get Generic get for relative positioning sensors
  • get Generic get for sensors
  • size Number of readings stored in the Sensor.
This function is called by:

SOURCE CODE ^

0001 function out=get(S,field,varargin)
0002 % Generic get for relative positioning sensors
0003 %
0004 % Retrives information about a relative positioning sensor.
0005 %
0006 % The possible fields to retive are:
0007 %     - relativeDisplacements: The relative displacements of the robot
0008 %       according to this sensor.
0009 %     - absolutePoses: The pose of the robot along time according to this
0010 %       sensor.
0011 %     - all the fields in a generic sensor.
0012 %
0013 
0014   switch field
0015     
0016     case 'relativeDisplacements'
0017       out=get(SB.RawSensor,'allReadings');
0018       
0019     case 'absolutePoses'
0020       n=size(S);
0021       if n==0
0022         out=0;
0023       else
0024         out=cell(1,n+1);
0025         if nargin>2
0026           out{1}=Pose(varargin{1});
0027         else
0028           d=size(get(S,'reading',1)); % dim of the poses
0029           out{1}=Pose(zeros(d,1));
0030         end
0031         for i=1:n
0032           out{i+1}=Relative2Absolute(out{i},get(S,'reading',i));
0033         end
0034       end      
0035     otherwise
0036       out=get(S.Sensor,field,varargin{1:end});
0037   end
0038


Institut de Robòtica i Informàtica Industrial

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