A method of controlling a mobile warning triangle, the mobile warning triangle comprising a sensor, the method comprising: controlling the mobile warning triangle to move forward along a lane marking of a road and acquiring color information detected by the sensor, wherein the mobile warning triangle is placed on the road and the sensor is aimed at the lane marking of the road; determining whether the sensor detects the lane marking of the road according to the color information detected by the sensor during the mobile warning triangle moving forward; and controlling the mobile warning triangle to continue moving forward if the sensor detects the lane marking of the road; characterized in that, the method further comprises: obtaining first deviation information of a central axis of the mobile warning triangle with respect to the lane marking of the road and rotating the central axis of the mobile warning triangle to a first direction by a first predetermined angle if the sensor does not detect the lane marking of the road; rotating again the central axis of the mobile warning triangle to a second direction by a second predetermined angle if the sensor still does not detect the lane marking of the road during the rotating of the mobile warning triangle to the first direction by the first predetermined angle, wherein the first direction is an opposite direction from the second direction; controlling the mobile warning triangle to suspend rotating the central axis and obtaining second deviation information of the central axis of the mobile warning triangle with respect to the lane marking of the road once the sensor detects the lane marking of the road during the rotating of the mobile warning triangle to the second direction by the second predetermined angle; calculating a first deflection angle (β1) based on the first deviation information and the second deviation information of the central axis of the mobile warning triangle; and rotating again the central axis of the mobile warning triangle to the first direction by twice the first deflection angle (β1) and controlling the mobile warning triangle to continue moving forward until the sensor detects the lane marking of the road. characterized in that, the method further comprises: obtaining first deviation information of a central axis of the mobile warning triangle with respect to the lane marking of the road and rotating the central axis of the mobile warning triangle to a first direction by a first predetermined angle if the sensor does not detect the lane marking of the road; rotating again the central axis of the mobile warning triangle to a second direction by a second predetermined angle if the sensor still does not detect the lane marking of the road during the rotating of the mobile warning triangle to the first direction by the first predetermined angle, wherein the first direction is an opposite direction from the second direction; controlling the mobile warning triangle to suspend rotating the central axis and obtaining second deviation information of the central axis of the mobile warning triangle with respect to the lane marking of the road once the sensor detects the lane marking of the road during the rotating of the mobile warning triangle to the second direction by the second predetermined angle; calculating a first deflection angle (β1) based on the first deviation information and the second deviation information of the central axis of the mobile warning triangle; and rotating again the central axis of the mobile warning triangle to the first direction by twice the first deflection angle (β1) and controlling the mobile warning triangle to continue moving forward until the sensor detects the lane marking of the road.