The high efficiency, flexibility, and low cost of robots provide huge opportunities for the application and development of intelligent logistics. Especially during the COVID-19 pandemic, the non-contact nature of robots effectively helped with preventing the spread of the epidemic. Task allocation and path planning according to actual problems is one of the most important problems faced by robots in intelligent logistics. In the distribution, the robots have the fundamental characteristics of battery capacity limitation, limited load capacity, and load affecting transportation capacity. So, a smart community logistics service framework is proposed based on control system, automatic replenishment platform, network communication method, and coordinated distribution optimization technology, and a Mixed Integer Linear Programming (MILP) model is developed for the collaborative and persistent delivery of a multiple-depot vehicle routing problem with time window (MDVRPTW) of swarm robots. In order to solve this problem, a hybrid algorithm of genetically improved set-based particle swarm optimization (S-GAIPSO) is designed and tested with numerical cases. Experimental results show that, Compared to CPLEX, S-GAIPSO has achieved gaps of 0.157%, 1.097%, and 2.077% on average, respectively, when there are 5, 10, and 20 tasks. S-GAIPSO can obtain the optimal or near-optimal solution in less than 0.35 s, and the required CPU time slowly increases as the scale increases. Thus, it provides utility for real-time use by handling a large-scale problem in a short time.