54 #ifndef _GAMS_ALGORITHMS_FOLLOW_H_
55 #define _GAMS_ALGORITHMS_FOLLOW_H_
87 const std::string & target,
88 const std::vector <double> & offset,
89 madara::knowledge::KnowledgeBase * knowledge = 0,
184 const madara::knowledge::KnowledgeMap & args,
185 madara::knowledge::KnowledgeBase * knowledge,
Copyright(c) 2014 Carnegie Mellon University.
Copyright(c) 2014 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 Follow 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 Follow Algorithm.
An algorithm for following a target.
void operator=(const Follow &rhs)
Assignment operator.
gams::pose::Orientation last_dest_orientation
last valid destination based orientation
Follow(const std::string &target, const std::vector< double > &offset, madara::knowledge::KnowledgeBase *knowledge=0, platforms::BasePlatform *platform=0, variables::Sensors *sensors=0, variables::Self *self=0)
Constructor.
pose::Orientation target_orientation_
keep track of the target orientation
virtual int plan(void)
Plans the next execution of the algorithm.
pose::Position target_last_location_
keep track of last leader/target location
pose::Position target_destination_
current target location shared between analyze and execute
variables::Agent target_
location of agent to follow
bool had_valid_dest_orientation_
keep track of whether we had previously calculated target orient
pose::Position target_location_
current target location shared between analyze and execute
std::vector< double > minimum_buffer_
keep track of the minimum_buffer that should be maintained
virtual int analyze(void)
Analyzes environment, platform, or other information.
bool need_move_
flag between analyze and execute indicating new move is necessary
std::vector< double > offset_
keep track of the offset that agent should be at
virtual int execute(void)
Plans the next execution of the algorithm.
pose::Position last_target_destination_
current target location shared between analyze and execute
pose::Position last_location_
keep track of last location
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.