GAMS  1.4.0
PerimeterPatrolCoverage.h
Go to the documentation of this file.
1 
55 #ifndef _GAMS_ALGORITHMS_AREA_COVERAGE_PERIMETER_PATROL_H_
56 #define _GAMS_ALGORITHMS_AREA_COVERAGE_PERIMETER_PATROL_H_
57 
59 
60 #include <string>
61 #include <vector>
62 
63 #include "gams/variables/Sensor.h"
66 #include "gams/variables/Self.h"
68 
69 namespace gams
70 {
71  namespace algorithms
72  {
73  namespace area_coverage
74  {
79  {
80  public:
92  const std::string& region_id,
93  double e_time,
94  madara::knowledge::KnowledgeBase * knowledge = 0,
95  platforms::BasePlatform * platform = 0,
96  variables::Sensors * sensors = 0,
97  variables::Self * self = 0,
98  variables::Agents * agents = 0);
99 
104 
110 
111  protected:
115  virtual void generate_new_position(void);
116 
118  void generate_positions(void);
119 
121  std::vector<utility::GPSPosition> waypoints_;
122 
124  unsigned int cur_waypoint_;
125 
127  std::string region_id_;
128  }; // class PerimeterPatrolCoverage
129 
134  : public AlgorithmFactory
135  {
136  public:
137 
153  const madara::knowledge::KnowledgeMap & args,
154  madara::knowledge::KnowledgeBase * knowledge,
155  platforms::BasePlatform * platform,
156  variables::Sensors * sensors,
157  variables::Self * self,
158  variables::Agents * agents);
159  };
160  } // namespace area_coverage
161  } // namespace algorithms
162 } // namespace gams
163 
164 #endif // _GAMS_ALGORITHMS_AREA_COVERAGE_PERIMETER_PATROL_H_
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
#define GAMS_EXPORT
Definition: GamsExport.h:20
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Base class for algorithm factories that classes derived from.
The base class that algorithms in GAMS use.
Definition: BaseAlgorithm.h:95
A factory class for creating perimeter patrol algorithms.
virtual BaseAlgorithm * create(const madara::knowledge::KnowledgeMap &args, madara::knowledge::KnowledgeBase *knowledge, platforms::BasePlatform *platform, variables::Sensors *sensors, variables::Self *self, variables::Agents *agents)
Creates a perimeter patrol algorithm.
Moves along a perimeter and keeps track of coverage metrics.
PerimeterPatrolCoverage(const std::string &region_id, double e_time, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0)
Constructor.
void generate_positions(void)
generates all positions to patrol
virtual void generate_new_position(void)
Generate new next position.
std::vector< utility::GPSPosition > waypoints_
waypoints
void operator=(const PerimeterPatrolCoverage &rhs)
Assignment operator.
std::string region_id_
indicates the region to patrol the border of
The base platform for all platforms to use.
Definition: BasePlatform.h:113
A container for self referencing information.
Definition: Self.h:70
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Definition: Sensor.h:238
std::vector< Agent > Agents
An array of agent knowledge.
Definition: Agent.h:246
Contains all GAMS-related tools, classes and code.