In this study, a decoupled controller, consisting of a force controller and a torque controller, is designed to achieve a smooth translational and rotational motion control of a group of nonholonomic mobile robots. The proposed controller also solves the problem of obstacle avoidance, where obstacles with arbitrary boundary shapes are taken into account. Since the tangential direction of obstacle boundary is adopted as the guiding direction of a robot, the proposed controller allows a mobile robot to escape from a concave obstacle, while the robot could be trapped with most of the conventional obstacle avoidance algorithms.