GAMS
1.4.0
|
An algorithm for covering an area in formation with a synchronous model of computation. More...
#include <ZoneCoverage.h>
Public Member Functions | |
ZoneCoverage (const std::string &protectors, const std::string &assets, const std::string &enemies, const std::string &formation, double buffer, double distance, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0) | |
Constructor. More... | |
~ZoneCoverage () | |
Destructor. More... | |
virtual int | analyze (void) |
Analyzes environment, platform, or other information. More... | |
virtual int | execute (void) |
Plans the next execution of the algorithm. More... | |
variables::Agents * | get_agents (void) |
Gets the list of agents. More... | |
variables::AlgorithmStatus * | get_algorithm_status (void) |
Gets algorithm status variables. More... | |
madara::knowledge::KnowledgeBase * | get_knowledge_base (void) |
Gets the knowledge base. More... | |
platforms::BasePlatform * | get_platform (void) |
Gets the platform. More... | |
variables::Self * | get_self (void) |
Gets self-defined variables. More... | |
variables::Sensors * | get_sensors (void) |
Gets the available sensor information. More... | |
void | operator= (const ZoneCoverage &rhs) |
Assignment operator. More... | |
virtual int | plan (void) |
Plans the next execution of the algorithm. More... | |
virtual void | set_agents (variables::Agents *agents) |
Sets the list of agents in the swarm. More... | |
virtual void | set_platform (platforms::BasePlatform *platform) |
Sets the platform. More... | |
virtual void | set_self (variables::Self *self) |
Sets the map of sensor names to sensor information. More... | |
virtual void | set_sensors (variables::Sensors *sensors) |
Sets the map of sensor names to sensor information. More... | |
Protected Types | |
typedef pose::Position(ZoneCoverage::* | formation_func) () const |
typedef std::vector< madara::knowledge::containers::NativeDoubleArray > | MadaraArrayVec |
Protected Member Functions | |
pose::Position | arc_formation () const |
pose::Position | line_formation () const |
pose::Position | onion_formation () const |
Static Protected Member Functions | |
static formation_func | get_form_func (const std::string &form_name) |
Private Member Functions | |
void | update_arrays (const gams::groups::AgentVector &names, MadaraArrayVec &arrays) const |
void | update_locs (const MadaraArrayVec &arrays, std::vector< pose::Position > &locs) const |
An algorithm for covering an area in formation with a synchronous model of computation.
Allows specification of arbitrary group or swarm.
Supports the following formation types, with the following names:
"line": protectors arrange themselves in a line perpendicular to line connecting enemy to asset, and parallel to the ground; supports only one enemy and one asset(only first in each group will be used)
Definition at line 85 of file ZoneCoverage.h.
|
protected |
Definition at line 165 of file ZoneCoverage.h.
|
protected |
Definition at line 175 of file ZoneCoverage.h.
gams::algorithms::ZoneCoverage::ZoneCoverage | ( | const std::string & | protectors, |
const std::string & | assets, | ||
const std::string & | enemies, | ||
const std::string & | formation, | ||
double | buffer, | ||
double | distance, | ||
madara::knowledge::KnowledgeBase * | knowledge = 0 , |
||
platforms::BasePlatform * | platform = 0 , |
||
variables::Sensors * | sensors = 0 , |
||
variables::Self * | self = 0 |
||
) |
Constructor.
protectors | name of group of protecting agents |
assets | name of group of agents to protect |
enemies | name of group of attacking agents |
formation | name of formation |
frame | frame of reference(cartesian, GPS) |
buffer | buffer between agents |
distance | distance from the asset |
knowledge | the context containing variables and values |
platform | the underlying platform the algorithm will use |
sensors | map of sensor names to sensor information |
self | self-referencing variables |
gams::algorithms::ZoneCoverage::~ZoneCoverage | ( | ) |
Destructor.
|
virtual |
Analyzes environment, platform, or other information.
Implements gams::algorithms::BaseAlgorithm.
|
protected |
|
virtual |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
inherited |
Gets the list of agents.
|
inherited |
Gets algorithm status variables.
|
staticprotected |
|
inherited |
Gets the knowledge base.
|
inherited |
Gets the platform.
|
inherited |
Gets self-defined variables.
|
inherited |
Gets the available sensor information.
|
protected |
|
protected |
void gams::algorithms::ZoneCoverage::operator= | ( | const ZoneCoverage & | rhs | ) |
Assignment operator.
rhs | values to copy |
|
virtual |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
virtualinherited |
Sets the list of agents in the swarm.
agents | list of agents |
|
virtualinherited |
Sets the platform.
platform | the underlying platform the algorithm will use |
|
virtualinherited |
Sets the map of sensor names to sensor information.
self | pointer to self-referencing variables container |
|
virtualinherited |
Sets the map of sensor names to sensor information.
sensors | map of sensor names to sensor information |
|
private |
|
private |
|
protectedinherited |
the list of agents potentially participating in the algorithm
Definition at line 201 of file BaseAlgorithm.h.
|
protected |
Definition at line 177 of file ZoneCoverage.h.
|
protected |
Definition at line 180 of file ZoneCoverage.h.
|
protected |
Definition at line 150 of file ZoneCoverage.h.
|
protected |
Definition at line 154 of file ZoneCoverage.h.
|
protected |
Definition at line 159 of file ZoneCoverage.h.
|
protected |
Definition at line 161 of file ZoneCoverage.h.
|
protected |
Definition at line 151 of file ZoneCoverage.h.
|
protected |
Definition at line 155 of file ZoneCoverage.h.
|
protected |
Definition at line 178 of file ZoneCoverage.h.
|
protected |
Definition at line 181 of file ZoneCoverage.h.
|
protectedinherited |
number of executions
Definition at line 204 of file BaseAlgorithm.h.
|
protected |
Definition at line 167 of file ZoneCoverage.h.
|
protected |
Definition at line 157 of file ZoneCoverage.h.
|
protected |
Definition at line 147 of file ZoneCoverage.h.
|
protected |
factory for interacting with user-defined groups
Definition at line 145 of file ZoneCoverage.h.
|
protected |
Definition at line 163 of file ZoneCoverage.h.
|
protectedinherited |
provides access to the knowledge base
Definition at line 207 of file BaseAlgorithm.h.
|
protected |
Definition at line 182 of file ZoneCoverage.h.
|
protectedinherited |
provides access to the platform
Definition at line 210 of file BaseAlgorithm.h.
|
protected |
Definition at line 149 of file ZoneCoverage.h.
|
protected |
Definition at line 153 of file ZoneCoverage.h.
|
protectedinherited |
the algorithm's concept of self
Definition at line 213 of file BaseAlgorithm.h.
|
protectedinherited |
provides access to sensor information
Definition at line 216 of file BaseAlgorithm.h.
|
protectedinherited |
provides access to status information for this platform
Definition at line 219 of file BaseAlgorithm.h.