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)

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:
  • node[in] The root node of the PDDL expression.

  • problem_client[in] The problem expert client.

  • predicates[in] Current predicates state.

  • functions[in] Current functions state.

  • apply[in] Apply result to problem expert or state.

  • use_state[in] Use state representation or problem client.

  • negate[in] Invert the truth value.

Returns:

result <- tuple(bool, bool, double) result(0) true if success result(1) truth value of boolean expression result(2) value of numeric expression