Search code examples
artificial-intelligencefaultpreconditionsplanningpddl

pddl precondtion not working correctly in the plan


I am working on a project in pddl. The idea is to pick four balls and transfer them to the conveyer. (defined in the goal) The simple pickup, move and drop actions work fine but when I try to make it more complicated for eg. by adding different poses for the robot,detecting the item before picking, the plan does not follow the pre-condition. For e.g. focus on the pick action, The correct pose is not followed. Any ideas regarding the mistake in the code? The final plan should to have correct pose for the each action and detect the item one by one and not all at once

link below: http://editor.planning.domains/#read_session=BzTaNrk4dQ

faulty output: https://i.sstatic.net/ubWS8.png


Solution

  • Thanks haz for going through the code. I was able to debug it. the assignment of preconditions was incorrect. the correct way of assigning a value to a parameter is the following:

    (= ?p findshirt)

    in the above line you assign findshirt type to 'p'