00001 #ifndef INCLUDE_NAVLIB_DUBINSSOLVER
00002 #define INCLUDE_NAVLIB_DUBINSSOLVER
00003
00004 #include "tpbvpSolver.h"
00005
00006 namespace navlib
00007 {
00009 class DubinsC : public Path
00010 {
00011 public:
00015 DubinsC(PathPoint wp0, double turnRadius, double theta);
00016 bool collides(const Shape* body, std::vector<Point> obstacles);
00017 Path* copy();
00018 PathPoint getPathPoint(double d) const;
00019 double getLength() const;
00020
00021 private:
00022 double _r;
00023 double _theta;
00024 };
00025
00027 class DubinsS : public Path
00028 {
00029 public:
00032 DubinsS(PathPoint wp0, double d);
00033 Path* copy();
00034 PathPoint getPathPoint(double d) const;
00035 double getLength() const;
00036
00037 private:
00038 double _d;
00039 };
00040
00042 class DubinsSolver : public TpbvpSolver
00043 {
00044 public:
00046 DubinsSolver(double turnRadius);
00047 virtual ~DubinsSolver() {};
00048 Path* getPath(const PathPoint& wp0, const PathPoint& wpf);
00049
00050 private:
00052
00060 bool getTangent(Point p0, bool ccw0, Point pf, bool ccwf, Point& t0,
00061 Point& tf);
00062
00063 double _r;
00064 };
00065 }
00066
00067 #endif
00068