CN113084802A - Robot control method, device, electronic device and storage medium - Google Patents

Robot control method, device, electronic device and storage medium Download PDF

Info

Publication number
CN113084802A
CN113084802A CN202110344224.4A CN202110344224A CN113084802A CN 113084802 A CN113084802 A CN 113084802A CN 202110344224 A CN202110344224 A CN 202110344224A CN 113084802 A CN113084802 A CN 113084802A
Authority
CN
China
Prior art keywords
control
control function
target
robot
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110344224.4A
Other languages
Chinese (zh)
Other versions
CN113084802B (en
Inventor
王永刚
郭小俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Shuke Haiyi Information Technology Co Ltd
Original Assignee
Jingdong Shuke Haiyi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Shuke Haiyi Information Technology Co Ltd filed Critical Jingdong Shuke Haiyi Information Technology Co Ltd
Priority to CN202110344224.4A priority Critical patent/CN113084802B/en
Publication of CN113084802A publication Critical patent/CN113084802A/en
Application granted granted Critical
Publication of CN113084802B publication Critical patent/CN113084802B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • B25J9/161Hardware, e.g. neural networks, fuzzy logic, interfaces, processor
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • B25J9/1664Programme controls characterised by programming, planning systems for manipulators characterised by motion, path, trajectory planning
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Manipulator (AREA)

Abstract

The application relates to a robot control method, a robot control device, an electronic device and a storage medium, wherein the method comprises the following steps: the method comprises the steps of firstly obtaining a control request of a user for controlling the robot, wherein the control request comprises an identification of a target control requirement, then determining at least one control function corresponding to the target control requirement according to a mapping relation between the preset identification of the control requirement and the control function, then calling the target control function from the determined at least one control function based on preset hardware configuration information of the robot, wherein the target control function is the control function which is configured through the hardware configuration information in advance, and finally controlling the robot by using the configuration information, the target control function and the control request. Thus, portability can be enhanced by using the hardware configuration information without re-developing related drivers.

Description

Robot control method, device, electronic device and storage medium
Technical Field
The present disclosure relates to the field of robot control technologies, and in particular, to a robot control method and apparatus, an electronic device, and a storage medium.
Background
With the development of science and technology, robots are more and more widely applied, for example, in service institutions such as malls, supermarkets and banks, the robots can be used for guiding, business query and the like, wherein one of the cores of the robots for performing human-computer interaction is twisting of joints of the robots, for example, up-down twisting, left-right twisting and the like, so that the experience of human-computer interaction is improved.
In the related art, for joints of different robots, different driving devices may be used for driving, such as a steering engine or a motor, and different driving devices may have different driving programs, for example, when the steering engine is to be controlled, the driving program of the steering engine needs to be called, when the motor is to be controlled, the driving program of the motor needs to be called, which may result in that when robots that drive heads using different driving devices are produced, for example, three types of single steering engine control, single motor control and motor-steering engine hybrid control are required, each type of driving program needs to be modified or even re-developed, and the driving programs of the three types of driving programs cannot be transplanted each other, that is, how many driving programs need to be modified or even developed, which may greatly increase the cost of robot research and development.
Disclosure of Invention
In order to overcome the problem that research and development costs are increased due to the fact that different driving programs need to be developed aiming at combination strategies of different driving devices in the related art, the application provides a robot control method, a device, electronic equipment and a storage medium.
According to a first aspect of the present application, there is provided a robot control method including:
obtaining a control request for controlling a robot, the control request comprising: identification of a target control requirement;
determining at least one control function corresponding to the identifier of the target control requirement according to a mapping relation between the identifier of the preset control requirement and the control function, wherein each control function is used for realizing the target control requirement;
based on preset hardware configuration information of the robot, calling a target control function from the at least one determined control function, wherein the target control function is a control function configured in advance through the hardware configuration information;
controlling the robot using the hardware configuration information, the target control function, and the control request.
In an optional embodiment, the retrieving, based on preset hardware configuration information of the robot, a target control function from the determined at least one control function includes:
calling preset hardware configuration information of the robot, wherein the hardware configuration information comprises configuration parameters and function identifiers of control functions configured through the configuration parameters;
determining a target control function corresponding to the function identification from the determined at least one control function;
and calling the target control function.
In an optional embodiment, the hardware configuration information includes a control object identifier, where the control object identifier is an identifier of a control object controlled by a control function corresponding to the control function identifier;
the controlling the robot using the hardware configuration information, the target control function, and the control request includes:
determining a control object identifier corresponding to the control function identifier of the target control function as a target control object identifier based on the corresponding relation between the control function identifier and the control object identifier in the hardware configuration information;
and controlling the control object corresponding to the target control object identification by using the target control function according to the control request so as to control the robot according to the target control requirement.
In an optional embodiment, the control request further comprises a control parameter;
the controlling the control object corresponding to the target control object identifier by using the target control function according to the control request includes:
adding the control parameter to the target control function;
and controlling the control object corresponding to the target control object identification based on the target control function added with the control parameter.
In an optional embodiment, the hardware configuration parameters include a limit parameter;
prior to the adding the control parameter to the target control function, the method further comprises:
judging whether the control parameter is smaller than the limit parameter or not;
if the control parameter is smaller than the limit parameter, adding the control parameter into the target control function;
and if the control parameter is not less than the limit parameter, adding the limit parameter into the target control function.
In an optional embodiment, if the control parameter is not less than the limit parameter, the method further includes:
and sending out a prompt exceeding the action range.
In an optional embodiment, the hardware configuration parameter comprises an action difference value or a reduction ratio;
prior to the adding the control parameter to the target control function, the method further comprises:
and calculating the control parameter by using the action difference value or the deceleration ratio.
According to a second aspect of the present application, there is provided a robot control apparatus comprising:
an obtaining module configured to obtain a control request for controlling a robot, the control request including: identification of a target control requirement;
the determining module is used for determining at least one control function corresponding to the identifier of the target control requirement according to a mapping relation between the identifier of the preset control requirement and the control function, wherein each control function is used for realizing the target control requirement;
the calling module is used for calling a target control function from the at least one determined control function based on preset hardware configuration information of the robot, wherein the target control function is a control function which is configured in advance through the hardware configuration information;
a control module for controlling the robot using the hardware configuration information, the target control function, and the control request.
In an optional embodiment, the determining module comprises:
the first calling unit is used for calling preset hardware configuration information of the robot, wherein the hardware configuration information comprises configuration parameters and function identifiers of control functions configured through the configuration parameters;
a first determining unit, configured to determine, from the at least one determined control function, a target control function corresponding to the function identifier;
and the second calling unit is used for calling the target control function.
In an optional embodiment, the hardware configuration information includes a control object identifier, where the control object identifier is an identifier of a control object controlled by a control function corresponding to the control function identifier;
the control module includes:
a second determining unit, configured to determine, based on a correspondence between a control function identifier and a control object identifier in the hardware configuration information, a control object identifier corresponding to the control function identifier of the target control function as a target control object identifier;
and the control unit is used for controlling the control object corresponding to the target control object identifier by using the target control function according to the control request so as to control the robot according to the target control requirement.
In an optional embodiment, the control request further comprises a control parameter;
the control unit includes:
an adding subunit, configured to add the control parameter to the target control function;
and the control subunit is used for controlling the control object corresponding to the target control object identifier based on the target control function added with the control parameter.
In an optional embodiment, the hardware configuration parameters include a limit parameter;
the device further comprises:
the judging module is used for judging whether the control parameter is smaller than the limiting parameter;
the first adding module is used for adding the control parameter into the target control function if the control parameter is smaller than the limit parameter;
and the second adding module is used for adding the limit parameter into the target control function if the control parameter is not less than the limit parameter.
In an optional embodiment, if the control parameter is not less than the limit parameter, the apparatus further includes:
and the reminding module is used for sending out reminding exceeding the action range.
In an optional embodiment, the hardware configuration parameter comprises an action difference value or a reduction ratio;
the device further comprises:
and the calculation module is used for calculating the control parameters by utilizing the action difference value or the deceleration ratio.
According to a third aspect of the present application, there is provided an electronic device comprising: at least one processor and memory;
the processor is configured to execute the robot control program stored in the memory to implement the robot control method according to the first aspect of the present application.
According to a fourth aspect of the present application, there is provided a storage medium storing one or more programs which, when executed, implement the robot control method of the first aspect of the present application.
The technical scheme provided by the application can comprise the following beneficial effects: the method comprises the steps of firstly obtaining a control request of a user for controlling the robot, wherein the control request comprises an identification of a target control requirement, then determining at least one control function corresponding to the target control requirement according to a mapping relation between the preset identification of the control requirement and the control function, then calling the target control function from the determined at least one control function based on preset hardware configuration information of the robot, wherein the target control function is the control function which is configured through the hardware configuration information in advance, and finally controlling the robot by using the configuration information, the target control function and the control request. Based on this, when a scene of realizing a target control requirement through different modes is faced, a control function can be predefined for each mode, then hardware configuration information is preset according to different scenes, namely, the control function corresponding to the current scene is configured in advance, in the specific control process, all the control functions capable of realizing the target control requirement are found firstly, then the configured control functions are found as the target control functions according to the preset hardware configuration information, and then the robot in a certain scene can be controlled by using the hardware configuration information, the control functions and the target control requirement, so that the transportability is greatly enhanced, and related driving programs do not need to be researched and developed again.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic flow chart diagram of a robot control method provided by an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a process for invoking a target control function according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of a method for controlling a target control object of a robot according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a robot control device according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a robot control method according to an embodiment of the present disclosure.
As shown in fig. 1, the robot control method provided in this embodiment may include:
step S101, obtaining a control request for controlling the robot, wherein the control request comprises: identification of a target control requirement.
It should be noted that the control request may be generated by a remote control terminal, a robot internal controller, and the like, and a general control request may carry an identifier corresponding to a target control requirement of the remote control terminal and the robot internal controller, where the identifier may be a number, a letter, a symbol, or a combination of any form of the three, as long as the identifier can identify different control requirements.
In one specific example, this may be as shown in Table 1.
Controlling demand Identification of control requirements
The head rotates to the left A1
Head rotating to the right A2
The head part rotates upwards A3
The head rotates downwards A4
The waist rotates to the left B1
The waist rotates to the right B2
…… ……
TABLE 1
Step S102, determining at least one control function corresponding to the identification of the target control requirement according to the mapping relation between the preset identification of the control requirement and the control function, wherein each control function is used for realizing the target control requirement.
It should be noted that, in this step, the control function is a preset function for each driving device to achieve a certain control requirement, for example, the driving device may have a steering engine, a brushless motor, etc., while different driving devices may achieve different control requirements or the same control requirement, for example, for the rotation control of the robot head, there are often four control requirements for the robot head, i.e., left rotation, right rotation, upward rotation, and downward rotation, and the driving device for driving the robot head to rotate may be two steering engines (one steering engine controls left and right rotation, and one steering engine controls up and down rotation), or may be one steering engine, one brushless motor (steering engine controls up and down rotation, and brushless motor controls left and right rotation), that is, there may be multiple control functions for achieving the same control requirement, in order to be compatible with more driving devices, the application presets all the related driving devices and the control function of the control requirement which can be realized by each driving device, and the mapping relation between the identifier of the specific control requirement and the control function can be shown as table 2:
Figure BDA0002999574390000081
Figure BDA0002999574390000091
TABLE 2
In this step, if the identifier of the target control requirement is known, at least one control function corresponding to the identifier of the target control requirement can be determined according to the mapping relationship between the identifier of the control requirement and the control function.
In a specific example, taking tables 1 and 2 as examples, if the target control demand is a left turn of the head, the corresponding identifier is a1, and then the mapping relationship between the identifier of the control demand and the control function in table 2 can be obtained, where the control function corresponding to a1 includes "leftHead 1" and "leftHead 2", and then the final target control function is selected from "leftHead 1" and "leftHead 2" according to the content of step S103.
Step S103, based on preset hardware configuration information of the robot, a target control function is called from the determined at least one control function, and the target control function is a control function configured in advance through the hardware configuration information.
In this step, the hardware configuration information refers to information that is set by a developer in advance according to hardware (e.g., a driving device) of the robot, for example, a robot, a steering engine is used for controlling the head of the robot to rotate up and down, and a brushless motor is used for controlling the head of the robot to rotate left and right, so that a corresponding control function needs to be configured, for example, the corresponding control function is marked in a configured state by means of selection or marking, and meanwhile, some personalized parameters (i.e., configuration parameters) of the hardware can be bound with the control function.
Referring to fig. 2, fig. 2 is a schematic flowchart of a process for retrieving a target control function according to an embodiment of the present application.
As shown in fig. 2, the process of invoking the target control function provided in this embodiment may include:
step S201, calling preset hardware configuration information of the robot, where the hardware configuration information includes configuration parameters and function identifiers of control functions configured by the configuration parameters.
It should be noted that the hardware configuration information refers to information for configuring a corresponding control function in advance according to hardware of the robot, for example, a state that the corresponding control function is marked as "configured" by means of checking, marking, or the like, and some personalized parameters (i.e., configuration parameters) of the hardware.
Specifically, the hardware configuration information may be as shown in table 3.
Figure BDA0002999574390000101
TABLE 3
Step S202, determining a target control function corresponding to the function identification from the determined at least one control function.
In this step, since at least one control function has been obtained in the foregoing step, and the hardware configuration information includes the configured function identifier, the configured control function can be screened from the obtained at least one control function according to the function identifier, and is used as the target control function.
Still taking the foregoing example as an illustration, the control functions corresponding to a1 include "leftHead 1" and "leftHead 2", both of which can control the head of the robot to rotate to the left, and in table 3, only "leftHead 1" has configuration information, and the configuration information is configured, which illustrates that, for this robot, the control function corresponding to "leftHead 1" is the control function capable of controlling the head of this robot to rotate to the left, and the control function corresponding to "leftHead 1" is the target control function.
And step S203, calling a target control function.
In this step, after the target control function is determined in the foregoing step, the control function may be directly called, and still in the foregoing example, if the target control function is "leftHead 1", the control function identified as "leftHead 1" may be called from a preset storage location.
And step S104, controlling the robot by using the hardware configuration information, the target control function and the control request.
It should be noted that the hardware configuration information in this step may include a control object identifier, where the control object identifier is an identifier of a control object that is controlled by a control function corresponding to the control function identifier. For example, the driving device is used for driving the head of the robot to move, or the driving device is used for driving the waist of the robot to rotate.
In order to further improve the stability of the control, when the robot is controlled by using the target control function, a target control object to be controlled may be determined first, specifically referring to fig. 3, where fig. 3 is a schematic flowchart of a process for controlling the target control object of the robot according to an embodiment of the present application.
As shown in fig. 3, the process of controlling a robot target control object provided by the present embodiment may include:
step S301, determining the control object identifier corresponding to the control function identifier of the target control function as the target control object identifier based on the corresponding relation between the control function identifier and the control object identifier in the hardware configuration information.
It should be noted that each control object corresponds to an identifier, that is, a control object identifier, and when the configuration information is preset, the control function and the corresponding control object are mapped, which may be specifically shown in table 4.
Figure BDA0002999574390000111
Figure BDA0002999574390000121
TABLE 4
Still referring to the foregoing example, the target control function is the control function corresponding to "leftHead 1", and it can be known from table 4 that the hardware configuration information corresponding to "leftHead 1" includes the control object id of the control object 2, that is, the target control object id corresponding to the target control function is the control object 2.
And S302, controlling the control object corresponding to the target control object identification by using the target control function according to the control request so as to control the robot according to the target control requirement.
It should be noted that the control request in this step may further include a control parameter, and when the target control function is used to control the control object corresponding to the target control identifier, the control parameter may be added to the target control function first, and then the control object corresponding to the target control identifier is controlled based on the target control function to which the control parameter is added. Also taking the control function corresponding to "leftHead 1" as an example, the control parameter may be an angle of turning to the left, for example, 10 degrees, and 10 degrees is added to the target control function, and when the target control function is executed, the purpose of turning the robot head to the left by 10 degrees can be achieved.
In addition, when the control object is a driving device such as a steering engine and a brushless motor, the control parameter can be a rotation angle, which may involve the problem of the maximum rotation angle, in order to ensure that the angle corresponding to the control parameter does not exceed the maximum angle, a limit parameter can be set in a preset hardware parameter, and before the control parameter is added into the target control function, whether the control parameter is smaller than the limit parameter can be judged, if the control parameter is smaller than the limit parameter, the control parameter is added into the target control function, and if the control parameter is not smaller than the limit parameter, the limit parameter is added into the target control function. Based on the technical characteristics, the size of the parameter added into the target control function cannot exceed the limit parameter, so that the action of the driving device cannot exceed the original action range, and the driving device is prevented from being damaged.
Of course, if the control parameter is not less than the limit parameter, a prompt exceeding the action range may be sent, and the content of the prompt may include the limit parameter, such as the maximum rotation angle, so as to further avoid that the control parameter exceeds the limit parameter when the user generates a control request through the human-computer interaction operation next time.
In addition, for different driving devices, there may be different phenomena between the control parameter of the control request and the amount actually required to be added to the target control parameter, for example, for a steering engine, the steering engine may be only capable of rotating in a single circle between 0 to 359.9 degrees, and cannot rotate in a full circle back to the original position, so that in this embodiment, a position mode may be used to realize forward and reverse rotation, and when the steering engine is installed, the steering engine is rotated to 90 degrees by a tool, and the degree is defined as an initial position, an action of 0 to 20 degrees is defined to be performed in a first direction between 90 degrees and 110 degrees, a torsion of 0 to 10 degrees is defined to be performed in a second direction between 90 degrees and 80 degrees, that is, there is an action difference between the actual amount and the control parameter, and therefore, before the control parameter is added to the target control function, the control parameter also needs to be calculated by the action difference (the action difference may be preset in the hardware configuration information), for example, for a steering engine, the motion difference value in the first direction is 90, the motion difference value in the second direction is 90, if the control parameter is to rotate 10 degrees in the first direction, 10 and 90 need to be added, and in fact, the steering engine needs to be controlled to a position of 100 degrees, if the control parameter is to rotate 5 degrees in the second direction, 90 needs to be subtracted by 5, and in fact, the steering engine needs to be controlled to a position of 85 degrees.
Of course, there may be some driving devices with some reduction ratios, such as a brushless motor, the actuator of the brushless motor has a reduction ratio of 2.7, taking the control head as an example, if the brushless motor rotates 27 degrees, the head actually moves only 10 degrees, therefore, the hardware configuration parameters may also have a reduction ratio, after calculating the control parameters by using the reduction ratio, the calculated control parameters are added to the target control function, for example, the control parameters are multiplied by the reduction ratio to obtain the amount actually required to be controlled, and then the amount is added to the target control function. In a specific example, if the control parameter is 10 degrees of rotation, then it is necessary to multiply 10 by 2.7 to obtain 27 degrees, and add 27 degrees to the target control function.
In this embodiment, a control request for controlling the robot by a user is first obtained, where the control request includes an identifier of a target control requirement, then at least one control function corresponding to the target control requirement is determined according to a mapping relationship between the preset identifier of the control requirement and the control function, then the target control function is called from the at least one determined control function based on preset hardware configuration information of the robot, where the target control function is a control function configured in advance through the hardware configuration information, and finally the robot is controlled by using the configuration information, the target control function, and the control request.
Based on this, when a scene of realizing a target control requirement through different modes is faced, a control function can be predefined for each mode, then hardware configuration information is preset according to different scenes, namely, the control function corresponding to the current scene is configured in advance, in the specific control process, all the control functions capable of realizing the target control requirement are found out firstly, then the configured control functions are found out as the target control functions according to the preset hardware configuration information, and the robot in a certain scene can be controlled by using the hardware configuration information, the control functions and the target control requirement, so that the transportability is greatly enhanced, and related driving programs do not need to be researched and developed again.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a robot control device according to another embodiment of the present disclosure.
As shown in fig. 4, the robot control apparatus provided in the present embodiment may include:
an obtaining module 401, configured to obtain a control request for controlling the robot, where the control request includes: identification of a target control requirement;
a determining module 402, configured to determine, according to a mapping relationship between an identifier of a preset control requirement and a control function, at least one control function corresponding to the identifier of a target control requirement, where each control function is used to implement the target control requirement;
a calling module 403, configured to call a target control function from the determined at least one control function based on preset hardware configuration information of the robot, where the target control function is a control function configured in advance through the hardware configuration information;
a control module 404 for controlling the robot using the hardware configuration information, the target control function, and the control request.
In this embodiment, the obtaining module 401 first obtains a control request for controlling the robot by a user, where the control request includes an identifier of a target control requirement, then the determining module 402 determines at least one control function corresponding to the target control requirement according to a mapping relationship between the preset identifier of the control requirement and the control function, the retrieving module 403 retrieves the target control function from the at least one determined control function based on preset hardware configuration information of the robot, where the target control function is a control function configured in advance through the hardware configuration information, and finally the control module 404 controls the robot by using the configuration information, the target control function, and the control request.
Based on this, when a scene of realizing a target control requirement through different modes is faced, a control function can be predefined for each mode, then hardware configuration information is preset according to different scenes, namely, the control function corresponding to the current scene is configured in advance, in the specific control process, all the control functions capable of realizing the target control requirement are found out firstly, then the configured control functions are found out as the target control functions according to the preset hardware configuration information, and the robot in a certain scene can be controlled by using the hardware configuration information, the control functions and the target control requirement, so that the transportability is greatly enhanced, and related driving programs do not need to be researched and developed again.
In an alternative embodiment, the determining module comprises:
the robot control system comprises a first calling unit, a second calling unit and a control unit, wherein the first calling unit is used for calling preset hardware configuration information of the robot, and the hardware configuration information comprises configuration parameters and function identifiers of control functions configured through the configuration parameters;
the first determining unit is used for determining a target control function corresponding to the function identification from the determined at least one control function;
and the second calling unit is used for calling the target control function.
In an optional embodiment, the hardware configuration information includes a control object identifier, where the control object identifier is an identifier of a control object controlled by a control function corresponding to the control function identifier;
the control module includes:
a second determining unit, configured to determine, based on a correspondence between a control function identifier and a control object identifier in the hardware configuration information, a control object identifier corresponding to the control function identifier of the target control function as a target control object identifier;
and the control unit is used for controlling the control object corresponding to the target control object identifier by using the target control function according to the control request so as to control the robot according to the target control requirement.
In an optional embodiment, the control request further comprises a control parameter;
the control unit includes:
an adding subunit, configured to add the control parameter to the target control function;
and the control subunit is used for controlling the target control object to identify the corresponding control object based on the target control function added with the control parameter.
In an alternative embodiment, the hardware configuration parameters include a limit parameter;
the device still includes:
the judging module is used for judging whether the control parameter is smaller than the limiting parameter;
the first adding module is used for adding the control parameter into the target control function if the control parameter is smaller than the limit parameter;
and the second adding module is used for adding the limiting parameter into the target control function if the control parameter is not less than the limiting parameter.
In an optional embodiment, if the control parameter is not less than the limit parameter, the apparatus further includes:
and the reminding module is used for sending out reminding exceeding the action range.
In an alternative embodiment, the hardware configuration parameter comprises an action difference value or a reduction ratio;
the device still includes:
and the calculation module is used for calculating the control parameters by utilizing the action difference value or the deceleration ratio.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to another embodiment of the present application.
As shown in fig. 5, the electronic device provided in this embodiment includes: at least one processor 501, memory 502, at least one network interface 503, and other user interfaces 504. The various components in the electronic device 500 are coupled together by a bus system 505. It is understood that the bus system 505 is used to enable connection communications between these components. The bus system 505 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 505 in FIG. 5.
The user interface 504 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 502 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), Enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 502 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 502 stores elements, executable units or data structures, or a subset thereof, or an expanded set thereof as follows: an operating system 5021 and a second application 5022.
The operating system 5021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The second application 5022 includes various second applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the second application program 5022.
In the embodiment of the present invention, by calling a program or an instruction stored in the memory 502, specifically, a program or an instruction stored in the second application 5022, the processor 501 is configured to execute the method steps provided by the method embodiments, for example, including:
obtaining a control request for controlling the robot, the control request comprising: identification of a target control requirement;
determining at least one control function corresponding to the identifier of the target control requirement according to a mapping relation between the identifier of the preset control requirement and the control function, wherein each control function is used for realizing the target control requirement;
based on preset hardware configuration information of the robot, calling a target control function from the determined at least one control function, wherein the target control function is a control function configured in advance through the hardware configuration information;
the robot is controlled using the hardware configuration information, the target control function, and the control request.
In an optional embodiment, the retrieving the target control function from the determined at least one control function based on preset hardware configuration information of the robot includes:
calling preset hardware configuration information of the robot, wherein the hardware configuration information comprises configuration parameters and function identifiers of control functions configured through the configuration parameters;
determining a target control function corresponding to the function identification from the determined at least one control function;
and calling a target control function.
In an optional embodiment, the hardware configuration information includes a control object identifier, where the control object identifier is an identifier of a control object controlled by a control function corresponding to the control function identifier;
controlling a robot using hardware configuration information, a target control function, and a control request, comprising:
determining a control object identifier corresponding to the control function identifier of the target control function as a target control object identifier based on the corresponding relation between the control function identifier and the control object identifier in the hardware configuration information;
and controlling the control object corresponding to the target control object identification by using the target control function according to the control request so as to control the robot according to the target control requirement.
In an optional embodiment, the control request further comprises a control parameter;
controlling the control object corresponding to the target control object identification by using the target control function according to the control request, wherein the control object comprises the following steps:
adding the control parameter to the target control function;
and controlling the target control object to identify the corresponding control object based on the target control function added with the control parameter.
In an alternative embodiment, the hardware configuration parameters include a limit parameter;
before adding the control parameter to the target control function, the method further comprises:
judging whether the control parameter is smaller than a limit parameter or not;
if the control parameter is smaller than the limit parameter, adding the control parameter into the target control function;
and if the control parameter is not less than the limit parameter, adding the limit parameter into the target control function.
In an optional embodiment, if the control parameter is not less than the limit parameter, the method further includes:
and sending out a prompt exceeding the action range.
In an alternative embodiment, the hardware configuration parameter comprises an action difference value or a reduction ratio;
before adding the control parameter to the target control function, the method further comprises:
and calculating the control parameter by using the action difference value or the deceleration ratio.
The method disclosed by the above-mentioned embodiments of the present invention may be applied to the processor 501, or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 501. The Processor 501 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 502, and the processor 501 reads the information in the memory 502 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented in one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions of the present Application, or a combination thereof.
For a software implementation, the techniques herein may be implemented by means of units performing the functions herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the robot control method performed on the electronic device side as described above is implemented.
The processor is used for executing the robot control program stored in the memory so as to realize the following steps of the robot control method executed on the electronic equipment side:
obtaining a control request for controlling the robot, the control request comprising: identification of a target control requirement;
determining at least one control function corresponding to the identifier of the target control requirement according to a mapping relation between the identifier of the preset control requirement and the control function, wherein each control function is used for realizing the target control requirement;
based on preset hardware configuration information of the robot, calling a target control function from the determined at least one control function, wherein the target control function is a control function configured in advance through the hardware configuration information;
the robot is controlled using the hardware configuration information, the target control function, and the control request.
In an optional embodiment, the retrieving the target control function from the determined at least one control function based on preset hardware configuration information of the robot includes:
calling preset hardware configuration information of the robot, wherein the hardware configuration information comprises configuration parameters and function identifiers of control functions configured through the configuration parameters;
determining a target control function corresponding to the function identification from the determined at least one control function;
and calling a target control function.
In an optional embodiment, the hardware configuration information includes a control object identifier, where the control object identifier is an identifier of a control object controlled by a control function corresponding to the control function identifier;
controlling a robot using hardware configuration information, a target control function, and a control request, comprising:
determining a control object identifier corresponding to the control function identifier of the target control function as a target control object identifier based on the corresponding relation between the control function identifier and the control object identifier in the hardware configuration information;
and controlling the control object corresponding to the target control object identification by using the target control function according to the control request so as to control the robot according to the target control requirement.
In an optional embodiment, the control request further comprises a control parameter;
controlling the control object corresponding to the target control object identification by using the target control function according to the control request, wherein the control object comprises the following steps:
adding the control parameter to the target control function;
and controlling the target control object to identify the corresponding control object based on the target control function added with the control parameter.
In an alternative embodiment, the hardware configuration parameters include a limit parameter;
before adding the control parameter to the target control function, the method further comprises:
judging whether the control parameter is smaller than a limit parameter or not;
if the control parameter is smaller than the limit parameter, adding the control parameter into the target control function;
and if the control parameter is not less than the limit parameter, adding the limit parameter into the target control function.
In an optional embodiment, if the control parameter is not less than the limit parameter, the method further includes:
and sending out a prompt exceeding the action range.
In an alternative embodiment, the hardware configuration parameter comprises an action difference value or a reduction ratio;
before adding the control parameter to the target control function, the method further comprises:
and calculating the control parameter by using the action difference value or the deceleration ratio.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present application, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. A robot control method, characterized in that the method comprises:
obtaining a control request for controlling a robot, the control request comprising: identification of a target control requirement;
determining at least one control function corresponding to the identifier of the target control requirement according to a mapping relation between the identifier of the preset control requirement and the control function, wherein each control function is used for realizing the target control requirement;
based on preset hardware configuration information of the robot, calling a target control function from the at least one determined control function, wherein the target control function is a control function configured in advance through the hardware configuration information;
controlling the robot using the hardware configuration information, the target control function, and the control request.
2. The method according to claim 1, wherein the retrieving a target control function from the determined at least one control function based on preset hardware configuration information of the robot comprises:
calling preset hardware configuration information of the robot, wherein the hardware configuration information comprises configuration parameters and function identifiers of control functions configured through the configuration parameters;
determining a target control function corresponding to the function identification from the determined at least one control function;
and calling the target control function.
3. The method according to claim 1, wherein the hardware configuration information includes a control object identifier, and the control object identifier is an identifier of a control object controlled by a control function corresponding to the control function identifier;
the controlling the robot using the hardware configuration information, the target control function, and the control request includes:
determining a control object identifier corresponding to the control function identifier of the target control function as a target control object identifier based on the corresponding relation between the control function identifier and the control object identifier in the hardware configuration information;
and controlling the control object corresponding to the target control object identification by using the target control function according to the control request so as to control the robot according to the target control requirement.
4. The method of claim 3, wherein the control request further comprises a control parameter;
the controlling the control object corresponding to the target control object identifier by using the target control function according to the control request includes:
adding the control parameter to the target control function;
and controlling the control object corresponding to the target control object identification based on the target control function added with the control parameter.
5. The method of claim 4, wherein the hardware configuration parameters comprise a limit parameter;
prior to the adding the control parameter to the target control function, the method further comprises:
judging whether the control parameter is smaller than the limit parameter or not;
if the control parameter is smaller than the limit parameter, adding the control parameter into the target control function;
and if the control parameter is not less than the limit parameter, adding the limit parameter into the target control function.
6. The method of claim 5, wherein if the control parameter is not less than the limiting parameter, the method further comprises:
and sending out a prompt exceeding the action range.
7. The method of claim 4, wherein the hardware configuration parameter comprises an action difference value or a reduction ratio;
prior to the adding the control parameter to the target control function, the method further comprises:
and calculating the control parameter by using the action difference value or the deceleration ratio.
8. A robot control apparatus, characterized in that the apparatus comprises:
an obtaining module configured to obtain a control request for controlling a robot, the control request including: identification of a target control requirement;
the determining module is used for determining at least one control function corresponding to the identifier of the target control requirement according to a mapping relation between the identifier of the preset control requirement and the control function, wherein each control function is used for realizing the target control requirement;
the calling module is used for calling a target control function from the at least one determined control function based on preset hardware configuration information of the robot, wherein the target control function is a control function which is configured in advance through the hardware configuration information;
a control module for controlling the robot using the hardware configuration information, the target control function, and the control request.
9. An electronic device, comprising: at least one processor and memory;
the processor is configured to execute a robot control program stored in the memory to implement the robot control method of any one of claims 1 to 7.
10. A storage medium characterized in that the storage medium stores one or more programs that, when executed, implement the robot control method according to any one of claims 1 to 7.
CN202110344224.4A 2021-03-30 2021-03-30 Robot control method, device, electronic device and storage medium Active CN113084802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110344224.4A CN113084802B (en) 2021-03-30 2021-03-30 Robot control method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110344224.4A CN113084802B (en) 2021-03-30 2021-03-30 Robot control method, device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN113084802A true CN113084802A (en) 2021-07-09
CN113084802B CN113084802B (en) 2023-01-31

Family

ID=76671499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110344224.4A Active CN113084802B (en) 2021-03-30 2021-03-30 Robot control method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113084802B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009252194A (en) * 2008-04-11 2009-10-29 Nec Electronics Corp Data processor, hardware access method, and hardware access program
CN102077255A (en) * 2008-06-27 2011-05-25 环球电子有限公司 System and method to facilitate configuration of a controlling device
US20130054669A1 (en) * 2011-08-24 2013-02-28 Microsoft Corporation Calling Functions Within A Deterministic Calling Convention
CN105100132A (en) * 2014-04-25 2015-11-25 北京奇虎科技有限公司 Terminal device and terminal device identification method and system
US20180239614A1 (en) * 2017-02-17 2018-08-23 Lenovo (Beijing) Co., Ltd. Method for identifying hardware device in operating system and computer apparatus thereof
CN110597492A (en) * 2019-08-07 2019-12-20 深圳市元征科技股份有限公司 Method for calling module and related product
CN111736910A (en) * 2020-06-24 2020-10-02 山东新北洋信息技术股份有限公司 External equipment control method and device based on self-service equipment and computer equipment
CN112162900A (en) * 2020-09-18 2021-01-01 北京浪潮数据技术有限公司 Hardware information acquisition method and device, electronic equipment and storage medium
CN112207829A (en) * 2020-10-10 2021-01-12 北京创想智控科技有限公司 Robot control method and device and readable storage medium
CN112446117A (en) * 2019-08-13 2021-03-05 浙江深酷机器人有限公司 Direct current motor virtual machine and implementation method thereof
CN112527420A (en) * 2020-12-23 2021-03-19 平安普惠企业管理有限公司 Interface data flow processing method and device, computer equipment and medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009252194A (en) * 2008-04-11 2009-10-29 Nec Electronics Corp Data processor, hardware access method, and hardware access program
CN102077255A (en) * 2008-06-27 2011-05-25 环球电子有限公司 System and method to facilitate configuration of a controlling device
US20130054669A1 (en) * 2011-08-24 2013-02-28 Microsoft Corporation Calling Functions Within A Deterministic Calling Convention
CN105100132A (en) * 2014-04-25 2015-11-25 北京奇虎科技有限公司 Terminal device and terminal device identification method and system
US20180239614A1 (en) * 2017-02-17 2018-08-23 Lenovo (Beijing) Co., Ltd. Method for identifying hardware device in operating system and computer apparatus thereof
CN110597492A (en) * 2019-08-07 2019-12-20 深圳市元征科技股份有限公司 Method for calling module and related product
CN112446117A (en) * 2019-08-13 2021-03-05 浙江深酷机器人有限公司 Direct current motor virtual machine and implementation method thereof
CN111736910A (en) * 2020-06-24 2020-10-02 山东新北洋信息技术股份有限公司 External equipment control method and device based on self-service equipment and computer equipment
CN112162900A (en) * 2020-09-18 2021-01-01 北京浪潮数据技术有限公司 Hardware information acquisition method and device, electronic equipment and storage medium
CN112207829A (en) * 2020-10-10 2021-01-12 北京创想智控科技有限公司 Robot control method and device and readable storage medium
CN112527420A (en) * 2020-12-23 2021-03-19 平安普惠企业管理有限公司 Interface data flow processing method and device, computer equipment and medium

Also Published As

Publication number Publication date
CN113084802B (en) 2023-01-31

Similar Documents

Publication Publication Date Title
US11704210B2 (en) Custom error recovery in selected regions of a data storage device
JP5735338B2 (en) Memory buffer with accessible information after program fail
CN104346293A (en) Data access method, module, processor and terminal device for hybrid memory
JP2008511913A (en) Power loss recovery mechanism based on volatile memory
JP5027610B2 (en) Apparatus and method for controlling arithmetic processing with nonvolatile memory
US10282123B2 (en) Data storage device and operating method thereof
US20160378375A1 (en) Memory system and method of operating the same
CN111942175B (en) Torque control method, torque control device, vehicle, electronic device, and storage medium
KR20100112290A (en) Booting method of computer system
CN113084802B (en) Robot control method, device, electronic device and storage medium
CN112306380A (en) Storage management method and device and computer storage medium
CN111752538B (en) Method and device for generating vehicle end scene, cloud end, vehicle end and storage medium
CN115328580B (en) Processing method, device and medium for registry operation in application migration environment
WO2023115904A1 (en) Video playing method and system, and storage medium
CN116719724A (en) eMMC multi-platform testing method and device and electronic equipment
CN114860321A (en) External device control method, device, equipment and medium based on raspberry pi
US20170017417A1 (en) Data storage device and operating method thereof
CN113608851A (en) Task allocation method and device, electronic equipment and storage medium
US20140098601A1 (en) Main memory system storing operating system program and computer system including the same
CN111625184A (en) Flash memory data burning method and system
US20130346677A1 (en) Non-volatile memory device
CN113806288A (en) Data interaction method and device suitable for SoC (System on chip) cores and electronic equipment
CN105988804B (en) Software transfer method and terminal
US20070038768A1 (en) Reflective driver
US20210389937A1 (en) Systems And Methods For Fixing Incompatibilities In Field Firmware Updates

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Jingdong Technology Information Technology Co.,Ltd.

Address before: 601, 6 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant before: Jingdong Shuke Haiyi Information Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant