当我拥有领域的PDDL和问题的PDDL时,如何使用fast downward获取问题的因果图?
回答:
你可以按照以下方式在C++中获取因果图对象。
#include "task_utils/causal_graph.h"#include "tasks/root_task.h"...TaskProxy task_proxy(*g_root_task);causal_graph::CausalGraph cg(task_proxy);
如果你希望将其作为输出,可以在主文件(“planner.cc”)中添加这些行。此外,你必须将task_utils/causal_graph.h文件中的dump(const TaskProxy &task_proxy)函数移到public,并使用以下命令。
cg.dump(task_proxy);
希望这对你有帮助 ;)。