A method for controlling a robot, comprising: obtaining a target action of the robot; obtaining environment information of a working environment where the robot is located, wherein the environment information comprises ground material information and obstacle information of an obstacle; determining a target work area of the robot based on the environment information and the target action; and controlling the robot to move in the target work area based on the target action; characterized in that, determining the target work area of the robot comprises: determining an operable level of the working environment where the robot is located based on the ground material information, wherein the operable level is used to characterize a level that a current ground environment is suitable for robot stepping or action; determining a distance between the robot and an obstacle based on the obstacle information; in response to the target action being a moving action, determining a polyhedron corresponding to a torso body of the robot as an action area required for the target action; in response to the target action being a non-moving action, determining a space area covered when the robot performs the target action as the action area required for the target action; and determining the target work area based on the operable level, the distance, and the action area. obtaining a target action of the robot; obtaining environment information of a working environment where the robot is located, wherein the environment information comprises ground material information and obstacle information of an obstacle; determining a target work area of the robot based on the environment information and the target action; and controlling the robot to move in the target work area based on the target action; characterized in that, determining the target work area of the robot comprises: determining an operable level of the working environment where the robot is located based on the ground material information, wherein the operable level is used to characterize a level that a current ground environment is suitable for robot stepping or action; determining a distance between the robot and an obstacle based on the obstacle information; in response to the target action being a moving action, determining a polyhedron corresponding to a torso body of the robot as an action area required for the target action; in response to the target action being a non-moving action, determining a space area covered when the robot performs the target action as the action area required for the target action; and determining the target work area based on the operable level, the distance, and the action area. determining an operable level of the working environment where the robot is located based on the ground material information, wherein the operable level is used to characterize a level that a current ground environment is suitable for robot stepping or action; determining a distance between the robot and an obstacle based on the obstacle information; in response to the target action being a moving action, determining a polyhedron corresponding to a torso body of the robot as an action area required for the target action; in response to the target action being a non-moving action, determining a space area covered when the robot performs the target action as the action area required for the target action; and determining the target work area based on the operable level, the distance, and the action area.