An algorithm for moving in formation.
More...
#include <FormationFlying.h>
|
| | FormationFlying (const std::string &head_id, const std::vector< double > &offset, const std::vector< double > &destination, const std::string &group_name, const std::string &modifier, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0) |
| | Constructor. More...
|
| |
| | ~FormationFlying () |
| | 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...
|
| |
| bool | is_head () const |
| | Return true if this agent is head. More...
|
| |
| bool | is_ready () const |
| | Get ready value. More...
|
| |
| void | operator= (const FormationFlying &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...
|
| |
An algorithm for moving in formation.
Definition at line 73 of file FormationFlying.h.
| gams::algorithms::FormationFlying::FormationFlying |
( |
const std::string & |
head_id, |
|
|
const std::vector< double > & |
offset, |
|
|
const std::vector< double > & |
destination, |
|
|
const std::string & |
group_name, |
|
|
const std::string & |
modifier, |
|
|
madara::knowledge::KnowledgeBase * |
knowledge = 0, |
|
|
platforms::BasePlatform * |
platform = 0, |
|
|
variables::Sensors * |
sensors = 0, |
|
|
variables::Self * |
self = 0 |
|
) |
| |
Constructor.
- Parameters
-
| head_id | target of the formation |
| offset | offset of formation |
| destination | destination of the formation |
| group_name | group identifier (e.g. group.group1) |
| modifier | modifier that influences the formation |
| 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::FormationFlying::~FormationFlying |
( |
| ) |
|
| virtual int gams::algorithms::FormationFlying::analyze |
( |
void |
| ) |
|
|
virtual |
| virtual int gams::algorithms::FormationFlying::execute |
( |
void |
| ) |
|
|
virtual |
Gets algorithm status variables.
| pose::Position gams::algorithms::FormationFlying::get_destination |
( |
| ) |
const |
|
protected |
| madara::knowledge::KnowledgeBase* gams::algorithms::BaseAlgorithm::get_knowledge_base |
( |
void |
| ) |
|
|
inherited |
Gets self-defined variables.
Gets the available sensor information.
| bool gams::algorithms::FormationFlying::is_head |
( |
| ) |
const |
Return true if this agent is head.
| bool gams::algorithms::FormationFlying::is_ready |
( |
| ) |
const |
Get ready value.
- Returns
- true if agents are in formation, false otherwise
| void gams::algorithms::FormationFlying::operator= |
( |
const FormationFlying & |
rhs | ) |
|
Assignment operator.
- Parameters
-
| virtual int gams::algorithms::FormationFlying::plan |
( |
void |
| ) |
|
|
virtual |
| virtual void gams::algorithms::BaseAlgorithm::set_agents |
( |
variables::Agents * |
agents | ) |
|
|
virtualinherited |
Sets the list of agents in the swarm.
- Parameters
-
Sets the platform.
- Parameters
-
| platform | the underlying platform the algorithm will use |
| virtual void gams::algorithms::BaseAlgorithm::set_self |
( |
variables::Self * |
self | ) |
|
|
virtualinherited |
Sets the map of sensor names to sensor information.
- Parameters
-
| self | pointer to self-referencing variables container |
Sets the map of sensor names to sensor information.
- Parameters
-
| sensors | map of sensor names to sensor information |
the list of agents potentially participating in the algorithm
Definition at line 201 of file BaseAlgorithm.h.
| std::vector<Compiled> gams::algorithms::FormationFlying::compiled_formation_ |
|
protected |
| unsigned int gams::algorithms::BaseAlgorithm::executions_ |
|
protectedinherited |
| madara::knowledge::containers::Integer gams::algorithms::FormationFlying::formation_ready_ |
|
protected |
| bool gams::algorithms::FormationFlying::head_ |
|
protected |
| madara::knowledge::containers::NativeDoubleArray gams::algorithms::FormationFlying::head_destination_ |
|
protected |
| int gams::algorithms::FormationFlying::head_id_ |
|
protected |
| madara::knowledge::containers::NativeDoubleArray gams::algorithms::FormationFlying::head_location_ |
|
protected |
| madara::knowledge::containers::Integer gams::algorithms::FormationFlying::in_formation_ |
|
protected |
| madara::knowledge::KnowledgeBase* gams::algorithms::BaseAlgorithm::knowledge_ |
|
protectedinherited |
| enum { ... } gams::algorithms::FormationFlying::modifier_ |
| bool gams::algorithms::FormationFlying::need_to_move_ |
|
protected |
| unsigned int gams::algorithms::FormationFlying::num_agents_ |
|
protected |
number of agents in formation; only head_id_ needs to know this
Definition at line 189 of file FormationFlying.h.
| double gams::algorithms::FormationFlying::phi_ |
|
protected |
| double gams::algorithms::FormationFlying::phi_dir_ |
|
protected |
| double gams::algorithms::FormationFlying::rho_ |
|
protected |
provides access to status information for this platform
Definition at line 219 of file BaseAlgorithm.h.
| double gams::algorithms::FormationFlying::z_ |
|
protected |
The documentation for this class was generated from the following file: