As for the obstacle avoidance and formation control for the multi-robot systems, this paper presents an obstacle-avoidance method based on the improved artificial potential field (IAPF) and PID adaptive tracking control algorithm. In order to analyze the dynamics and kinematics of the robot, the mathematical model of the robot is built. Then we construct the motion situational awareness map (MSAM), which can map the environment information around the robot on the MSAM. Based on the MSAM, the IAPF functions are established. We employ the rotating potential field to solve the local minima and oscillations. As for collisions between robots, we build the repulsive potential function and priority model among the robots. Afterwards, the PID adaptive tracking algorithm is utilized to multi-robot formation control. To demonstrate the validity of the proposed method, a series of simulation results confirm that the approaches proposed in this paper can successfully address the obstacle- and collision-avoidance problem while reaching formation.