Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

fdp.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------
00002 //               The Motion Strategy Library (MSL)
00003 //----------------------------------------------------------------------
00004 //
00005 // Copyright (c) 1998-2000 Iowa State University and Steve LaValle.  
00006 // All Rights Reserved.
00007 // 
00008 // Permission to use, copy, and distribute this software and its 
00009 // documentation is hereby granted free of charge, provided that 
00010 // (1) it is not a component of a commercial product, and 
00011 // (2) this notice appears in all copies of the software and
00012 //     related documentation. 
00013 // 
00014 // Iowa State University and the author make no representations
00015 // about the suitability or fitness of this software for any purpose.  
00016 // It is provided "as is" without express or implied warranty.
00017 //----------------------------------------------------------------------
00018 
00019 #ifndef MSL_FDP_H
00020 #define MSL_FDP_H
00021 
00022 #include <LEDA/file.h>
00023 #include <LEDA/graph.h>
00024 #include <LEDA/list.h>
00025 #include <LEDA/polygon.h>
00026 #include <LEDA/vector.h>
00027 #include <LEDA/p_queue.h>
00028 
00029 #include "marray.h"
00030 #include "planner.h"
00031 
00032 #include <LEDA/REDEFINE_NAMES.h>
00033 
00055 
00056 
00057 
00058 class FDP: public Planner {
00059  protected:
00060 
00062   node_map<double> GEdgeTime;
00063 
00065   p_queue<double,node> Q;
00066 
00068   MultiArray<int> Grid;
00069 
00071   array<int> GridDimensions;
00072 
00074   int GridDefaultResolution;
00075 
00077   vector Quantization;
00078 
00079   virtual double SearchCost(double initcost, const node &n, const node &nn);
00080 
00082   list<node> PathToLeaf(const node &n, const GRAPH<vector,vector> &g);
00083 
00084   array<int> StateToIndices(const vector &x);
00085 
00086   vector IndicesToState(const array<int> &indices);
00087 
00088   public:
00089 
00091   FDP(Problem *problem);
00092 
00094   ~FDP() {};
00095   
00097   int SatisfiedCount;
00098 
00100   virtual void Reset();
00101 
00103   virtual void Construct();
00104 
00106   virtual bool Plan();
00107 
00108 };
00109 
00110 
00112 class FDPStar: public FDP {
00113  protected:
00114   virtual double SearchCost(double initcost, const node &n, const node &nn);
00115  public:
00116   FDPStar(Problem *p);
00117 };
00118  
00119 
00121 class FDPBestFirst: public FDP {
00122  protected:
00123   virtual double SearchCost(double initcost, const node &n, const node &nn);
00124  public:
00125   FDPBestFirst(Problem *p);
00126 };
00127 
00128 
00130 class FDPBi: public FDP {
00131  protected:
00132 
00134   node_map<double> G2EdgeTime;
00135 
00137   p_queue<double,node> Q2;
00138 
00140   void RecoverSolution(const node &n1, const node &n2);
00141 
00142  public:
00143 
00145   FDPBi(Problem *problem);
00146 
00148   ~FDPBi() {};
00149 
00151   virtual void Reset();
00152 
00154   virtual bool Plan();
00155 };
00156 
00157 
00158 #include <LEDA/UNDEFINE_NAMES.h>
00159 
00160 #endif
00161 
00162 
Motion Strategy Library


Web page maintained by Steve LaValle
Partial support provided by NSF CAREER Award IRI-970228 (LaValle), Honda Research, and Iowa State University.
Contributors: Anna Atramentov, Peng Cheng, James Kuffner, Steve LaValle, and Libo Yang.