Institut de Robòtica i Informàtica Industrial

GetPoseData

PURPOSE ^

Defines a PoseData objects from the information stored in the filter.

SYNOPSIS ^

function pd=GetPoseData(F,varargin)

DESCRIPTION ^

 Defines a PoseData objects from the information stored in the filter.

 If only the filter F is given, then the output is a cell array with the
 PoseData objects with one entry for each one of the poses estimated by
 the filter.

 If we give a particular time, then the output is the PoseData object
 for the particular pose obtained at the given time.

 The PoseData objects include the time for the pose (this is used as
 an identifier), the mean, the marginal covariance, and data related 
 with the cross-covariance of the pose with respect to the current 
 robot's pose (matrix \Phi in the paper).

 See also PoseData.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
  • Simulation Simulates a robot performing Pose SLAM.

SOURCE CODE ^

0001 function pd=GetPoseData(F,varargin)
0002 % Defines a PoseData objects from the information stored in the filter.
0003 %
0004 % If only the filter F is given, then the output is a cell array with the
0005 % PoseData objects with one entry for each one of the poses estimated by
0006 % the filter.
0007 %
0008 % If we give a particular time, then the output is the PoseData object
0009 % for the particular pose obtained at the given time.
0010 %
0011 % The PoseData objects include the time for the pose (this is used as
0012 % an identifier), the mean, the marginal covariance, and data related
0013 % with the cross-covariance of the pose with respect to the current
0014 % robot's pose (matrix \Phi in the paper).
0015 %
0016 % See also PoseData.
0017 
0018   if nargin>1
0019     step=varargin{1};
0020     state=Step2State(F,step);
0021     if state<1
0022       pd=0;
0023     else
0024       m=GetPoseMean(F,step);
0025       S=GetPoseCovariance(F,step);
0026       CS=GetCrossCovarianceWithPose(F,step);
0027       pd=PoseData(m,S,CS,step);
0028     end
0029   else
0030     % get all PoseDatas
0031     nStates=get(F,'nStates');
0032     pd=cell(1,nStates);
0033     for i=1:nStates
0034       step=State2Step(F,i);
0035       m=GetPoseMean(F,step);
0036       S=GetPoseCovariance(F,step);
0037       CS=GetCrossCovarianceWithPose(F,step);
0038       pd{i}=PoseData(m,S,CS,step);
0039     end
0040   end


Institut de Robòtica i Informàtica Industrial

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