In the logistics warehouse environment, the autonomous navigation and environment perception of the logistics sorting robot are two key challenges. To deal with the complex obstacles and cargo layout in a warehouse, this study focuses on improving the robot perception and navigation system to achieve efficient path planning and safe motion control. For this purpose, a scheme based on an improved Gmapping algorithm is proposed to construct a high-precision map inside a warehouse through the efficient scanning and processing of environmental data by robots. While the improved algorithm effectively integrates sensor data with robot position information to realize the real-time modeling and analysis of warehouse environments. Consequently, the precise mapping results provide a reliable navigation basis for the robot, enabling it to make intelligent path planning and obstacle avoidance decisions in unknown or dynamic environments. The experimental results show that the robot using the improved Gmapping algorithm has high accuracy and robustness in identifying obstacles and an effectively reduced navigation error, thus improving the intelligence level and efficiency of logistics operations. The improved algorithm significantly enhances obstacle detection rates, increasing them by 4.05%. Simultaneously, it successfully reduces map size accuracy errors by 1.4% and angle accuracy errors by 0.5%. Additionally, the accuracy of the robot’s travel distance improves by 2.4%, and the mapping time is reduced by nine seconds. Significant progress has been made in achieving high-precision environmental perception and intelligent navigation, providing reliable technical support and solutions for autonomous operations in logistics warehouses.