The embodiments of the present application belong to the technical field of robots. Provided are a
robot control method and apparatus, an electronic device, and a readable storage medium. The method comprises: on the basis of a preset dictionary, performing instruction decoding on a task file to obtain at least one instruction to be executed, and storing each instruction to be executed in an instruction
queue to be executed, each instruction to be executed comprising a command name, a command parameter, and an execution state; reading a header instruction of the instruction
queue to be executed as the current instruction; and determining whether there is a preceding instruction for the current instruction and, if there is a preceding instruction and the preceding instruction has been executed, executing the current instruction on the basis of the preset dictionary. In this way, decoding
robot operating instructions by means of the preset dictionary involves a simple decoding process, exhibits high expandability, can program complex
robot operations, reduces the threshold of operating robots, and improves the
usability of humanoid robots.