Class CognexConsultant
java.lang.Object
edu.tufts.hrilab.consultant.Consultant<CognexReference>
edu.tufts.hrilab.mtracs.consultant.vision.CognexConsultant
- All Implemented Interfaces:
ConsultantInterface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
Group identifier to be prepended to reference namesFields inherited from class edu.tufts.hrilab.consultant.Consultant
defaultProperties, kbName, log, propertiesHandled, refConstructor, references, refNumber
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDetectionType
(Symbol descriptor, Symbol jobName) Adds a binding between the human descriptor and the name of the job on the cognex, these doesn't necessarily need to be the same.boolean
assertProperties
(Symbol refId, List<Term> properties) Add properties to already existing object ref.boolean
an attempt is made to bring the knowledge base in line with the provided bindings, list of properties, and probability value.createCognexRef
(CognexJob job, List<Term> additionalProps) getJobForDescriptor
(String descriptor) protected Symbol
Helper method to generate next unique reference ID (e.g., object_3).boolean
insertReference
(Symbol refId, CognexReference ref) <U> U
localConvertToType
(Symbol refId, Class<U> type) <U> U
localConvertToType
(Symbol refId, Class<U> type, List<? extends Term> constraints) removeReference
(Symbol refId) Methods inherited from class edu.tufts.hrilab.consultant.Consultant
addPropertiesHandled, addReference, convertToType, convertToType, createReference, createReferences, getActivatedEntities, getAssertedProperties, getInitialDomain, getKBName, getPropertiesHandled, getReference, getReferenceSummaries, getReferencesWithAllProperties, getReferencesWithAnyProperties, notifyNewPropertySubscribers, process, registerForNewPropertyNotification, retractProperties, stripQuotesFromMorpheme, unregisterForNewPropertyNotification
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.tufts.hrilab.interfaces.ConsultantInterface
convertToType, convertToType, createReferences, getActivatedEntities, getAssertedProperties, getInitialDomain, getKBName, getPropertiesHandled, notifyNewPropertySubscribers, process, registerForNewPropertyNotification, unregisterForNewPropertyNotification
-
Field Details
-
availableJobs
-
boundJobs
-
groupNames
Group identifier to be prepended to reference names
-
-
Constructor Details
-
CognexConsultant
-
-
Method Details
-
localConvertToType
- Specified by:
localConvertToType
in classConsultant<CognexReference>
-
localConvertToType
- Specified by:
localConvertToType
in classConsultant<CognexReference>
-
assertProperties
Description copied from interface:ConsultantInterface
an attempt is made to bring the knowledge base in line with the provided bindings, list of properties, and probability value.- Specified by:
assertProperties
in interfaceConsultantInterface
- Overrides:
assertProperties
in classConsultant<CognexReference>
- Parameters:
bindings
- list of bindings in tuple form (free-variable and refId pair)prob
- probability valueproperties
- list of Properties- Returns:
- whether the updated was successful?
-
assertProperties
Description copied from interface:ConsultantInterface
Add properties to already existing object ref. Each property should contain a connection to the existing ref either by refId or refId's variable.- Specified by:
assertProperties
in interfaceConsultantInterface
- Overrides:
assertProperties
in classConsultant<CognexReference>
- Returns:
-
addDetectionType
Adds a binding between the human descriptor and the name of the job on the cognex, these doesn't necessarily need to be the same. The system should know about all of the job names, but it doesn't have to know about the human producible descriptors?Once the binding is done it adds the property to the consultant. TODO:brad is there a way we could just get the jobs from the Cognex at start up? that would make this a lot easier.
- Parameters:
descriptor
- human provided descriptorjobName
- name of job on the Cognex that is used to detect the thing associated with the provided descriptor
-
createCognexRef
-
getNextReferenceId
Description copied from class:Consultant
Helper method to generate next unique reference ID (e.g., object_3).- Overrides:
getNextReferenceId
in classConsultant<CognexReference>
- Returns:
-
getJobForDescriptor
- Parameters:
descriptor
-- Returns:
-
removeReference
-
insertReference
-