GAMS  1.4.0
BaseAreaCoverage.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_ALGORITHMS_AREA_COVERAGE_BASE_AREA_COVERAGE_H_
55 #define _GAMS_ALGORITHMS_AREA_COVERAGE_BASE_AREA_COVERAGE_H_
56 
58 
60 
61 #include "madara/utility/Utility.h"
62 #include "madara/utility/EpochEnforcer.h"
63 
64 namespace gams
65 {
66  namespace algorithms
67  {
68  namespace area_coverage
69  {
74  {
75  public:
86  madara::knowledge::KnowledgeBase * knowledge = 0,
87  platforms::BasePlatform * platform = 0,
88  variables::Sensors * sensors = 0,
89  variables::Self * self = 0,
90  variables::Agents * agents = 0,
91  double e_time = -1.0);
92 
96  virtual ~BaseAreaCoverage();
97 
102  void operator=(const BaseAreaCoverage& rhs);
103 
108  virtual int analyze(void);
109 
114  virtual int execute(void);
115 
120  virtual int plan(void);
121 
127 
128  protected:
132  virtual void generate_new_position(void) = 0;
133 
137  int check_if_finished(int ret_val) const;
138 
141 
144 
146  double max_time_;
147 
149  madara::utility::EpochEnforcer<std::chrono::steady_clock> enforcer_;
150  };
151  } // namespace area_coverage
152  } // namespace algorithms
153 } // namespace gams
154 
155 #endif // _GAMS_ALGORITHMS_AREA_COVERAGE_BASE_AREA_COVERAGE_H_
Copyright(c) 2014 Carnegie Mellon University.
Copyright (c) 2014 Carnegie Mellon University.
#define GAMS_EXPORT
Definition: GamsExport.h:20
The base class that algorithms in GAMS use.
Definition: BaseAlgorithm.h:95
double max_time_
for keeping track of the time set for maximum coverage time
int check_if_finished(int ret_val) const
Check if finished based on time.
virtual void generate_new_position(void)=0
Generate new next position.
virtual int execute(void)
Plans the next execution of the algorithm.
void operator=(const BaseAreaCoverage &rhs)
Assignment operator.
BaseAreaCoverage(madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0, variables::Agents *agents=0, double e_time=-1.0)
Constructor.
utility::GPSPosition get_next_position(void) const
Get next position.
virtual int plan(void)
Plans the next execution of the algorithm.
virtual int analyze(void)
Analyzes environment, platform, or other information.
utility::GPSPosition next_position_
next position
madara::utility::EpochEnforcer< std::chrono::steady_clock > enforcer_
enforcer for maximum time
bool initialized_
indicates whether the algorithm is initialized
The base platform for all platforms to use.
Definition: BasePlatform.h:113
A position in the global positioning system reference frame.
Definition: GPSPosition.h:78
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.