Package edu.tufts.hrilab.vision.stm
Class MemoryObjectUtil
java.lang.Object
edu.tufts.hrilab.vision.stm.MemoryObjectUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanapplyDefinition(MemoryObject mo, Term name, List<Term> descriptors) static doublegetAngleFromAngle(Grasp grasp, javax.vecmath.Vector3d angleVector) Helper method to get the angle (in radians) between the grasp orientation and the passed in vector..Helper method to get an entire bound scene graph description given the root of the scene graph.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.static booleangetMemoryObjectBindings(MemoryObject mo, Term constraints, List<Map<Variable, MemoryObject>> bindings) Convenience method to pass in a single constraint.static booleangetMemoryObjectBindings(MemoryObject mo, List<? extends Term> constraints, List<Map<Variable, MemoryObject>> bindings) Get list of MemoryObject bindings from the scene graph that meet the constraints.static booleangetMemoryObjectIdentifierBindings(MemoryObject mo, Term constraints, List<Map<Variable, Symbol>> bindings) Convenience method to pass in a single constraint.static booleangetMemoryObjectIdentifierBindings(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.Helper method to get an entire scene graph description (i.e., unbound descriptors) given the root of the scene graph.
-
Constructor Details
-
MemoryObjectUtil
public MemoryObjectUtil()
-
-
Method Details
-
getAngleFromAngle
Helper method to get the angle (in radians) between the grasp orientation and the passed in vector..- Parameters:
grasp-- Returns:
-
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 searchedconstraints- to be satisfiedbindings- 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
-
getBoundSceneGraphDescriptors
Helper method to get an entire bound scene graph description given the root of the scene graph.- Parameters:
mo-- Returns:
-
getSceneGraphDescriptors
Helper method to get an entire scene graph description (i.e., unbound descriptors) given the root of the scene graph.- Parameters:
mo-
-