Robot control method and device, equipment, storage medium, product and robot
A dual-processor system in industrial robots uses real-time operational data and simulation to quickly detect and diagnose faults, improving reliability by shortening fault detection and resolution times.
Patent Information
- Application Number
- CN202510573315.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-06
- Publication Date
- 2025-07-15
AI Technical Summary
In the prior art, when an industrial robot encounters a fault, it is difficult to quickly detect and solve the problem, resulting in poor reliability of the robot and long fault resolution cycle.
Using a dual processor architecture, the main processor and twin processor determine the operating data and simulated running data respectively, monitor the status of the second processor in real time, and output prompt information when abnormalities, accurately locate the cause of the fault, improve the speed of fault discovery and resolution efficiency.
Through the dual processors working together, it quickly identifies and records fault problems, shortens fault discovery time, improves robot reliability, and reduces fault resolution cycles.
Smart Images

Figure CN120307291A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and particularly relates to a robot control method, device, equipment, storage medium, product and robot. Background Art
[0002] In actual use, industrial robots may encounter various abnormal situations, including but not limited to hardware failures such as motor failures, sensor failures, mechanical component wear, etc.; software failures such as program errors, system crashes, communication interruptions, etc. Among them, the fault problems are characterized by strong randomness and long recurrence periods.
[0003] In the related art, traditional event logs, operation logs, etc. are usually used to record and prompt that the operation of the robot has failed. However, since traditional event logs, operation logs, etc. cannot completely record the fault data, it is difficult to quickly discover the fault problems, resulting in a long cycle for solving the fault problems, and even the situation where the problems cannot be solved, making the reliability of the robot poor. Summary of the Invention
[0004] Embodiments of the present invention provide a robot control method, device, equipment, storage medium, product and robot, which can quickly and comprehensively record the fault problems that occur during the operation of the robot, reduce the cycle for solving the fault problems, and improve the reliability of the robot.
[0005] To solve the above problems, in a first aspect, embodiments of the present invention disclose a robot control method, which is applied to a control device of a robot. The control device includes a first processor and a second processor. The method includes:
[0006] In response to a control operation request for the robot, the first processor determines the operation data of the robot according to the configuration information and status information of the robot.
[0007] The second processor determines the simulation operation data of the robot according to the configuration information and the status information.
[0008] Determine whether the second processor is in an abnormal state.
[0009] When the second processor is in an abnormal state, output a first abnormal prompt message and stop controlling the operation of the robot. The first abnormal prompt message indicates that the robot has an abnormality.
[0010] Optionally, the determining whether the second processor is in an abnormal state includes:
[0011] When the simulation operation data meets a preset abnormal condition, it is determined that the second processor is in an abnormal state. The simulation operation data includes interface data, intermediate data, simulation operation results, and underlying program operation information; and / or,
[0012] An inquiry notice is sent to the second processor through the first processor. When the response information of the second processor is not received within a preset time period, it is determined that the second processor is in an abnormal state.
[0013] Optionally, the control device further includes a data memory, and the second processor includes a plurality of buffer areas. The method further includes:
[0014] Through the second processor, according to the current buffer capacity of each buffer area, the simulation operation data is buffered in a target buffer area;
[0015] When the current buffer capacity of the target buffer area is greater than or equal to the first buffer capacity, the simulation operation data stored in the target buffer area is sent to the data memory for storage;
[0016] Optionally, the target buffer area includes a first target buffer area. The step of buffering the simulation operation data in the target buffer area through the second processor according to the current buffer capacity of each buffer area includes:
[0017] When the current buffer capacity of each buffer area is empty, any one of the plurality of buffer areas is used as the first target buffer area;
[0018] The simulation operation data is buffered in the first target buffer area.
[0019] Optionally, the target buffer area includes a second target buffer area. After buffering the simulation operation data in the first target buffer area, the method further includes:
[0020] When the current buffer capacity of the first target buffer area is greater than or equal to the second buffer capacity, any one of the plurality of buffer areas other than the first target buffer area is used as the second target buffer area;
[0021] The simulation operation data is buffered in the second target buffer area.
[0022] Optionally, the target buffer area includes a third target buffer area. After buffering the simulation operation data in the second target buffer area, the method further includes:
[0023] When there is at least one buffer among the multiple buffers whose current buffer capacity is not empty, any one of the buffers with a non-empty current buffer capacity is used as the third target buffer;
[0024] Cache the simulation operation data in the third target buffer.
[0025] Optionally, the target buffer includes a fourth target buffer. After caching the simulation operation data in the third target buffer, the method further includes:
[0026] When the current buffer capacity of the third target buffer is greater than or equal to the third buffer capacity, any one of the buffers other than the third target buffer among the buffers with a non-empty current buffer capacity is used as the fourth target buffer;
[0027] Cache the simulation operation data in the fourth target buffer.
[0028] Optionally, when the second processor is in a normal state, control the robot to run through the operation data.
[0029] In a second aspect, an embodiment of the present invention provides a robot control device, which includes a first processor and a second processor, wherein,
[0030] The first processor is configured to respond to a control operation request for the robot, and determine the operation data of the robot according to the configuration information and status information of the robot through the first processor;
[0031] The second processor is configured to determine the simulation operation data of the robot according to the configuration information and the status information; determine whether the second processor is in an abnormal state; and when the second processor is in an abnormal state, output a first abnormal prompt message and stop controlling the robot to run, where the first abnormal prompt message indicates that the robot has an abnormality.
[0032] In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor; when the processor executes the program, the foregoing method is implemented.
[0033] In a fourth aspect, an embodiment of the present invention provides a readable storage medium, when the instructions in the readable storage medium are executed by the processor of the electronic device, the electronic device can execute the foregoing method.
[0034] Fifth aspect, an embodiment of the present invention provides a computer program product, including instructions or transactions, which, when executed by a processor in an electronic device, cause the electronic device to execute the foregoing method.
[0035] Sixth aspect, an embodiment of the present invention provides a robot, which includes the electronic device provided in the third aspect of the embodiment of the present invention.
[0036] Embodiments of the present invention include the following advantages:
[0037] The robot control method provided by the embodiment of the present invention, in response to a control operation request for the robot, determines the operation data of the robot by the first processor according to the configuration information and status information of the robot; determines the simulation operation data of the robot by the second processor according to the configuration information and the status information; determines whether the second processor is in an abnormal state; in the case where the second processor is in an abnormal state, outputs a first abnormal prompt message and stops controlling the operation of the robot, and the first abnormal prompt message indicates that the robot has an abnormality. In this way, the operation data and simulation operation data can be determined by two processors respectively, and the status of the second processor can be monitored in real time. When the second processor is in an abnormal state, a prompt message can be output, and the fault problem can be quickly prompted and recorded, greatly shortening the fault discovery time compared with the traditional log method; moreover, the two processors can work together, the operation data of the first processor reflects the actual operation status of the robot, and the simulation operation data of the second processor simulates the expected operation state of the robot from a theoretical level. When the second processor is abnormal, the fault cause can be accurately located by comparing the data, thereby avoiding the situation of a long fault problem solving cycle and improving the reliability of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 is a flowchart of a robot control method provided by an embodiment of the present application;
[0039] Figure 2 is a block diagram of an overall controller module provided by an embodiment of the present invention;
[0040] Figure 3 is a flowchart of another robot control method provided by an embodiment of the present invention;
[0041] Figure 4 is a flowchart of another robot control method provided by an embodiment of the present invention;
[0042] Figure 5 is a flowchart of another robot control method provided by an embodiment of the present invention;
[0043] Figure 6It is a design block diagram of a simulation operation data storage solution provided by an embodiment of the present application;
[0044] Figure 7 It is a flowchart of an information receiving buffer allocation strategy and a buffer sending selection strategy provided by an embodiment of the present application;
[0045] Figure 8 It is a block diagram of a robot control device provided by an embodiment of the present application;
[0046] Figure 9 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Specific implementation manners
[0047] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.
[0048] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. generally belong to the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.
[0049] Before introducing the robot control method, device, equipment, storage medium, product and robot provided by the present disclosure, the application scenarios involved in each embodiment of the present disclosure will be introduced first. The present disclosure can be applied to the scenario of robot control. The robot control method provided by the embodiments of the present disclosure can be applied to a control device of a robot. The control device can include a first processor and a second processor. Among them, the first processor can be the main processor, and the second processor can be a twin processor. The twin processor control device has the same architecture and operating system as the main processor and runs synchronously.
[0050] At present, in the field of industrial automation, the reliable operation of industrial robots is crucial to the stability of intelligent manufacturing systems. However, in actual use, industrial robots may encounter various abnormal situations, including but not limited to hardware failures such as motor failures, sensor failures, mechanical component wear, etc.; software failures such as program errors, system crashes, communication interruptions, etc. Among them, the fault problems are characterized by strong randomness and long recurrence periods.
[0051] In related technologies, traditional event logs, operation logs, etc. are usually used to record and prompt that the operation of the robot has failed. However, the fault recording scheme based on traditional event logs and operation logs has inherent defects and cannot fully record fault data, making it difficult to quickly discover fault problems, resulting in a long fault problem solving cycle and even situations where the problems cannot be solved, making the robot less reliable.
[0052] To solve the above problems, the present disclosure provides a robot control method, device, equipment, storage medium, product and robot, which can respectively determine operation data and simulation operation data through dual processors, and real-time monitor the status of the second processor. When the second processor appears in an abnormal state, a prompt message can be output, and the fault problem can be quickly prompted and recorded. Compared with the traditional log method, the fault discovery time is greatly shortened; moreover, through the collaborative work of the dual processors, the actual operation status of the robot can be reflected by the operation data of the first processor, and the theoretical operation state that the robot should have can be simulated by the simulation operation data of the second processor. When the second processor is abnormal, the fault cause can be accurately located by comparing the data, thereby avoiding the situation of a long fault problem solving cycle and improving the reliability of the robot.
[0053] Method Embodiment
[0054] The following combines the accompanying drawings to detail the robot control method provided by the embodiments of the present application through specific embodiments and their application scenarios.
[0055] Figure 1 is a flowchart of a robot control method provided by the embodiments of the present application. As Figure 1 shown, this method is applied to the control device of the robot. The control device includes a first processor and a second processor. Among them, the first processor can be the main processor, and the second processor can be the twin processor. The twin processor control device has the same architecture and operating system as the main processor and runs synchronously.
[0056] This method may include the following steps.
[0057] In step S101, in response to a control operation request for the robot, the first processor determines the operation data of the robot according to the configuration information and status information of the robot.
[0058] Among them, the control operation request can be an external instruction signal for triggering the robot to start or execute a specific task. The request includes multiple sources, which can include manual input from a teach pendant, task scheduling by a host computer, triggering by external devices (such as sensors), and so on.
[0059] The first processor can be the core computing unit of an industrial robot controller, responsible for parsing instructions, processing data, and generating control signals. It is used to receive and parse control requests; call configuration information and status information; and generate operation data through algorithms to drive the robot to execute actions.
[0060] The configuration information can represent the preset static parameters and task rules of the robot. For example, it can include the hardware parameters, control parameters, and task configuration data of the robot, etc.
[0061] The status information can represent the core control parameters for driving the robot to execute actions. It can be calculated by combining configuration information (such as a kinematic model) and status information (such as the current position); through motion planning algorithms (such as path planning) and control algorithms (such as PID).
[0062] In this step, first, the first processor can receive the control operation request in various ways. Specifically, the control operation request can be manually issued by an operator with the help of devices such as an operation panel, remote control, and teach pendant, or it can also include being automatically sent by other automation systems according to preset programs and logics. Among them, the control operation request can include clear task objectives, such as specific positions that the robot needs to reach (which can be Cartesian space coordinates or joint space angles), specific actions to be executed (such as handling, welding, spraying, etc.), and information such as the priority of the task. For example, in a welding task, the request will clearly specify parameters such as the starting point, ending point, and welding speed of the welding.
[0063] Then, after the first processor receives the control operation request, it can read the configuration information of the robot from a storage device (such as a hard disk, flash memory, etc.), and at the same time, it can collect the status information of the robot in real time through various sensor interfaces.
[0064] Exemplarily, the first processor can communicate with the storage device through specific interfaces (such as SATA interface for hard disks, SPI or USB interfaces for flash memories). After receiving the control operation request, the processor will locate and read the corresponding configuration information from the storage device according to the task type and requirements of the request. The configuration information can include the hardware parameters, control parameters, and task configuration data of the robot, etc.
[0065] Among them, the hardware parameters may include the mechanical structure parameters of the robot, such as the lengths of each joint, the rotation range, the maximum load capacity, etc. These parameters determine the motion space and working ability of the robot. The control parameters may include the relevant parameters of the motion control algorithm, such as the parameters of the PID controller (proportional coefficient, integral coefficient, differential coefficient), and these parameters will affect the motion stability and accuracy of the robot. In addition, it may also include the limit parameters of speed and acceleration to ensure that the robot will not have safety problems due to excessive speed during operation. The task configuration data may include the programs and parameters preset for different tasks, such as the welding current, voltage, and welding speed in the welding task, as well as the grasping method and placement position in the handling task, etc. These configuration information can be adjusted and optimized according to specific production requirements.
[0066] Moreover, the first processor can collect the sensor data at a certain sampling frequency. The selection of the sampling frequency can be determined according to the motion speed and control requirements of the robot to ensure that it can timely and accurately reflect the state changes of the robot. The collected data will be stored in the internal cache of the processor for subsequent processing and analysis. Among them, different types of sensors usually use different interfaces to connect with the first processor. For example, the encoder may be connected to the processor through a pulse signal interface, and the processor obtains the angle information of the joint by counting the number of pulses; the force sensor may use an analog signal interface, and the processor needs to convert the analog signal into a digital signal through an analog-to-digital converter for processing; the vision sensor may transmit the collected images or data to the processor through an Ethernet interface.
[0067] Then, after reading the configuration information and collecting the state information, the first processor will integrate and preprocess these data. The integration process is to associate and match the data from different sources. For example, the current joint position information is combined with the kinematic model in the configuration information. The preprocessing includes operations such as filtering and calibration of the data to remove noise and errors and improve the quality of the data. For example, for the signals collected by the sensor, a digital filtering algorithm (such as Kalman filtering) may be used to reduce the influence of noise; for the data of the position sensor, calibration may be required to eliminate the installation error and measurement error.
[0068] In step S102, the second processor determines the simulation operation data of the robot according to the configuration information and the state information.
[0069] Among them, the second processor and the main processor (the first processor) are exactly the same in architecture and operating system, and run synchronously with it. Its main function is to simulate the operation of the robot, verify the accuracy of the control logic of the main processor by means of the generated simulation operation data, and at the same time provide a data basis for fault diagnosis and system optimization. The configuration information and the status information are consistent with the configuration information and the status information in the above step S101.
[0070] In this step, after receiving the configuration information and the status information sent by the main processor, the second processor can first update its own simulation environment to ensure consistency with the actual robot state controlled by the main processor. This process is usually completed within each control cycle to ensure the real-time nature of the simulation. Then, according to the synchronized configuration information, a simulation model of the robot can be established in the second processor. This model takes into account factors such as the mechanical structure, dynamic characteristics, and control algorithms of the robot and can accurately simulate the movement and behavior of the robot.
[0071] During the process of performing simulation calculations, the second processor can calculate the angular changes of each joint and the position changes of the end effector of the robot within a certain period of time in the future based on the kinematic model of the robot and in combination with the current status information. It can also, on the basis of kinematic simulation, consider the dynamic characteristics of the robot, such as inertial force, friction force, gravity, etc., and calculate the driving torques and powers required for each joint. It can more accurately reflect the mechanical behavior of the robot during actual operation. In a possible implementation manner, it can also simulate the interaction between the robot and the surrounding environment, such as collision detection, force feedback, etc. Through environmental interaction simulation, problems that the robot may encounter during operation, such as colliding with obstacles and unstable contact with workpieces, can be predicted.
[0072] After performing simulation calculations, the second processor processes the results obtained from the simulation calculations, such as filtering, smoothing, etc., to improve the quality and reliability of the data. At the same time, it analyzes the simulation results and extracts key information, such as movement trajectories, joint torques, energy consumption, etc.
[0073] In step S103, it is determined whether the second processor is in an abnormal state.
[0074] Among them, the abnormal state indicates that it cannot run synchronously with the main processor, has data calculation errors, or has hardware / software failures.
[0075] In some embodiments, it is possible to determine that the second processor is in an abnormal state when the simulation operation data meets a preset abnormal condition. And / or, by sending an inquiry notice from the first processor to the second processor, if no response information from the second processor is received within a preset time period, it is determined that the second processor is in an abnormal state.
[0076] Wherein, the simulation operation data includes interface data, intermediate data, simulation operation results, and running low-level program information.
[0077] The interface data represents the data involved in the data interaction between the second processor and the outside world (such as the main processor, sensors, actuators, etc.). It includes but is not limited to configuration information and status information synchronized with the main processor, data collected from sensors, control instructions sent to actuators, etc. For example, when communicating with the main processor, the interface data may be joint angle data, task instructions, etc. transmitted in each control cycle; force data of a force sensor, image data of a vision sensor, etc. obtained from sensors also belong to the category of interface data.
[0078] The intermediate data is temporary data generated by the second processor during the simulation calculation process and is an intermediate step to complete the final simulation operation result. For example, during kinematic and dynamic simulation calculations, the intermediate data may include joint angular velocity, angular acceleration, and intermediate results of force analysis during the calculation process. These data are obtained through a series of algorithms based on the input interface data and configuration information.
[0079] The simulation operation result is the final output obtained by the second processor through simulation calculations based on configuration information, status information, and interface data. It reflects the operation of the robot in a virtual environment. It may include the predicted positions, speeds, and accelerations of the joints of the robot, the motion trajectory of the end effector, as well as the energy consumption and force conditions during the simulation process. For example, in the simulation of a handling task, the simulation operation result may show the position of the robot at a certain moment and the magnitude of the grasping force.
[0080] The running low-level program information represents the running status and related information of the low-level program involved in the second processor's execution of the simulation calculation. It may include the execution flow of the program, function call relationships, register status, memory usage, etc. For example, whether the program is executed in the expected order, whether a certain key function is called correctly, and whether the data in the register is logical. By monitoring the running low-level program information, the software running status of the second processor can be deeply understood, and potential problems in the program, such as program runaway and deadlock, can be discovered in a timely manner.
[0081] Optionally, the preset abnormal condition may be that the second processor has an alarm or data abnormality, which is judged by the abnormal handling logic in the robot control logic. For example, when the target position of the robot is extremely far and the robot cannot reach it, the abnormal handling logic will prompt that the target position cannot be reached and will send out this prompt.
[0082] In a possible implementation manner, abnormal detection can be first performed on the interface data, and the interface data may include the version number of the configuration information synchronized with the main processor (such as the task program hash value), the status information timestamp (such as the joint angle acquisition moment), the integrity of the original data of the sensor interface (such as the packet loss rate of the lidar point cloud data), the actuator instruction verification value (such as the CRC verification of the motor torque instruction), and so on.
[0083] In the case of detecting data loss, format error, deviation exceeding the limit, etc., it can be confirmed that the interface data meets the preset abnormal condition. For example, in the case of not receiving the status information synchronization packet of the main processor for 3 consecutive cycles, it can be considered that data loss is detected; in the case of finding that the protocol field is misaligned during the parsing of the interface data (such as the CAN bus data frame ID is abnormal), it can be considered that a format error is detected; in the case where the difference between the force sensor interface data and the main processor acquisition value is >10%, it can be considered that the deviation exceeds the limit.
[0084] For example, when the robot target position exceeds the kinematically reachable range (such as the maximum working radius of the robotic arm), the interface data of the second processor will contain a flag indicating the failure of inverse kinematics solution, triggering the abnormal condition "data abnormality - target unreachable".
[0085] Then, abnormal detection can be performed on the intermediate data, and the intermediate data may include the intermediate solution of the joint angle in kinematic simulation (such as the intermediate value in the inverse solution iteration process), and intermediate variables such as the calculation result of the inertia matrix and the Coriolis force component in dynamic simulation, etc.
[0086] In the case of detecting numerical overflow, logical contradiction, convergence failure, etc., it can be confirmed that the intermediate data meets the preset abnormal condition. For example, in the case where the intermediate calculation result exceeds the data type range (such as NaN appears during the calculation of a 32-bit floating-point variable), it can be confirmed that numerical overflow is detected; in the case where the intermediate value of the joint angular velocity is opposite to the angle change trend (such as the angle increases but the speed is negative), it can be confirmed that a logical contradiction is detected, and in the case where the trajectory planning algorithm (such as quintic polynomial interpolation) does not converge within the preset number of iterations, it can be confirmed that convergence failure is detected.
[0087] For example, in the simulation calculation, due to incorrect configuration of the robotic arm parameters (such as the link length is wrongly set to a negative number), the intermediate data has a negative eigenvalue of the inertia matrix, triggering the "intermediate data logical error" abnormality.
[0088] In addition, the simulation results can be detected for anomalies. For example, in the welding task simulation, the simulation results show that the welding gun posture angle deviates from the actual value of the main processor by 15°, triggering the "mismatch between simulation results and actual control quantity" anomaly. In addition, the underlying program information can be detected for anomalies. For example, when the simulation process crashes due to memory leaks in the underlying program, and the "memory usage rate" in the underlying program information remains at 100%, the "software anomaly-memory exhaustion" alarm will be triggered.
[0089] In another possible implementation, the first processor (main processor) may periodically send status check instructions to the second processor (twin processor) to confirm the latter's survival status, communication link integrity, and computing power.
[0090] Optionally, the first processor acts as the main control unit, generates an inquiry data packet containing a unique cycle number, timestamp and data check value within each preset control cycle (such as 1ms), and transmits it to the second processor through a hard real-time communication bus (such as EtherCAT or CANopen).
[0091] After the first processor sends the inquiry notification, it needs to wait for the response of the second processor within a strictly limited preset time period (such as 500μs). The setting of this time period needs to comprehensively consider the physical delay of the communication link (such as bus transmission time), the minimum task scheduling cycle of the processor (such as the context switching time of the real-time operating system) and the algorithm processing time (such as check value calculation). If no response is received within this time period, it may be caused by the following multi-level reasons: first, physical layer failure, such as communication cable breakage, interface chip damage or electromagnetic interference causing signal distortion, so that the inquiry notification cannot reach the second processor; second, hardware abnormality of the second processor, such as CPU core failure, memory module error or power management unit failure, resulting in its inability to execute reception and response instructions; third, software-level problems, such as operating system kernel crash, simulation program entering an infinite loop or task scheduler failure, making the processor unable to process the inquiry request in time; finally, the synchronization mechanism may fail, such as the clock source of the dual processors deviates, resulting in response timeout.
[0092] In engineering implementation, in order to avoid misjudgment caused by occasional interference (such as transient electromagnetic pulses), the anti-shake strategy of "N consecutive timeouts triggering abnormalities" is usually adopted. For example, when no response is received for the first time, the first processor will immediately resend the query notification and start the redundant link (if there is a backup bus). If there is no response after three consecutive retransmissions, the second processor is determined to be in an abnormal state.
[0093] In this way, "liveness detection" and "communication health monitoring" of the second processor can be achieved with extremely low system overhead (the inquiry data packet is usually less than 100 bytes).
[0094] Adopting the above technical solution, the determination of the abnormal state of the second processor (twin processor) depends on a dual monitoring system of simulation operation data verification and inquiry response mechanism. The two operate independently and complement each other, ensuring comprehensive coverage of problems such as hardware failures, software anomalies, and communication interruptions.
[0095] In step S104, when the second processor is in an abnormal state, a first abnormal prompt message is output, and the control of the robot's operation is stopped.
[0096] Among them, the first abnormal prompt message indicates that the robot is abnormal.
[0097] Adopting the above technical solution, the operating data and simulation operating data can be determined by the dual processors respectively, and the status of the second processor can be monitored in real time. When the second processor is in an abnormal state, a prompt message can be output, quickly prompting and recording the fault problem, greatly shortening the fault discovery time compared with the traditional log method; moreover, the dual processors can work together. The operating data of the first processor reflects the actual operating condition of the robot, and the simulation operating data of the second processor simulates the expected operating state of the robot from a theoretical level. When the second processor is abnormal, the cause of the fault can be accurately located by comparing the data, thus avoiding the situation of a long fault problem solving cycle and improving the reliability of the robot.
[0098] In some embodiments, as Figure 2 shown, the control device further includes a data memory, and the second processor includes a plurality of buffer areas.
[0099] Considering that in the related art, traditional event logs, operation logs, etc. are usually used to record and prompt that the operation of the robot has a fault. However, since traditional event logs, operation logs, etc. cannot fully record the fault data, a data memory can be added in this solution so that when the second processor is in an abnormal state, the simulation operation data corresponding to the moment when the second processor is in an abnormal state can be stored in the data memory.
[0100] As Figure 3 shown, the method further includes the following steps:
[0101] In step S105, through the second processor, according to the current buffer capacity of each buffer area, the simulation operation data is cached in the target buffer area.
[0102] Among them, the buffer of the second processor can be divided into different functional areas according to data types and processing stages.
[0103] Specifically, it can be divided into an interface data buffer, an intermediate calculation buffer, a result output buffer, and a program log buffer. Among them, the interface data buffer is used to store the configuration information (such as robotic arm parameters) and real-time status information (such as joint angles) synchronized from the main processor; the intermediate calculation buffer is used to save the iterative intermediate values of algorithms such as inverse kinematics and dynamics modeling; the result output buffer is used to temporarily store the final simulation operation results (such as predicted trajectories, torque commands); the program log buffer is used to record the execution process of the underlying program (such as the number of code lines, register status).
[0104] Optionally, the simulation operation data can be cached in the target buffer according to the current cache capacity of each buffer in the following way.
[0105] First, the second processor can monitor three key metrics of each buffer in real time, including: the used capacity, which is used for the currently stored data volume and reflects the occupancy of the buffer; the remaining capacity, which is used for the available space size and determines whether new data can be accommodated; and the read-write load, which characterizes the operation frequency per unit time and is used to judge the busyness of the buffer. Through register mapping or the status control module, the processor can obtain the status data of each buffer with microsecond-level accuracy and predict the future data traffic trend based on the sliding window algorithm, providing a basis for the selection of the target buffer.
[0106] Then, the second processor can dynamically select the write target according to the buffer status according to the following priority strategies:
[0107] Strategy 1: Capacity priority strategy.
[0108] Priority is given to writing data into the buffer with the largest remaining capacity to avoid premature overflow of a single buffer. For example, when the interface data buffer has 20KB remaining and the intermediate calculation buffer has 50KB remaining, even if the new data is of the interface type, it can be temporarily stored in the intermediate buffer (ensuring data type compatibility) to balance the overall load.
[0109] Strategy 2: Type matching strategy.
[0110] When the remaining capacities are similar, the buffer corresponding to the data type can be preferentially selected (such as writing interface data into the interface buffer) to reduce the data type conversion overhead and improve the locality efficiency of cache access.
[0111] Strategy 3: Emergency caching strategy.
[0112] When an abnormal state (such as a timeout in the main processor's inquiry) or a system event (such as an impending power failure) is detected, critical data (such as the log at the abnormal moment) can be forced to be written into the program log buffer or a dedicated emergency buffer to ensure the priority storage of core information.
[0113] In some embodiments, when the current cache capacity of each of these buffers is empty, any one of the multiple buffers can be used as the first target buffer; the simulation run data can be cached in the first target buffer.
[0114] For example, when the current cache capacity of all buffers is zero, it indicates that no buffer stores data and the state is completely idle. At this time, any one of the multiple buffers can be selected as the first target buffer. This is because when all buffers are idle, the initial conditions of the multiple buffers for storing data are the same, and selecting any one will not have an adverse impact on subsequent data caching. After selecting the first target buffer, the simulation run data can be stored in the first target buffer. In this way, the data caching operation can start quickly, avoiding wasting too much time on selecting the buffer.
[0115] When the current cache capacity of the first target buffer is greater than or equal to the second cache capacity, any one of the multiple buffers other than the first target buffer can be used as the second target buffer; the simulation run data can be cached in the second target buffer.
[0116] For example, after continuously caching the simulation run data into the first target buffer, when it is detected that the current cache capacity of the first target buffer is greater than or equal to the second cache capacity, it means that the buffer has approached or reached a pre-set capacity limit. To prevent the buffer from being overused and affecting the efficiency of data storage and processing, the buffer needs to be replaced. At this time, any one of the multiple buffers other than the first target buffer is selected as the second target buffer, and the subsequent simulation run data is stored in this new buffer. In this way, the use of each buffer can be balanced, avoiding overloading of a certain buffer.
[0117] When there is at least one buffer among the multiple buffers whose current cache capacity is not empty, any one of the buffers with a non-empty current cache capacity can be used as the third target buffer; the simulation run data can be cached in the third target buffer.
[0118] Exemplarily, when at least one of the multiple buffer areas already stores data, that is, when the current buffer capacity is not empty, any one of these buffer areas with existing data is selected as the third target buffer area. Selecting these buffer areas with existing data as the target is considered to further utilize the remaining space of the buffer areas that have already been in use and reduce the overhead caused by frequent buffer area switching. After selecting the third target buffer area, the simulation operation data is stored therein.
[0119] In the case where the current buffer capacity of the third target buffer area is greater than or equal to the third buffer capacity, any buffer area other than the third target buffer area in the buffer area with the current buffer capacity not being empty is used as the fourth target buffer area; the simulation operation data is cached in the fourth target buffer area.
[0120] Exemplarily, when the simulation operation data is continuously stored in the third target buffer area such that the current buffer capacity of this buffer area is greater than or equal to the third buffer capacity, it indicates that this buffer area is also approaching or reaching a preset capacity limit. At this time, to ensure the efficiency and stability of data caching, the buffer area needs to be changed again. From the buffer areas with the current buffer capacity not being empty, any buffer area other than the third target buffer area is selected as the fourth target buffer area, and the subsequent simulation operation data is stored in this new buffer area.
[0121] In step S106, in the case where the current buffer capacity of the target buffer area is greater than or equal to the first buffer capacity, the simulation operation data stored in this buffer area is sent to the data memory for storage.
[0122] Among them, the target buffer area is an area in the second processor for temporarily storing simulation operation data. During the operation of the robot, simulation operation data is continuously generated and cached in the target buffer area. When the current buffer capacity of the target buffer area is greater than or equal to the first buffer capacity, step S106 is triggered for execution.
[0123] The first buffer capacity is a preset threshold value, and this threshold value can be determined by multiple factors, such as the total capacity of the storage area, the data generation rate, the writing speed of the data memory, and the system's requirement for data processing real-time performance, etc. For example, if the total capacity of the buffer area is 100 MB, combined with the data generation rate and system performance, the first buffer capacity can be set to 80 MB. When the usage amount of the target buffer area reaches or exceeds 80 MB, the cached data needs to be processed.
[0124] When the trigger condition is met, the simulation operation data stored in the target buffer can be sent to the data storage for storage. Among them, the data storage usually uses non-volatile storage media, such as solid state drives (SSDs) or disk arrays, which have the characteristics of large capacity, high reliability, and persistent storage, and can long-term store important data information. During the data transmission process, it is necessary to ensure the integrity and accuracy of the data.
[0125] In this way, the data in the buffer can be transferred to the data storage, which can avoid buffer overflow due to excessive data. This is because buffer overflow will cause data loss, which will in turn affect the simulation calculation and control decision-making of the robot, and may even cause system failures. By clearing data in a timely manner when the buffer reaches a certain capacity, it can ensure that there is always enough space in the buffer to store newly generated simulation operation data, ensuring the smooth progress of the system's data processing process. On the other hand, storing data in the data storage provides strong support for subsequent data analysis and fault troubleshooting. These simulation operation data contain various key information during the robot's operation, such as interface data, intermediate data, simulation operation results, and underlying program information during operation, etc. When the system experiences anomalies or performance optimization is required, engineers can extract these historical data from the data storage for in-depth analysis to find the root cause of the problem and formulate corresponding solutions.
[0126] It should be noted that when the second processor is in a normal state, the robot is controlled to operate through the operation data.
[0127] Figure 4 is a flowchart of another robot control method provided by an embodiment of the present application. As Figure 4 shown, this method is applied to a control device of a robot. The control device includes a first processor and a second processor. Among them, the first processor can be a main processor, and the second processor can be a twin processor. The twin processor control device has the same architecture and operating system as the main processor and runs synchronously.
[0128] This method may include the following steps.
[0129] In step S201, in response to a control operation request for the robot, the first processor obtains the configuration information and status information of the robot.
[0130] In this step, operations such as reading static parameters from the memory, receiving task files through the network, and collecting sensor data using a real-time bus can be performed.
[0131] In step S202, the first processor determines the operation data of the robot according to the configuration information and status information of the robot.
[0132] In this step, based on the acquired configuration information and status information, the first processor determines the operation data of the robot by using algorithms such as kinematic calculation and trajectory planning, converts the user instructions into executable joint control instructions, and generates a smooth motion curve.
[0133] If it is determined that the second processor is online, step S203 is executed;
[0134] If it is determined that the second processor is not online, step S201 is re-executed;
[0135] Among them, if it is determined that the second processor is not online, it indicates that there are problems such as communication link failure, hardware initialization failure, or software process not being activated. At this time, re-executing step S201 can eliminate occasional interference. If the second processor is not detected online continuously for multiple times, a hardware failure alarm is triggered. If it is determined that the second processor is online, step S203 is executed.
[0136] In step S203, if the second processor is in an abnormal state, the status information is sent to the monitoring device, and a second abnormal prompt message is output to prompt the user to view the status information.
[0137] In this step, when the second processor is in an abnormal state (the abnormal state can be triggered by abnormal simulation data or abnormal operating state, such as missing interface data, heartbeat response timeout, etc.), the system sends the status information to the monitoring device, and at the same time outputs a second abnormal prompt message to remind the user to view the status information, so that the user can troubleshoot the cause of the abnormality in combination with the fault code, sound and light alarm, etc. displayed on the teach pendant.
[0138] For example, the error of model parameters or the hardware fault point can be located by comparing the operation data of the main / second processor, and non-intrusive diagnosis can be realized on the premise of ensuring that the main control process is not interrupted. If the abnormality persists and the system supports hot swapping, the faulty processor can be isolated and the main processor can run independently.
[0139] In this embodiment, the first processor can first parse the configuration file through peripheral interfaces such as the memory and network and receive external commands, and at the same time obtain information such as the current position and IO status of the robot. Then, after processing these information through motion control algorithms and logic, on the one hand, it is sent to the execution unit of the robot through the peripheral interface to control it to perform different actions, and on the other hand, it is uploaded to the teach pendant or the upper computer for the user to monitor and use.
[0140] With the above solution, the entire process constructs a dual-redundancy system through the real-time control of the main processor and the simulation verification of the second processor, realizing a complete closed-loop from information acquisition, data processing to status detection and abnormal response, improving the reliability, maintenance efficiency and control performance of the robot control system, and providing technical support for stable operation in industrial scenarios.
[0141] Figure 5 It is a flowchart of another robot control method provided by an embodiment of the present application. As Figure 5 shown, this method is applied to the control device of the robot. The control device includes a first processor and a second processor. Among them, the first processor can be the main processor, and the second processor can be the twin processor. The twin processor control device has the same architecture and operating system as the main processor and runs synchronously.
[0142] This method may include the following steps.
[0143] In step S301, in response to a control operation request for the robot, the configuration information and status information of the robot are obtained through the first processor.
[0144] In step S302, the second processor determines the simulation operation data of the robot according to the configuration information and the status information.
[0145] In step S303, through the second processor, according to the current cache capacity of each buffer, the simulation operation data is cached in the target buffer.
[0146] Among them, the second processor includes a plurality of buffers.
[0147] In the case where the second processor is not in an abnormal state, step S304 is executed;
[0148] In the case where the second processor is in an abnormal state, step S305 is executed;
[0149] In step S304, it is determined whether the first processor is online.
[0150] In the case where the first processor is online, step S301 is re-executed;
[0151] In the case where the first processor is not online, step S305 is executed;
[0152] In step S305, a first abnormal prompt message is output, and the first abnormal prompt message indicates that the robot has an abnormality.
[0153] Adopting the above technical solution, a redundancy mechanism is formed through a dual-processor architecture to reduce the risk of single-processor failure and improve system reliability; using a multi-buffer intelligent caching strategy, data storage is dynamically allocated according to capacity to optimize data processing efficiency; with the help of a perfect anomaly detection and response mechanism, prompt information is output in a timely manner to enhance the timeliness of anomaly handling and reduce losses; information is obtained in real time through a loop execution process, enabling the system to adapt to environmental changes and improve flexibility; relying on status monitoring and clear anomaly prompts, it is convenient for maintenance personnel to quickly locate problems and improve the convenience of system maintenance and upgrade.
[0154] In some embodiments, the multiple buffers may include two buffers A and B. Through the second processor, the simulation operation data is sent to the multiple buffers. As Figure 6 shown, the simulation operation data can be allocated to the multiple buffers through the information receiving buffer allocation strategy, and then the simulation operation data cached in the multiple buffers can be stored in the data processor through the buffer sending selection strategy.
[0155] Specifically, as Figure 7 shown, first, it can be judged whether buffer A is empty. If it is empty, then it is judged whether buffer B is empty. If B is also empty, it means that the program has just started running, and the current data is stored in buffer A. If buffer B is not empty, it means that buffer B is being used to store data, and it continues to be judged whether buffer B is full. If buffer B is already full, the current data is filled into buffer A, and the data in buffer B is sent to the running data memory for storage, and the data in buffer B is cleared after the sending is completed. If buffer B is not yet full, the current data is stored in buffer B; if buffer A is not empty, it means that buffer A is being used to store data, and it continues to be judged whether buffer A is full. If buffer A is already full, the current data is filled into buffer B, and the data in buffer A is sent to the running data memory, and after the data sending is completed, the data in buffer A is cleared. If buffer A is not yet full, the current data is stored in buffer A.
[0156] Device Embodiment
[0157] Figure 8 is a block diagram of a robot control device provided by an embodiment of the present application. As Figure 8 shown, the device 400 includes a first processor 401 and a second processor 402, wherein,
[0158] The first processor 401 is used to respond to a control operation request for the robot and determine the operation data of the robot according to the configuration information and status information of the robot through the first processor;
[0159] The second processor 402 is configured to determine the simulation operation data of the robot according to the configuration information and the status information; determine whether the second processor is in an abnormal state; in the case where the second processor is in an abnormal state, output a first abnormal prompt message and stop controlling the operation of the robot, where the first abnormal prompt message indicates that the robot has an abnormality.
[0160] In summary, a robot control device provided by an embodiment of the present invention, in response to a control operation request for a robot, determines the operation data of the robot by the first processor according to the configuration information and the status information of the robot; determines the simulation operation data of the robot by the second processor according to the configuration information and the status information; determines whether the second processor is in an abnormal state; in the case where the second processor is in an abnormal state, outputs a first abnormal prompt message and stops controlling the operation of the robot, where the first abnormal prompt message indicates that the robot has an abnormality. In this way, the operation data and the simulation operation data can be determined by two processors respectively, and the status of the second processor can be monitored in real time. When the second processor is in an abnormal state, a prompt message can be output, and the fault problem can be quickly prompted and recorded, greatly shortening the fault discovery time compared with the traditional log method; moreover, the two processors can work together. The operation data of the first processor reflects the actual operation status of the robot, and the simulation operation data of the second processor simulates the expected operation state of the robot from a theoretical level. When the second processor is abnormal, the fault cause can be accurately located by comparing the data, thereby avoiding the situation of a long fault problem solving cycle and improving the reliability of the robot.
[0161] The robot control device in the embodiments of the present application can be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than terminals. Exemplarily, the electronic device can be a GPU BOX, a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It can also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.
[0162] The robot control device provided by the embodiments of the present application can implement each process implemented by the above method embodiments. To avoid repetition, it will not be elaborated here.
[0163] Optionally, as Figure 9 shown, the embodiments of the present application further provide an electronic device, including a processor and a memory. A program or instruction that can run on the processor is stored on the memory. When the program or instruction is executed by the processor, it implements each step of the above method embodiments of the robot control method and can achieve the same or better technical effects. To avoid repetition, it will not be elaborated here.
[0164] In an embodiment of the present application, the memory can be used to store software programs and various data. The memory mainly includes a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area can store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory can include a volatile memory or a non-volatile memory, or the memory can include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory in the embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
[0165] The processor can include one or more processing units; optionally, the processor integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor may not be integrated into the processor either.
[0166] The embodiments of the present application also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above-mentioned embodiment of the robot control method, and can achieve the same or better technical effects. To avoid repetition, it will not be elaborated here.
[0167] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs, etc.
[0168] An embodiment of the present application provides a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the robot control method embodiment as described above, and can achieve the same or greater technical effects. To avoid repetition, it will not be elaborated here.
[0169] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0170] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the related technology, can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc) and includes several instructions to enable a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.
[0171] The embodiments of the present application have been described above with reference to the drawings, but the present application is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all belong to the protection scope of the present application.
Claims
1. A robot control method, characterized in that, A control device applied to a robot, the control device includes a first processor and a second processor, and the method includes: In response to a control operation request for the robot, the first processor determines the operation data of the robot according to the configuration information and status information of the robot; The second processor determines the simulation operation data of the robot according to the configuration information and the status information; Determine whether the second processor is in an abnormal state; When the second processor is in an abnormal state, output a first abnormal prompt message and stop controlling the operation of the robot, and the first abnormal prompt message indicates that the robot has an abnormality.
2. The method according to claim 1, characterized in that The determination of whether the second processor is in an abnormal state includes: When the simulation operation data meets a preset abnormal condition, it is determined that the second processor is in an abnormal state, and the simulation operation data includes interface data, intermediate data, simulation operation results, and running underlying program information; and / or, The first processor sends an inquiry notice to the second processor, and when the response information of the second processor is not received within a preset time period, it is determined that the second processor is in an abnormal state.
3. The method according to claim 1, characterized in that, The control device further includes a data memory, the second processor includes a plurality of buffer areas, and the method further includes: The second processor caches the simulation operation data in a target buffer area according to the current cache capacity of each buffer area; When the current cache capacity of the target buffer area is greater than or equal to the first cache capacity, the simulation operation data stored in the target buffer area is sent to the data memory for storage.
4. The method according to claim 3, wherein The target buffer area includes a first target buffer area, and the step of the second processor caching the simulation operation data in the target buffer area according to the current cache capacity of each buffer area includes: When the current cache capacity of each buffer area is empty, any one of the plurality of buffer areas is used as the first target buffer area; Cache the simulation operation data in the first target buffer area.
5. The method according to claim 4, characterized in that, The target buffer area includes a second target buffer area, and after caching the simulation operation data in the first target buffer area, the method further includes: When the current cache capacity of the first target buffer area is greater than or equal to the second cache capacity, any one of the plurality of buffer areas other than the first target buffer area is used as the second target buffer area; Cache the simulation operation data in the second target buffer area.
6. The method according to claim 5, wherein The target buffer area includes a third target buffer area, and after caching the simulation operation data in the second target buffer area, the method further includes: When there is at least one buffer area in the plurality of buffer areas whose current cache capacity is not empty, any one of the buffer areas with a non-empty current cache capacity is used as the third target buffer area; Cache the simulation operation data in the third target buffer area.
7. The method according to claim 6, wherein The target buffer includes a fourth target buffer. After caching the simulation operation data in the third target buffer, the method further includes: When the current buffer capacity of the third target buffer is greater than or equal to the third buffer capacity, using any buffer other than the third target buffer in the buffers with non-empty current buffer capacity as the fourth target buffer; Caching the simulation operation data in the fourth target buffer.
8. The method according to claim 1, wherein The method further includes: When the second processor is in a normal state, controlling the operation of the robot through the operation data.
9. A robot control device, characterized in that, The device includes a first processor and a second processor, where The first processor is configured to, in response to a control operation request for the robot, determine the operation data of the robot according to the configuration information and status information of the robot through the first processor; The second processor is configured to determine the simulation operation data of the robot according to the configuration information and the status information; determine whether the second processor is in an abnormal state; and when the second processor is in an abnormal state, output a first abnormal prompt message and stop controlling the operation of the robot, where the first abnormal prompt message indicates that the robot has an abnormality.
10. An electronic device, characterized in that, including: A processor, a memory, and a computer program stored on the memory and executable on the processor, characterized in that when the processor executes the program, the method described in any one of claims 1 to 8 is implemented.
11. A readable storage medium, characterized in that, When the instructions or transactions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the method described in any one of claims 1 to 8.
12. A computer program product, characterized in that, including instructions or transactions, when the instructions or transactions are executed by the processor in the electronic device, the electronic device executes the method described in any one of claims 1 to 8.
13. A robot, characterized in that, The robot includes the electronic device described in claim 10.