Add or remove goals from a PDDL problem. #468
-
I have a pddl file like so,
I parse this into the format for UPF, use OneShotplanner with fast-downward and generate a plan. Suppose, when I am executing the plan with a robot and some issue occurs. I want to remove that specfic goal from that problem and use replanner to generate a new plan. How do I do the part where I remove the goal and replan? When I try to follow the example in the docs, it says "on" is not defined. This is the generated upf problem file
Here is the code I have so far
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @MannavaVivek . So, your issue of Then for the Here the new python code that should work.
This code should work. Let me know if you still have any issue! |
Beta Was this translation helpful? Give feedback.
Hi @MannavaVivek .
So, your issue of
on
not being defined comes from the fact thaton
is a python variable that is never assigned to anything. For this you have to add the code commented with [1] .Then for the
remove_goal
method you will have another problem: thePDDLReader
parses the goals as a unique one (which is a "big and"). You need to rewrite the single goal (which is anAnd
) into more goals. For this you have to add the code commented with [2].Here the new python code that should work.