![]() |
SensorLoopClosesPURPOSE
Checks if two sensor readigs can be properly registered.
SYNOPSIS
function [lc d n]=SensorLoopCloses(S,i,j)
DESCRIPTION
Checks if two sensor readigs can be properly registered. Checks if the sensor readings at time 'i'and those at time 'j' can be registered, i.e., if they allow to get the relative displacement between the two poses. If so the output 'lc' is set to true, 'd' is the (noisy) displacement between the two poses and 'n' is the noise of this displacement. In this particular type of sensors, only poses closer that a given threshold are registred. The threshold is set when defining the sensor (i.e., in the contructor) and we use the ground truth to assert whether or not two poses are close enough. CROSS-REFERENCE INFORMATION
This function calls:
SOURCE CODE
0001 function [lc d n]=SensorLoopCloses(S,i,j) 0002 % Checks if two sensor readigs can be properly registered. 0003 % 0004 % Checks if the sensor readings at time 'i'and those at time 'j' 0005 % can be registered, i.e., if they allow to get the relative displacement 0006 % between the two poses. If so the output 'lc' is set to true, 'd' is 0007 % the (noisy) displacement between the two poses and 'n' is the noise 0008 % of this displacement. 0009 % 0010 % In this particular type of sensors, only poses closer that a given 0011 % threshold are registred. The threshold is set when defining the sensor 0012 % (i.e., in the contructor) and we use the ground truth to assert whether 0013 % or not two poses are close enough. 0014 0015 Pi=S.groundTruth{i}; 0016 Pj=S.groundTruth{j}; 0017 0018 dij=Absolute2Relative(Pi,Pj); 0019 0020 s=size(dij); 0021 lc=true; 0022 i=1; 0023 while lc && (i<=s) 0024 lc=(abs(dij(i))<=S.matchArea(i)); 0025 i=i+1; 0026 end 0027 0028 if lc 0029 n=get(S,'noise'); 0030 % the output must be corrupted with noise 0031 d=AddNoise2Relative(dij,n); 0032 else 0033 d=0; 0034 n=0; 0035 end 0036 |