This paper proposed a pickup and delivery (P&D) task provisioning framework for carrier robots in a factory with edge servers assisting as the intermediary between robots and working stations, where the task requests come. The carrier robots must pick up and deliver each assigned load from and to designated locations with minimal traveled distance and without violating designated constraints. Edge servers are utilized to facilitate communication between the main server and delivery robots and assisting the main server in deciding the best robot for each incoming task request. The problem of pickup and delivery for each robot is modeled based on Dial-a-Ride Problem, and a discrete bio-inspired algorithm is proposed to solve this problem. The tasks are distributed to edge servers and carrier robots by putting their service loads into account. The simulation results show that the proposed framework can provide an effective solution towards optimizing the pickup and delivery process in a smart factory.