Institut de Robòtica i Informàtica Industrial

SimOdometry

PURPOSE ^

Simulated Odometry sensor constructor.

SYNOPSIS ^

function O=SimOdometry(varargin)

DESCRIPTION ^

 Simulated Odometry sensor constructor.

 Simulated odometry sensors are useful to test algorithm with ground truth
 available.
 
 The possible parameters are:
     - Another simulated odometry sensor.
     - The sensor noise and a noiless trajectory from where to generate the
       noisy simulated sensor readings.

CROSS-REFERENCE INFORMATION ^

This function calls:
  • AddNoise2Trajectory Adds noise to a trajectory.
  • size Number of poses in a trajectory.
  • size Size of the state estimated in the filter
  • size Size (rows/columns) of an interval matrix.
  • Absolute2Relative Relative displacement between two poses.
  • size Number of parameters of the pose.
  • RelPosSensor Relative Position Sensor constructor.
  • size Number of readings stored in the Sensor.
This function is called by:

SOURCE CODE ^

0001 function O=SimOdometry(varargin)
0002 % Simulated Odometry sensor constructor.
0003 %
0004 % Simulated odometry sensors are useful to test algorithm with ground truth
0005 % available.
0006 %
0007 % The possible parameters are:
0008 %     - Another simulated odometry sensor.
0009 %     - The sensor noise and a noiless trajectory from where to generate the
0010 %       noisy simulated sensor readings.
0011 
0012   switch nargin
0013     case 1
0014       % Copy constructor
0015       if isa(varargin{1},'SimOdometry')
0016         O=varargin{1};
0017       else
0018         error('Sensor copy constructor used with an non SimOdometry object');
0019       end
0020       
0021     case 2 % noise + trajectory
0022       noise=varargin{1};
0023       
0024       Tn=AddNoise2Trajectory(varargin{2},noise);
0025       
0026       n=size(Tn)-1;
0027       data=cell(1,n);
0028       for i=1:n
0029         data{i}=Absolute2Relative(Tn{i},Tn{i+1});
0030       end
0031       
0032       S=RelPosSensor(noise,data);
0033       
0034       O=class(struct([]),'SimOdometry',S);
0035    
0036     otherwise
0037       error('Defining a SimOdometry sensor with the wrong number of parameters');   
0038   end


Institut de Robòtica i Informàtica Industrial

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