Skip to content

Commit

Permalink
add rovers domain
Browse files Browse the repository at this point in the history
  • Loading branch information
francescofuggitti committed Nov 9, 2022
1 parent 0350eef commit d0d04b2
Show file tree
Hide file tree
Showing 11 changed files with 726 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,20 @@
"acrobatics",
"beam-walk",
"blocksworld-ipc08",
"blocksworld_fond",
"doors",
# "earth_observation",
"elevators",
# "faults-ipc08",
# "first-responders-ipc08",
"islands",
"miner",
"rovers_fond",
"spiky-tireworld",
"tireworld",
"tireworld-truck",
"triangle-tireworld",
# "zenotravel",
"blocksworld_fond"
]

DOMAIN_FILES = [
Expand Down
220 changes: 220 additions & 0 deletions tests/fixtures/pddl_files/rovers_fond/domain.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
(define (domain dom)

(:requirements :strips :non-deterministic :typing)
(:types
rover - NO_TYPE
waypoint - NO_TYPE
store - NO_TYPE
camera - NO_TYPE
mode - NO_TYPE
lander - NO_TYPE
objective - NO_TYPE
)

(:predicates
(at ?x0 - rover ?x1 - waypoint)
(at_lander ?x0 - lander ?x1 - waypoint)
(can_traverse ?x0 - rover ?x1 - waypoint ?x2 - waypoint)
(equipped_for_soil_analysis ?x0 - rover)
(equipped_for_rock_analysis ?x0 - rover)
(equipped_for_imaging ?x0 - rover)
(empty ?x0 - store)
(have_rock_analysis ?x0 - rover ?x1 - waypoint)
(have_soil_analysis ?x0 - rover ?x1 - waypoint)
(full ?x0 - store)
(calibrated ?x0 - camera ?x1 - rover)
(supports ?x0 - camera ?x1 - mode)
(available ?x0 - rover)
(visible ?x0 - waypoint ?x1 - waypoint)
(have_image ?x0 - rover ?x1 - objective ?x2 - mode)
(communicatedsoildata ?x0 - waypoint)
(communicatedrockdata ?x0 - waypoint)
(communicatedimagedata ?x0 - objective ?x1 - mode)
(at_soil_sample ?x0 - waypoint)
(at_rock_sample ?x0 - waypoint)
(visible_from ?x0 - objective ?x1 - waypoint)
(store_of ?x0 - store ?x1 - rover)
(calibration_target ?x0 - camera ?x1 - objective)
(on_board ?x0 - camera ?x1 - rover)
(channel_free ?x0 - lander)
)
(:action navigate
:parameters (?x0 - rover ?x1 - waypoint ?x2 - waypoint)
:precondition
(and
(can_traverse ?x0 ?x1 ?x2)
(available ?x0)
(at ?x0 ?x1)
(visible ?x1 ?x2))
:effect
(and
(at ?x0 ?x2)
(not
(at ?x0 ?x1))
)
)
(:action sample_soil
:parameters (?x0 - rover ?x1 - store ?x2 - waypoint)
:precondition
(and
(at ?x0 ?x2)
(at_soil_sample ?x2)
(equipped_for_soil_analysis ?x0)
(store_of ?x1 ?x0)
(empty ?x1))
:effect
(and
(oneof
(and
(full ?x1)
(have_soil_analysis ?x0 ?x2)
(not
(empty ?x1))
)
(and
(when (at_rock_sample ?x2)
(and
(full ?x1)
(have_rock_analysis ?x0 ?x2)
(not
(empty ?x1))
)
)
)
)
)
)
(:action sample_rock
:parameters (?x0 - rover ?x1 - store ?x2 - waypoint)
:precondition
(and
(at ?x0 ?x2)
(at_rock_sample ?x2)
(equipped_for_rock_analysis ?x0)
(store_of ?x1 ?x0)
(empty ?x1))
:effect
(and
(full ?x1)
(have_rock_analysis ?x0 ?x2)
(not
(empty ?x1))
)
)
(:action drop
:parameters (?x0 - rover ?x1 - store)
:precondition
(and
(store_of ?x1 ?x0)
(full ?x1))
:effect
(and
(empty ?x1)
(not
(full ?x1))
)
)
(:action calibrate
:parameters (?x0 - rover ?x1 - camera ?x2 - objective ?x3 - waypoint)
:precondition
(and
(equipped_for_imaging ?x0)
(calibration_target ?x1 ?x2)
(at ?x0 ?x3)
(visible_from ?x2 ?x3)
(on_board ?x1 ?x0))
:effect
(calibrated ?x1 ?x0) )
(:action take_image
:parameters (?x0 - rover ?x1 - waypoint ?x2 - objective ?x3 - camera ?x4 - mode)
:precondition
(and
(calibrated ?x3 ?x0)
(on_board ?x3 ?x0)
(equipped_for_imaging ?x0)
(supports ?x3 ?x4)
(visible_from ?x2 ?x1)
(at ?x0 ?x1))
:effect
(and
(oneof
(have_image ?x0 ?x2 ?x4)
(and)
)
(not
(calibrated ?x3 ?x0))
)
)
(:action communicate_soil_data
:parameters (?x0 - rover ?x1 - lander ?x2 - waypoint ?x3 - waypoint ?x4 - waypoint)
:precondition
(and
(at ?x0 ?x3)
(at_lander ?x1 ?x4)
(have_soil_analysis ?x0 ?x2)
(visible ?x3 ?x4)
(available ?x0)
(channel_free ?x1))
:effect
(and
(channel_free ?x1)
(oneof
(communicatedsoildata ?x2)
(and)
)
(not
(have_soil_analysis ?x0 ?x2))
(available ?x0)
(not
(channel_free ?x1))
)
)
(:action communicate_rock_data
:parameters (?x0 - rover ?x1 - lander ?x2 - waypoint ?x3 - waypoint ?x4 - waypoint)
:precondition
(and
(at ?x0 ?x3)
(at_lander ?x1 ?x4)
(have_rock_analysis ?x0 ?x2)
(visible ?x3 ?x4)
(available ?x0)
(channel_free ?x1))
:effect
(and
(channel_free ?x1)
(oneof
(communicatedrockdata ?x2)
(and)
)
(not
(have_rock_analysis ?x0 ?x2))
(available ?x0)
(not
(channel_free ?x1))
)
)
(:action communicate_image_data
:parameters (?x0 - rover ?x1 - lander ?x2 - objective ?x3 - mode ?x4 - waypoint ?x5 - waypoint)
:precondition
(and
(at ?x0 ?x4)
(at_lander ?x1 ?x5)
(have_image ?x0 ?x2 ?x3)
(visible ?x4 ?x5)
(available ?x0)
(channel_free ?x1))
:effect
(and
(channel_free ?x1)
(oneof
(communicatedimagedata ?x2 ?x3)
(and)
)
(not
(have_image ?x0 ?x2 ?x3))
(available ?x0)
(not
(channel_free ?x1))
)
)
)
54 changes: 54 additions & 0 deletions tests/fixtures/pddl_files/rovers_fond/p01.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
(define (problem problem5)

(:domain dom)
(:objects camera0 - camera colour - mode general - lander highres - mode low_res - mode objective0 - objective objective1 - objective rover0 - rover rover0store - store waypoint0 - waypoint waypoint1 - waypoint waypoint2 - waypoint waypoint3 - waypoint)
(:init
(visible waypoint1 waypoint0)
(visible waypoint0 waypoint1)
(visible waypoint2 waypoint0)
(visible waypoint0 waypoint2)
(visible waypoint2 waypoint1)
(visible waypoint1 waypoint2)
(visible waypoint3 waypoint0)
(visible waypoint0 waypoint3)
(visible waypoint3 waypoint1)
(visible waypoint1 waypoint3)
(visible waypoint3 waypoint2)
(visible waypoint2 waypoint3)
(at_soil_sample waypoint0)
(at_rock_sample waypoint1)
(at_soil_sample waypoint2)
(at_rock_sample waypoint2)
(at_soil_sample waypoint3)
(at_rock_sample waypoint3)
(at_lander general waypoint0)
(channel_free general)
(at rover0 waypoint3)
(available rover0)
(store_of rover0store rover0)
(empty rover0store)
(equipped_for_soil_analysis rover0)
(equipped_for_rock_analysis rover0)
(equipped_for_imaging rover0)
(can_traverse rover0 waypoint3 waypoint0)
(can_traverse rover0 waypoint0 waypoint3)
(can_traverse rover0 waypoint3 waypoint1)
(can_traverse rover0 waypoint1 waypoint3)
(can_traverse rover0 waypoint1 waypoint2)
(can_traverse rover0 waypoint2 waypoint1)
(on_board camera0 rover0)
(calibration_target camera0 objective1)
(supports camera0 colour)
(supports camera0 highres)
(visible_from objective0 waypoint0)
(visible_from objective0 waypoint1)
(visible_from objective0 waypoint2)
(visible_from objective0 waypoint3)
(visible_from objective1 waypoint0)
(visible_from objective1 waypoint1)
(visible_from objective1 waypoint2)
(visible_from objective1 waypoint3)
)
(:goal (and (communicatedsoildata waypoint2)))

)
55 changes: 55 additions & 0 deletions tests/fixtures/pddl_files/rovers_fond/p02.pddl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
(define (problem problem5)

(:domain dom)
(:objects camera0 - camera colour - mode general - lander highres - mode low_res - mode objective0 - objective objective1 - objective rover0 - rover rover0store - store waypoint0 - waypoint waypoint1 - waypoint waypoint2 - waypoint waypoint3 - waypoint)
(:init
(visible waypoint1 waypoint0)
(visible waypoint0 waypoint1)
(visible waypoint2 waypoint0)
(visible waypoint0 waypoint2)
(visible waypoint2 waypoint1)
(visible waypoint1 waypoint2)
(visible waypoint3 waypoint0)
(visible waypoint0 waypoint3)
(visible waypoint3 waypoint1)
(visible waypoint1 waypoint3)
(visible waypoint3 waypoint2)
(visible waypoint2 waypoint3)
(at_soil_sample waypoint0)
(at_rock_sample waypoint1)
(at_soil_sample waypoint2)
(at_rock_sample waypoint2)
(at_soil_sample waypoint3)
(at_rock_sample waypoint3)
(at_lander general waypoint0)
(channel_free general)
(at rover0 waypoint3)
(available rover0)
(store_of rover0store rover0)
(empty rover0store)
(equipped_for_soil_analysis rover0)
(equipped_for_rock_analysis rover0)
(equipped_for_imaging rover0)
(can_traverse rover0 waypoint3 waypoint0)
(can_traverse rover0 waypoint0 waypoint3)
(can_traverse rover0 waypoint3 waypoint1)
(can_traverse rover0 waypoint1 waypoint3)
(can_traverse rover0 waypoint1 waypoint2)
(can_traverse rover0 waypoint2 waypoint1)
(on_board camera0 rover0)
(calibration_target camera0 objective1)
(supports camera0 colour)
(supports camera0 highres)
(visible_from objective0 waypoint0)
(visible_from objective0 waypoint1)
(visible_from objective0 waypoint2)
(visible_from objective0 waypoint3)
(visible_from objective1 waypoint0)
(visible_from objective1 waypoint1)
(visible_from objective1 waypoint2)
(visible_from objective1 waypoint3)
)
(:goal (and (communicatedsoildata waypoint2)
(communicatedrockdata waypoint3)))

)
Loading

0 comments on commit d0d04b2

Please sign in to comment.