GAMS  1.2.2
Follow.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_ALGORITHMS_FOLLOW_H_
55 #define _GAMS_ALGORITHMS_FOLLOW_H_
56 
57 #include <queue>
58 
60 #include "gams/variables/Sensor.h"
63 #include "gams/variables/Self.h"
66 
67 namespace gams
68 {
69  namespace algorithms
70  {
75  {
76  public:
86  Follow (
87  const std::string & target,
88  const std::vector <double> & offset,
89  madara::knowledge::KnowledgeBase * knowledge = 0,
90  platforms::BasePlatform * platform = 0,
91  variables::Sensors * sensors = 0,
92  variables::Self * self = 0);
93 
97  ~Follow ();
98 
103  void operator= (const Follow & rhs);
104 
109  virtual int analyze (void);
110 
115  virtual int execute (void);
116 
121  virtual int plan (void);
122 
123  protected:
126 
129 
132 
135 
138 
141 
144 
146  std::vector <double> offset_;
147 
149  std::vector <double> minimum_buffer_;
150 
153 
156 
159  };
160 
165  {
166  public:
167 
183  virtual BaseAlgorithm * create (
184  const madara::knowledge::KnowledgeMap & args,
185  madara::knowledge::KnowledgeBase * knowledge,
186  platforms::BasePlatform * platform,
187  variables::Sensors * sensors,
188  variables::Self * self,
189  variables::Agents * agents);
190  };
191  }
192 }
193 
194 #endif // _GAMS_ALGORITHMS_FOLLOW_H_
Base class for algorithm factories that classes derived from.
variables::Agent target_
location of agent to follow
Definition: Follow.h:125
Copyright (c) 2014 Carnegie Mellon University.
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
Definition: Sensor.h:238
pose::Position last_location_
keep track of last location
Definition: Follow.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
pose::Position target_location_
current target location shared between analyze and execute
Definition: Follow.h:128
bool need_move_
flag between analyze and execute indicating new move is necessary
Definition: Follow.h:152
pose::Position target_destination_
current target location shared between analyze and execute
Definition: Follow.h:131
pose::Position target_last_location_
keep track of last leader/target location
Definition: Follow.h:140
bool had_valid_dest_orientation_
keep track of whether we had previously calculated target orient
Definition: Follow.h:155
Copyright (c) 2014 Carnegie Mellon University.
pose::Orientation target_orientation_
keep track of the target orientation
Definition: Follow.h:143
std::vector< double > minimum_buffer_
keep track of the minimum_buffer that should be maintained
Definition: Follow.h:149
gams::pose::Orientation last_dest_orientation
last valid destination based orientation
Definition: Follow.h:158
A factory class for creating Follow Algorithms.
Definition: Follow.h:164
Contains all GAMS-related tools, classes and code.
A container for self referencing information.
Definition: Self.h:69
A container for agent information.
Definition: Agent.h:79
#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.
std::vector< double > offset_
keep track of the offset that agent should be at
Definition: Follow.h:146
An algorithm for following a target.
Definition: Follow.h:74
Copyright (c) 2014 Carnegie Mellon University.
pose::Position last_target_destination_
current target location shared between analyze and execute
Definition: Follow.h:134