Package edu.tufts.hrilab.fetch
Class MockFetchComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.moveit.MockMoveItComponent
edu.tufts.hrilab.fetch.MockFetchComponent
- All Implemented Interfaces:
FetchInterface,ArmInterface,LearningInterface,MoveItInterface
- Direct Known Subclasses:
MockFetchItComponent
-
Field Summary
Fields inherited from class edu.tufts.hrilab.moveit.MockMoveItComponent
grasping, shouldSimExecTime, simExecTimeoutFields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckGrasping(Term graspingTerm) getBreakerState(String breakerName) Gets the specified breaker state.floatGets the charge level of the fetchpointHeadTo(Symbol objectRef) Point head in direction of target object in base_link coordinate frame.pointHeadTo(MemoryObject target_object) Point head in direction of target object in base_link coordinate frame.pointHeadTo(javax.vecmath.Point3d target_point) Point head in direction of target point in base_link coordinate frame.setBreakerState(String breakerName, boolean state) Sends a breaker command request to set the given breaker to the desired state.setTorsoPosition(double position) Move the torso to desired joint position.protected voidMethods inherited from class edu.tufts.hrilab.moveit.MockMoveItComponent
additionalUsageInfo, closeGripper, disableCarryingConstraints, enableCarryingConstraints, executeTrajectory, getEEPose, getGripperPosition, getPose, goToEEPose, goToPose, goToPose, graspObject, learn, loadEEPosesFromFile, loadPosesFromFile, loadTrajectoriesFromFile, moveGripper, moveTo, moveTo, moveTo, moveTo, moveToCartesian, moveToJointPosition, moveToJointPositions, moveToJointPositions, moveToRelative, openGripper, parseArgs, pointTo, pointTo, pressObject, pressObject, publishPointCloudToRos, recordEEPose, recordPose, releaseObject, saveEEPosesToFile, savePosesToFile, saveTrajectoriesToFile, startRecordingTrajectory, stopRecordingTrajectory, unlearnMethods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, init, main, shutdown, shutdownComponentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.tufts.hrilab.interfaces.ArmInterface
closeGripper, executeTrajectory, getEEPose, getGripperPosition, getPose, goToPose, goToPose, graspObject, loadEEPosesFromFile, loadPosesFromFile, loadTrajectoriesFromFile, moveGripper, moveTo, moveTo, moveTo, moveTo, moveToRelative, openGripper, pointTo, pressObject, pressObject, recordPose, releaseObject, saveEEPosesToFile, savePosesToFile, saveTrajectoriesToFile, startRecordingTrajectory, stopRecordingTrajectoryMethods inherited from interface edu.tufts.hrilab.interfaces.LearningInterface
learn, unlearnMethods inherited from interface edu.tufts.hrilab.moveit.MoveItInterface
disableCarryingConstraints, enableCarryingConstraints, moveToCartesian, moveToJointPosition, moveToJointPositions, moveToJointPositions, pointTo, publishPointCloudToRos
-
Constructor Details
-
MockFetchComponent
public MockFetchComponent()
-
-
Method Details
-
setTorsoPosition
Description copied from interface:FetchInterfaceMove the torso to desired joint position.- Specified by:
setTorsoPositionin interfaceFetchInterface- Parameters:
position- all the way down is 0.0, and all the way up is approximately 0.3- Returns:
- TODO: replace this with more general setJointPosition(String joint, double position) method
-
pointHeadTo
Description copied from interface:FetchInterfacePoint head in direction of target object in base_link coordinate frame.- Specified by:
pointHeadToin interfaceFetchInterface- Returns:
-
pointHeadTo
Description copied from interface:FetchInterfacePoint head in direction of target object in base_link coordinate frame. Alternative method to pointHeadTo that takes in POWER ref instead of MemoryObject.- Specified by:
pointHeadToin interfaceFetchInterface- Returns:
-
pointHeadTo
Description copied from interface:FetchInterfacePoint head in direction of target point in base_link coordinate frame.- Specified by:
pointHeadToin interfaceFetchInterface- Returns:
-
look
- Specified by:
lookin interfaceFetchInterface
-
lookAround
- Specified by:
lookAroundin interfaceFetchInterface
-
checkGrasping
- Specified by:
checkGraspingin interfaceFetchInterface
-
getChargeLevel
public float getChargeLevel()Description copied from interface:FetchInterfaceGets the charge level of the fetch- Specified by:
getChargeLevelin interfaceFetchInterface- Returns:
- The charge level of the fest (between 0-1) or -1 if battery state is null (likely not being published)
-
getBreakerState
Description copied from interface:FetchInterfaceGets the specified breaker state.- Specified by:
getBreakerStatein interfaceFetchInterface- Parameters:
breakerName- The name of the breaker. Currently, these are the relevant breakers: computer_breaker, battery_breaker, supply_breaker, base_breaker, arm_breaker, gripper_breaker.- Returns:
- An enumerated FetchBreakerStates object representing the states of the breaker or null if robot state is null/not being published or the breaker name cannot be found)
-
setBreakerState
Description copied from interface:FetchInterfaceSends a breaker command request to set the given breaker to the desired state.- Specified by:
setBreakerStatein interfaceFetchInterface- Parameters:
breakerName- The name of the breaker. Current settable breakers: base_breaker, arm_breaker, gripper_breakerstate- The desired state of the specified breaker. TRUE means ON and FALSE means OFF.- Returns:
- An enumerated FetchBreakerStates object representing the actual resultant state of the breaker (i.e. if the E-stop is on, and you try to turn on the breaker it will still be off). A null return value likely means the breaker name is not valid/cannot be found.
-
simExecTime
protected void simExecTime()
-