Function plansys2::evaluate(const plansys2_msgs::msg::Tree&, std::shared_ptr<plansys2::ProblemExpertClient>, std::vector<plansys2::Predicate>&, std::vector<plansys2::Function>&, bool, bool, uint8_t, bool)
Defined in File Utils.hpp
Function Documentation
-
std::tuple<bool, bool, double> plansys2::evaluate(const plansys2_msgs::msg::Tree &tree, std::shared_ptr<plansys2::ProblemExpertClient> problem_client, std::vector<plansys2::Predicate> &predicates, std::vector<plansys2::Function> &functions, bool apply = false, bool use_state = false, uint8_t node_id = 0, bool negate = false)
Evaluate a PDDL expression represented as a tree.
- Parameters:
tree – [in] The root node of the PDDL expression.
problem_client – [in] The problem expert client.
predicates – [inout] Current predicates state.
functions – [inout] Current functions state.
apply – [in] Apply result to problem expert or state (default: false).
use_state – [in] Use state representation or problem client (default: false).
node_id – [in] Node identifier in the tree (default: 0).
negate – [in] Invert the truth value of the expression (default: false).
- Returns:
tuple(bool, bool, double) with execution result in this format: result <- tuple(bool, bool, double) result(0) true if success result(1) truth value of boolean expression result(2) value of numeric expression