Skip to content

Commit

Permalink
load fridge-demo file only when suceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
JSK PR2 Users committed Oct 31, 2022
1 parent 453942c commit 67f3e2c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions detect_cans_in_fridge_201202/apps/pick_object/pick_object.l
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
;; pick_object.l

(require :app-utils "package://jsk_demo_common/euslisp/app-utils.l")

(require :fridge-demo-smach-main
"package://detect_cans_in_fridge_201202/euslisp/fridge-demo-smach-main.l")

(require :speak "package://pr2eus/speak.l")

(defun main ()
(let ((object (string-downcase (get-arg :object))))
;; set default object: georgia
(if (null object) (setq object "georgia"))
(cond
((find object (list "wonda" "georgia" "boss" "iemon") :test #'string=)
(require :fridge-demo-smach-main
"package://detect_cans_in_fridge_201202/euslisp/fridge-demo-smach-main.l")
(send *ri* :clear-costmap)
(fridge-demo-smach-main :can-type object
:use-arm :larm
Expand All @@ -21,4 +20,5 @@
nil))
))

(ros::roseus "pick_object")
(run-exit (main))

0 comments on commit 67f3e2c

Please sign in to comment.