Fawkes API
Fawkes Development Version
|
#include <>>
Public Member Functions | |
NavGraphTimedReservationListNodeConstraint (Logger *logger, std::string constraint_name, fawkes::Clock *clock) | |
Constructor. More... | |
NavGraphTimedReservationListNodeConstraint (Logger *logger, std::string constraint_name, fawkes::Clock *clock, std::vector< std::pair< fawkes::NavGraphNode, fawkes::Time >> node_time_list) | |
Constructor. More... | |
virtual | ~NavGraphTimedReservationListNodeConstraint () |
Virtual empty destructor. More... | |
const std::vector< std::pair< fawkes::NavGraphNode, fawkes::Time > > & | node_time_list () const |
Get list of blocked nodes. More... | |
void | add_node (const fawkes::NavGraphNode &node, const fawkes::Time valid_time) |
Add a single node to constraint list. More... | |
void | add_nodes (const std::vector< std::pair< fawkes::NavGraphNode, fawkes::Time >> &timed_nodes) |
Add multiple nodes to constraint list. More... | |
void | remove_node (const fawkes::NavGraphNode &node) |
Remove a single node from the constraint list. More... | |
void | clear_nodes () |
Remove all nodes. More... | |
bool | has_node (const fawkes::NavGraphNode &node) |
Check if constraint has a specific node. More... | |
virtual bool | compute (void) throw () |
Perform compuations before graph search and to indicate re-planning. More... | |
virtual bool | blocks (const fawkes::NavGraphNode &node) throw () |
![]() | |
NavGraphNodeConstraint (const std::string &name) | |
Constructor. More... | |
NavGraphNodeConstraint (const char *name) | |
Constructor. More... | |
virtual | ~NavGraphNodeConstraint () |
Virtual empty destructor. More... | |
std::string | name () |
Get name of constraint. More... | |
bool | operator== (const std::string &name) const |
Check if constraint matches name. More... | |
Additional Inherited Members | |
![]() | |
std::string | name_ |
Constraint that holds a list of nodes to block with timeouts.
Definition at line 43 of file timed_reservation_list_node_constraint.h.
fawkes::NavGraphTimedReservationListNodeConstraint::NavGraphTimedReservationListNodeConstraint | ( | Logger * | logger, |
std::string | name, | ||
fawkes::Clock * | clock | ||
) |
Constructor.
logger | logger used for debug logging |
name | name of node constraint |
clock | time source to evaluate constraint timeouts |
Definition at line 47 of file timed_reservation_list_node_constraint.cpp.
fawkes::NavGraphTimedReservationListNodeConstraint::NavGraphTimedReservationListNodeConstraint | ( | Logger * | logger, |
std::string | name, | ||
fawkes::Clock * | clock, | ||
std::vector< std::pair< fawkes::NavGraphNode, fawkes::Time >> | node_time_list | ||
) |
Constructor.
logger | logger used for debug logging |
name | name of node constraint |
clock | time source to evaluate constraint timeouts |
node_time_list | list of nodes with valid_time |
Definition at line 63 of file timed_reservation_list_node_constraint.cpp.
|
virtual |
Virtual empty destructor.
Definition at line 77 of file timed_reservation_list_node_constraint.cpp.
void fawkes::NavGraphTimedReservationListNodeConstraint::add_node | ( | const fawkes::NavGraphNode & | node, |
const fawkes::Time | valid_time | ||
) |
Add a single node to constraint list.
node | node to add to constraint list |
valid_time | valid time for this node |
Definition at line 114 of file timed_reservation_list_node_constraint.cpp.
void fawkes::NavGraphTimedReservationListNodeConstraint::add_nodes | ( | const std::vector< std::pair< fawkes::NavGraphNode, fawkes::Time >> & | timed_nodes | ) |
Add multiple nodes to constraint list.
timed_nodes | nodes with timeout to add to constraint list |
Definition at line 137 of file timed_reservation_list_node_constraint.cpp.
|
virtual |
Check if constraint blocks a node. This method must be implemented by constraint classes. It is called to determine if a node should be considered blocked and therefore cannot be expanded during path search. Note that the method may not throw an exception. Handle this internally appropriately.
node | node to check for expansion |
Implements fawkes::NavGraphNodeConstraint.
Definition at line 185 of file timed_reservation_list_node_constraint.cpp.
void fawkes::NavGraphTimedReservationListNodeConstraint::clear_nodes | ( | ) |
Remove all nodes.
Definition at line 206 of file timed_reservation_list_node_constraint.cpp.
|
virtual |
Perform compuations before graph search and to indicate re-planning.
The compute method is called on all constraints just before a path search is performed and to check if re-planning should be tried.
It can be used for example to cache results for the coming search run. The search guarantees that for each complete search run compute() is called once and only once and that no two search runs overlap, i.e., compute() will not be called while another search is still running.
Constraints must indicate whether any change has occured during computation or since the last compute() call through the return value. This is used to determine if re-planning should be attempted.
Reimplemented from fawkes::NavGraphNodeConstraint.
Definition at line 82 of file timed_reservation_list_node_constraint.cpp.
bool fawkes::NavGraphTimedReservationListNodeConstraint::has_node | ( | const fawkes::NavGraphNode & | node | ) |
Check if constraint has a specific node.
node | node to check |
Definition at line 174 of file timed_reservation_list_node_constraint.cpp.
const std::vector< std::pair< fawkes::NavGraphNode, fawkes::Time > > & fawkes::NavGraphTimedReservationListNodeConstraint::node_time_list | ( | ) | const |
Get list of blocked nodes.
Definition at line 199 of file timed_reservation_list_node_constraint.cpp.
void fawkes::NavGraphTimedReservationListNodeConstraint::remove_node | ( | const fawkes::NavGraphNode & | node | ) |
Remove a single node from the constraint list.
node | node to remote |
Definition at line 154 of file timed_reservation_list_node_constraint.cpp.