Skip to content
ericrosenbrown edited this page Mar 22, 2016 · 10 revisions

Preparing Workspace

First you will have need to have set up an empty background map. Do this by spiral scanning the empty workspace and saving the result as a focused class, then load that class as the background. Be sure to be pointed directly down (shiftIntoGraspGear1), and at height 1 (1 changeToHeight).

Scanning Object

The command tempQuickScan (defined in ein/back/scene.back) will create a folder called autoclass_DATESTRING which contains a thumbnail and a SLFG model of the object that was scanned. Be sure to rename this folder to something more descriptive (for the purposes of this page, we will use the name "myObject").

Loading Object Model Into Ein

Now we need to set class labels. The command

endArgs "myObject" setClassLabels

will do this (the quotes are necessary). Check in ein stdout that the object was loaded with nonzero width and height. Note that setClassLabels will unload any other class labels.

Annotating Grasp

After you have this folder, you will want to annotate a grasp. To do this, run tempSceneLock3dGrasp. This will estimate the pose of the object and record it for relative grasp calculation. You may need to go into scene.back and change the command tempReconstructServoToBestSceneObject to tempServoToBestSceneOject.

Next, put the arm at the place you want the grasp to be, at any 3d orientation.

Finally, save this grasp with the command add3dGrasp.

If you already have an EEPose saved, use EEPOSE add3dGraspPoseWord to save an EEPOSE as the annotated grasp. Warning, this word needs an EEPose that is in a global frame of reference. You can retrieve the current eePose of the arm with the word currentPose. Therefore the command add3dGrasp is equivalent to currentPose add3dGraspPoseWord.

clearClass3dGrasps clears the 3d grasps for that class of object. If re-annotating a grasp, be sure to first clear the saved grasp.

Saving Grasp

After you're done, enter writeFocusedClass to save the 3d grasp to the "myObject" folder.

Manipulating Object

Make sure only one focused class is loaded.

sceneClearPredictedObjects, and clearBlueBoxMemories will clean your workspace of predicted objects.

sceneClearObservedMap will clean the observed map.

setPlaceModeToHold will keep the arm stationary after attempting the grasp.

tempMapFocusedClass will run a spiral scan and detect the focused class for you. It will place a blue box around "myObject".

deliverTargetObject (focused and target are synonymous) will grasp the object.

If you want grasps to press until effort (good for crane grasps), issue 1 setSnapToFlushGrasp. If you do not, issue 0 setSnapToFlushGrasp.

If the object is tall, you may knock it over trying to grasp it. Issue ikModeIkFast 1 setCurrentIKFastMode. change back to ikModeService after the grasp.