## 4 Simulation Environment and Tasks  
In this study, we constructed a highly physically simulated system, as illustrated in Figure 8. To the right of the robotic arm is a desktop, upon which several obstacles and target yarn spools are placed. The spools have a diameter and height of 20 cm, and the rectangular obstacles measure 32 \(\times\) 22 \(\times\) 12 cm. To the left is a spacious platform, serving as the preparation area for the yarn-spinning machine, indicating the target placement location for the spools. Additionally, a horizontal beam is situated above, which the robotic arm should avoid colliding with during operation. Moreover, a humanoid model is placed nearby as one of the obstacles in the task environment. During the initial phase of the transfer task, the robotic arm is positioned at point A or its vicinity. Additionally, a red yarn spool, the object to be grasped and placed, is located beneath point B on the table. The process of grasping and placing the yarn spool involves a series of precise actions. Firstly, the robotic arm's end effector must vertically descend, insert its claws into the central hollow of the spool, expand them, and then lift the spool using frictional force, eventually placing it at point C on the left platform with appropriate posture. To increase the generalizability of the problem, only one target spool is placed in the virtual twin platform (directly below Region 1), but its position may vary in different simulations to accommodate diverse possibilities. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(r_{lim}\) & **VG** & **G** & **M** & **B** & **VB** \\ \hline
**VG** & VG & VG & G & M & B \\
**G** & VG & VG & M & B & B \\
**M** & VG & G & M & B & VB \\
**B** & G & M & B & VB & VB \\
**VB** & M & M & VB & VB & VB \\ \hline \(r_{pos}\) & **VG** & **G** & **M** & **B** & **VB** \\ \hline
**VG** & VG & VG & VG & G & M \\
**G** & VG & VG & G & M & B \\
**M** & VG & G & M & B & VB \\
**B** & G & M & B & VB & VB \\
**VB** & M & M & VB & VB & VB \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Fuzzy rule base for the alignment placement stage. Figure 7: Output of the fuzzy logic system during the alignment and placement stage: The figure on the left shows the first layer, whereas the right figure displays the second layer of the fuzzy logic system. The movement from point A to B involves the end effector of the robotic arm moving a short distance along the -\(x\) axis, then along the \(y\)-axis, followed by continued movement along the -\(x\) axis, approaching the yarn spool with appropriate posture, and finally lifting the spool along the \(z\)-axis. If the robotic arm were to move directly from point A to B, it would inevitably collide with the beam in the environment. Therefore, the entire grasping-placing task is divided into a continuous trajectory consisting of the following segments:  
(1) The yarn spool appears at any location on the table, and the TCP of the robotic arm moves from the initial position A along the trajectory of segment 1 to the preparatory position B with appropriate posture. Point B is located above the center of the spool along the \(z\)-axis, potentially in any position within Region 1. (2) The robotic arm moves along trajectory segment 2 from the preparatory position B to the placement position C (which can be randomly designated within Region 2), contracts its claw, and places the spool on the platform. (3) The arm resets and moves back to the vicinity of the initial position A. This simulation platform enables large-scale strategy training, yielding a rich and high-quality training dataset. These data can be directly applied to the trajectory planning and generation of real-world robots. More importantly, this simulation system not only aids in policy transfer and the implementation of safety constraints but also considers diverse production scenarios and environmental variables in simulations.