Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pddl_planner/demos/search_object] fix bug, and add launch file #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pddl/pddl_planner/demos/search_object/demo_search_object.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<launch>
<arg name="viewer" default="true" />
<include file="$(find pddl_planner)/launch/pddl_downward.launch" />
<node name="demo_search_object" pkg="roseus" type="roseus"
args="$(find pddl_planner)/demos/search_object/solve-search-object.l"
output="screen">
<param name="display_graph" value="$(arg viewer)" />
</node>

<node pkg="smach_viewer" name="smach_viewer"
type="smach_viewer.py" if="$(arg viewer)" />
</launch>
6 changes: 2 additions & 4 deletions pddl/pddl_planner/demos/search_object/solve-search-object.l
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,12 @@
;;

;; normal plan
(pprint (setq *result* (solve-pddl-planning *domain* *problem* :debug nil)))
(setq *graph* (pddl-plan-to-graph nil :domain *domain* :problem *problem* :failed-nodes (list 'detect :debug nil)))
Naoki-Hiraoka marked this conversation as resolved.
Show resolved Hide resolved
;; there is no target object in environment
(pprint (setq *result-fail-end* (solve-pddl-planning *domain* *problem-fail-end* :debug nil)))

;; at first, make graph from failed plan (because failed plan does not contain success detection)
(setq *graph* (make-graph-from-pddl-results (list *result-fail-end*) :node-name :pprint))
;; merge 2 results and adding failure
(setq *graph* (add-failed-nodes *result* (list 'detect) :graph *graph*))
(setq *graph* (make-graph-from-pddl-results (list *result-fail-end*) :node-name :pprint :graph *graph*))

(make-readable-graph *graph* :copy nil)

Expand Down