Package edu.tufts.hrilab.mtracs
Class MockCR800Component
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.mtracs.MockCR800Component
- All Implemented Interfaces:
CR800ComponentInterface
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final javax.vecmath.Point3dprotected CognexConsultantprotected javax.vecmath.Point3dprotected Stringprotected final Symbolprotected Stringprotected final javax.vecmath.Point3dprotected final intprotected final intprotected final intprotected final intprotected Stringprotected MPoseConsultantprotected Stringprotected intFields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptEE()protected List<org.apache.commons.cli.Option>Command line options available in sub-class.protected SymbolHelper method used to create a new entry in our pose consultant for the given pose name and pose data.adjustPoseToCameraHeight(MPose goal, Symbol cameraHeight) booleanalternateEE(MPose newTCP) voidbindCognexResult(CognexReference ref, CognexResult result, int indexIntoCognexResult) voidbindToSurface(MPose goal, Symbol surfaceHeight) booleanvoidcreateCogRefWithProps(CognexJob j, List<Term> additionalProperties) booleandelay(double seconds) booleanbooleaneeOrientTo(javax.vecmath.Point3d g) booleanejectEE()getCameraData(String jobName) getCognexJobForDescriptor(Symbol descriptor) getCognexReferenceForID(Symbol refId) getDescriptorForID(Symbol refId) getMatchingResult(CognexReference toReBind, List<CognexResult> results) getPoseFromSymbol(Symbol poseName) getTCPForEE(Symbol eeType) booleanbooleangoToPoseLong(MPose goal) protected voidinit()Perform any component initialization.booleanbooleanbooleanbooleanmoveInPlane(Symbol x, Symbol y) booleanmoveToCognexTarget(Symbol refID) booleanmoveToCognexTarget(List<CognexResult> results, int jobIndex) booleanbooleanmoveXRelative(double dist) booleanmoveZRelative(double dist) booleanprotected voidparseArgs(org.apache.commons.cli.CommandLine cmdLine) Called directly after construction to pass runtime values that will override default values.booleanbooleanrecordPose(Symbol poseName, Symbol surfaceHeight) recordPose(Symbol poseName, MPose pose, Symbol surfaceHeight) booleanbooleanbooleanshankIn()booleanshankOut()booleantightenScrew(Symbol screwType) booleanMethods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, shutdown, shutdownComponent
-
Field Details
-
configFilePath
-
dropoffs
-
additionalHeader
-
modelCode
-
defaultCognexJob
-
cognexOffset
protected javax.vecmath.Point3d cognexOffset -
tcps
-
mxtPoseConsultant
-
cognexConsultant
-
DEFAULT_GRIPPER
-
GRIPPER_POLL_SLEEP
protected final int GRIPPER_POLL_SLEEP- See Also:
-
GRIPPER_FINISH_SLEEP
protected final int GRIPPER_FINISH_SLEEP- See Also:
-
GRIPPER_CLOSED
protected final int GRIPPER_CLOSED- See Also:
-
GRIPPER_OPEN
protected final int GRIPPER_OPEN- See Also:
-
COGNEX
protected final javax.vecmath.Point3d COGNEX -
DOWN
protected final javax.vecmath.Point3d DOWN -
myAgentName
-
SIM_SLEEP_T
protected int SIM_SLEEP_T
-
-
Constructor Details
-
MockCR800Component
public MockCR800Component()
-
-
Method Details
-
additionalUsageInfo
Description copied from class:DiarcComponentCommand line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfoin classDiarcComponent- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponentCalled directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.zs- Overrides:
parseArgsin classDiarcComponent
-
init
protected void init()Description copied from class:DiarcComponentPerform any component initialization. This should not be used for setting local fields to default values as was the case in DIARC. This method is called after the constructor, and after parseArgs. Setting default values should be done in field declaration or in the constructor.- Overrides:
initin classDiarcComponent
-
getCameraData
- Specified by:
getCameraDatain interfaceCR800ComponentInterface
-
moveToCognexTarget
- Specified by:
moveToCognexTargetin interfaceCR800ComponentInterface
-
moveToCognexTarget
- Specified by:
moveToCognexTargetin interfaceCR800ComponentInterface
-
getCurrentPose
- Specified by:
getCurrentPosein interfaceCR800ComponentInterface
-
connectToController
public void connectToController() -
recordPose
- Specified by:
recordPosein interfaceCR800ComponentInterface
-
recordPose
- Specified by:
recordPosein interfaceCR800ComponentInterface
-
addPose
Helper method used to create a new entry in our pose consultant for the given pose name and pose data.- Parameters:
poseName- The string representation of the human understandable pose name.pose- The MPose representing the pose to save to our pose consultant.
-
getPoseFromSymbol
- Specified by:
getPoseFromSymbolin interfaceCR800ComponentInterface
-
reconnect
public boolean reconnect()- Specified by:
reconnectin interfaceCR800ComponentInterface
-
moveInPlane
- Specified by:
moveInPlanein interfaceCR800ComponentInterface
-
moveAbove
- Specified by:
moveAbovein interfaceCR800ComponentInterface
-
moveAwayFromJointLimit
public boolean moveAwayFromJointLimit()- Specified by:
moveAwayFromJointLimitin interfaceCR800ComponentInterface
-
undoCognexOffset
public boolean undoCognexOffset()- Specified by:
undoCognexOffsetin interfaceCR800ComponentInterface
-
doCognexOffset
public boolean doCognexOffset()- Specified by:
doCognexOffsetin interfaceCR800ComponentInterface
-
moveAndOrientToCognexTarget
- Specified by:
moveAndOrientToCognexTargetin interfaceCR800ComponentInterface
-
bindCognexResult
- Specified by:
bindCognexResultin interfaceCR800ComponentInterface
-
getMatchingResult
- Specified by:
getMatchingResultin interfaceCR800ComponentInterface
-
getEmptyProps
- Specified by:
getEmptyPropsin interfaceCR800ComponentInterface
-
createCogRefWithProps
- Specified by:
createCogRefWithPropsin interfaceCR800ComponentInterface
-
getCognexJobForCognexReference
- Specified by:
getCognexJobForCognexReferencein interfaceCR800ComponentInterface
-
getCognexReferenceForID
- Specified by:
getCognexReferenceForIDin interfaceCR800ComponentInterface
-
getDescriptorForID
- Specified by:
getDescriptorForIDin interfaceCR800ComponentInterface
-
getCognexJobForDescriptor
- Specified by:
getCognexJobForDescriptorin interfaceCR800ComponentInterface
-
eeOrientTo
public boolean eeOrientTo(javax.vecmath.Point3d g) - Specified by:
eeOrientToin interfaceCR800ComponentInterface
-
getMHeader
- Specified by:
getMHeaderin interfaceCR800ComponentInterface
-
getConstantMappings
- Specified by:
getConstantMappingsin interfaceCR800ComponentInterface
-
getModelType
- Specified by:
getModelTypein interfaceCR800ComponentInterface
-
delay
public boolean delay(double seconds) - Specified by:
delayin interfaceCR800ComponentInterface
-
openGripper
public boolean openGripper()- Specified by:
openGripperin interfaceCR800ComponentInterface
-
closeGripper
public boolean closeGripper()- Specified by:
closeGripperin interfaceCR800ComponentInterface
-
pickupScrew
public boolean pickupScrew()- Specified by:
pickupScrewin interfaceCR800ComponentInterface
-
tightenScrew
- Specified by:
tightenScrewin interfaceCR800ComponentInterface
-
shankOut
public boolean shankOut()- Specified by:
shankOutin interfaceCR800ComponentInterface
-
shankIn
public boolean shankIn()- Specified by:
shankInin interfaceCR800ComponentInterface
-
goToPose
- Specified by:
goToPosein interfaceCR800ComponentInterface
-
goToPoseLong
- Specified by:
goToPoseLongin interfaceCR800ComponentInterface
-
adjustPoseToCameraHeight
- Specified by:
adjustPoseToCameraHeightin interfaceCR800ComponentInterface
-
bindToSurface
- Specified by:
bindToSurfacein interfaceCR800ComponentInterface
-
getTCPForEE
- Specified by:
getTCPForEEin interfaceCR800ComponentInterface
-
alternateEE
- Specified by:
alternateEEin interfaceCR800ComponentInterface
-
acceptEE
public boolean acceptEE()- Specified by:
acceptEEin interfaceCR800ComponentInterface
-
ejectEE
public boolean ejectEE()- Specified by:
ejectEEin interfaceCR800ComponentInterface
-
getGripDropoff
- Specified by:
getGripDropoffin interfaceCR800ComponentInterface
-
rotateForToolRack
public boolean rotateForToolRack()- Specified by:
rotateForToolRackin interfaceCR800ComponentInterface
-
moveZRelative
public boolean moveZRelative(double dist) - Specified by:
moveZRelativein interfaceCR800ComponentInterface
-
moveXRelative
public boolean moveXRelative(double dist) - Specified by:
moveXRelativein interfaceCR800ComponentInterface
-
moveToRelative
- Specified by:
moveToRelativein interfaceCR800ComponentInterface
-
removeCognexReferenceWithID
- Specified by:
removeCognexReferenceWithIDin interfaceCR800ComponentInterface
-