Hostname: page-component-74656f9884-kv2lp Total loading time: 0 Render date: 2026-11-06T10:05:25.518Z Has data issue: false hasContentIssue false

Image segmentation-driven sim-to-real deep reinforcement learning framework for accurate peg-in-hole assembly

Published online by Cambridge University Press:  18 July 2025

Ning Zhang
Affiliation:
China’s State Key Laboratory of Virtual Reality Technology and Systems, Beihang University, Beijing, China
Yongjia Zhao*
Affiliation:
China’s State Key Laboratory of Virtual Reality Technology and Systems, Beihang University, Beijing, China Jiangxi Research Institute, Beihang University, Nanchang, Jiangxi, China
Minghao Yang
Affiliation:
School of Artificial Intelligence, University of Chinese Academy of Sciences, Beijing, China
Shuling Dai
Affiliation:
China’s State Key Laboratory of Virtual Reality Technology and Systems, Beihang University, Beijing, China
*
Corresponding author: Yongjia Zhao; Email: zhaoyongjia@buaa.edu.cn
Rights & Permissions [Opens in a new window]

Abstract

The automation of assembly operations with industrial robots is pivotal in modern manufacturing, particularly for multispecies, low-volume, and customized production. Traditional programing methods are time-consuming and lack adaptability to complex, variable environments. Reinforcement learning-based assembly tasks have shown success in simulation environments, but face challenges like the simulation-to-reality gap and safety concerns when transferred to real-world applications. This article addresses these challenges by proposing a low-cost, image-segmentation-driven deep reinforcement learning strategy tailored for insertion tasks, such as the assembly of peg-in-hole components in satellite manufacturing, which involve extensive contact interactions. Our approach integrates visual and forces feedback into a prior dueling deep Q-network for insertion skill learning, enabling precise alignment of components. To bridge the simulation-to-reality gap, we transform the raw image input space into a canonical space based on image segmentation. Specifically, we employ a segmentation model based on U-net, pretrained in simulation and fine-tuned with real-world data, significantly reducing the need for labor-intensive real image segment labels. To handle the frequent contact inherent in peg-in-hole tasks, we integrated safety protections and impedance control into the training process, providing active compliance and reducing the risk of assembly failures. Our approach was evaluated in both simulated and real robotic environments, demonstrating robust performance in handling camera position errors and varying ambient light intensities and different lighting colors. Finally, the algorithm was validated in a real satellite assembly scenario, achieving a success rate of 15 out of 20 tests.

Information

Type
Research Article
Copyright
© The Author(s), 2025. Published by Cambridge University Press
Figure 0

Figure 1. A sim-to-real learning framework for a peg-in-hole (PiH) assembly task. The simulation component is used to train the image segmentation model and the RL policy network within a simulator. In the real pipeline, real images are mapped to segmented images to translate them from a raw image space to a canonical space. An impedance-based controller is used to execute agent actions when transferring the RL agent to the real scene.

Figure 1

Figure 2. RL policy learning with demonstration.

Figure 2

Figure 3. Our effective robot agent exploration process for the peg-in-hole insertion task involves four stages: moving from the initial pose to nearing the goal, from nearing the goal to pose refinement, from pose refinement to depth exploring, and from depth exploring to achieving the goal.

Figure 3

Algorithm 1. SIL

Figure 4

Figure 4. Train image segmentation model for real scene image by first using U-nets trained on synthetic RGB data and ground truth masks from the simulation environment. Then, fine-tune the networks with real data.

Figure 5

Figure 5. The original real image is transformed into segmented image by image segmentation, and the real robot is controlled by the transfer RL strategy.

Figure 6

Figure 6. Results curve across RL training phases: (a) with pretraining and (b) without pretraining.

Figure 7

Figure 7. Evaluations in the simulation. Case 1: assess the RL policy with camera position change. The camera position offset ranges from −0.15 cm to 0.15 cm in the X, Y, and Z axis. Case 2: assess the RL policy on different light intensity. The light intensity ranges from 1 to 30,000, from dark to bright. Case 3: assess on different light colors. RL policy is tested with 8 colors: color 0 is black (RGB: 000), color 1 is blue (RGB: 001), and so forth.

Figure 8

Figure 8. Assembly success rate with varying camera position offsets.

Figure 9

Figure 9. Assembly success rate with varying light intensity.

Figure 10

Figure 10. Assembly success rate with different light colors. Sim-to-real performance is tested across eight light types.

Figure 11

Figure 11. Performance comparison of training methods: SIL vs. Sliding.

Figure 12

Figure 12. Experimental setup for robotic peg-in-hole assembly in the real world, including the robotic arm, gripper, camera, and satellite components.

Figure 13

Figure 13. Real image and corresponding segmented image.

Figure 14

Table I. Comparison of experimental results (20 evaluations).