Software algorithm test method and device of robot and robot test platform
By monitoring the performance of the software algorithm to be tested in a real environment, the problem of different software algorithm detection results caused by the difference in detail between the simulated simulation environment and the real environment is solved, which improves the accuracy of the detection and reduces the impact of unpredictable factors.
Patent Information
- Application Number
- CN202510026524.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
There is a difference in the execution results of software algorithms detected by humanoid robots in simulated simulation environments and the execution results in real environments, mainly due to the details between the simulated simulation environments and the real environments, such as friction, air resistance and material characteristics.
Provide a robot software algorithm testing method. By obtaining the software algorithm and task information to be tested, obtaining the initial configuration parameters of the target execution module of the robot, generating action execution instructions and controlling the target execution module to execute actions, obtaining the execution result, and based on the execution result and preset execution results determine the algorithm performance of the software algorithm to be tested.
By monitoring the performance of the software algorithm to be tested in a real environment, the accuracy of software algorithm detection is improved, and the impact of unpredictable factors in the real environment on the simulation and simulation detection results is reduced.
Smart Images

Figure CN119473918A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of robot software testing, and in particular to a robot software algorithm testing method, device and robot testing platform. Background Art
[0002] With the continuous development of technology fields such as electronic information, artificial intelligence, and sensors, strong support has been provided for the development of humanoid robots, and humanoid robot technology has gradually been implemented in various fields.
[0003] In order to enable humanoid robots to perform various complex tasks correctly and efficiently, and to ensure that the various capabilities of humanoid robots can be used normally in practical applications, virtual simulations will be performed on the execution of various tasks by their software algorithms during their development process. For example, MuJoCo software is used to simulate various strategies or control algorithms of humanoid robots, test and verify various algorithms, or enable moderator developers to optimize the running paths and behaviors of humanoid robots.
[0004] However, the inventors of the present application discovered that when testing the software algorithm of a humanoid robot through simulation, there will be detailed differences between the simulated environment and the real environment of the humanoid robot, such as friction, air resistance, material properties, etc., which will lead to differences between the detection results of the software algorithm obtained by the humanoid robot through simulation and the execution results of the software algorithm in the real environment of the humanoid robot. Summary of the invention
[0005] In order to reduce the impact of unpredictable factors in the real environment on the execution of robot actions controlled by the software algorithm to be tested based on simulation monitoring; the present application provides a robot software algorithm testing method, device and robot testing platform.
[0006] This application provides a robot software algorithm testing method, which adopts the following technical solutions: A robot software algorithm testing method, comprising: Obtain the software algorithm to be tested and task information, and based on the task information, obtain the initial configuration parameters corresponding to the target execution module of the robot; Generate action execution instructions based on initial configuration parameters and the software algorithm to be tested, and control the target execution module to execute actions based on the action execution instructions to obtain execution results; Based on the execution results and the retrieved preset execution results, the algorithm performance of the software algorithm to be tested is determined.
[0007] According to some embodiments, the above-mentioned obtaining the initial configuration parameters corresponding to the robot's target execution module based on the task information includes: determining the task type and the task configuration parameters corresponding to the task type based on the task information; determining the robot's target execution module based on the task type and the task configuration parameters, and obtaining the initial configuration parameters corresponding to the target execution module.
[0008] According to some embodiments, the above-mentioned generation of action execution instructions based on initial configuration parameters and the software algorithm to be tested includes: generating action execution parameters based on the software algorithm to be tested, and determining the range of action execution parameters based on the initial configuration parameters; judging whether the action execution parameters are within the range of action execution parameters; and generating action execution instructions when the action execution parameters are within the range of action execution parameters.
[0009] According to some embodiments, the above-mentioned determination of the algorithm performance of the software algorithm to be tested based on the execution results and the preset execution results includes: determining the timeliness of the execution results, wherein the timeliness includes the time for the robot to complete the execution action by controlling the software algorithm to be tested; when the time is lower than the preset time included in the preset execution result, generating a first algorithm performance indicator characterizing the excellent performance of the software algorithm to be tested; when the time is not lower than the preset time included in the preset execution result, generating a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested.
[0010] According to some embodiments, the above-mentioned determination of the algorithm performance of the software algorithm to be tested based on the execution results and the preset execution results includes: based on the execution results, retrieving intermediate result data, wherein the intermediate result data includes an accuracy rate, and the intermediate result data is action data for controlling the robot to perform actions calculated based on the software algorithm to be tested; when the accuracy rate meets the preset accuracy rate included in the preset execution result, generating a first algorithm performance indicator characterizing the excellent performance of the software algorithm to be tested; when the accuracy rate does not meet the preset accuracy rate included in the preset execution result, generating a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested.
[0011] According to some embodiments, the software algorithm testing method of the above-mentioned robot also includes: obtaining error status information during the process of the robot's target execution module executing an action based on the action execution instruction, wherein the error status information is the status information of the robot when an emergency occurs during the process of the robot's target execution module executing the action; based on the error status information, generating an emergency stop instruction, and controlling the robot to stop running or cut off power based on the emergency stop instruction.
[0012] According to some embodiments, the above-mentioned robot software algorithm testing method also includes: in the process of the robot's target execution module executing an action based on the action execution instruction, obtaining the heartbeat connection information between modules; when the heartbeat connection information between modules is information that the modules are disconnected, obtaining hardware unavailable information, and based on the hardware unavailable information, controlling the software algorithm to be tested to stop running.
[0013] The present application provides a robot software algorithm testing device, which adopts the following technical solution; A robot software algorithm testing device includes: a parameter acquisition module, an execution result determination module and an algorithm performance determination module, wherein: The parameter acquisition module is used to obtain the software algorithm to be tested and the task information, and based on the task information, obtain the initial configuration parameters corresponding to the target execution module of the robot; The execution result determination module is used to generate an action execution instruction based on the initial configuration parameters and the software algorithm to be tested, and control the target execution module to execute the action based on the action execution instruction to obtain the execution result; The algorithm performance determination module is used to determine the algorithm performance of the software algorithm to be tested based on the execution result and the retrieved preset execution result.
[0014] According to some embodiments, the above-mentioned parameter acquisition module is specifically used to: determine the task type and the task configuration parameters corresponding to the task type based on the task information; determine the target execution module of the robot based on the task type and the task configuration parameters, and obtain the initial configuration parameters corresponding to the target execution module.
[0015] According to some embodiments, the above-mentioned execution result determination module is specifically used to: generate action execution parameters based on the software algorithm to be tested, and determine the range of action execution parameters based on the initial configuration parameters; determine whether the action execution parameters are within the range of action execution parameters; and generate action execution instructions when the action execution parameters are within the range of action execution parameters.
[0016] According to some embodiments, the above-mentioned algorithm performance determination module is specifically used to: determine the timeliness of the execution result, wherein the timeliness includes the time required for the robot to complete the execution action through the software algorithm to be tested; when the time is lower than the preset time included in the preset execution result, generate a first algorithm performance indicator characterizing the excellent performance of the software algorithm to be tested; when the time is not lower than the preset time included in the preset execution result, generate a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested.
[0017] According to some embodiments, the above-mentioned algorithm performance determination module is specifically used to: based on the execution result, retrieve intermediate result data, wherein the intermediate result data includes an accuracy rate, and the intermediate result data is action data for controlling the robot to perform actions calculated based on the software algorithm to be tested; when the accuracy rate meets the preset accuracy rate included in the preset execution result, generate a first algorithm performance indicator characterizing the excellent performance of the software algorithm to be tested; when the accuracy rate does not meet the preset accuracy rate included in the preset execution result, generate a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested.
[0018] According to some embodiments, the software algorithm testing device for the above-mentioned robot further includes: an error status information acquisition module and an emergency stop instruction generation module, wherein the error status information is used to acquire the error status information during the process in which the target execution module of the robot performs an action based on the action execution instruction, wherein the error status information is the status information of the robot when an emergency occurs during the process in which the target execution module of the robot performs the action; the emergency stop instruction generation module is used to generate an emergency stop instruction based on the error status information, and control the robot to stop running or cut off power based on the emergency stop instruction.
[0019] According to some embodiments, the software algorithm testing device of the above-mentioned robot further includes: an inter-module heartbeat connection information acquisition module and a control module, wherein the inter-module heartbeat connection information acquisition module is used to obtain inter-module heartbeat connection information during the process of the robot's target execution module executing an action based on an action execution instruction; the control module is used to obtain hardware unavailable information when the inter-module heartbeat connection information is information that a disconnection has occurred between modules, and based on the hardware unavailable information, control the software algorithm to be tested to stop running.
[0020] The present application provides an electronic device, which adopts the following technical solution: An electronic device, comprising: processor; The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the software algorithm testing method of the robot.
[0021] The present application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium stores a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute a software algorithm testing method for a robot.
[0022] The present application includes the following beneficial technical effects: obtaining a software algorithm to be tested and task information, encapsulating the software algorithm to be tested, and obtaining initial configuration parameters corresponding to a robot target execution module based on the software algorithm to be tested and the task information; the software algorithm to be tested generates an action execution module based on the initial configuration parameters to obtain an execution result; obtaining monitoring information of the robot action execution in a real environment to obtain a second execution result, and determining the algorithm performance of the software algorithm to be tested by analyzing the execution result and the preset execution result, thereby improving the accuracy of the detection of the software algorithm to be tested and reducing the influence of unpredictable factors in the real environment on the control of the robot action execution by the software algorithm to be tested after simulation detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 is a schematic block diagram of a robot according to an embodiment of the present application; Figure 2 is a block diagram of a robot testing platform according to an embodiment of the present application; Figure 3 It is a flowchart of a software algorithm testing method for a robot according to an embodiment of the present application; Figure 4 This is a schematic diagram of the robot test site environment of the embodiment of the present application Figure 5 It is a schematic diagram of a robot test passing a step task in an embodiment of the present application; Figure 6 It is a block diagram of a software algorithm testing device of a robot according to an embodiment of the present application; Figure 7 It is a schematic diagram of an electronic device according to an embodiment of the present application.
[0024] Explanation of the reference numerals: 60: software algorithm testing device for a robot; 601: parameter acquisition module; 602: execution result determination module; 603: algorithm performance determination module; 70: electronic device; 701: processor; 702: bus; 703: memory; 704: transceiver. DETAILED DESCRIPTION
[0025] The following is combined with Figure 1-Figure 7 This application is described in further detail.
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the drawings in the embodiments of the present application are collected below to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] An embodiment of the present application provides a robot for implementing the following robot testing platform.
[0028] Reference Figure 1 The robot includes: a central computing and decision-making processor, a head sensor component, an arm sensor and an actuator component, a leg sensor and an actuator component, and a torso sensor and an actuator component; the central computing and decision-making processor is loaded with a software algorithm module to be tested, and the software algorithm module to be tested runs in the central computing and decision-making processor.
[0029] In some embodiments, the robot's external hardware has multiple different sensors for sensing the on-site environment, such as visual sensors, force sensors, etc.; it has actuators of a humanoid robot such as arms, legs, and a torso; it also has a central processor for running actual algorithms, namely, a central computing and decision-making processor, in which different software scheduling programs and algorithms for the humanoid robot to be tested can be run to control the movement of the entire humanoid robot.
[0030] The embodiment of the present invention discloses a robot testing platform, which is used to implement the following robot software algorithm testing method.
[0031] Reference Figure 2 ,The robot test platform includes: a central computing decision processor (such as Figure 2 The dotted line part in the middle is used to receive task information, the software algorithm to be tested, the monitoring information of the robot action execution and the initial configuration parameters, and determine the algorithm performance of the software algorithm to be tested based on the execution results and the preset execution results; the target execution module is connected to the central computing decision processor, and is used to receive the action execution instruction, and execute the action based on the action execution instruction; the state monitoring module is connected to the central computing decision processor and the execution target execution module, and is used to receive task information, and configure the initial configuration parameters of the target execution module based on the task information, and receive the action state information generated by the target execution module.
[0032] The robot testing platform also includes: a task receiving and status reporting module, which is connected to the external device, the central computing decision processor and the status monitoring module, and is used to send the task information and the software algorithm to be tested received from the external device to the central computing decision processor, and to report the action status information received from the status monitoring module to the external device; a data disk placement module, which is connected to the target execution module, the central computing decision module and the status monitoring module, and is used to receive and store the log data of the target execution module and the central computing decision module in operation; a posture perception module, which is connected to the central computing decision module, and is used to receive the subscription instruction generated by the central computing decision module when the software algorithm to be tested needs to subscribe to the posture sensor data.
[0033] In some embodiments, in order to shield the robot's control algorithm from communicating with the upper layer and the complexity of sensing and executing operations of the robot's execution module, each module adopts a software modular design, mainly in the form of encapsulation of the function driver layer; the external interface receives commands, sends data, and connects with the software algorithm module to be tested (such as Figure 2 The buses and arrows outside each module in the diagram).
[0034] In some embodiments, the task receiving and status reporting module is mainly responsible for receiving the task information and the software algorithm to be tested sent by the external server through the network, and sending the software algorithm to be tested and the task information to the central computing decision server, and encapsulating the software algorithm to be tested into the algorithm module to be tested; at the same time, the task receiving and status reporting module sends the task information to the status monitoring module, and the status monitoring module configures the initial configuration parameters of the target execution module based on the task information, wherein the task execution module can be at least one of the sensor perception and execution module (head), sensor perception and execution module (arms), sensor perception and execution module (trunk), and sensor perception and execution module (legs). The software algorithm to be tested generates an action execution instruction based on the task information and the initial configuration parameters, and the status monitoring module responds to the action execution instruction and performs action control on the target execution module.
[0035] In some embodiments, when the software algorithm to be tested needs to subscribe to the data of the posture sensor, the central computing strategy server sends a subscription instruction to the posture perception module. The algorithm module to be tested is responsible for operating the underlying register driver layer to obtain data, and then sends the data to the module's external interface to the algorithm module to be tested. The module implements the protocol definition of the external interface, and the transmission data protocol format usually includes information such as packet header, data, checksum, status and timestamp, which is placed at a defined structure position. The party that needs the data can parse the data structure and retrieve the data at the corresponding position.
[0036] In some embodiments, the commands that can be received by each module in the robot test platform will also be defined and classified in advance, such as data acquisition instructions, configuration instructions, transmission control parameter instructions, etc. When the module receives the configuration instruction, the working mode of the module, the format of the transmitted data, etc. can be configured. For example, the algorithm module to be tested in the central computing decision service may require data of different precision types, or require the module to provide data after filtering, smoothing, statistics or feature extraction. For example, in the process of obtaining data from the camera sensor, through the configuration of the packaged head sensor and the execution module, the algorithm module to be tested can obtain raw data or image enhanced data or image feature extraction, segmentation and other data forms. The main function of the transmission control parameter instruction is to control the robot's motion position. After receiving the instruction and data, the robot's sensor perception and execution module (head, trunk, arms, legs) will control the rotation of each joint motor to the corresponding position through the bottom layer inside the module. In addition, these modules can also output the encoder's motion position related position information at the same time to provide data reference for the algorithm module to be tested.
[0037] In some embodiments, the robot test platform can be divided into three functional parts: perception, execution, and decision-making; the robot test platform provides the same external physical environment such as perception and execution structure, and provides the same software underlying module interface environment in the central computing decision processor. The decision part is the algorithm module to be tested running in the central computing decision processor. By recording the results of the execution of different algorithms and the status and results of the robot running in the actual test field, the accuracy and efficiency of the execution of different algorithm programs are tested and evaluated.
[0038] In some embodiments, in order to improve the versatility of the test method and make the robot test platform more focused on the test of the algorithm performance itself, the algorithm test software running environment involves relevant communication interfaces, software structures, etc., wherein multiple execution modules of the robot, such as sensor perception and execution module (head), sensor perception and execution module (arms), sensor perception and execution module (trunk), sensor perception and execution module (legs), etc., are encapsulated and provided with relevant external interfaces to become various software modules. For example, when the algorithm receives tasks and calls the execution module to obtain the external environment state and control the execution of the execution module, there are relevant encapsulation modules available, and the encapsulated modules provide specific usage interfaces.
[0039] In some embodiments, the software algorithm to be tested is embedded in a central computing decision processor (e.g. Figure 2The part shown by the dotted line in the middle) is used to construct the algorithm module to be tested. Its input and output interfaces only need to meet the message passing requirements for communication between the algorithm module and the execution module or the upper-level module. It communicates with the execution module or the upper-level module when it is necessary to implement the task function, thereby achieving the goal that each time the algorithm is tested, there is no need to implement redundant underlying hardware area logic.
[0040] An embodiment of the present application provides a robot software algorithm testing method, which can be executed by an electronic device, wherein the electronic device can be a server or a central computing policy server, wherein the server can be an independent physical server, or a server cluster or distributed device composed of multiple physical servers, or a cloud server that provides cloud computing services; the server can be installed on a humanoid robot.
[0041] Reference Figure 3 , a robot software algorithm testing method includes: step S301, step S302 and step S303, wherein, S301, obtaining the software algorithm to be tested and task information, and based on the task information, obtaining initial configuration parameters corresponding to the target execution module of the robot.
[0042] In some embodiments, the task information is a test task for testing the software algorithm to be tested; the target execution module is the execution module of the robot, such as the sensor perception and execution module of the head, the sensor perception and execution module of the legs, the sensor perception and execution module of the trunk, the sensor perception and execution module of the arms, etc. The task information is sent to the electronic device through the network by the task management server. After the electronic device obtains the task information, it first parses out which task needs to be tested and what the relevant configuration parameters of the task are according to the protocol; in addition, before the software algorithm to be tested is tested, the algorithm software to be tested implemented according to the interface specification needs to be downloaded to the electronic device.
[0043] When the task information is sent to the electronic device, the task information will also be sent to the status monitoring module in the robot. Based on the analysis of the task information, the status monitoring module initializes the target execution module corresponding to the task information contained in the robot and configures the initial configuration parameters of the target execution module. At this time, the electronic device obtains the initial configuration parameters corresponding to the target execution module of the robot from the status monitoring module, and uses the initial configuration parameters as the limiting parameters of the parameter values of the relevant parameters output by the software algorithm to be tested to control the robot's actions.
[0044] S302, generating an action execution instruction based on the initial configuration parameters and the software algorithm to be tested, and controlling the target execution module to execute the action based on the action execution instruction to obtain an execution result.
[0045] In some embodiments, the execution result is the execution result of controlling the target execution module to execute an action based on the software algorithm to be tested.
[0046] After the initial configuration parameters of the robot's target execution module are configured and the electronic device obtains the software algorithm to be tested, it begins to enter the execution control process of controlling the robot's target execution module based on the software algorithm to be tested, wherein the software algorithm to be tested parses multiple command instructions based on the analysis of task information; when it is necessary to control the robot's target execution module, the command instructions and related control parameters corresponding to the target execution module are integrated to generate action execution instructions, and the action execution instructions are sent to the state monitoring module and the target execution module in the robot, the state monitoring module responds to the action execution instructions, controls the target execution module, and at the same time, the target execution module executes the action based on the related control parameters; the electronic device obtains the execution result based on the command instructions and the related control parameters.
[0047] S303: Determine the algorithm performance of the software algorithm to be tested based on the execution result and the retrieved preset execution result.
[0048] In some embodiments, the electronic device compares and analyzes the execution results and the preset execution results, wherein the timeliness of the robot controlling the target execution module to complete the execution action based on the software algorithm to be tested can be analyzed, and the accuracy of the robot controlling the target execution module to execute the action based on the relevant control parameters output by the software algorithm to be tested can also be analyzed. When the timeliness meets the requirements, it indicates that the algorithm performance of the software algorithm to be tested is positive performance; when the accuracy meets certain requirements, it indicates that the algorithm performance of the software algorithm to be tested is positive performance; thereby, by packaging the algorithm to be tested and downloading it to the electronic device, and allowing the robot to complete the action in a real environment, the algorithm performance of the software algorithm to be tested is determined by comparing and analyzing the execution results and the preset execution results, thereby improving the accuracy of the detection of the software algorithm to be tested, and reducing the impact of unpredictable factors in the real environment on the control of the robot's action execution by the software algorithm to be tested after the detection is completed using simulation.
[0049] In some embodiments, there may be multiple software algorithms to be tested, and the multiple software algorithms to be tested are from the same batch of software algorithms that need to undergo algorithm performance testing; the multiple software algorithms to be tested are loaded in turn and their performance is tested in a real environment; the task information corresponding to the multiple software algorithms to be tested may be the same or different.
[0050] When the task information corresponding to multiple software algorithms to be tested are the same, and the multiple software algorithms to be tested complete the execution of robot actions based on the task information, the electronic device obtains the execution results corresponding to the multiple software algorithms to be tested, and then compares and analyzes the execution results corresponding to the multiple software algorithms to be tested with the preset execution results to determine the algorithm performance of each software algorithm to be tested.
[0051] When there are at least two algorithm performances corresponding to multiple software algorithms to be tested that are first algorithm performance indicators that characterize excellent algorithms, obtain the time durations corresponding to the at least two algorithm performances, and compare the at least two time durations to determine the time length relationship between the at least two time durations; a short time duration indicates that the algorithm performance of the corresponding software algorithm to be tested is better, and the result of controlling the execution of the robot action is more perfect; a long time duration indicates that the algorithm performance of the corresponding software algorithm to be tested is relatively good, and the result of controlling the execution of the robot action is relatively perfect, that is, the algorithm performance of the software algorithm to be tested with a short time duration is determined to be the optimal first algorithm performance indicator, and the algorithm performance of the software algorithm to be tested with a long time duration is determined to be the suboptimal first algorithm performance indicator.
[0052] In step S301, based on the task information, the initial configuration parameters corresponding to the target execution module of the robot are obtained, including: based on the task information, determining the task type and the task configuration parameters corresponding to the task type; based on the task type and the task configuration parameters, determining the target execution module of the robot, and obtaining the initial configuration parameters corresponding to the target execution module.
[0053] In some embodiments, while sending task information to the electronic device, the task information is also sent to a status monitoring module installed inside the robot. The status monitoring module analyzes the task information and initializes parameters of the target execution module, that is, sets critical parameters of action execution-related parameters received by the target execution module.
[0054] The electronic device parses and analyzes the task information to determine the task type contained in the task information and the task configuration parameters corresponding to the task type. For example, the task type is to control the robot to climb stairs, and the task configuration parameters are the relevant configuration parameters needed to control the robot to complete the stair climbing action.
[0055] Subsequently, the electronic device determines the action that the robot needs to perform based on the task type, and determines the execution module that needs to perform the action based on the action, that is, the target execution module. At the same time, based on the task configuration parameters, the electronic device obtains the initial configuration parameters corresponding to the target execution module from the status monitoring module, wherein the initial configuration parameters are critical parameters that limit the parameters received by the target execution module and related to the execution of the action.
[0056] In step S302, an action execution instruction is generated based on the initial configuration parameters and the software algorithm to be tested, including: generating action execution parameters based on the software algorithm to be tested, and determining the range of the action execution parameters based on the initial configuration parameters; judging whether the action execution parameters are within the range of the action execution parameters; and generating an action execution instruction if the action execution parameters are within the range of the action execution parameters.
[0057] In some embodiments, the action execution parameter is an execution parameter required to control the target execution module to execute the action.
[0058] After the status monitoring module completes parameter initialization of the target execution module and the electronic device completes parsing and analyzing the task information, it starts to control the target execution module to execute actions based on the software algorithm to be tested; first, the software algorithm to be tested encapsulated inside the electronic device generates the action execution parameters needed to complete the task information based on the task information, and at the same time, the electronic device determines the action execution parameter range of the target execution module limited by the status monitoring module based on the initial configuration parameters; the software algorithm to be tested in the electronic device uses the action execution parameter range as reference data and generates action execution instructions based on the action execution parameters.
[0059] In some embodiments, when the software algorithm to be tested does not use execution action parameters as parameter data, and the action execution parameters contained in the generated action execution instruction exceed the action execution parameter range, the target execution module cannot receive the action execution instruction, and the target execution module will return an error message to the electronic device to inform the electronic device that the transmission failed.
[0060] In step S303, based on the execution result and the preset execution result, the algorithm performance of the software algorithm to be tested is determined, including: determining the timeliness of the execution result, wherein the timeliness includes the time for the robot to complete the execution action by controlling the software algorithm to be tested; when the time is lower than the preset time included in the preset execution result, generating a first algorithm performance indicator characterizing the excellent performance of the software algorithm to be tested; when the time is not lower than the preset time included in the preset execution result, generating a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested.
[0061] In some embodiments, the timeliness is the length of time it takes for the robot to complete an action controlled by the software algorithm under test.
[0062] When the electronic device receives the task information and the software algorithm to be tested, it starts timing through a data acquisition device installed outside the robot, and when the robot's target execution module completes the action execution, the timing ends, and the data acquisition device obtains the corresponding duration, and then the data acquisition device sends the duration to the electronic device; after obtaining the duration, the electronic device determines whether the duration is lower than the preset duration; when it is determined that the duration is lower than the preset duration, it indicates that the target execution module of the robot needs a shorter time to execute the action based on the software algorithm to be tested, that is, the running ability of the software algorithm to be tested is strong, and its algorithm performance is higher, and then the electronic device generates a first algorithm performance indicator characterizing the excellent performance of the software algorithm to be tested, and sends the first algorithm performance indicator to the background main control terminal through the task receiving and status reporting module installed inside the robot based on the external communication interface.
[0063] When it is judged that the duration is not less than the preset duration, it indicates that the robot's target execution module takes a long time to execute the action based on the software algorithm to be tested, that is, the computing power of the software algorithm to be tested is low, and its algorithm performance is low. The electronic device then generates a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested, and sends the second algorithm performance indicator to the background main control terminal through the task receiving and status reporting module installed in the robot based on the external communication interface.
[0064] In some embodiments, when the duration is lower than a preset duration, the duration is compared with a preset duration range to determine whether the preset duration is within the preset duration range; when the electronic device determines that the duration is within the preset duration range, it indicates that although the software algorithm to be tested corresponding to the duration can control the robot to complete the action, it can only control the robot to complete the action to a minimum extent, and there is a possibility that the robot cannot be controlled to complete the action. Therefore, the electronic device generates a call instruction, and based on the call instruction, obtains the intermediate result data of the software algorithm to be tested corresponding to the duration from the data disk module, and determines the target action data from the intermediate result data, wherein the target action data is the action data of the action that the robot is controlled to complete to a minimum extent.
[0065] Subsequently, the electronic device analyzes the software algorithm to be tested corresponding to the duration based on the target action data, and generates software algorithm adjustment suggestion information; subsequently, the electronic device sends the software algorithm adjustment suggestion information to the background main control terminal via the task receiving and status reporting module, thereby providing the technical staff with modification and adjustment suggestions for the software algorithm to be tested corresponding to the duration, wherein the preset duration range is set based on the preset duration, and can be subjectively set by the technical staff based on the actual situation and the preset duration, or can be automatically generated by the electronic device based on the historical detection conditions of the robot in the actual environment, and its specific range value is not specifically limited in the embodiments of the present application.
[0066] In step S303, based on the execution result and the preset execution result, the algorithm performance of the software algorithm to be tested is determined, including: based on the execution result, retrieving intermediate result data, wherein the intermediate result data includes an accuracy rate, and the intermediate result data is action data for controlling the robot to perform actions calculated based on the software algorithm to be tested; when the accuracy rate meets the preset accuracy rate included in the preset execution result, generating a first algorithm performance indicator characterizing the excellent performance of the software algorithm to be tested; when the accuracy rate does not meet the preset accuracy rate included in the preset execution result, generating a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested.
[0067] In some embodiments, the intermediate result data is action data for controlling the robot to perform an action calculated based on the software algorithm to be tested; The electronic device generates action execution instructions based on the software algorithm to be tested, and controls the robot's target execution module to execute actions. During the process, the data disk landing module installed inside the robot will receive relevant log information of the software algorithm to be tested and the target execution module in the electronic device during the execution process, that is, the data disk landing module stores the intermediate result data of the software algorithm to be tested and the target execution module, wherein the intermediate result data includes the execution data of the target execution module; the data disk landing module also includes the running data of the software algorithm to be tested.
[0068] Based on the software module to be tested, the target execution module is controlled to complete the execution action. After obtaining the execution result, the electronic device retrieves the intermediate result data from the data disk module; then, based on the preset execution result, the electronic device determines the specific execution status of the target execution module in the real environment and obtains the real environment execution data; then, the electronic device compares and analyzes the real environment execution data and the intermediate result data to determine the accuracy of the execution action of the robot's target execution module, and then, the electronic device determines whether the accuracy meets the preset accuracy.
[0069] When the electronic device determines that the accuracy rate meets the preset accuracy rate, it indicates that the software algorithm to be tested is capable of completing the motion control of the robot's target execution module to adapt to the real environment, that is, the software algorithm to be tested is excellent. Then, the electronic device generates a first algorithm performance indicator characterizing the excellence of the software algorithm to be tested, and sends the first algorithm performance indicator to the background main control terminal through the task receiving and status reporting module installed in the robot based on the external communication interface.
[0070] When the electronic device determines that the accuracy rate does not meet the preset accuracy rate, it indicates that the action control of the robot's target execution module to adapt to the real environment cannot be completed based on the software algorithm to be tested, that is, the algorithm capability of the software algorithm to be tested is low. Then, the electronic device generates a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested, and sends the second algorithm performance indicator to the background main control terminal through the task receiving and status reporting module installed in the robot based on the external communication interface.
[0071] In some embodiments, the software algorithm testing method of the above-mentioned robot also includes: obtaining error status information during the process of the robot's target execution module executing an action based on the action execution instruction; generating an emergency stop instruction based on the error status information, and controlling the robot to stop running or cut off power based on the emergency stop instruction.
[0072] In some embodiments, the error status information is status information when an emergency occurs in the robot during the execution of an action by the robot's target execution module.
[0073] During the process of the robot's target execution module executing actions based on action execution instructions, the status monitoring module installed inside the robot monitors in real time the electronic device's control of the target execution module's execution of actions based on the software algorithm to be tested, that is, monitors the status of the target execution module. When the status monitoring module detects an emergency state of the target execution module, such as physical damage, underlying program crash, etc.; the status monitoring module generates error status information and sends the error status information to the electronic device; the electronic device generates an emergency stop command based on the error status information, and controls the robot or the target execution module inside the robot to stop running or cut off power based on the emergency stop command.
[0074] In some embodiments, the above-mentioned robot software algorithm testing method also includes: in the process of the robot's target execution module executing an action based on the action execution instruction, obtaining the heartbeat connection information between modules; when the heartbeat connection information between modules is information that the modules are disconnected, obtaining hardware unavailable information, and based on the hardware unavailable information, controlling the software algorithm to be tested to stop running.
[0075] In some embodiments, during the process of the robot's target execution module executing an action based on an action execution instruction, a status monitoring module installed inside the robot monitors in real time the connection status between multiple modules that are communicatively connected inside and outside the robot, and generates heartbeat connection information between modules; the status monitoring module sends the heartbeat connection status between modules to an electronic device for analysis.
[0076] After the electronic device analyzes the heartbeat connection situation between modules and obtains the heartbeat connection information between modules that indicates disconnection between modules, it indicates that communication disconnection has occurred between some modules inside and outside the robot due to a fault. Then, the electronic device obtains the hardware unavailable information, and controls the software algorithm to be tested to stop running based on the hardware unavailable information, and sends the heartbeat connection information between modules and the hardware unavailable information to the background main control terminal through the task receiving and status reporting module to inform the background technicians of the hardware availability of the robot.
[0077] In some embodiments, reference Figure 4 ,When the robot performs the task, the robot (such as Figure 4 The Actor in the robot will also perform actual actions in the test field. The test field is equipped with obstacles such as obstacles, steps and slopes, which can evaluate the robot's execution ability and thus illustrate the pros and cons of the software algorithm under test.
[0078] In some embodiments, reference Figure 5 , taking the robot's stair climbing action as an example, after the robot's target execution module completes the execution action, the software algorithm to be tested will first calculate the height h1 of each step. The algorithm determines whether the step can be passed normally based on the height result, plans the robot's leg lifting height and position, and controls the robot to pass the step smoothly. Since the height results calculated by different software algorithms to be tested and the controlled leg lifting height may be inconsistent, the accuracy of the calculation results of the robot passing the steps (the intermediate result data in the data disk module) and the efficiency of the robot passing (timing) can be judged to a certain extent. The algorithm can be evaluated to a certain extent. If the humanoid robot does not lift its feet high enough or falls during the process of climbing the stairs, the test process will monitor this situation and judge that the algorithm test fails.
[0079] The present application provides a robot software algorithm testing device, which adopts the following technical solution; Reference Figure 6 , a robot software algorithm testing device 60, comprising: a parameter acquisition module 601, an execution result determination module 602 and an algorithm performance determination module 603, wherein, The parameter acquisition module 601 is used to obtain the software algorithm to be tested and the task information, and based on the task information, obtain the initial configuration parameters corresponding to the target execution module of the robot; The execution result determination module 602 is used to generate an action execution instruction based on the initial configuration parameters and the software algorithm to be tested, and control the target execution module to execute the action based on the action execution instruction to obtain the execution result; The algorithm performance determination module 603 is used to determine the algorithm performance of the software algorithm to be tested based on the execution result and the retrieved preset execution result.
[0080] In some embodiments, the above-mentioned parameter acquisition module 601 is specifically used to: determine the task type and the task configuration parameters corresponding to the task type based on the task information; determine the target execution module of the robot based on the task type and the task configuration parameters, and obtain the initial configuration parameters corresponding to the target execution module.
[0081] In some embodiments, the above-mentioned execution result determination module 602 is specifically used to: generate action execution parameters based on the software algorithm to be tested, and determine the range of action execution parameters based on the initial configuration parameters; determine whether the action execution parameters are within the range of action execution parameters; and generate action execution instructions when the action execution parameters are within the range of action execution parameters.
[0082] In some embodiments, the above-mentioned algorithm performance determination module 603 is specifically used to: determine the timeliness of the execution result, wherein the timeliness includes the time taken by the software algorithm to be tested to control the robot to complete the execution action; when the time is lower than the preset time included in the preset execution result, generate a first algorithm performance indicator characterizing the excellent performance of the software algorithm to be tested; when the time is not lower than the preset time included in the preset execution result, generate a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested.
[0083] In some embodiments, the above-mentioned algorithm performance determination module 603 is specifically used to: based on the execution result, retrieve the intermediate result data, wherein the intermediate result data includes the accuracy rate, and the intermediate result data is the action data of the control robot to perform the action calculated based on the software algorithm to be tested; when the accuracy rate meets the preset accuracy rate included in the preset execution result, generate a first algorithm performance indicator characterizing the excellent performance of the software algorithm to be tested; when the accuracy rate does not meet the preset accuracy rate included in the preset execution result, generate a second algorithm performance indicator characterizing the poor or unqualified performance of the software algorithm to be tested.
[0084] In some embodiments, the software algorithm testing device 60 of the above-mentioned robot also includes: an error status information acquisition module and an emergency stop instruction generation module, wherein the error status information is used to acquire the error status information during the process of the robot's target execution module executing an action based on the action execution instruction, wherein the error status information is the status information of the robot when an emergency occurs during the process of the robot's target execution module executing the action; the emergency stop instruction generation module is used to generate an emergency stop instruction based on the error status information, and control the robot to stop running or cut off power based on the emergency stop instruction.
[0085] In some embodiments, the software algorithm testing device 60 of the above-mentioned robot also includes: an inter-module heartbeat connection information acquisition module and a control module, wherein the inter-module heartbeat connection information acquisition module is used to obtain the inter-module heartbeat connection information during the process of the robot's target execution module executing an action based on the action execution instruction; the control module is used to obtain hardware unavailable information when the inter-module heartbeat connection information is information that the modules are disconnected, and based on the hardware unavailable information, control the software algorithm to be tested to stop running.
[0086] In some embodiments, the parameter acquisition module 601 may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; the execution result determination module 602 may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; the algorithm performance determination module 603 may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; In some embodiments, the error status information acquisition module may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; the emergency stop instruction generation module may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; the heartbeat connection information acquisition module may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device; the control module may include a logic circuit, or may be implemented by a central processing unit, a digital signal processor, or a field programmable gate array, etc. included in the electronic device.
[0087] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0088] The embodiment of the present invention discloses an electronic device, comprising: a processor; a memory storing a computer program, and when the computer program is executed by the processor, the processor executes the software algorithm testing method of the robot; for example, Figure 7 As shown, Figure 7 The electronic device 70 shown includes: a processor 701 and a memory 703. The processor 701 and the memory 703 are connected, such as through a bus 702. Optionally, the electronic device 70 may also include a transceiver 704. It should be noted that in actual applications, the transceiver 704 is not limited to one, and the structure of the electronic device 70 does not constitute a limitation on the embodiments of the present invention.
[0089] Processor 701 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in the disclosure of the present invention. Processor 701 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0090] The bus 702 may include a path to transmit information between the above components. The bus 702 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 702 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0091] The memory 703 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0092] The memory 703 is used to store application code for executing the solution of the present invention, and the execution is controlled by the processor 701. The processor 701 is used to execute the application code stored in the memory 703 to implement the content shown in the above method embodiment.
[0093] Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0094] An embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute a software algorithm testing method for a robot.
[0095] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0096] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A robot software algorithm testing method, characterized in that: include: Obtaining the software algorithm to be tested and task information, and based on the task information, obtaining initial configuration parameters corresponding to the target execution module of the robot; Based on the initial configuration parameters and the software algorithm to be tested, an action execution instruction is generated, and based on the action execution instruction, the target execution module is controlled to execute an action to obtain an execution result; Based on the execution result and the retrieved preset execution result, the algorithm performance of the software algorithm to be tested is determined.
2. The method according to claim 1, characterized in that The obtaining, based on the task information, initial configuration parameters corresponding to the target execution module of the robot includes: Based on the task information, determine the task type and the task configuration parameters corresponding to the task type; Based on the task type and the task configuration parameters, a target execution module of the robot is determined, and initial configuration parameters corresponding to the target execution module are obtained.
3. The method according to claim 1, characterized in that The step of generating an action execution instruction based on the initial configuration parameters and the software algorithm to be tested includes: Based on the software algorithm to be tested, generating action execution parameters, and based on the initial configuration parameters, determining the range of the action execution parameters; Determining whether the action execution parameter is within the action execution parameter range; When the action execution parameter is within the action execution parameter range, the action execution instruction is generated.
4. The method according to claim 1, characterized in that: The step of determining the algorithm performance of the software algorithm to be tested based on the execution result and the preset execution result includes: Determining the timeliness of the execution result, wherein the timeliness includes the time length for the robot to complete the execution action controlled by the software algorithm to be tested; When the duration is shorter than the preset duration included in the preset execution result, generating a first algorithm performance indicator indicating that the performance of the software algorithm to be tested is excellent; When the duration is not less than the preset duration included in the preset execution result, a second algorithm performance indicator is generated, which indicates that the performance of the software algorithm to be tested is poor or unqualified.
5. The method according to claim 1, characterized in that The step of determining the algorithm performance of the software algorithm to be tested based on the execution result and the preset execution result includes: Based on the execution result, retrieve intermediate result data, wherein the intermediate result data includes accuracy, and the intermediate result data is action data for controlling the robot to perform an action calculated based on the software algorithm to be tested; When the accuracy rate satisfies the preset accuracy rate included in the preset execution result, a first algorithm performance indicator is generated to characterize the excellent performance of the algorithm of the software to be tested; When the accuracy rate does not satisfy the preset accuracy rate included in the preset execution result, a second algorithm performance indicator is generated to characterize that the performance of the software algorithm to be tested is poor or unqualified.
6. The method according to claim 1, characterized in that The method further comprises: Acquire error status information during the process in which the target execution module of the robot executes an action based on the action execution instruction, wherein the error status information is status information of the robot when an emergency occurs during the process in which the target execution module of the robot executes the action; Based on the error status information, an emergency stop instruction is generated, and based on the emergency stop instruction, the robot is controlled to stop running or to be powered off.
7. The method according to claim 1, characterized in that The method further comprises: In the process of the target execution module of the robot executing an action based on the action execution instruction, obtaining heartbeat connection information between modules; When the inter-module heartbeat connection information is information indicating that a disconnection has occurred between the modules, hardware unavailable information is obtained, and based on the hardware unavailable information, the software algorithm to be tested is controlled to stop running.
8. A robot software algorithm testing device, characterized in that: include: A parameter acquisition module is used to obtain the software algorithm to be tested and the task information, and based on the task information, obtain the initial configuration parameters corresponding to the target execution module of the robot; An execution result determination module, used to generate an action execution instruction based on the initial configuration parameters and the software algorithm to be tested, and to control the target execution module to execute an action based on the action execution instruction to obtain an execution result; The algorithm performance determination module is used to determine the algorithm performance of the software algorithm to be tested based on the execution result and the retrieved preset execution result.
9. An electronic device, characterized in that: include: processor; A memory storing a computer program, which, when executed by the processor, enables the processor to execute the robot software algorithm testing method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the robot software algorithm testing method according to any one of claims 1 to 7.
11. A robot testing platform, characterized in that: A software algorithm testing method for implementing the robot described in any one of claims 1 to 7, The robot testing platform comprises: A central computing decision processor, configured to generate the action execution instruction based on the task information, the software algorithm to be tested and the initial configuration parameters, and to determine the algorithm performance of the software algorithm to be tested based on the execution result and the preset execution result; A target execution module, connected to the central computing decision processor, configured to receive the action execution instruction and execute an action based on the action execution instruction; A state monitoring module is connected to the central computing decision processor and the execution target execution module, and is used to receive the task information, configure the initial configuration parameters of the target execution module based on the task information, and receive the action state information generated by the target execution module.
12. The test platform according to claim 11, characterized in that: Also includes: The task receiving and status reporting module is connected to the external device, the central computing decision processor and the status monitoring module, and is used to send the task information and the software algorithm to be tested received from the external device to the central computing decision processor, and to report the action status information received from the status monitoring module to the external device.
13. The test platform according to claim 11, characterized in that: Also includes: A data storage module, connected to the target execution module, the central computing and decision-making module and the status monitoring module, for receiving and storing log data of the target execution module and the central computing and decision-making module in operation; The posture perception module is connected to the central computing and decision-making module and is used to receive a subscription instruction generated by the central computing and decision-making module when the software algorithm to be tested needs to subscribe to the posture sensor data.
Citation Information
Patent Citations
Physical simulation test method, device and system
CN107894762A
Robot scene test method, medium, terminal and device
CN111002347A
Remote testing method and device for robot
CN115972259A
Robot control method and device, electronic equipment and storage medium
CN119238499A
Robot knuckle actuating range limitation device for equipping movement area checking device
CN1701930A