This paper discusses the efficiency and completeness of a sweeping task to ensure the reliability of sweeping robots. The map information is necessary in order to ensure the completeness of sweeping, but it is not practical to give the preliminary map information to the robot. When the robot generates the map online, the reliability of the map is low in the beginning of the sweeping task. Therefore, the robot cannot use globally motion control. In the latter half of sweeping, unswept area are scattered like detached lands. The map has high reliability at this time, and the motion control using the whole map information is effective. The reliability of the map is gradually increased during the sweeping task, the robot should switch the motion control from locally to globally in accordance with it. In this paper, we propose the new motion control method for a sweeping robot in unknown environments. The robot selects mainly local motion control method at an early stage in this algorithm. As time goes on, the probability of the global motion control method selecting is increased. Even though the robot does not know the area of environment, the robot behaves as the above. Simulation and experimental results show the proposed method is more effective than the behavior-based method.