Addressing the issue of excessive error accumulation in visual-inertial odometry under complex and adverse environments, leading to degraded positioning accuracy or even failure, this article proposes a dual-camera visual/inertial measurement unit (IMU) multistate constraint Kalman filter (MSCKF) positioning methodology that incorporates dynamic initialization and loop closure detection, drawing inspiration from the visual-inertial system-monocular (VINS-Mono) algorithmic structure. In the initial phase, to overcome the limitation of conventional MSCKF algorithms that can only perform static initialization, thereby failing in motion estimation under initial dynamic conditions, we augment the MSCKF framework with a dynamic initialization module, furnishing the visual-inertial odometry (VIO) system with a robust initial state. In the backend, we introduce a pose graph optimization and loop closure detection module to enhance positioning accuracy and robustness in complex and harsh environments. Comparative precision experiments were conducted between the proposed algorithm, the original msckf_vio, the monocular visual-inertial vins_mono, and the stereo visual-inertial vins_fusion, utilizing both the EuRoc open-source datasets and real-world scenarios. The experimental results demonstrate that the proposed algorithm effectively provides accurate initial system states and outperforms both VINS-Mono and VINS-Fusion in terms of positioning accuracy. Practical tests further confirm the algorithm's ability to significantly improve positioning precision and stability under challenging conditions such as complex lighting variations and sparse textures.