GAMS  1.4.0
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 
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 
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_
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) 2016 Carnegie Mellon University.
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 Spell algorithms.
Definition: Spell.h:169
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 Spell Algorithm.
size_t step_
the step count in the waypoint list
Definition: Spell.h:159
groups::GroupFactoryRepository group_factory_
factory for interacting with user-defined groups
Definition: Spell.h:132
Spell(const std::string &group, std::string text, pose::Pose origin, double height, double width, double buffer, const std::string &barrier, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0)
Constructor.
virtual int plan(void)
Plans the next execution of the algorithm.
double width_
the width of the letters to spell in meters
Definition: Spell.h:147
virtual int analyze(void)
Analyzes environment, platform, or other information.
pose::Position next_pos_
the next position to go to
Definition: Spell.h:156
std::string text_
Definition: Spell.h:129
double buffer_
the expected buffer between letters in meters
Definition: Spell.h:150
double height_
the height of the letters to spell in meters
Definition: Spell.h:144
madara::knowledge::containers::Barrier barrier_
a barrier between all agents before steps can proceed
Definition: Spell.h:162
groups::AgentVector group_members_
a convenience list of all current group members
Definition: Spell.h:138
virtual int execute(void)
Plans the next execution of the algorithm.
groups::GroupBase * group_
the group that the user wishes the algorithm to use
Definition: Spell.h:135
pose::Pose origin_
the origin of the spelled word/phrase
Definition: Spell.h:141
Base class for a group of agents.
Definition: GroupBase.h:91
A repository for group factories.
The base platform for all platforms to use.
Definition: BasePlatform.h:113
A container for self referencing information.
Definition: Self.h:70
std::vector< std::string > AgentVector
A vector of agent names.
Definition: GroupBase.h:71
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-2018 Carnegie Mellon University.