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
353 stars 159 forks source link

Getting POPF planner to spit out a simple plan #176

Closed keerthanamanivannan closed 5 years ago

keerthanamanivannan commented 5 years ago

Description

I have a simple domain and problem PDDL files, but I get Plan was unsolvable. output from the planner.

My environment

(kinetic branch is far behind master.)

Steps to reproduce

I cloned ROSPlan and followed few of the tutorials. I added my own domain and problem PDDL files in rosplan_demos/common/aq/

Domain file

d-pddl

Problem file

p-pddl

My launch file: <?xml version="1.0"?>

Expected behaviour

I launch this launch file, and call these two services:

  1. rosservice call /rosplan_problem_interface/problem_generation_server
  2. rosservice call /rosplan_planner_interface/planning_server

I should get a plan.pddl with the action "Stow" or something.

Actual behaviour

Instead, I get this:

[ INFO] [1552073160.804842525]: KCL: (/rosplan_planner_interface) (problem.pddl) Planning complete [ INFO] [1552073160.804941163]: KCL: (/rosplan_planner_interface) (problem.pddl) Plan was unsolvable.

The generated plan.pddl inside install space contains this:

Screenshot from 2019-03-08 14-56-48

Backtrace or Console output


[ INFO] [1552073067.156950095]: KCL: (/rosplan_problem_interface) Ready to receive
[ INFO] [1552073067.208967971]: KCL: (/rosplan_knowledge_base) Parsing domain
[ INFO] [1552073067.209099173]: KCL: (/rosplan_knowledge_base) Parsing domain: /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/domain.pddl.
[ INFO] [1552073067.209486743]: KCL: (/rosplan_knowledge_base) Parsing initial state
[ INFO] [1552073067.209554154]: KCL: (/rosplan_knowledge_base) Parsing Problem File: /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/problem.pddl.
[ INFO] [1552073067.209735903]: KCL: (/rosplan_knowledge_base) Waiting for MongoDB
[ INFO] [1552073067.211048186]: waitForService: Service [/message_store/delete] has not been advertised, waiting...
[ INFO] [1552073067.230798705]: KCL: (/rosplan_planner_interface) Ready to receive
[ INFO] [1552073068.066033253]: waitForService: Service [/message_store/delete] is now available.
MongoDB shell version: 2.6.10
connecting to: message_store
2019-03-08T13:24:28.123-0600 remove needs a query at src/mongo/shell/collection.js:299
[ INFO] [1552073068.125870943]: KCL: (/rosplan_knowledge_base) Ready to receive
[ INFO] [1552073072.126034682]: KCL: (/rosplan_problem_interface) (problem.pddl) Generating problem file.
[ INFO] [1552073072.141167715]: KCL: (/rosplan_problem_interface) (problem.pddl) The problem was generated.
[ INFO] [1552073072.141485859]: KCL: (/rosplan_planner_interface) Problem received.
[ INFO] [1552073160.799022064]: KCL: (/rosplan_planner_interface) (problem.pddl) Writing problem to file.
[ INFO] [1552073160.799326552]: KCL: (/rosplan_planner_interface) (problem.pddl) Running: timeout 10 /home/kmanivannan/a_ws/install/share/rosplan_planning_system/common/bin/popf /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/domain.pddl /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/problem.pddl > /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/plan.pddl
[ INFO] [1552073160.804842525]: KCL: (/rosplan_planner_interface) (problem.pddl) Planning complete
[ INFO] [1552073160.804941163]: KCL: (/rosplan_planner_interface) (problem.pddl) Plan was unsolvable.```
DerekLong101 commented 5 years ago

Hi

POPF does not handle negative preconditions (at start (not (stowed ?a))). Try using a paired predicate, unstowed:

(at start (unstowed ?a))

:effect (and (at end (stowed ?a)) (at start (not (unstowed ?a))))

etc. Note the idiom in which you delete the unstowed at start and only add the stowed at end - in the middle of the action, the arm is neither stowed or unstowed. This is actually a good thing - because it stops any plans in which the arm is exploited while in the middle of stowing or unstowing.

Cheers

Derek


From: Keerthana Subramanian Manivannan notifications@github.com Sent: 08 March 2019 19:37:08 To: KCL-Planning/ROSPlan Cc: Subscribed Subject: [KCL-Planning/ROSPlan] Help getting POPF planner to spit out a simple plan (#176)

Description

I have a simple domain and problem PDDL files, but I get Plan was unsolvable. output from the planner.

My environment

Steps to reproduce

I cloned ROSPlan and followed few of the tutorials. I added my own domain and problem PDDL files in rosplan_demos/common/aq/

Domain file

[d-pddl]https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F15019704%2F54051335-31a8ca00-41a7-11e9-9a3c-e4e560cd3d75.png&data=01%7C01%7Cderek.long%40kcl.ac.uk%7Cb269d775e96c4c8fcf6208d6a3fd751e%7C8370cf1416f34c16b83c724071654356%7C0&sdata=yhgRjMvX8MJf5blwT1d4Rz2LhJSJP2Rde5Z%2FRK57iHw%3D&reserved=0

Problem file

[p-pddl]https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F15019704%2F54051341-379eab00-41a7-11e9-9bb1-59c759d04046.png&data=01%7C01%7Cderek.long%40kcl.ac.uk%7Cb269d775e96c4c8fcf6208d6a3fd751e%7C8370cf1416f34c16b83c724071654356%7C0&sdata=znrt9fuPQ%2FE5X6giTMYG5KrDF9S4KiQtHIw6Jbk%2Fo9A%3D&reserved=0

My launch file:

Expected behaviour

I launch this launch file, and call these two services:

  1. rosservice call /rosplan_problem_interface/problem_generation_server
  2. rosservice call /rosplan_planner_interface/planning_server

I should get a plan.pddl with the action "Stow" or something.

Actual behaviour

Instead, I get this:

[ INFO] [1552073160.804842525]: KCL: (/rosplan_planner_interface) (problem.pddl) Planning complete [ INFO] [1552073160.804941163]: KCL: (/rosplan_planner_interface) (problem.pddl) Plan was unsolvable.

Backtrace or Console output

[ INFO] [1552073067.156950095]: KCL: (/rosplan_problem_interface) Ready to receive [ INFO] [1552073067.208967971]: KCL: (/rosplan_knowledge_base) Parsing domain [ INFO] [1552073067.209099173]: KCL: (/rosplan_knowledge_base) Parsing domain: /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/domain.pddl. [ INFO] [1552073067.209486743]: KCL: (/rosplan_knowledge_base) Parsing initial state [ INFO] [1552073067.209554154]: KCL: (/rosplan_knowledge_base) Parsing Problem File: /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/problem.pddl. [ INFO] [1552073067.209735903]: KCL: (/rosplan_knowledge_base) Waiting for MongoDB [ INFO] [1552073067.211048186]: waitForService: Service [/message_store/delete] has not been advertised, waiting... [ INFO] [1552073067.230798705]: KCL: (/rosplan_planner_interface) Ready to receive [ INFO] [1552073068.066033253]: waitForService: Service [/message_store/delete] is now available. MongoDB shell version: 2.6.10 connecting to: message_store 2019-03-08T13:24:28.123-0600 remove needs a query at src/mongo/shell/collection.js:299 [ INFO] [1552073068.125870943]: KCL: (/rosplan_knowledge_base) Ready to receive [ INFO] [1552073072.126034682]: KCL: (/rosplan_problem_interface) (problem.pddl) Generating problem file. [ INFO] [1552073072.141167715]: KCL: (/rosplan_problem_interface) (problem.pddl) The problem was generated. [ INFO] [1552073072.141485859]: KCL: (/rosplan_planner_interface) Problem received. [ INFO] [1552073160.799022064]: KCL: (/rosplan_planner_interface) (problem.pddl) Writing problem to file. [ INFO] [1552073160.799326552]: KCL: (/rosplan_planner_interface) (problem.pddl) Running: timeout 10 /home/kmanivannan/a_ws/install/share/rosplan_planning_system/common/bin/popf /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/domain.pddl /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/problem.pddl > /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/plan.pddl [ INFO] [1552073160.804842525]: KCL: (/rosplan_planner_interface) (problem.pddl) Planning complete [ INFO] [1552073160.804941163]: KCL: (/rosplan_planner_interface) (problem.pddl) Plan was unsolvable.```

Use gist.github.com to copy-paste the console output or segfault backtrace using gdb.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKCL-Planning%2FROSPlan%2Fissues%2F176&data=01%7C01%7Cderek.long%40kcl.ac.uk%7Cb269d775e96c4c8fcf6208d6a3fd751e%7C8370cf1416f34c16b83c724071654356%7C0&sdata=vVkWhZXxUxu4n2Qda06muPRhlVSsxLfG17SXIExXKXw%3D&reserved=0, or mute the threadhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHSnVFOMRdcWeALIxpABoW27aybZww5wks5vUrvkgaJpZM4bl_tw&data=01%7C01%7Cderek.long%40kcl.ac.uk%7Cb269d775e96c4c8fcf6208d6a3fd751e%7C8370cf1416f34c16b83c724071654356%7C0&sdata=B%2BHBlFk0oo7xIJu27T5Dcu0875TWZWUh2frfbBPZVYE%3D&reserved=0.

DerekLong101 commented 5 years ago

If that is your pddl file, then one error is the missing bracket at end of line 23. Try running popf outside rosplan first, to debug your domain.

Cheers

Derek

Sent from Samsung tablet.

-------- Original message -------- From: Keerthana Subramanian Manivannan notifications@github.com Date: 13/03/2019 19:53 (GMT+00:00) To: KCL-Planning/ROSPlan ROSPlan@noreply.github.com Cc: DerekLong101 derek.long@kcl.ac.uk, Comment comment@noreply.github.com Subject: Re: [KCL-Planning/ROSPlan] Help getting POPF planner to spit out a simple plan (#176)

Hi Derek,

Thank you for the response. What you explained makes a lot of sense.

However, when I changed the domain file to: [Screenshot from 2019-03-13 14-52-12]https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F15019704%2F54310114-9d23da80-459f-11e9-88cb-351ec0022596.png&data=01%7C01%7Cderek.long%40kcl.ac.uk%7C7692980eb8e5403c78d108d6a7ed867b%7C8370cf1416f34c16b83c724071654356%7C0&sdata=W%2FcDjt%2F3gmCGZB22SRMJZMI0Zbq7ZzQxnRh38jdJHzU%3D&reserved=0

and problem file was the same: [Screenshot from 2019-03-13 14-38-08]https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F15019704%2F54309175-a14ef880-459d-11e9-9276-cc3429f4af37.png&data=01%7C01%7Cderek.long%40kcl.ac.uk%7C7692980eb8e5403c78d108d6a7ed867b%7C8370cf1416f34c16b83c724071654356%7C0&sdata=AyGG8EfNm8iRoyLuhBrVMy%2FQCqGNwYgXvTx7bQQCx3A%3D&reserved=0

I still get an error:

[ INFO] [1552505729.284645504, 739.787000000]: KCL: (/rosplan_planner_interface) (problem.pddl) Running: timeout 10 /home/kmanivannan/a_ws/install/share/rosplan_planning_system/common/bin/popf /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/domain.pddl /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/problem.pddl > /home/kmanivannan/a_ws/install/share/rosplan_demos/common/aq/plan.pddl Critical Errors Encountered in Domain/Problem File

Due to critical errors in the supplied domain/problem file, the planner has to terminate. The errors encountered are as follows: [ INFO] [1552505729.295531608, 739.789000000]: KCL: (/rosplan_planner_interface) (problem.pddl) Planning complete [ INFO] [1552505729.295634449, 739.789000000]: KCL: (/rosplan_planner_interface) (problem.pddl) Plan was unsolvable.

I'm getting some syntax errors in the domain file:

File: ../rosplan/rosplan_demos/common/aq/domain.pddl

Errors: 2, warnings: 0 ../rosplan/rosplan_demos/common/aq/domain.pddl: line: 24: Error: Syntax error in durative-action declaration. ../rosplan/rosplan_demos/common/aq/domain.pddl: line: 24: Error: Unreadable structure```

Do you see any obvious issues here that I'm missing?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKCL-Planning%2FROSPlan%2Fissues%2F176%23issuecomment-472579794&data=01%7C01%7Cderek.long%40kcl.ac.uk%7C7692980eb8e5403c78d108d6a7ed867b%7C8370cf1416f34c16b83c724071654356%7C0&sdata=sSbnDrRVYJ0%2F93f%2BEPiHzpJYSbCIER9OQ0HuC4wjtE8%3D&reserved=0, or mute the threadhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHSnVP9cEUWA-ninDiDnH1g8SVSfxEVLks5vWVcmgaJpZM4bl_tw&data=01%7C01%7Cderek.long%40kcl.ac.uk%7C7692980eb8e5403c78d108d6a7ed867b%7C8370cf1416f34c16b83c724071654356%7C0&sdata=o76CLaLUfyA2u9oeAHTAYa6a%2FrysQ6k8b0JpqMPoz0o%3D&reserved=0.

keerthanamanivannan commented 5 years ago

Awesome, what you said made a lot of sense. Thank you for your response!

I changed the domain file to: Screenshot from 2019-03-13 15-15-23 and the /rosplan_planner_interface put out a Plan was solved. message.

Thank you once again!