-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
254 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
(define (problem complexProblem) | ||
(:domain simple-supermarket) | ||
(:objects | ||
x1 x2 x3 x4 x5 x6 x7 - location | ||
a1 a2 a3 a4 a5 a6 a7 - agent | ||
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 - item | ||
c1 - car | ||
c2 - car | ||
c3 - car | ||
|
||
|
||
|
||
|
||
|
||
) | ||
(:init | ||
|
||
(at a1 x1) | ||
(at a2 x1) | ||
(at a3 x4) | ||
(at a4 x5) | ||
(at a5 x7) | ||
(at a6 x6) | ||
(at a7 x6) | ||
|
||
(at c1 x1) | ||
(at c2 x1) | ||
(at c3 x3) | ||
|
||
|
||
(at i1 x3) | ||
(at i2 x3) | ||
(at i3 x3) | ||
(at i4 x3) | ||
(at i5 x3) | ||
(at i6 x3) | ||
(at i7 x2) | ||
(at i8 x2) | ||
(at i9 x2) | ||
(at i10 x2) | ||
(at i11 x2) | ||
(at i12 x2) | ||
(at i13 x3) | ||
(at i14 x4) | ||
(at i15 x5) | ||
(at i16 x6) | ||
(at i17 x7) | ||
|
||
|
||
(hasnotagent c1) | ||
(hasnotagent c2) | ||
(hasnotagent c3) | ||
(notbusy a1) | ||
(notbusy a2) | ||
(notbusy a3) | ||
(notbusy a4) | ||
(notbusy a5) | ||
(notbusy a6) | ||
(notbusy a7) | ||
|
||
(haspath x1 x2) | ||
(haspath x2 x1) | ||
(haspath x2 x3) | ||
(haspath x3 x2) | ||
(haspath x1 x7) | ||
(haspath x7 x1) | ||
|
||
(= (numberofcarrings a1) 0) | ||
(= (capacity a1) 4) | ||
|
||
(= (numberofcarrings a2) 0) | ||
(= (capacity a2) 4) | ||
|
||
(= (numberofcarrings a3) 1) | ||
(= (capacity a2) 3) | ||
|
||
(= (numberofcarrings a4) 0) | ||
(= (capacity a2) 4) | ||
|
||
(= (numberofcarrings a5) 2) | ||
(= (capacity a2) 10) | ||
|
||
(= (numberofcarrings a6) 0) | ||
(= (capacity a2) 1) | ||
|
||
(= (numberofcarrings a7) 0) | ||
(= (capacity a2) 3) | ||
|
||
|
||
|
||
(= (distancetime x1 x2) 20) | ||
(= (distancetime x2 x1) 20) | ||
|
||
(= (distancetime x2 x3) 20) | ||
(= (distancetime x3 x2) 20) | ||
|
||
(= (distancetime x3 x4) 20) | ||
(= (distancetime x3 x3) 20) | ||
|
||
|
||
(= (distancetime x4 x5) 20) | ||
(= (distancetime x5 x4) 20) | ||
|
||
(= (distancetime x5 x6) 20) | ||
(= (distancetime x6 x5) 20) | ||
|
||
(= (distancetime x6 x7) 20) | ||
(= (distancetime x7 x6) 20) | ||
|
||
|
||
|
||
) | ||
|
||
(:goal | ||
(and | ||
(at i1 x1) | ||
(at i2 x1) | ||
(at i3 x1) | ||
(at i4 x1) | ||
(at i5 x1) | ||
(at i6 x1) | ||
(at i7 x1) | ||
(at i8 x1) | ||
(at i9 x1) | ||
(at i10 x1) | ||
(at i11 x1) | ||
(at i12 x1) | ||
(at i13 x1) | ||
(at i14 x1) | ||
(at i15 x1) | ||
(at i16 x1) | ||
(at i17 x1) | ||
|
||
|
||
) | ||
) | ||
|
||
|
||
|
||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<launch> | ||
|
||
<arg name="domain" default="$(find explainable_planning)/common/supermarket-domain.pddl"/> | ||
|
||
<!-- scene database (MongoDB) --> | ||
|
||
<include file="$(find mongodb_store)/launch/mongodb_store.launch"> | ||
<arg name="db_path" value="$(find rosplan_knowledge_base)/common/mongoDB/"/> | ||
</include> | ||
|
||
<!-- knowledge base --> | ||
|
||
<node name="rosplan_knowledge_base" pkg="rosplan_knowledge_base" type="knowledgeBase" respawn="false" output="screen"> | ||
<param name="domain_path" value="$(arg domain)"/> | ||
<!-- change problem here --> | ||
<param name="problem_path" value="$(find explainable_planning)/common/complex-supermarket-problem.pddl"/> | ||
<param name="database_path" value="$(find rosplan_knowledge_base)/common/mongoDB/"/> | ||
<!-- conditional planning flags --> | ||
<param name="use_unknowns" value="False"/> | ||
</node> | ||
|
||
<!-- problem generation --> | ||
|
||
<node name="rosplan_problem_interface" pkg="rosplan_planning_system" type="problemInterface" respawn="false" output="screen"> | ||
<param name="domain_path" value="$(arg domain)"/> | ||
<param name="problem_path" value="$(find rosplan_planning_system)/common/problem.pddl"/> | ||
<param name="problem_topic" value="problem_instance"/> | ||
<param name="knowledge_base" value="rosplan_knowledge_base"/> | ||
</node> | ||
|
||
<!-- planning system --> | ||
|
||
<node name="rosplan_planner_interface" pkg="rosplan_planning_system" type="popf_planner_interface" respawn="false" output="screen"> | ||
<param name="knowledge_base" value="rosplan_knowledge_base"/> | ||
<!-- general options --> | ||
<param name="use_problem_topic" value="true"/> | ||
<!-- ros topics --> | ||
<param name="problem_topic" value="/rosplan_problem_interface/problem_instance"/> | ||
<param name="planner_topic" value="planner_output"/> | ||
<!-- directory for files --> | ||
<param name="domain_path" value="$(arg domain)"/> | ||
<param name="problem_path" value="$(find rosplan_planning_system)/common/problem.pddl"/> | ||
<param name="data_path" value="$(find rosplan_planning_system)/common/"/> | ||
<!-- to run the planner --> | ||
<param name="planner_command" value="$(find rosplan_planning_system)/common/bin/popf DOMAIN PROBLEM"/> | ||
</node> | ||
|
||
<!-- plan parsing --> | ||
<node name="rosplan_parsing_interface" pkg="rosplan_planning_system" type="pddl_simple_plan_parser" respawn="false" output="screen"> | ||
<param name="knowledge_base" value="rosplan_knowledge_base"/> | ||
<param name="planner_topic" value="/rosplan_planner_interface/planner_output"/> | ||
<param name="plan_topic" value="complete_plan"/> | ||
</node> | ||
|
||
<!-- plan explanation --> | ||
<node name="rosplan_plan_explainer" pkg="explainable_planning" type="rpexplainer" respawn="false" output="screen"> | ||
<param name="plan_topic" value="/rosplan_parsing_interface/complete_plan"/> | ||
<param name="action_dispatch_topic" value="action_dispatch"/> | ||
<param name="action_feedback_topic" value="action_feedback"/> | ||
</node> | ||
|
||
<!-- sim actions --> | ||
<!-- change actions here --> | ||
|
||
<node name="rosplan_interface_pick" pkg="rosplan_planning_system" type="simulatedAction" respawn="false" output="screen"> | ||
<param name="knowledge_base" value="rosplan_knowledge_base"/> | ||
<param name="pddl_action_name" value="pick"/> | ||
<param name="action_duration" value="0.0"/> | ||
<param name="action_probability" value="1.0"/> | ||
<param name="action_dispatch_topic" value="/rosplan_plan_explainer/action_dispatch"/> | ||
<param name="action_feedback_topic" value="/rosplan_plan_explainer/action_feedback"/> | ||
</node> | ||
|
||
<node name="rosplan_interface_drop" pkg="rosplan_planning_system" type="simulatedAction" respawn="false" output="screen"> | ||
<param name="knowledge_base" value="rosplan_knowledge_base"/> | ||
<param name="pddl_action_name" value="drop"/> | ||
<param name="action_duration" value="0.0"/> | ||
<param name="action_probability" value="1.0"/> | ||
<param name="action_dispatch_topic" value="/rosplan_plan_explainer/action_dispatch"/> | ||
<param name="action_feedback_topic" value="/rosplan_plan_explainer/action_feedback"/> | ||
</node> | ||
|
||
<node name="rosplan_interface_movecar" pkg="rosplan_planning_system" type="simulatedAction" respawn="false" output="screen"> | ||
<param name="knowledge_base" value="rosplan_knowledge_base"/> | ||
<param name="pddl_action_name" value="movecar"/> | ||
<param name="action_duration" value="0.0"/> | ||
<param name="action_probability" value="1.0"/> | ||
<param name="action_dispatch_topic" value="/rosplan_plan_explainer/action_dispatch"/> | ||
<param name="action_feedback_topic" value="/rosplan_plan_explainer/action_feedback"/> | ||
</node> | ||
|
||
<node name="rosplan_interface_getoncar" pkg="rosplan_planning_system" type="simulatedAction" respawn="false" output="screen"> | ||
<param name="knowledge_base" value="rosplan_knowledge_base"/> | ||
<param name="pddl_action_name" value="getoncar"/> | ||
<param name="action_duration" value="0.0"/> | ||
<param name="action_probability" value="1.0"/> | ||
<param name="action_dispatch_topic" value="/rosplan_plan_explainer/action_dispatch"/> | ||
<param name="action_feedback_topic" value="/rosplan_plan_explainer/action_feedback"/> | ||
</node> | ||
|
||
<node name="rosplan_interface_getoffcar" pkg="rosplan_planning_system" type="simulatedAction" respawn="false" output="screen"> | ||
<param name="knowledge_base" value="rosplan_knowledge_base"/> | ||
<param name="pddl_action_name" value="getoffcar"/> | ||
<param name="action_duration" value="0.0"/> | ||
<param name="action_probability" value="1.0"/> | ||
<param name="action_dispatch_topic" value="/rosplan_plan_explainer/action_dispatch"/> | ||
<param name="action_feedback_topic" value="/rosplan_plan_explainer/action_feedback"/> | ||
</node> | ||
|
||
|
||
|
||
|
||
</launch> |