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.Point3d
protected CognexConsultant
protected javax.vecmath.Point3d
protected String
protected final Symbol
protected String
protected final javax.vecmath.Point3d
protected final int
protected final int
protected final int
protected final int
protected String
protected MPoseConsultant
protected String
protected int
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
acceptEE()
protected List<org.apache.commons.cli.Option>
Command line options available in sub-class.protected Symbol
Helper method used to create a new entry in our pose consultant for the given pose name and pose data.adjustPoseToCameraHeight
(MPose goal, Symbol cameraHeight) boolean
alternateEE
(MPose newTCP) void
bindCognexResult
(CognexReference ref, CognexResult result, int indexIntoCognexResult) void
bindToSurface
(MPose goal, Symbol surfaceHeight) boolean
void
createCogRefWithProps
(CognexJob j, List<Term> additionalProperties) boolean
delay
(double seconds) boolean
boolean
eeOrientTo
(javax.vecmath.Point3d g) boolean
ejectEE()
getCameraData
(String jobName) getCognexJobForDescriptor
(Symbol descriptor) getCognexReferenceForID
(Symbol refId) getDescriptorForID
(Symbol refId) getMatchingResult
(CognexReference toReBind, List<CognexResult> results) getPoseFromSymbol
(Symbol poseName) getTCPForEE
(Symbol eeType) boolean
boolean
goToPoseLong
(MPose goal) protected void
init()
Perform any component initialization.boolean
boolean
boolean
boolean
moveInPlane
(Symbol x, Symbol y) boolean
moveToCognexTarget
(Symbol refID) boolean
moveToCognexTarget
(List<CognexResult> results, int jobIndex) boolean
boolean
moveXRelative
(double dist) boolean
moveZRelative
(double dist) boolean
protected void
parseArgs
(org.apache.commons.cli.CommandLine cmdLine) Called directly after construction to pass runtime values that will override default values.boolean
boolean
recordPose
(Symbol poseName, Symbol surfaceHeight) recordPose
(Symbol poseName, MPose pose, Symbol surfaceHeight) boolean
boolean
boolean
shankIn()
boolean
shankOut()
boolean
tightenScrew
(Symbol screwType) boolean
Methods 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:DiarcComponent
Command line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfo
in classDiarcComponent
- Returns:
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponent
Called directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.zs- Overrides:
parseArgs
in classDiarcComponent
-
init
protected void init()Description copied from class:DiarcComponent
Perform 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:
init
in classDiarcComponent
-
getCameraData
- Specified by:
getCameraData
in interfaceCR800ComponentInterface
-
moveToCognexTarget
- Specified by:
moveToCognexTarget
in interfaceCR800ComponentInterface
-
moveToCognexTarget
- Specified by:
moveToCognexTarget
in interfaceCR800ComponentInterface
-
getCurrentPose
- Specified by:
getCurrentPose
in interfaceCR800ComponentInterface
-
connectToController
public void connectToController() -
recordPose
- Specified by:
recordPose
in interfaceCR800ComponentInterface
-
recordPose
- Specified by:
recordPose
in 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:
getPoseFromSymbol
in interfaceCR800ComponentInterface
-
reconnect
public boolean reconnect()- Specified by:
reconnect
in interfaceCR800ComponentInterface
-
moveInPlane
- Specified by:
moveInPlane
in interfaceCR800ComponentInterface
-
moveAbove
- Specified by:
moveAbove
in interfaceCR800ComponentInterface
-
moveAwayFromJointLimit
public boolean moveAwayFromJointLimit()- Specified by:
moveAwayFromJointLimit
in interfaceCR800ComponentInterface
-
undoCognexOffset
public boolean undoCognexOffset()- Specified by:
undoCognexOffset
in interfaceCR800ComponentInterface
-
doCognexOffset
public boolean doCognexOffset()- Specified by:
doCognexOffset
in interfaceCR800ComponentInterface
-
moveAndOrientToCognexTarget
- Specified by:
moveAndOrientToCognexTarget
in interfaceCR800ComponentInterface
-
bindCognexResult
- Specified by:
bindCognexResult
in interfaceCR800ComponentInterface
-
getMatchingResult
- Specified by:
getMatchingResult
in interfaceCR800ComponentInterface
-
getEmptyProps
- Specified by:
getEmptyProps
in interfaceCR800ComponentInterface
-
createCogRefWithProps
- Specified by:
createCogRefWithProps
in interfaceCR800ComponentInterface
-
getCognexJobForCognexReference
- Specified by:
getCognexJobForCognexReference
in interfaceCR800ComponentInterface
-
getCognexReferenceForID
- Specified by:
getCognexReferenceForID
in interfaceCR800ComponentInterface
-
getDescriptorForID
- Specified by:
getDescriptorForID
in interfaceCR800ComponentInterface
-
getCognexJobForDescriptor
- Specified by:
getCognexJobForDescriptor
in interfaceCR800ComponentInterface
-
eeOrientTo
public boolean eeOrientTo(javax.vecmath.Point3d g) - Specified by:
eeOrientTo
in interfaceCR800ComponentInterface
-
getMHeader
- Specified by:
getMHeader
in interfaceCR800ComponentInterface
-
getConstantMappings
- Specified by:
getConstantMappings
in interfaceCR800ComponentInterface
-
getModelType
- Specified by:
getModelType
in interfaceCR800ComponentInterface
-
delay
public boolean delay(double seconds) - Specified by:
delay
in interfaceCR800ComponentInterface
-
openGripper
public boolean openGripper()- Specified by:
openGripper
in interfaceCR800ComponentInterface
-
closeGripper
public boolean closeGripper()- Specified by:
closeGripper
in interfaceCR800ComponentInterface
-
pickupScrew
public boolean pickupScrew()- Specified by:
pickupScrew
in interfaceCR800ComponentInterface
-
tightenScrew
- Specified by:
tightenScrew
in interfaceCR800ComponentInterface
-
shankOut
public boolean shankOut()- Specified by:
shankOut
in interfaceCR800ComponentInterface
-
shankIn
public boolean shankIn()- Specified by:
shankIn
in interfaceCR800ComponentInterface
-
goToPose
- Specified by:
goToPose
in interfaceCR800ComponentInterface
-
goToPoseLong
- Specified by:
goToPoseLong
in interfaceCR800ComponentInterface
-
adjustPoseToCameraHeight
- Specified by:
adjustPoseToCameraHeight
in interfaceCR800ComponentInterface
-
bindToSurface
- Specified by:
bindToSurface
in interfaceCR800ComponentInterface
-
getTCPForEE
- Specified by:
getTCPForEE
in interfaceCR800ComponentInterface
-
alternateEE
- Specified by:
alternateEE
in interfaceCR800ComponentInterface
-
acceptEE
public boolean acceptEE()- Specified by:
acceptEE
in interfaceCR800ComponentInterface
-
ejectEE
public boolean ejectEE()- Specified by:
ejectEE
in interfaceCR800ComponentInterface
-
getGripDropoff
- Specified by:
getGripDropoff
in interfaceCR800ComponentInterface
-
rotateForToolRack
public boolean rotateForToolRack()- Specified by:
rotateForToolRack
in interfaceCR800ComponentInterface
-
moveZRelative
public boolean moveZRelative(double dist) - Specified by:
moveZRelative
in interfaceCR800ComponentInterface
-
moveXRelative
public boolean moveXRelative(double dist) - Specified by:
moveXRelative
in interfaceCR800ComponentInterface
-
moveToRelative
- Specified by:
moveToRelative
in interfaceCR800ComponentInterface
-
removeCognexReferenceWithID
- Specified by:
removeCognexReferenceWithID
in interfaceCR800ComponentInterface
-