Search

CN-117021073-B - Robot control method and device, electronic equipment and readable storage medium

CN117021073BCN 117021073 BCN117021073 BCN 117021073BCN-117021073-B

Abstract

The application discloses a control method, a device, electronic equipment and a computer readable storage medium of a robot, wherein the method comprises the steps of determining a to-be-executed action required by completing a to-be-executed task, determining a target instruction template matched with the to-be-executed action from preset instruction templates, wherein the instruction template comprises configuration variables on which corresponding actions are dependent to be executed, responding to parameter configuration instructions aiming at the target configuration variables in the target instruction template, carrying out parameter configuration on the target configuration variables to obtain an instantiation instruction for controlling the robot to execute the to-be-executed action, and executing the instantiation instruction according to the arrangement sequence of the to-be-executed action so as to control the robot to execute the to-be-executed task. The scheme provided by the application can improve the reusability of the program and reduce the programming difficulty of the program for controlling the movement of the robot.

Inventors

  • HUANG QI
  • LIU SIYAN
  • HU ZHIPENG
  • FAN CHANGJIE

Assignees

  • 网易(杭州)网络有限公司

Dates

Publication Date
20260512
Application Date
20230717

Claims (12)

  1. 1. A method of controlling a robot, the method comprising: Determining actions to be executed required for completing tasks to be executed; determining a target instruction template matched with the action to be executed from preset instruction templates, wherein the instruction template comprises configuration variables on which the corresponding action is executed; Responding to a parameter configuration instruction aiming at a target configuration variable in the target instruction template, and carrying out parameter configuration on the target configuration variable to obtain an instantiation instruction for controlling the robot to execute the action to be executed; Executing the instantiation instruction according to the arrangement sequence of the actions to be executed so as to control the robot to execute the tasks to be executed; the configuring the parameters of the target configuration variables comprises the following steps: determining a target action position for executing the action to be executed; parameter configuration is carried out on the target configuration variables according to the target action positions; the configuration variables further comprise a precondition judging function when the corresponding action is executed, the precondition judging function comprises a space state judging function and/or an accessory state judging function, the space state judging function is used for judging whether the robot reaches an execution position for starting to execute the corresponding action in the action position, and the accessory state judging function is used for judging whether an accessory of the robot executing the corresponding action is in a state capable of executing the corresponding action; The parameter configuration of the target configuration variable further includes: determining a target pre-condition judging function for executing the action to be executed; Parameter configuration is carried out on the target configuration variables according to the target pre-condition judging function; The parameter configuration of the target configuration variable according to the target action position further includes: determining a space state judging function according to the execution position of the action to be executed in the target action position, and/or, Determining a fitting state judging function according to a target identifier corresponding to the fitting for executing the action to be executed; And carrying out parameter configuration on the target configuration variable according to the target pre-condition judging function.
  2. 2. The method of claim 1, wherein prior to the determining the action to be performed required to complete the task to be performed, the method further comprises: determining a single action of the robot in a scene; Modeling the single action according to the action position of executing the single action to obtain an instruction template corresponding to the single action.
  3. 3. The method of claim 1, wherein prior to the determining to perform the target precondition judging function of the action to be performed, the method further comprises: determining the arrangement sequence of the actions to be executed; the determining the target precondition judging function for executing the action to be executed comprises the following steps: Determining whether a first action in the actions to be executed is in a completion state or not as a target pre-condition judging function corresponding to a second action in the other actions aiming at other actions except the first action in the actions to be executed, wherein the second action is triggered after the first action is completed; And determining a target pre-condition corresponding to the first action to be executed according to the execution position of the first action to be executed.
  4. 4. The method of claim 1, wherein prior to said executing the instantiation instructions in the order of the actions to be performed, the method further comprises: And responding to a drag instruction of the front page for the component corresponding to the instantiation instruction, and acquiring the arrangement sequence of the actions to be executed, which is indicated by the drag instruction.
  5. 5. The method of claim 1, wherein the instruction template is a DSL-type instruction template, the instantiation instruction is a DSL-type instantiation instruction, and the executing the instantiation instruction in the order of the actions to be performed comprises: sequentially arranging the instantiation instructions according to the arrangement sequence of the actions to be executed to obtain a continuous action instruction set; And analyzing the continuous action instruction set to obtain computer language codes, and executing the computer language codes.
  6. 6. The method according to claim 1, wherein prompt information describing that the robot completes the corresponding action is provided in the instruction template, and the prompt information is triggered when the robot completes the corresponding action.
  7. 7. The method of claim 6, wherein the configuration variables further include the hint information, and wherein the parameter configuring the target configuration variables further includes: Determining information containing the target action position and completing the action to be executed as target prompt information; and carrying out parameter configuration on the target configuration variables according to the target prompt information.
  8. 8. The method of claim 1, wherein the robot comprises a plurality of accessories, the configuration variable comprising an identification of an accessory correspondence of the robot used to perform the corresponding action; the parameter configuration of the target configuration variable comprises the following steps: determining a target accessory used for executing the action to be executed in the plurality of accessories; And carrying out parameter configuration on the target configuration variable according to the accessory identification of the target accessory.
  9. 9. The method of claim 1, wherein parameter configuring the target configuration variables of the target instruction template comprises: Determining configuration parameters of the target configuration variables according to scene information in the execution process of the task to be executed; And filling the target configuration variables of the target instruction templates through the configuration parameters.
  10. 10. A control device for a robot, the device comprising: The first determining unit is used for determining actions to be executed required by completing tasks to be executed; the second determining unit is used for determining a target instruction template matched with the action to be executed from preset instruction templates, wherein the instruction template comprises configuration variables on which the corresponding action is executed; The parameter configuration unit is used for responding to a parameter configuration instruction aiming at a target configuration variable in the target instruction template, carrying out parameter configuration on the target configuration variable and obtaining an instantiation instruction for controlling the robot to execute the action to be executed; the instruction execution unit is used for executing the instantiation instruction according to the arrangement sequence of the actions to be executed so as to control the robot to execute the tasks to be executed; the configuring the parameters of the target configuration variables comprises the following steps: determining a target action position for executing the action to be executed; parameter configuration is carried out on the target configuration variables according to the target action positions; the configuration variables further comprise a precondition judging function when the corresponding action is executed, the precondition judging function comprises a space state judging function and/or an accessory state judging function, the space state judging function is used for judging whether the robot reaches an execution position for starting to execute the corresponding action in the action position, and the accessory state judging function is used for judging whether an accessory of the robot executing the corresponding action is in a state capable of executing the corresponding action; The parameter configuration of the target configuration variable further includes: determining a target pre-condition judging function for executing the action to be executed; Parameter configuration is carried out on the target configuration variables according to the target pre-condition judging function; The parameter configuration of the target configuration variable according to the target action position further includes: determining a space state judging function according to the execution position of the action to be executed in the target action position, and/or, Determining a fitting state judging function according to a target identifier corresponding to the fitting for executing the action to be executed; And carrying out parameter configuration on the target configuration variable according to the target pre-condition judging function.
  11. 11. An electronic device, comprising: Processor, and A memory for storing a data processing program, the electronic device being powered on and executing the program by the processor, for performing the method of any of claims 1-9.
  12. 12. A computer readable storage medium, characterized in that a data processing program is stored, which program is run by a processor, for performing the method according to any of claims 1-9.

Description

Robot control method and device, electronic equipment and readable storage medium Technical Field The present application relates to the field of robots, and in particular, to a method and apparatus for controlling a robot, an electronic device, and a computer readable storage medium. Background With the development of robotics, robots are used instead of manual labor in more and more industries, for example, robots are used in the logistics field to perform sorting, distribution, and the like, and robots are used in factories to perform material transportation. The appearance of robot has reduced the human cost, has realized automaticly for the efficiency of labour work is higher. At present, the control of the robot is mostly realized by a program, and the motion trail of the robot is programmed to control the robot to perform corresponding motion. With the increase of uncertain factors in application scenes, the robot may correspond to a plurality of different motion tracks in practical application, for example, the robot needs to transport objects to different delivery positions from different starting positions. Once the motion trail of the robot needs to be changed, a program is often required to be redesigned according to the motion trail of the robot, so that the reusability of the program is poor, and as the motion trail of the robot in an application scene becomes more and more complex, the programming difficulty becomes more and more, a great deal of time and energy are also required to be consumed for maintaining the program, and the experience of a user when the robot is used is poor. Disclosure of Invention The application provides a control method and device of a robot, electronic equipment and a computer readable storage medium, which can improve the reusability of a program and reduce the programming difficulty of the program for controlling the movement of the robot. The specific scheme is as follows: in a first aspect, an embodiment of the present application provides a method for controlling a robot, including: Determining actions to be executed required for completing tasks to be executed; determining a target instruction template matched with the action to be executed from preset instruction templates, wherein the instruction template comprises configuration variables on which the corresponding action is executed; Responding to a parameter configuration instruction aiming at a target configuration variable in the target instruction template, and carrying out parameter configuration on the target configuration variable to obtain an instantiation instruction for controlling the robot to execute the action to be executed; and executing the instantiation instruction according to the arrangement sequence of the actions to be executed so as to control the robot to execute the tasks to be executed. In a second aspect, an embodiment of the present application provides a control device for a robot, including: The first determining unit is used for determining actions to be executed required by completing tasks to be executed; the second determining unit is used for determining a target instruction template matched with the action to be executed from preset instruction templates, wherein the instruction template comprises configuration variables on which the corresponding action is executed; The parameter configuration unit is used for responding to a parameter configuration instruction aiming at a target configuration variable in the target instruction template, carrying out parameter configuration on the target configuration variable and obtaining an instantiation instruction for controlling the robot to execute the action to be executed; And the instruction execution unit is used for executing the instantiation instruction according to the arrangement sequence of the actions to be executed so as to control the robot to execute the tasks to be executed. In a third aspect, the present application also provides an electronic device, including: Processor, and A memory for storing a data processing program, the electronic device being powered on and executing the program by the processor, to perform the method according to the first aspect. In a fourth aspect, embodiments of the present application also provide a computer readable storage medium storing a data processing program for execution by a processor to perform the method of the first aspect. Compared with the prior art, the application has the following advantages: The control method of the robot comprises the steps of determining an action to be executed required by completing a task to be executed, determining a target instruction template matched with the action to be executed from preset instruction templates, responding to a parameter configuration instruction aiming at the target configuration variable in the target instruction template, carrying out parameter configuration on the target configuration variable to obtain an instantiat