KCL-Planning / ROSPlan

The ROSPlan framework provides a generic method for task planning in a ROS system.
http://kcl-planning.github.io/ROSPlan
BSD 2-Clause "Simplified" License
355 stars 159 forks source link

PDDL parsing failed Plan was unsolvable #245

Closed rakhmanu closed 4 years ago

rakhmanu commented 4 years ago

Hi,

I wanted to use my PDDL domain and constructed PDDL problem manually in ROSPlan. However, when i try to execute rosplan_planner_interface, it says plan was unsolvable. This is my pddl domain (define (domain againd)

(:requirements :strips :negative-preconditions :disjunctive-preconditions)

(:predicates (robot_at ?v ?wp ) (adj ?from ?to ) (obstacle ?wp ) (visited ?wp ) )

(:action goto_waypoint :parameters (?v ?from ?to ) :precondition (and (robot_at ?v ?from) (adj ?from?to) (not (obstacle ?to)) ) :effect ( and
(visited ?to) (not (robot_at ?v ?from)) (robot_at ?v ?to) ) )

)

And PDDL problem (define (problem task) (:domain againd) (:objects wp0 wp1 wp2 wp3 wp4 wp5 turtlebot ) (:init

(robot_at turtlebot wp0)
(obstacle wp1)
(adj wp0 wp1)
(adj wp1 wp0)
(adj wp1 wp2)
(adj wp2 wp1)
(adj wp0 wp3)
(adj wp3 wp0)
(adj wp3 wp4)
(adj wp4 wp3)
(adj wp4 wp5)
(adj wp5 wp4)
(adj wp1 wp4)   
(adj wp4 wp1)  
(adj wp2 wp5)
(adj wp5 wp2)

) (:goal (and

(visited wp5)

)) )

When i check PDDL model by VAL parser, there is no error with domain but there are warnings in problem file: Errors: 0, warnings: 4 againp2.pddl: line: 9: Warning: Undeclared symbol: robot_at againp2.pddl: line: 10: Warning: Undeclared symbol: obstacle againp2.pddl: line: 11: Warning: Undeclared symbol: adj againp2.pddl: line: 29: Warning: Undeclared symbol: visited

By the way, my launch file

ooo

How i can fix this?

oscar-lima commented 4 years ago

This domain does not have durative actions and therefore standard popf can't solve it. I suggest you try ffha. sudo apt install ros-melodic-ffha

You can see an example on this open PR:

https://github.com/KCL-Planning/rosplan_demos/pull/33/files

closing for now, feel free to reopen if further issues

rakhmanu commented 4 years ago

Hi,

Thank you very much for the reply I tried to use FF planner with ffha by following this https://github.com/KCL-Planning/rosplan_demos/pull/33/files example. However, it still says that the plan was unsolvable...

The pddl domain and problem from the examples in /ROSPlan/rosplan_planning_system/test/pddl/amazon

Here is the FFplanning launch file :

<?xml version="1.0"?>

And my launch file: <?xml version="1.0"?>

fail