GAMS  1.2.2
Move.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_ALGORITHMS_MOVE_H_
55 #define _GAMS_ALGORITHMS_MOVE_H_
56 
58 
59 #include <string>
60 
61 #include "gams/variables/Sensor.h"
64 #include "gams/variables/Self.h"
65 #include "gams/pose/Position.h"
67 #include "madara/utility/EpochEnforcer.h"
68 
69 #include "gams/GamsExport.h"
70 
71 namespace gams
72 {
73  namespace algorithms
74  {
79  {
80  public:
92  Move (
93  const std::vector <pose::Pose> & locations,
94  int repeat,
95  double wait_time,
96  madara::knowledge::KnowledgeBase * knowledge = 0,
97  platforms::BasePlatform * platform = 0,
98  variables::Sensors * sensors = 0,
99  variables::Self * self = 0,
100  variables::Agents * agents = 0);
101 
105  ~Move ();
106 
111  void operator= (const Move & rhs);
112 
117  virtual int analyze (void);
118 
123  virtual int execute (void);
124 
129  virtual int plan (void);
130 
131  protected:
132 
134  std::vector <pose::Pose> poses_;
135 
137  int repeat_;
138 
140  size_t move_index_;
141 
143  int cycles_;
144 
146  std::string frame_;
147 
149  double wait_time_;
150 
152  bool waiting_;
153 
156 
158  madara::utility::EpochEnforcer<std::chrono::steady_clock> enforcer_;
159  };
160 
165  {
166  public:
167 
184  virtual BaseAlgorithm * create (
185  const madara::knowledge::KnowledgeMap & args,
186  madara::knowledge::KnowledgeBase * knowledge,
187  platforms::BasePlatform * platform,
188  variables::Sensors * sensors,
189  variables::Self * self,
190  variables::Agents * agents);
191  };
192  }
193 }
194 
195 #endif // _GAMS_ALGORITHMS_MOVE_H_
Base class for algorithm factories that classes derived from.
bool waiting_
if true, is in a waiting state on wait_time_
Definition: Move.h:152
double wait_time_
global wait time for each waypoint
Definition: Move.h:149
size_t move_index_
current location to move to
Definition: Move.h:140
std::vector< pose::Pose > poses_
the locations to visit
Definition: Move.h:134
Copyright (c) 2014 Carnegie Mellon University.
bool finished_moving_
if true, all movements are completed
Definition: Move.h:155
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Definition: Sensor.h:238
madara::utility::EpochEnforcer< std::chrono::steady_clock > enforcer_
the timing enforcer
Definition: Move.h:158
int repeat_
number of times to repeat
Definition: Move.h:137
The base platform for all platforms to use.
Definition: BasePlatform.h:190
Copyright (c) 2014 Carnegie Mellon University.
std::vector< Agent > Agents
An array of agent knowledge.
Definition: Agent.h:246
Copyright (c) 2014 Carnegie Mellon University.
An algorithm for moving to a location.
Definition: Move.h:78
Contains all GAMS-related tools, classes and code.
A container for self referencing information.
Definition: Self.h:69
std::string frame_
reference frame for coordinates
Definition: Move.h:146
A factory class for creating Move algorithms.
Definition: Move.h:164
#define GAMS_EXPORT
Definition: GamsExport.h:20
The base class that algorithms in GAMS use.
Definition: BaseAlgorithm.h:94
Copyright (c) 2014 Carnegie Mellon University.
int cycles_
tracks the number of cycles completed through locations
Definition: Move.h:143
Copyright (c) 2014 Carnegie Mellon University.