Institut de Robòtica i Informàtica Industrial

get

PURPOSE ^

Generic get function for filters.

SYNOPSIS ^

function out=get(F,field)

DESCRIPTION ^

 Generic get function for filters.

 Retives information from a filter. This basically returns the
 informations common to all filters.

 Possible fields to query are:
   - initialState: The Gaussian with the estimation of the initial pose
        of the robot.
   - nSteps: Simulation steps executed by the filter.
   - nStates: The number of poses in the trajectory estimated by the
        filter. In general we store one pose for each step but some 
        filters (TRO filter) remove redundant poses. In this case 
        we have less estates than steps.
   - dim: Dimensionality of the poses in the estimated trajectory.
   - covariances: Returns a cell array with the marginal covariances for
        each one of the poses stored in the filter. Note that different
        filters provide different covariance estimations.
   - crossCovariances: Retuns a cell array with the cross-covariances
        between all the poses stored in the filter and the current 
        robot's pose.
   - loops: Cell array with all loops closed so far.
   - nLoops: The number of loops closed so far.

CROSS-REFERENCE INFORMATION ^

This function calls:
  • get Get function for robots.
  • get Get function for trajectories.
  • size Number of poses in a trajectory.
  • GetCrossCovarianceWithPose Cross covariance of a given pose with the current one.
  • GetPoseEstimation Estimation of a given pose.
  • get Get function for EKF filters.
  • GetCrossCovarianceWithPose Cross covariance of a given pose with the current one.
  • GetPoseEstimation Estimation of a given pose.
  • get Generic get function for filters.
  • size Size of the state estimated in the filter
  • GetCrossCovarianceWithPose Cross covariance of a given pose with the current one.
  • GetPoseEstimation Estimation of a given pose.
  • 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.
  • get Get function for poses.
  • size Number of parameters of the pose.
  • 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(F,field)
0002 % Generic get function for filters.
0003 %
0004 % Retives information from a filter. This basically returns the
0005 % informations common to all filters.
0006 %
0007 % Possible fields to query are:
0008 %   - initialState: The Gaussian with the estimation of the initial pose
0009 %        of the robot.
0010 %   - nSteps: Simulation steps executed by the filter.
0011 %   - nStates: The number of poses in the trajectory estimated by the
0012 %        filter. In general we store one pose for each step but some
0013 %        filters (TRO filter) remove redundant poses. In this case
0014 %        we have less estates than steps.
0015 %   - dim: Dimensionality of the poses in the estimated trajectory.
0016 %   - covariances: Returns a cell array with the marginal covariances for
0017 %        each one of the poses stored in the filter. Note that different
0018 %        filters provide different covariance estimations.
0019 %   - crossCovariances: Retuns a cell array with the cross-covariances
0020 %        between all the poses stored in the filter and the current
0021 %        robot's pose.
0022 %   - loops: Cell array with all loops closed so far.
0023 %   - nLoops: The number of loops closed so far.
0024 
0025   switch field
0026     case  'initialState'
0027       out=F.initEstimation;
0028       
0029     case 'nStates'
0030       out=F.nStates;
0031       
0032     case 'nSteps'
0033       out=F.nSteps;
0034       
0035     case 'dim'
0036       out=F.dim;
0037       
0038     case 'covariances'
0039       out=cell(1,F.nStates);
0040       for i=1:n
0041         out{i}=get(GetPoseEstimation(F,F.State2Step(F,i)),'covariance');
0042       end
0043       
0044     case 'crossCovariances'
0045       out=zeros(F.nStates*F.dim,F.dim);
0046       for i=1:n
0047         ind=(i-1)*dim+1:i*dim;
0048         out(ind)=GetCrossCovarianceWithPose(F,F.State2Step(F,i));
0049       end
0050       
0051     case 'loops'
0052       out=F.loops;
0053       
0054     case 'nLoops'
0055       out=size(F.loops,2);
0056       
0057     otherwise
0058       error('Unknown field in Filter get');
0059   end


Institut de Robòtica i Informàtica Industrial

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