25 #ifndef _GAMS_ALGORITHMS_GREET_H_
26 #define _GAMS_ALGORITHMS_GREET_H_
84 const std::string & target,
const std::string & target_group,
85 double guard_distance,
86 const std::string & guard_group,
87 const std::vector<double> & guard_location,
88 double guard_max_follow_distance,
89 const std::vector<double> & home_location,
90 bool follow,
const std::string & follow_group,
91 int follow_max_agents,
92 madara::knowledge::KnowledgeBase * knowledge = 0,
131 std::unique_ptr<groups::GroupBase> target_group_ = 0;
134 bool follow_ =
false;
137 std::unique_ptr<groups::GroupBase> follow_group_ = 0;
140 std::string follow_group_name_ =
"group.{.target}.followers";
149 int follow_max_agents_ = 2;
152 double follow_max_distance_ = 1000;
156 double guard_max_follow_distance_ = -1;
162 std::unique_ptr<groups::GroupBase> guard_group_ = 0;
174 bool is_following_ =
false;
177 bool is_guarding_ =
false;
180 bool use_agent_home_ =
true;
206 const madara::knowledge::KnowledgeMap & args,
207 madara::knowledge::KnowledgeBase * knowledge,
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2016 Carnegie Mellon University.
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.
A factory class for creating Greet Algorithms.
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 Greet Algorithm.
An algorithm for greeting a target if it comes within range and potentially following the target arou...
void operator=(const Greet &rhs)
Assignment operator.
pose::Position guard_location_
the location for the agent to guard
variables::Agent target_
location of agent to follow
std::string follow_group_prefix_
the group name prefix before {.target}
pose::Epsilon guard_epsilon_
the distance from guard location (max of dimensions)
virtual int analyze(void)
Analyzes environment, platform, or other information.
std::string follow_group_suffix_
the group name suffix after {.target}
pose::Position home_location_
the home location to return to if not guarding or following
virtual int execute(void)
Plans the next execution of the algorithm.
Greet(const std::string &target, const std::string &target_group, double guard_distance, const std::string &guard_group, const std::vector< double > &guard_location, double guard_max_follow_distance, const std::vector< double > &home_location, bool follow, const std::string &follow_group, int follow_max_agents, 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.
groups::GroupFactoryRepository group_factory_
A repository for group factories.
A simple bounds checker which tests whether the current position is within the given number of meters...
A container for agent information.
A container for self referencing information.
std::map< std::string, Sensor * > Sensors
a map of sensor names to the sensor information
std::vector< Agent > Agents
An array of agent knowledge.
Contains all GAMS-related tools, classes and code.
Copyright (c) 2015 Carnegie Mellon University.