Open Rezenders opened 3 weeks ago
PR #318 solves the problem of the derived predicates not being parsed.
However, I still get errors with not
expressions of the form (not (= ?y ?z))
such as in:
(:derived (inferred-Inconsistent )
(exists (?x ?y ?z)
(and
(inferred-C_status ?x ?y)
(inferred-C_status ?x ?z)
(not (= ?y ?z))
)
)
)
Error:
Error parsing PDDL: does not name a known token
Error parsing PDDL: does not name a known token
This error occurs because it is not possible to cast CompositeExpression
to Ground *
. Thus, cond
results in a nullptr
.
https://github.com/PlanSys2/ros2_planning_system/blob/c063ce54cf86f46594e9bda160e01dc8c40d4de5/plansys2_pddl_parser/src/plansys2_pddl_parser/Not.cpp#L31-L35
I don't really know how to fix this problem as I don't fully understand what the Ground
class does.
Hello,
I am working on adding support for the Symk planner to PlanSys2, mainly because I need a planner that supports derived predicates. I created a ros package and a plansys plugin for the planner: https://github.com/Rezenders/symk_ros And I am trying to apply it to SUAVE exemplar with the following setup: https://github.com/Rezenders/suave_planning
However, I am having some problems with the parsing of my PDDL files. The derived predicates in the domain file don't get parsed, and some predicates in the problem file are also not getting parsed. I can check this by looking into the domain and problem files created in the
/tmp
folder.For example, the suave_domain_created.pddl domain file is outputted as:
The suave_problem_created.pddl problem file becomes:
I will work on this the following week and propose a PR when I solve these problems. I opened this issue to let you know and check if anyone has insights on how to solve this.
I guess the problem of the derived predicates not being parsed is related to the parseDerived method https://github.com/PlanSys2/ros2_planning_system/blob/c063ce54cf86f46594e9bda160e01dc8c40d4de5/plansys2_pddl_parser/include/plansys2_pddl_parser/Domain.h#L102
But I still need to figure out why the problem file predicates are not parsed. Would anyone happen to have any ideas?