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

problem.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_PROBLEM_H
00020 #define MSL_PROBLEM_H
00021 
00022 //#include <list.h>
00023 //#include <string>
00024 
00025 #include "model.h"
00026 #include "geom.h"
00027 #include "util.h"
00028 
00030 
00039 class Problem {
00040  protected:
00042   Geom *G;
00044   Model *M;
00045  public:
00047   string FilePath;
00048 
00050   int NumBodies;
00051 
00053   int StateDim;
00054 
00056   int InputDim;
00057 
00059   int GeomDim;
00060 
00062   MSLVector LowerState;
00063 
00065   MSLVector UpperState;
00066 
00068   MSLVector InitialState;
00069 
00071   MSLVector GoalState;
00072 
00075   Problem(Geom *geom, Model *model, string path);
00076 
00078   virtual ~Problem() {};
00079 
00081   void SetGeom(Geom *geom);
00082 
00084   void SetModel(Model *model);
00085 
00087   virtual list<MSLVector> GetInputs(const MSLVector &x);
00088 
00090   virtual list<MSLVector> GetInputs();
00091 
00093   virtual MSLVector Integrate(const MSLVector &x, const MSLVector &u, 
00094                            const double &deltat);
00095 
00097 
00101   virtual MSLVector InterpolateState(const MSLVector &x1, const MSLVector &x2, 
00102                                    const double &a);  // Depends on topology
00103 
00105   virtual double Metric(const MSLVector &x1, const MSLVector &x2);
00106 
00108   virtual MSLVector StateToConfiguration(const MSLVector &x);
00109 
00113   virtual MSLVector StateDifference(const MSLVector &x1, 
00114                                  const MSLVector &x2); 
00115 
00118   virtual bool Satisfied(const MSLVector &x);
00119 
00121   virtual bool CollisionFree(const MSLVector &q);
00122 
00124   virtual double DistanceComp(const MSLVector &q); 
00125 
00127   MSLVector MaxDeviates; 
00128 
00132   virtual MSLVector ConfigurationDifference(const MSLVector &q1, 
00133                                          const MSLVector &q2); 
00134 };
00135 
00136 #endif
00137 
00138 
Motion Strategy Library


Web page maintained by Steve LaValle