Package edu.tufts.hrilab.pr2
Class PR2Component
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.moveit.MoveItComponent
edu.tufts.hrilab.pr2.PR2Component
- All Implemented Interfaces:
ArmInterface
,LearningInterface
,MoveItInterface
,PR2Interface
-
Field Summary
Fields inherited from class edu.tufts.hrilab.moveit.MoveItComponent
configName, defaultConfigDir, eePoses, eeTransform, endEffectorNames, grippers, jointNames, jointStateSub, moveGroup, moveItConfig, poses, recordedTrajectories, recordingTrajectory, trajectoriesFile
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.commons.cli.Option>
Command line options available in sub-class.boolean
goToPoseNoPlanning
(String pose_name) protected void
init()
Perform any component initialization.protected void
parseArgs
(org.apache.commons.cli.CommandLine cmdLine) Called directly after construction to pass runtime values that will override default values.boolean
pointHeadTo
(Symbol objectRef) Point head in direction of target object in base_link coordinate frame.boolean
pointHeadTo
(javax.vecmath.Point3d targetPosition) Point head in direction of target point in base_link coordinate frame.boolean
setTorsoPosition
(double position) Move the torso to desired joint position.void
startRecordingTrajectory
(String trajectoryName) There are two arms here, so startRecordingTrajectory intentionally overrides MoveItComponent method.Methods inherited from class edu.tufts.hrilab.moveit.MoveItComponent
addCollisionObject, addLocalStaticTransforms, attachCollisionObject, attachCollisionObject, closeGripper, connectToMoveGroup, detachAllAttachedCollisionObjects, detachCollisionObject, detachCollisionObject, disableCarryingConstraints, disableCollisionAvoidance, enableCarryingConstraints, enableCollisionAvoidance, executeMotionPlanRequest, executeTrajectory, getEEPose, getGripperPosition, getPose, getPoses, getPoses, getRobotState, goToEEPose, goToPose, goToPose, goToStartPose, goToStartPose, graspObject, interrupt, isMoveGroupConnected, learn, loadEEPosesFromFile, loadPosesFromFile, loadTrajectoriesFromFile, moveGripper, moveGrippers, moveTo, moveTo, moveTo, moveTo, moveTo, moveTo, moveToApproach, moveToCartesian, moveToJointPosition, moveToJointPositions, moveToJointPositions, moveToRelative, notOneArm, openGripper, pointTo, pointTo, pour, pressObject, pressObject, publishPointCloudToRos, pushObject, reconnectToMoveGroup, recordEEPose, recordPose, releaseObject, removeAllCollisionObjects, removeCollisionObject, saveEEPosesToFile, savePosesToFile, saveTrajectoriesToFile, setObjectCollisions, stopRecordingTrajectory, unlearn
Methods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
createInstance, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, shutdown, shutdownComponent
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.ArmInterface
closeGripper, executeTrajectory, getEEPose, getGripperPosition, getPose, goToPose, goToPose, goToStartPose, graspObject, loadEEPosesFromFile, loadPosesFromFile, loadTrajectoriesFromFile, moveGripper, moveTo, moveTo, moveTo, moveTo, moveToRelative, openGripper, pointTo, pressObject, pressObject, recordPose, releaseObject, saveEEPosesToFile, savePosesToFile, saveTrajectoriesToFile, stopRecordingTrajectory
Methods inherited from interface edu.tufts.hrilab.interfaces.LearningInterface
learn, unlearn
Methods inherited from interface edu.tufts.hrilab.moveit.MoveItInterface
disableCarryingConstraints, enableCarryingConstraints, goToStartPose, moveToCartesian, moveToJointPosition, moveToJointPositions, moveToJointPositions, pointTo, publishPointCloudToRos
-
Constructor Details
-
PR2Component
public PR2Component()
-
-
Method Details
-
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 classMoveItComponent
-
additionalUsageInfo
Description copied from class:DiarcComponent
Command line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfo
in classMoveItComponent
- 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 classMoveItComponent
-
setTorsoPosition
public boolean setTorsoPosition(double position) Description copied from interface:PR2Interface
Move the torso to desired joint position. TODO: replace this with the more general setJointPosition(String joint, double position) method in MoveItComponent- Specified by:
setTorsoPosition
in interfacePR2Interface
- Parameters:
position
- all the way down is 0.0, and all the way up is approximately 0.3- Returns:
-
pointHeadTo
Description copied from interface:PR2Interface
Point 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:
pointHeadTo
in interfacePR2Interface
- Returns:
-
pointHeadTo
public boolean pointHeadTo(javax.vecmath.Point3d targetPosition) Description copied from interface:PR2Interface
Point head in direction of target point in base_link coordinate frame.- Specified by:
pointHeadTo
in interfacePR2Interface
- Returns:
-
goToPoseNoPlanning
- Specified by:
goToPoseNoPlanning
in interfacePR2Interface
-
startRecordingTrajectory
There are two arms here, so startRecordingTrajectory intentionally overrides MoveItComponent method.- Specified by:
startRecordingTrajectory
in interfaceArmInterface
- Overrides:
startRecordingTrajectory
in classMoveItComponent
- Parameters:
trajectoryName
-
-