GAMS  1.4.0
SnakeAreaCoverage.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_ALGORITHMS_AREA_COVERAGE_SNAKE_AREA_COVERAGE_H_
55 #define _GAMS_ALGORITHMS_AREA_COVERAGE_SNAKE_AREA_COVERAGE_H_
56 
59 
60 #include <string>
61 #include <vector>
62 
63 #include "gams/variables/Sensor.h"
66 #include "gams/variables/Self.h"
67 
68 namespace gams
69 {
70  namespace algorithms
71  {
72  namespace area_coverage
73  {
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 
109  void operator=(const SnakeAreaCoverage & rhs);
110 
111  protected:
116 
120  void compute_waypoints(const std::string& region_id);
121 
123  std::vector<utility::GPSPosition> waypoints_;
124 
126  unsigned int cur_waypoint_;
127 
129  std::string region_id_;
130  }; // class SnakeAreaCoverage
131 
137  : public AlgorithmFactory
138  {
139  public:
140 
156  const madara::knowledge::KnowledgeMap & args,
157  madara::knowledge::KnowledgeBase * knowledge,
158  platforms::BasePlatform * platform,
159  variables::Sensors * sensors,
160  variables::Self * self,
161  variables::Agents * agents);
162  };
163  } // namespace area_coverage
164  } // namespace algorithms
165 } // namespace gams
166 
167 #endif // _GAMS_ALGORITHMS_AREA_COVERAGE_SNAKE_AREA_COVERAGE_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 snake/lawnmower area coverage 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 snake area coverage algorithm.
Implements a serpentine pattern-based area coverage that is minimum time but easy to predict(adversar...
void compute_waypoints(const std::string &region_id)
Compute waypoints.
void generate_new_position(void)
Generate new next position.
SnakeAreaCoverage(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.
std::vector< utility::GPSPosition > waypoints_
waypoints
void operator=(const SnakeAreaCoverage &rhs)
Assignment operator.
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.