24 #ifndef _PLUGINS_PDDL_PLANNER_THREAD_H_
25 #define _PLUGINS_PDDL_PLANNER_THREAD_H_
27 #include <aspect/blackboard.h>
28 #include <aspect/blocked_timing.h>
29 #include <aspect/configurable.h>
30 #include <aspect/logging.h>
31 #include <blackboard/interface_listener.h>
32 #include <core/threading/thread.h>
33 #include <interfaces/PddlPlannerInterface.h>
34 #include <plugins/robot-memory/aspect/robot_memory_aspect.h>
36 #include <bsoncxx/document/value.hpp>
64 std::vector<std::string> args;
66 fawkes::PddlPlannerInterface *plan_if_;
67 std::string cfg_descripton_path_;
68 std::string cfg_result_path_;
69 std::string cfg_domain_path_;
70 std::string cfg_problem_path_;
71 std::string cfg_fd_options_;
72 std::string cfg_collection_;
74 std::vector<action> action_list_;
76 std::function<void()> planner_;
81 bsoncxx::document::value BSONFromActionList();
82 static size_t find_nth_space(
const std::string &s,
size_t nth);
83 void print_action_list();
84 std::string run_planner(std::string command);
Starts a pddl planner and writes the resulting plan into the robot memory.
PddlPlannerThread()
Constructor.
virtual void init()
Initialize the thread.
virtual void finalize()
Finalize the thread.
virtual void loop()
Thread is only waked up if there was a new interface message to plan.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread aspect to access to BlackBoard.
BlackBoard interface listener.
Thread aspect to access configuration data.
Base class for all Fawkes BlackBoard interfaces.
Thread aspect to log output.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
Thread aspect to get access to a the RobotMemory.
Thread class encapsulation of pthreads.
const char * name() const
Get name of thread.