Class MemoryObjectUtil

java.lang.Object
edu.tufts.hrilab.vision.stm.MemoryObjectUtil

public class MemoryObjectUtil extends Object
  • Constructor Details

    • MemoryObjectUtil

      public MemoryObjectUtil()
  • Method Details

    • convertMemoryObjectToGrasp

      public static Grasp convertMemoryObjectToGrasp(MemoryObject graspMO)
    • getAngleFromVertical

      public static double getAngleFromVertical(MemoryObject mo)
      Helper method to get the angle (in radians) between the mo orientation and the vertical (0,0,-1) orientation.
      Parameters:
      mo -
      Returns:
    • getAngleFromAngle

      public static double getAngleFromAngle(MemoryObject mo, javax.vecmath.Vector3d angleVector)
      Helper method to get the angle (in radians) between the mo orientation and the passed in vector..
      Parameters:
      mo -
      Returns:
    • getAngleFromAngle

      public static double getAngleFromAngle(Grasp grasp, javax.vecmath.Vector3d angleVector)
      Helper method to get the angle (in radians) between the grasp orientation and the passed in vector..
      Parameters:
      grasp -
      Returns:
    • getAngleFromCurrent

      public static double getAngleFromCurrent(MemoryObject mo)
    • getConfidence

      public static List<Float> getConfidence(MemoryObject rootMO, List<? extends Term> constraints, Map<Variable,Symbol> bindings)
      Get the highest confidence value for each term in list along with the bindings (variable to memory object identifier (e.g., object26)) for the returned confidence values.
      Parameters:
      rootMO - root of the scene graph to be searched
      constraints - to be satisfied
      bindings - return bindings for highest confidence match
      Returns:
      list of confidence values, one for each constraint Term
    • getMemoryObjectBindings

      public static boolean getMemoryObjectBindings(MemoryObject mo, List<? extends Term> constraints, List<Map<Variable,MemoryObject>> bindings)
      Get list of MemoryObject bindings from the scene graph that meet the constraints.
      Parameters:
      mo -
      constraints -
      bindings -
      Returns:
      if bindings were found for all free variables
    • getMemoryObjectIdentifierBindings

      public static boolean getMemoryObjectIdentifierBindings(MemoryObject mo, List<? extends Term> constraints, List<Map<Variable,Symbol>> bindings)
      Get list of MemoryObject identifier bindings (e.g., object31) from the scene graph that meet the constraints.
      Parameters:
      mo -
      constraints -
      bindings -
      Returns:
      if bindings were found for all free variables
    • getMemoryObjectBindings

      public static boolean getMemoryObjectBindings(MemoryObject mo, Term constraints, List<Map<Variable,MemoryObject>> bindings)
      Convenience method to pass in a single constraint.
      Parameters:
      mo -
      constraints -
      bindings -
      Returns:
    • getMemoryObjectIdentifierBindings

      public static boolean getMemoryObjectIdentifierBindings(MemoryObject mo, Term constraints, List<Map<Variable,Symbol>> bindings)
      Convenience method to pass in a single constraint.
      Parameters:
      mo -
      constraints -
      bindings -
      Returns:
      if bindings were found for all free variables
    • applyDefinition

      public static boolean applyDefinition(MemoryObject mo, Term name, List<Term> descriptors)
    • getBoundSceneGraphDescriptors

      public static Set<Term> getBoundSceneGraphDescriptors(MemoryObject mo)
      Helper method to get an entire bound scene graph description given the root of the scene graph.
      Parameters:
      mo -
      Returns:
    • getSceneGraphDescriptors

      public static Set<Term> getSceneGraphDescriptors(MemoryObject mo)
      Helper method to get an entire scene graph description (i.e., unbound descriptors) given the root of the scene graph.
      Parameters:
      mo -
    • getGraspsFor

      public static List<Grasp> getGraspsFor(MemoryObject o, Function<Grasp,Boolean> filter, Comparator<Grasp> comparator)
    • getGraspsFor

      public static List<Grasp> getGraspsFor(MemoryObject o, Comparator<Grasp> comparator)
    • getGraspsFor

      public static List<Grasp> getGraspsFor(MemoryObject o, Function<Grasp,Boolean> filter)
    • getGraspsFor

      public static List<Grasp> getGraspsFor(MemoryObject o)
    • getGraspFor

      public static Grasp getGraspFor(MemoryObject o, Function<Grasp,Boolean> filter, Comparator<Grasp> comparator)
    • getGraspFor

      public static Grasp getGraspFor(MemoryObject o, Comparator<Grasp> comparator)
    • getGraspFor

      public static Grasp getGraspFor(MemoryObject o, Function<Grasp,Boolean> filter)
    • getGraspFor

      public static Grasp getGraspFor(MemoryObject o)