Random exploration was used to collect training data. Initially, the robot arm was in a resting posture, such that it did not occlude the table from the perspective of the camera. Further, the red brick was put in-between the two gripper fingers. One training trial was composed of several steps.
First, a random position on the table (within a 40×30 cm rectangle--its extension on the table can be seen in figure 6.2) and a random orientation (0o to 360o) were chosen. To make the gripper tip to take this position and orientation, a suitable arm posture was found by solving analytically the inverse kinematics6.1.
For a given end-effector position and orientation, up to eight solutions of the inverse kinematics exist. At least two solutions exist for any target position, because a 180o turn of the joint near the gripper does not have an effect on the grasp. Thus, each image of the brick gives rise to redundant joint-angle sets. For the data collection, one solution was chosen at random.
The resulting arm posture is called a `grasping' posture. In addition to the position on the table, a second one 60 mm directly above was chosen, and the corresponding joint angles were obtained, as described above. This second posture is called `pre-grasping' posture (figure 6.3). Both postures were stored.
In the next step, the robot put the brick on the table. Between two postures, the joint angles were transformed simultaneously and linearly. The arm moved via the pre-grasping to the grasping posture. The use of the pre-grasping posture eases the picking up and putting down of bricks on the table, because collisions with the table and the brick are avoided. These collisions would occur if the arm would turn directly from the resting to the grasping position.
After the brick was put on the table, the arm moved again to the resting position. At this stage, an image from the left camera was taken. Since all brick positions were on a table surface, stereo vision was not necessary. Afterward, the arm repeated the above movement sequence to take back the brick. This concludes one trial. In total, 3371 training patterns and 495 test patterns were collected.