This paper presents an improved Dynamic Window Approach (DWA) for omnidirectional mobile robots, aimed at optimizing local path planning and posture adjustment in narrow and complex environments. Traditional DWA faces challenges such as inadequate dynamic obstacle avoidance and unstable postures when applied to omnidirectional robots. To address these issues, this paper introduces a three-dimensional velocity vector V ̵⃗ = [ V x V y ω ̵⃗ ] , replacing the conventional ( v, ω) framework. This optimizes the calculation of the dynamic window according to the characteristics of omnidirectional robots and incorporates mutual constraints between linear and angular velocities. Moreover, the evaluation function of the traditional DWA is enhanced by adding a new posture evaluation function, and the normalization process is eliminated to improve computational efficiency. A triangular region scanning algorithm is also designed for capturing optimal posture angles in dynamic environments. Through extensive experiments involving random dynamic obstacles, the improved algorithm achieves a path planning success rate of over 98% and it maintains a collision occurrence probability below 5% in both simulation and real-world tests. The robot can successfully navigate narrow obstacle environments with optimal posture, validating the repeatability and robustness of the improved DWA in path planning and posture adjustment. This study holds potential for further application in broader dynamic and unpredictable environments.