# Learning Form Closure Grasping with a Four-Pin Parallel Gripper
## 4 Experimental Validation and Discussion
### The End-to-End Grasping Simulation  
In this simulation experiment, we trained the gripper to grasp 1000 randomly generated objects in a form closure manner using the proposed method.  
We set the parameters for the autoencoder and the PPO as follows. (1) For the autoencoder, we set the input image size to \(256\times 256\times 3\) and the latent size to 128. We used a convolutional variational-type autoencoder. The size of the dataset was 120,000, which indicates that there were 120,000 randomly generated top-view images of objects extracted by the in-hand camera. (2) For the PPO, we set the buffer size to 512, batch size to 64 and layer size to 256. We used two hidden layers in the actor and critic networks. The loss clipping was set to 0.2, and the step for each episode was set to 1. The average training time was approximately 30 h, and the model size was approximately 110 M.  
We first trained an autoencoder which aimed to extract the object pose from the raw image. To speed up the training process, we scaled the image size down to \(256\times 256\times 3\). Since we were in a simulated environment, the autoencoder showed good results in recognizing the poses of the objects.  
We then trained the reinforcement learning model using the PPO policy. The model was trained over 1000 epochs, and we observed that the training results converged. Using the latest trained weight, we observed that the manipulator could grasp an object using the four-pin gripper after the training process, similar to the prototype experiment.  
We compared the experimental results with our previous work [12], in which a synthetic method was adopted to grasp the object as shown in Table 2. Since we performed the experiment in a simulation environment, we extended the number of test objects to 100. We followed the same experimental process in the previous work to find the success rate and also the average planning time of the proposed grasping method. We observed that the proposed method in this paper achieved a success rate of 94.4% without a disturbance and 84.8% with a 5 N disturbance, which was lower than the results in [12]. This was because the end-to-end framework brought uncertainty in various processes (e.g., the autoencoder bringing in errors during the pose estimation of the object and the actor network bringing in errors during the control of the gripper). However, there was an improvement in adaptation to the number of objects, and the average planning time was greatly reduced. A better result may be expected if the resolution of the image is increased.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Object Name**} & \multicolumn{3}{c}{**Experiments**} \\  & \multicolumn{2}{c}{**[No. Successful Trials/No. Total Trials]**} \\ \cline{2-4}  & **No Disturbance** & **1.0 N Disturbance** & **5.0 N Disturbance** \\ \hline H shape & 20/20 & 20/20 & 20/20 \\ X shape & 20/20 & 20/20 & 20/20 \\ S shape & 20/20 & 20/20 & 19/20 \\ Z shape & 20/20 & 19/20 & 19/20 \\ Gear & 19/20 & 19/20 & 18/20 \\ Cross & 20/20 & 20/20 & 20/20 \\ Cube & 20/20 & 20/20 & 20/20 \\ Star & 20/20 & 20/20 & 19/20 \\ \hline \hline \end{tabular}
\end{table}
Table 1: The success rate of the proposed four-pin gripper.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Methods**} & \multirow{2}{*}{**No. Objects**} & \multicolumn{3}{c}{**Success Rate**} \\ \cline{3-5}  & & **No Disturbance** & **5.0 N Disturbance** & **Avg. Planning Time [s]** \\ \hline
[12] & 12 & 57/60 (95.0\%) & 54/60 (90.0\%) & 12.0 \\ This work & 100 & 472/500 (94.4\%) & 424/500 (84.8\%) & 3.1 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of the methods.