GAMS
1.4.0
|
An algorithm for covering an area in formation with a synchronous model of computation. More...
#include <FormationSync.h>
Public Types | |
enum | FormationTypes { PYRAMID , TRIANGLE , RECTANGLE , CIRCLE , LINE , WING } |
Types of formations. More... | |
Public Member Functions | |
FormationSync (pose::Pose &start, pose::Pose &end, const std::string &group, double buffer, int formation, const std::string &barrier_name, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0) | |
Constructor. More... | |
~FormationSync () | |
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 FormationSync &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 Member Functions | |
void | generate_plan (int formation) |
Generates the full plan. More... | |
pose::Position | generate_position (pose::Position reference, double angle, double distance) |
Generates a position at an angle and distance. More... | |
Protected Attributes | |
variables::Agents * | agents_ |
the list of agents potentially participating in the algorithm More... | |
madara::knowledge::containers::Barrier | barrier_ |
movement barrier More... | |
double | buffer_ |
the buffer between cells in the formation More... | |
pose::Pose | end_ |
center of formation end More... | |
unsigned int | executions_ |
number of executions More... | |
int | formation_ |
the formation to use More... | |
groups::GroupBase * | group_ |
the group that the user wishes the algorithm to use More... | |
groups::GroupFactoryRepository | group_factory_ |
factory for interacting with user-defined groups More... | |
groups::AgentVector | group_members_ |
a convenience list of all current group members More... | |
madara::knowledge::KnowledgeBase * | knowledge_ |
provides access to the knowledge base More... | |
int | move_pivot_ |
the move total before a pivot. Used for debugging More... | |
std::vector< pose::Position > | plan_ |
the planned positions of this agent More... | |
platforms::BasePlatform * | platform_ |
provides access to the platform More... | |
int | position_ |
position in member assignment More... | |
variables::Self * | self_ |
the algorithm's concept of self More... | |
variables::Sensors * | sensors_ |
provides access to sensor information More... | |
pose::Pose | start_ |
center of formation start More... | |
variables::AlgorithmStatus | status_ |
provides access to status information for this platform More... | |
An algorithm for covering an area in formation with a synchronous model of computation.
Allows specification of arbitrary group or swarm.
Definition at line 78 of file FormationSync.h.
Types of formations.
Enumerator | |
---|---|
PYRAMID | |
TRIANGLE | |
RECTANGLE | |
CIRCLE | |
LINE | |
WING |
Definition at line 85 of file FormationSync.h.
gams::algorithms::FormationSync::FormationSync | ( | pose::Pose & | start, |
pose::Pose & | end, | ||
const std::string & | group, | ||
double | buffer, | ||
int | formation, | ||
const std::string & | barrier_name, | ||
madara::knowledge::KnowledgeBase * | knowledge = 0 , |
||
platforms::BasePlatform * | platform = 0 , |
||
variables::Sensors * | sensors = 0 , |
||
variables::Self * | self = 0 |
||
) |
Constructor.
start | the starting center of the formation |
end | the ending center of the formation |
group | the group name(e.g., group.allies) |
buffer | the distance between formation participants in meters |
formation | type of formation( |
barrier_name | the barrier name to synchronize on |
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::FormationSync::~FormationSync | ( | ) |
Destructor.
|
virtual |
Analyzes environment, platform, or other information.
Implements gams::algorithms::BaseAlgorithm.
|
virtual |
Plans the next execution of the algorithm.
Implements gams::algorithms::BaseAlgorithm.
|
protected |
|
protected |
Generates a position at an angle and distance.
reference | the reference position |
angle | the angle from the reference position |
distance | the distance in meters |
|
inherited |
Gets the list of agents.
|
inherited |
Gets algorithm status variables.
|
inherited |
Gets the knowledge base.
|
inherited |
Gets the platform.
|
inherited |
Gets self-defined variables.
|
inherited |
Gets the available sensor information.
void gams::algorithms::FormationSync::operator= | ( | const FormationSync & | 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 |
|
protectedinherited |
the list of agents potentially participating in the algorithm
Definition at line 201 of file BaseAlgorithm.h.
|
protected |
movement barrier
Definition at line 198 of file FormationSync.h.
|
protected |
the buffer between cells in the formation
Definition at line 183 of file FormationSync.h.
|
protected |
center of formation end
Definition at line 171 of file FormationSync.h.
|
protectedinherited |
number of executions
Definition at line 204 of file BaseAlgorithm.h.
|
protected |
the formation to use
Definition at line 189 of file FormationSync.h.
|
protected |
the group that the user wishes the algorithm to use
Definition at line 177 of file FormationSync.h.
|
protected |
factory for interacting with user-defined groups
Definition at line 174 of file FormationSync.h.
|
protected |
a convenience list of all current group members
Definition at line 180 of file FormationSync.h.
|
protectedinherited |
provides access to the knowledge base
Definition at line 207 of file BaseAlgorithm.h.
|
protected |
the move total before a pivot. Used for debugging
Definition at line 195 of file FormationSync.h.
|
protected |
the planned positions of this agent
Definition at line 186 of file FormationSync.h.
|
protectedinherited |
provides access to the platform
Definition at line 210 of file BaseAlgorithm.h.
|
protected |
position in member assignment
Definition at line 192 of file FormationSync.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.
|
protected |
center of formation start
Definition at line 168 of file FormationSync.h.
|
protectedinherited |
provides access to status information for this platform
Definition at line 219 of file BaseAlgorithm.h.