I am trying to develop a algorithm using PDDL
. Below here I am trying to define the domain and the problem files
Domain File:
(define (domain sp)
(:requirements :typing)
(:types location agent item - object
robot human - agent
room - location
fruit cup table - item)
(:predicates
(at ?o - object ?l - location)
(detected ?p - human ?l - room)
(greeted ?r - robot ?p - human)
)
(:action detect
:parameters (?p - human ?i - item ?r - robot ?l - location)
:precondition (at ?r ?l)
:effect (and (at ?p ?l) (at ?r ?l))
)
(:action greet
:parameters (?r - robot ?p - human ?l - location)
:precondition (and (at ?r ?l) (detected ?p ?l))
:effect (greeted ?r ?p)
)
)
Problem File:
(define (problem test12)
(:domain sp)
(:objects person0 - Human
pepper0 - Robot
apple - Fruit
cup0 - Cup
table0 - Table
room0 - Room)
(:init
(at pepper0 room0)
)
(:goal (and
(detected person0 room0)
(greeted pepper0 person0)
)
)
)
What I am trying to achieve is
- Robot is in the room
- When human enters the room, robot needs to detect human
- Greet human
- The it has to detect other objects in the room (like cup, fruit, etc.)
When I run this code I am going to the following error.
solution-impossbible
ff: parsing domain file
domain 'SP' defined
... done.
ff: parsing problem file
problem 'TEST12' defined
... done.
ff: goal can be simplified to FALSE. No plan will solve it
I followed the syntax correctly but it throws this error. I am not sure how to go about it. Can anyone show me a direction and if possible some debugging resources for PDDL
?