   env/Action                (action-name [] [:go-grasp o])
                             (primitive? [] false)
   env/ContextualAction      (precondition-context [s] 
-                              (conj (reach-context s (env/get-var s [:pos o])) 
+                              (conj (reach-context (env/get-var s :const) (env/get-var s [:pos o])) 
                                     [:pos o] [:at-goal? o] [:holding]))
   hierarchy/HighLevelAction (immediate-refinements- [s]
                              (for [dst (possible-grasp-base-pos s (env/get-var s [:pos o]))]

;                                  {}))


(defn move-to-front [x s]
  (if (some #{x} s)
      (cons x (remove #{x} s))
    s))

;; TODO: check out state abstraction here
;; Note: since we may not sample current position, have to special case.

(defn possible-grasp-base-pos [s grasp-pos]
  (let [const (env/get-var s :const)
        base  (env/get-var s [:base])                                   
        free  (get const [:freespace])]
    (->> (get const [:base-offsets])
         (map #(add-pos % grasp-pos))
         (filter free)
         (move-to-front base)
         (take (get const [:n-base-samples])))))


;; TODO: pess

                                     (move-gripper-reward go dst-go)}
                                    {}))))))

(defn possible-grasp-gos [const base pos]
  (for [[dirname dir] dirs
        :let [go (sub-pos (sub-pos pos dir) base)]
        :when (can-reach-from? const base go)]
      go))

;; TODO: slack? pess? 
