  Cloud robotics enables robots to benefit from the massive storage and
computational power of the cloud, overcoming the capacity limitations of
cooperative robots. When the decision is made to use a robotic network cloud
system to execute a task or a set of tasks, the main goal will be to use the
cheapest, in terms of smallest memory, and fastest, in terms of shortest
execution time, robots. Previous studies have mainly focused on minimizing the
cost of the robots in retrieving resources by knowing the resource allocation
in advance. When a task arrives in the system, it can be assigned to any
processing unit, one of the robots, an eventual fog node or the cloud, and the
question is where a task should be processed to optimize performance. Here, we
develop a method for a robotic network cloud system to determine where each
algorithm should be allocated for the system to achieve optimal performance,
regardless of which robot initiates the request. We can find the minimum
required memory for the robots and the optimal way to allocate the algorithms
with the shortest time to complete each task. We show how our proposed method
works, and we experimentally compare its performance with a state-of-the-art
method, using real-world data, showing the improvements that can be obtained.
