Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
tutorials:advanced:bullet_world [2017/09/18 17:43] – [Construct plans] gkazhoyatutorials:advanced:bullet_world [2017/09/22 09:40] – [Abstract entity descriptions] gkazhoya
Line 1: Line 1:
-//Tested with Cram branch: Cram4, ROS version: Indigo, Ubuntu 14.04//+**//Tested with Cram v0.4.0, ROS version: Kinetic, Ubuntu 16.04//**
  
 ====== Bullet world demonstration ====== ====== Bullet world demonstration ======
Line 70: Line 70:
 ====REPL setup==== ====REPL setup====
  
-Now, let's load the package in the REPL:+Now, let's load the package in the REPL (start the REPL with ''$ roslisp_repl''):
 <code lisp> <code lisp>
 CL-USER> (ros-load:load-system "cram_bullet_world_tutorial" :cram-bullet-world-tutorial) CL-USER> (ros-load:load-system "cram_bullet_world_tutorial" :cram-bullet-world-tutorial)
Line 214: Line 214:
 (btr:set-robot-state-from-joints (btr:set-robot-state-from-joints
  '(("iai_fridge_door_joint"  0.3d0))  '(("iai_fridge_door_joint"  0.3d0))
- (btr:object btr:*current-bullet-world* 'my-kitchen))+ (btr:object btr:*current-bullet-world* :kitchen))
 </code> </code>
  
Line 285: Line 285:
 BTW-TUT> (prolog:prolog '(and (btr:bullet-world ?world) BTW-TUT> (prolog:prolog '(and (btr:bullet-world ?world)
                               (assert (btr:object-pose ?world cram-pr2-description:pr2                               (assert (btr:object-pose ?world cram-pr2-description:pr2
-                                                       ((0.5 1 0) (0 0 1 ))))))+                                                       ((0.5 1 0) (0 0 1 0))))))
 </code> </code>
 and ask the visibility query again: instead of typing, put the cursor where you would type and press ''Ctrl-Up''. This will find previously executed commands. and ask the visibility query again: instead of typing, put the cursor where you would type and press ''Ctrl-Up''. This will find previously executed commands.
Line 296: Line 296:
                 (?mug-pose-stamped (cl-transforms-stamped:pose->pose-stamped "map" 0 mug-pose))                 (?mug-pose-stamped (cl-transforms-stamped:pose->pose-stamped "map" 0 mug-pose))
                 (?mug-location-designator (desig:a location (pose ?mug-pose-stamped)))                 (?mug-location-designator (desig:a location (pose ?mug-pose-stamped)))
-                (to-see-designator (desig:a location (to see)+                (to-see-designator (desig:a location (type visible) 
 +                                                     (for pr2)
                                                      (location ?mug-location-designator))))                                                      (location ?mug-location-designator))))
              (desig:reference to-see-designator))              (desig:reference to-see-designator))
Line 315: Line 316:
        (?the-object (desig:an object (type mug)        (?the-object (desig:an object (type mug)
                                      (at ?on-counter)))                                      (at ?on-counter)))
-       (location-to-see (desig:a location (to see)+       (location-to-see (desig:a location (type visible) 
 +                                          (for pr2)
                                           (object ?the-object))))                                           (object ?the-object))))
     (desig:reference location-to-see))     (desig:reference location-to-see))
Line 521: Line 523:
 <code lisp> <code lisp>
 BTW-TUT>     BTW-TUT>    
 +(defparameter *pose-bottle-1*
 +  (cl-transforms-stamped:make-pose-stamped 
 +   "map" 0.0 
 +   (cl-transforms:make-3d-vector -2 -0.9d0 0.86d0)
 +   (cl-transforms:make-identity-rotation)))
 + 
 +(defparameter *pose-bottle-2*
 +  (cl-transforms-stamped:make-pose-stamped 
 +   "map" 0.0 
 +   (cl-transforms:make-3d-vector -0.8 2 0.9)
 +   (cl-transforms:make-identity-rotation)))
 +
 (defparameter *pose-meal-table* (defparameter *pose-meal-table*
   (cl-tf:make-pose-stamped   (cl-tf:make-pose-stamped
    "map" 0.0    "map" 0.0
-   (cl-tf:make-3d-vector -0.15 1.0)+   (cl-tf:make-3d-vector -0.15 2.0)
    (cl-tf:make-quaternion 0.0d0 0.0d0 -1.0d0 0.0d0)))    (cl-tf:make-quaternion 0.0d0 0.0d0 -1.0d0 0.0d0)))
  
Line 530: Line 544:
   (cl-transforms-stamped:make-pose-stamped   (cl-transforms-stamped:make-pose-stamped
    "map" 0.0    "map" 0.0
-   (cl-transforms:make-3d-vector -2.1547d0 -0.381d0 0.0d0)+   (cl-transforms:make-3d-vector -1.8547d0 -0.381d0 0.0d0)
    (cl-transforms:axis-angle->quaternion (cl-transforms:make-3d-vector 0 0 1) (/ pi -2))))    (cl-transforms:axis-angle->quaternion (cl-transforms:make-3d-vector 0 0 1) (/ pi -2))))
 </code> </code>