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 (S11); extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region (S12); extracting, from the second 3D point cloud, a third 3D point cloud having a height value in a set height range (S13), 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 (S14); the method is characterized by : additionally acquiring first inertial measurement unit data collected by one or more sensors of the cleaning robot (S31); determining morphologically-connected regions in the ground projection point cloud (S15); and using a morphologically-connected region having an area less than a preset value as a region where an obstacle is located (S16); wherein the extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region (S12) 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 (S11); extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region (S12); extracting, from the second 3D point cloud, a third 3D point cloud having a height value in a set height range (S13), 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 (S14); the method is characterized by : additionally acquiring first inertial measurement unit data collected by one or more sensors of the cleaning robot (S31); determining morphologically-connected regions in the ground projection point cloud (S15); and additionally acquiring first inertial measurement unit data collected by one or more sensors of the cleaning robot (S31); determining morphologically-connected regions in the ground projection point cloud (S15); and using a morphologically-connected region having an area less than a preset value as a region where an obstacle is located (S16); wherein the extracting, from the first 3D point cloud, a second 3D point cloud belonging to a ground region (S12) 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. <EOS>