Computer simulations are utilized to investigate the dynamic behavior of self-propelled particles (SPPs) within a complex obstacle environment. The findings reveal that SPPs exhibit three distinct aggregation states within the obstacle, each contingent on specific conditions. A phase diagram outlining the aggregation states concerning self-propulsion conditions is presented. The results illustrate a transition of SPPs from a dispersion state to a transition state as persistence time increases within the obstacle. Conversely, as the driving strength increases, self-propelled particles shift towards a cluster state. A systematic exploration of the interplay between driving strength, persistence time, and matching degree on the dynamic behavior of self-propelled particles is conducted. Furthermore, an analysis is performed on the spatial distribution of SPPs along the y-axis, capture rate, maximum capture probability, and mean-square displacement. The insights gained from this research serve as valuable contributions to understanding the capture and collection of active particles.