A method for detecting obstacles, applied to a cleaning robot, comprising: acquiring a first 3D point cloud corresponding to image data acquired by the cleaning robot; extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region; extracting, from the second 3D point cloud, a third 3D point cloud having a height value in a set height range, wherein the set height range is a range containing a positive range and/or a negative range; calculating a ground projection point cloud of the third 3D point cloud; the method is characterized by: additionally acquiring first inertial measurement unit data collected by one or more sensors of the cleaning robot; determining morphologically-connected regions in the ground projection point cloud; and using a morphologically-connected region having an area less than a preset value as a region where an obstacle is located; wherein the extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region comprises: inputting the first inertial measurement unit data into a first model to obtain plane information output by the first model (S121'); and extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region, according to the plane information (S122'); wherein the plane information is used for indicating a plane in a world coordinate system. acquiring a first 3D point cloud corresponding to image data acquired by the cleaning robot; extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region; extracting, from the second 3D point cloud, a third 3D point cloud having a height value in a set height range, wherein the set height range is a range containing a positive range and/or a negative range; calculating a ground projection point cloud of the third 3D point cloud; the method is characterized by: additionally acquiring first inertial measurement unit data collected by one or more sensors of the cleaning robot; determining morphologically-connected regions in the ground projection point cloud; and additionally acquiring first inertial measurement unit data collected by one or more sensors of the cleaning robot; determining morphologically-connected regions in the ground projection point cloud; and using a morphologically-connected region having an area less than a preset value as a region where an obstacle is located; wherein the extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region comprises: inputting the first inertial measurement unit data into a first model to obtain plane information output by the first model (S121'); and extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region, according to the plane information (S122'); wherein the plane information is used for indicating a plane in a world coordinate system. inputting the first inertial measurement unit data into a first model to obtain plane information output by the first model (S121'); and extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region, according to the plane information (S122'); wherein the plane information is used for indicating a plane in a world coordinate system.