00001 #ifndef INCLUDE_NAVLIB_PATHPLANNER_ROADMAPPLANNER
00002 #define INCLUDE_NAVLIB_PATHPLANNER_ROADMAPPLANNER
00003
00004 #include "pathPlanner.h"
00005 #include <list>
00006 #include <map>
00007 #include <vector>
00008
00009 namespace navlib
00010 {
00011 PathPoint uniformCapsule(Point p0, Point pf, double radius);
00012 PathPoint uniformVisible(Pose psensor, std::vector<Polar> obstacles);
00013
00015 class RoadmapPlanner : public PathPlanner
00016 {
00017 public:
00022 RoadmapPlanner(TpbvpSolver* solver, bool reverse=true, size_t knn=5);
00023 virtual ~RoadmapPlanner() {};
00024 Path* getPath(const PathPoint& wp0, const PathPoint& wpf, Shape* body,
00025 const std::vector<Point>& obstacles);
00027 void addWaypoint(PathPoint wp);
00029 void addWaypoints(std::vector<PathPoint> wps);
00031 void clearWaypoints();
00033 void removeWaypoint(PathPoint wp);
00035 void removeWaypoints(std::vector<PathPoint> wps);
00036
00037 private:
00038 TpbvpSolver* _solver;
00039 bool _reverse;
00040 size_t _knn;
00041 std::list<PathPoint> _waypoints;
00042 };
00043 }
00044
00045 #endif