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

geom.h

Go to the documentation of this file.
00001 //----------------------------------------------------------------------
00002 //               The Motion Strategy Library (MSL)
00003 //----------------------------------------------------------------------
00004 //
00005 // Copyright (c) University of Illinois and Steven M. 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 // The University of Illinois 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_GEOM_H
00020 #define MSL_GEOM_H
00021 
00022 
00023 // The world places objects using configuration (model uses state).
00024 // Each derived class can define Obst and Robot however it likes.
00025 // Methods such as "GeomToPolygons" can give output in whatever 
00026 //  format is requested.  So far, only list<polygon> is shown,
00027 //  but we could imagine an OpenInventor model, Geomview model, etc.
00028 
00030 
00040 #include <list.h>
00041 #include <string>
00042 
00043 #include "vector.h"
00044 
00045 class Geom {
00046  protected:
00047   string FilePath;
00048  public:
00050   Geom(string path);
00051 
00053   virtual ~Geom() {};
00054 
00056   int NumBodies;
00057 
00059   int GeomDim;
00060 
00062   virtual bool CollisionFree(const MSLVector &q) = 0; // Input is configuration
00063 
00066   virtual double DistanceComp(const MSLVector &q) = 0;  // Distance in world
00067 
00069   MSLVector MaxDeviates;
00070 
00074   virtual MSLVector ConfigurationDifference(const MSLVector &q1, 
00075                                             const MSLVector &q2); 
00076 };
00077 
00078 
00080 class GeomNone: public Geom {
00081  public:
00082   GeomNone(string path);
00083   virtual ~GeomNone() {};
00084   virtual bool CollisionFree(const MSLVector &q){return true;} 
00085   virtual double DistanceComp(const MSLVector &q){return 10000.0;}
00086 };
00087 
00088 #endif
Motion Strategy Library


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