This article investigates the formation switching problem of a group of autonomous tracked mobile robots (ATMRs) traveling in unknown obstacle environments. Firstly, a novel formation structure model of virtual leader–leader–follower is designed, where the leader tracks the virtual leader determined by a reference trajectory, while the followers track their desired positions dictated by the virtual leader. Subsequently, a dynamic optimization formation switching strategy is developed, in which the leader calculates a formation adjustment factor in real-time to dynamically adjust the formation parameters according to the environmental constraints. Furthermore, a comprehensive performance evaluation index system is presented to assess formation switching efficiency, leveraging the inherent simplicity of the ATMR’s kinematics. Finally, extensive numerical simulations and physical experiments are carried out to validate the effectiveness of the proposed strategies.