Drone participating in logistics delivery has gained much concern due to its potential superiority of operational efficiency and service costs. How to optimize the hybrid vehicle delivery trip is still a crucial issue. Besides, complex urban environment and regulatory no-through zones bring more rigorous challenges. The aim is to develop an efficient routing solution that considers obstacles encountered by the truck and drone, ensuring the timely delivery. This paper proposes an efficient deep reinforcement learning to optimize the collaborative truck–drone routing problem (C-TDRP) under vehicle obstacle avoidance trail. Specifically, the trucks deploy a fleet of drones to serve the random distributed consumers subject to minimum delivery cost. Homogeneous drones serve multiple demand nodes per trip with limited energy carrying capacity. We design the C-TDRP formulation with studying the feasibility of obstacle avoidance routing. Owing to the computational complexity of the proposed mathematical model, an intelligent optimization algorithm based on deep reinforcement learning is developed, named pointer network (Ptr-Net), which can capture the position weights associated with network sequence automatically. Through rigorous experimental validations, the results demonstrate that the vehicle energy consumption of final trajectory reduces by more than 42%, even for large-scale delivery scenarios. Our proposed method not only enhances the optimization performance but also lays the foundation for more intelligent and adaptable logistics delivery in complex urban environments.