In this work, our motivation focuses on an energy-efficient data collection problem by a mobile sink, an unmanned aerial vehicle (UAV) with limited battery capacity, in a robot network divided into several robot clusters. In each cluster, a cluster head (CH) robot allocates tasks to the remaining robots and collects data from them. Our contribution is to minimize the UAV total energy consumption coupled to minimum cost data collection from CH robots by visiting optimally a portion of the CH robots. The UAV decides the subset of CH robots to visit by considering not only the locations of all CH robots but also its battery capacity. If the UAV cannot visit all CH robots, then the CH robots not visited by the UAV transmit their data to another CH robot to forward it. The decision of transmission paths of transmitting robots is included in the cost optimization. Our contribution passes beyond the existing paradigms in the literature by considering the constant battery capacity for the UAV. We derive the optimal approach analytically for this problem. For various numbers of clusters, the performance of our strategy is compared with the approach in the close literature in terms of total energy consumed by CH robots, which affects network lifetime. Numerical results demonstrate that our strategy outperforms the approach in the close literature.