GAMS  1.2.2
Spell.h
Go to the documentation of this file.
1 
54 #ifndef _GAMS_ALGORITHMS_SPELL_H_
55 #define _GAMS_ALGORITHMS_SPELL_H_
56 
57 #include <vector>
58 #include <string>
59 
60 #include "gams/variables/Sensor.h"
63 #include "gams/variables/Self.h"
65 #include "gams/pose/Position.h"
67 #include "madara/knowledge/containers/Integer.h"
68 #include "madara/knowledge/containers/Barrier.h"
70 
71 namespace gams
72 {
73  namespace algorithms
74  {
79  {
80  public:
81 
99  Spell (
100  const std::string &group, std::string text,
101  pose::Pose origin,
102  double height, double width,
103  double buffer,
104  const std::string & barrier,
105  madara::knowledge::KnowledgeBase * knowledge = 0,
106  platforms::BasePlatform * platform = 0,
107  variables::Sensors * sensors = 0,
108  variables::Self * self = 0);
109 
114  virtual int analyze (void);
115 
120  virtual int execute (void);
121 
126  virtual int plan (void);
127 
128  protected:
129  std::string text_;
130 
133 
136 
139 
142 
144  double height_;
145 
147  double width_;
148 
150  double buffer_;
151 
153  int index_, count_, node_;
154 
157 
159  size_t step_;
160 
162  madara::knowledge::containers::Barrier barrier_;
163  };
164 
169  {
170  public:
171 
186  virtual BaseAlgorithm * create (
187  const madara::knowledge::KnowledgeMap & args,
188  madara::knowledge::KnowledgeBase * knowledge,
189  platforms::BasePlatform * platform,
190  variables::Sensors * sensors,
191  variables::Self * self,
192  variables::Agents * agents);
193  };
194  }
195 }
196 
197 #endif // _GAMS_ALGORITHMS_FORMATION_SYNC_H_
Base class for algorithm factories that classes derived from.
groups::GroupFactoryRepository group_factory_
factory for interacting with user-defined groups
Definition: Spell.h:132
std::vector< std::string > AgentVector
A vector of agent names.
Definition: GroupBase.h:71
pose::Pose origin_
the origin of the spelled word/phrase
Definition: Spell.h:141
groups::GroupBase * group_
the group that the user wishes the algorithm to use
Definition: Spell.h:135
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
double width_
the width of the letters to spell in meters
Definition: Spell.h:147
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
std::string text_
Definition: Spell.h:129
madara::knowledge::containers::Barrier barrier_
a barrier between all agents before steps can proceed
Definition: Spell.h:162
A factory class for creating Spell algorithms.
Definition: Spell.h:168
double height_
the height of the letters to spell in meters
Definition: Spell.h:144
size_t step_
the step count in the waypoint list
Definition: Spell.h:159
Copyright (c) 2014 Carnegie Mellon University.
double buffer_
the expected buffer between letters in meters
Definition: Spell.h:150
Contains all GAMS-related tools, classes and code.
A container for self referencing information.
Definition: Self.h:69
Base class for a group of agents.
Definition: GroupBase.h:90
#define GAMS_EXPORT
Definition: GamsExport.h:20
The base class that algorithms in GAMS use.
Definition: BaseAlgorithm.h:94
groups::AgentVector group_members_
a convenience list of all current group members
Definition: Spell.h:138
Copyright (c) 2014 Carnegie Mellon University.
A repository for group factories.
Copyright (c) 2016 Carnegie Mellon University.
Copyright (c) 2014 Carnegie Mellon University.
pose::Position next_pos_
the next position to go to
Definition: Spell.h:156