  Robots are integrating more huge-size models to enrich functions and improve
accuracy, which leads to out-of-control computing pressure. And thus robots are
encountering bottlenecks in computing power and battery capacity. Fog or cloud
robotics is one of the most anticipated theories to address these issues.
Approaches of cloud robotics have developed from system-level to node-level.
However, the present node-level systems are not flexible enough to dynamically
adapt to changing conditions. To address this, we present ElasticROS, which
evolves the present node-level systems into an algorithm-level one. ElasticROS
is based on ROS and ROS2. For fog and cloud robotics, it is the first robot
operating system with algorithm-level collaborative computing. ElasticROS
develops elastic collaborative computing to achieve adaptability to dynamic
conditions. The collaborative computing algorithm is the core and challenge of
ElasticROS. We abstract the problem and then propose an algorithm named
ElasAction to address. It is a dynamic action decision algorithm based on
online learning, which determines how robots and servers cooperate. The
algorithm dynamically updates parameters to adapt to changes of conditions
where the robot is currently in. It achieves elastically distributing of
computing tasks to robots and servers according to configurations. In addition,
we prove that the regret upper bound of the ElasAction is sublinear, which
guarantees its convergence and thus enables ElasticROS to be stable in its
elasticity. Finally, we conducted experiments with ElasticROS on common tasks
of robotics, including SLAM, grasping and human-robot dialogue, and then
measured its performances in latency, CPU usage and power consumption. The
algorithm-level ElasticROS performs significantly better than the present
node-level system.
