Institut de Robòtica i Informàtica Industrial

SearchInTree

PURPOSE ^

Search nearest-neighbours using a Btree

SYNOPSIS ^

function rs=SearchInTree(T,F,matchArea,s,c)

DESCRIPTION ^

 Search nearest-neighbours using a Btree

 Searches nearest-neighbours using a balanced tree of poses as described
 in Section VI-C of the paper.

 Input parameters
   - T The BTree to search.
   - F The Filter to use in the search
   - matchArea The area around the previous pose where the new pose should
               be to be considered a neighbour (this is vector 'v' in the
               papers).
   - s The probability threshold.
   - c The BTree node from where to start the search. This must be the
     root node for the initial call.

 See also SearchInTree, BTree, TreeDetectLoops.

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.
  • SearchInTree Search nearest-neighbours using a Btree
  • get Get function for BTrees.
  • ProbDistance2PoseDataAboveThreshold p=ProbDistance2PoseDataAboveThreshold(PD,F,t,pt)
  • 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:
  • TreeDetectLoops Propose loops based on the distance between poses using a tree for the search.
  • SearchInTree Search nearest-neighbours using a Btree

SOURCE CODE ^

0001 function rs=SearchInTree(T,F,matchArea,s,c)
0002 % Search nearest-neighbours using a Btree
0003 %
0004 % Searches nearest-neighbours using a balanced tree of poses as described
0005 % in Section VI-C of the paper.
0006 %
0007 % Input parameters
0008 %   - T The BTree to search.
0009 %   - F The Filter to use in the search
0010 %   - matchArea The area around the previous pose where the new pose should
0011 %               be to be considered a neighbour (this is vector 'v' in the
0012 %               papers).
0013 %   - s The probability threshold.
0014 %   - c The BTree node from where to start the search. This must be the
0015 %     root node for the initial call.
0016 %
0017 % See also SearchInTree, BTree, TreeDetectLoops.
0018 
0019    [pMin pMax]=ProbDistance2PoseDataAboveThreshold(T.data{c}.element,F,matchArea,s);
0020 
0021    if pMax<s
0022      rs={};
0023    else
0024      if pMin>s
0025        ids=get(T.data{c}.element,'id');
0026        nIds=size(ids,2);
0027        rs=cell(1,nIds);
0028        for i=1:nIds
0029          rs{i}=T.data{T.leaves(ids(i))}.element;
0030        end
0031      else
0032        if T.data{c}.heigth>1
0033          rsl=SearchInTree(T,F,matchArea,s,T.data{c}.left);
0034          rsr=SearchInTree(T,F,matchArea,s,T.data{c}.right);
0035          rs=[rsl rsr];
0036        else
0037          rs={T.data{c}.element};
0038        end
0039      end
0040    end
0041


Institut de Robòtica i Informàtica Industrial

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