Recent developments in the field of robotics have led to discussions surrounding the humanrobot coexistence environments including homes and modern factories. Focusing on the application of mobile robots, the focus of this research is to enhance their performance in dynamic scenarios. To effectively plan the robot's path to avoid pedestrians, a machine learning algorithm is employed to predict the future trajectory of pedestrians, thus improving the accuracy of forecasting their multi-modal motion. The existing prediction methods primarily rely on pedestrian history and current movement attributes to predict future movement, they often overlook the impact of static obstacles on pedestrian movement decision. Therefore, in this study, a static obstacles probability description generative adversarial network (SOPD-GAN) is proposed. The static obstacles probability description (SOPD) represents the future movement space of pedestrians and assesses the likelihood of entry. Additionally, we incorporate pedestrian historical trajectory information using LSTM, and combine it with SOPD to form the generator model. The training of this model is carried out using a generative adversarial network (GAN), which is referred to as SOPD-GAN. In addition, we also introduce an improved dynamic window approach (IDWA) for robot path planning in dynamic scenarios based on pedestrian trajectory prediction. In order to validate the efficacy of our approach, we conduct experiments in real scenarios and compare the model with existing baselines. The results show that this method can construct a suitable prediction model with high accuracy, thereby facilitating smooth dynamic obstacle avoidance tasks.