GAMS  1.4.0
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:
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 
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 
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_
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 Follow Algorithms.
Definition: Follow.h:165
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 Follow Algorithm.
An algorithm for following a target.
Definition: Follow.h:75
void operator=(const Follow &rhs)
Assignment operator.
gams::pose::Orientation last_dest_orientation
last valid destination based orientation
Definition: Follow.h:158
Follow(const std::string &target, const std::vector< double > &offset, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0)
Constructor.
pose::Orientation target_orientation_
keep track of the target orientation
Definition: Follow.h:143
virtual int plan(void)
Plans the next execution of the algorithm.
pose::Position target_last_location_
keep track of last leader/target location
Definition: Follow.h:140
pose::Position target_destination_
current target location shared between analyze and execute
Definition: Follow.h:131
variables::Agent target_
location of agent to follow
Definition: Follow.h:125
bool had_valid_dest_orientation_
keep track of whether we had previously calculated target orient
Definition: Follow.h:155
pose::Position target_location_
current target location shared between analyze and execute
Definition: Follow.h:128
std::vector< double > minimum_buffer_
keep track of the minimum_buffer that should be maintained
Definition: Follow.h:149
virtual int analyze(void)
Analyzes environment, platform, or other information.
bool need_move_
flag between analyze and execute indicating new move is necessary
Definition: Follow.h:152
std::vector< double > offset_
keep track of the offset that agent should be at
Definition: Follow.h:146
virtual int execute(void)
Plans the next execution of the algorithm.
pose::Position last_target_destination_
current target location shared between analyze and execute
Definition: Follow.h:134
pose::Position last_location_
keep track of last location
Definition: Follow.h:137
The base platform for all platforms to use.
Definition: BasePlatform.h:113
A container for agent information.
Definition: Agent.h:80
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.
Copyright (c) 2015 Carnegie Mellon University.