00001 //---------------------------------------------------------------------- 00002 // The Motion Strategy Library (MSL) 00003 //---------------------------------------------------------------------- 00004 // 00005 // Copyright (c) University of Illinois 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 // 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_MODELMISC_H 00020 #define MSL_MODELMISC_H 00021 00022 #include <string> 00023 00024 #include "model.h" 00025 #include "vector.h" 00026 #include "matrix.h" 00027 #include "util.h" 00028 00030 class Model1D: public Model { 00031 public: 00032 double Force; 00033 Model1D(string path); 00034 virtual ~Model1D() {}; 00035 virtual MSLVector StateToConfiguration(const MSLVector &x); 00036 virtual MSLVector Integrate(const MSLVector &x, const MSLVector &u, const double &h); 00037 virtual MSLVector StateTransitionEquation(const MSLVector &x, const MSLVector &u); 00038 virtual double Metric(const MSLVector &x1, const MSLVector &x2); 00039 }; 00040 00041 00043 class ModelLinear: public Model { 00044 public: 00045 MSLMatrix A; 00046 MSLMatrix B; 00047 ModelLinear(string path); 00048 virtual ~ModelLinear() {}; 00049 virtual MSLVector StateToConfiguration(const MSLVector &x); 00050 virtual MSLVector Integrate(const MSLVector &x, const MSLVector &u, 00051 const double &h); 00052 virtual MSLVector StateTransitionEquation(const MSLVector &x, 00053 const MSLVector &u); 00054 }; 00055 00056 00057 00059 class ModelND: public Model { 00060 public: 00061 double CorridorWidth; 00062 ModelND(string path); 00063 virtual ~ModelND() {}; 00064 virtual MSLVector StateToConfiguration(const MSLVector &x); 00065 virtual MSLVector Integrate(const MSLVector &x, const MSLVector &u, const double &h); 00066 virtual MSLVector StateTransitionEquation(const MSLVector &x, const MSLVector &u); 00067 //virtual bool Satisfied(const MSLVector &x); 00068 }; 00069 00070 00072 class ModelNintegrator: public Model { 00073 public: 00074 double UBound; 00075 double VBound; 00076 ModelNintegrator(string path); 00077 virtual ~ModelNintegrator() {}; 00078 virtual MSLVector StateToConfiguration(const MSLVector &x); 00079 virtual MSLVector Integrate(const MSLVector &x, const MSLVector &u, const double &h); 00080 virtual MSLVector StateTransitionEquation(const MSLVector &x, const MSLVector &u); 00081 }; 00082 00083 00084 #endif