Method, system, medium and equipment for automatically capturing abnormal exit of IROS node
By subscribing to the '/exception' topic and resolving the communication contact of abnormal nodes, the cluster operation abnormality caused by abnormal exit of IROS nodes is solved, automatic capture and fault analysis are realized, and the stability and development efficiency of the IROS system are improved.
Patent Information
- Application Number
- CN202411178054.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2025-01-10
AI Technical Summary
In the multi-robot collaborative operation scenario, the abnormal exit of a single IROS node may trigger a chain reaction, causing abnormal operation of the entire cluster, and traditional troubleshooting is difficult to work. An automated mechanism is needed to monitor and deal with abnormal exits to ensure system stability and resilience. Great.
By subscribing to the '/exception' topic, catch exception information and send it to the cloud server, cancel the communication contact of the exception node, and record detailed information, allowing maintenance personnel to analyze the cause of the failure, implement custom callback functions to handle exception node exit, and ensure the cluster Stablize.
It realizes automatic capture of abnormal exit of IROS nodes, prevents them from affecting the normal operation of the cluster, accelerates the debugging cycle, and improves the robustness and stable development of the IROS system.
Smart Images

Figure CN119299290A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent robot operating systems, and in particular to a method, system, medium and device for automatically capturing abnormal exit of an IROS node. Background Art
[0002] In the context of the rapid development of robotics technology, the Intelligent Robot Operating System (IROS) aims to become the core platform of robots and realizes distributed communication centered on topics and following the publish / subscribe model. When any IROS node publishes data to a specific topic, it will be instantly synchronized to all subscriber nodes associated with the topic, ensuring efficient communication between robots.
[0003] As the application areas of robots continue to expand, they are required to perform more complex and continuous tasks, which not only tests the functionality of robots, but also places higher demands on the stability of the IROS system. In the scenario of multi-robot collaborative operation, the abnormal exit of any single node may trigger a chain reaction, endangering the normal operation of the entire cluster. In addition, such problems often occur during long-term operation and are difficult to reproduce, resulting in traditional troubleshooting methods usually being difficult to work.
[0004] In view of this, IROS needs an automated mechanism to monitor and respond to abnormal exits of IROS nodes. This mechanism should be able to immediately identify faulty nodes to prevent them from having a negative impact on the overall system. At the same time, it should also be able to record detailed information about abnormal exits at the code level to provide valuable clues for subsequent fault analysis and repair. This can not only significantly improve the robustness of the IROS system, but also accelerate the debugging cycle in the development process, thereby promoting the steady development of IROS. Summary of the invention
[0005] The technical problem solved by the present invention is to provide a method for automatically capturing abnormal exit of IROS nodes, thereby preventing abnormal nodes from affecting the normal operation of the IROS cluster.
[0006] The technical solution adopted by the present invention to solve the technical problem is: a method for automatically capturing abnormal exit of an IROS node, comprising:
[0007] Topic subscription feedback steps: Subscribe to the " / exception" topic, automatically capture the exception information of the abnormal node, and send the exception information to the " / exception" topic;
[0008] Abnormal information receiving step: After the normal nodes in the IROS cluster receive the abnormal node information in the " / exception" topic, they trigger the processing logic;
[0009] Abnormal node release step: The cloud server receives and parses the abnormal node information of the " / exception" topic, releases the communication with the abnormal node, and writes the parsed abnormal information to a local file.
[0010] Furthermore, it also includes a node abnormality analysis step, specifically: maintenance personnel access the cloud server, quickly locate and analyze the cause of the node abnormality based on the abnormality record, and solve it.
[0011] Furthermore, in the topic subscription feedback step, specifically:
[0012] The IROS node starts, automatically subscribes to the " / exception" topic, and receives and responds to abnormal exit notifications from other IROS nodes in the IROS cluster;
[0013] A SIGSEGV signal processor is set in each IROS node, and the SIGSEGV signal processor is used to execute a preset fault diagnosis and reporting program when an abnormal exit of a node is detected.
[0014] Furthermore, the preset fault diagnosis and reporting procedure is specifically as follows: in the SIGSEGV signal processor, the backtrace and backtrace_symbols functions are used to collect the function call stack information when the exception occurs. Subsequently, the c++filt tool is used to convert the original function stack information into a human-readable C++ function name format, which will be integrated into a structured IROS message, including the robot identification where the exception occurs, the abnormal node information, and the converted function call stack data, and then published to the " / exception" topic.
[0015] Furthermore, in the abnormal information receiving step, the normal nodes in the IROS cluster receive the abnormal node information in the " / exception" topic and trigger the processing logic, specifically: the normal nodes in the IROS cluster customize the callback function of the " / exception" topic according to actual needs.
[0016] Furthermore, in the abnormal node removal step, specifically:
[0017] Set up a cloud server outside the IROS cluster to run the IROS cloud node, and establish a stable data communication link between the IROS cloud node and each IROS node in the IROS cluster;
[0018] The IROS cloud node receives the message in the " / exception" topic and executes the callback function in the IROS cloud node. The callback function in the IROS cloud node is used to parse the received exception information, terminate the communication between the IROS cloud node and the abnormal IROS node, and write the parsed exception information to a local file.
[0019] Furthermore, in the node exception analysis step, specifically, maintenance personnel can access the cloud server through the data communication link, obtain which abnormal IROS nodes have experienced abnormal crash events by consulting the local record file of the exception information, and explore the root cause of the failure from the code level by analyzing the function call stack information recorded in the file.
[0020] The present invention also discloses a system for automatically capturing abnormal exit of IROS nodes, including a topic subscription feedback module, an abnormal information receiving module and an abnormal node release module;
[0021] The topic subscription feedback module is used to subscribe to the " / exception" topic, automatically capture the abnormal information of the abnormal node, and send the abnormal information to the " / exception" topic;
[0022] The abnormal information receiving module is used for normal nodes in the IROS cluster to receive abnormal node information in the " / exception" topic and trigger processing logic;
[0023] The abnormal node release module is used for the cloud server to receive and parse the abnormal node information of the " / exception" topic, and to release the communication with the abnormal node, and at the same time write the parsed abnormal information into a local file.
[0024] The present invention also discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for automatically capturing abnormal exit of an IROS node are implemented.
[0025] The present invention also discloses a computer device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein:
[0026] The memory is used to store computer programs;
[0027] The processor is used to execute the steps of the above-mentioned method for automatically capturing abnormal exit of an IROS node by running the program stored in the memory.
[0028] The beneficial effects of the present invention are: the present invention utilizes the characteristics of IROS to realize the function of automatically capturing abnormal nodes in the IROS cluster, and allows the IROS nodes of the IROS cluster to write custom callback functions to deal with the exit of abnormal nodes, thereby avoiding abnormal nodes affecting the normal operation of the IROS cluster. At the same time, through the cloud server equipped with IROS nodes, IROS abnormal nodes can be viewed and analyzed anytime and anywhere, which helps to quickly locate the cause of the node abnormality, thereby accelerating the debugging cycle in the IROS development process. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A flowchart of a method for automatically capturing abnormal exit of an IROS node according to an embodiment of the present application.
[0030] Figure 2 A schematic diagram of the framework of a system for automatically capturing abnormal exits of IROS nodes according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0032] like Figure 1 As shown, the present application discloses a first embodiment, which is a method for automatically capturing abnormal exit of an IROS node, including:
[0033] Topic subscription feedback steps: Subscribe to the " / exception" topic, automatically capture the exception information of the abnormal node, and send the exception information to the " / exception" topic;
[0034] Abnormal information receiving step: After the normal nodes in the IROS cluster receive the abnormal node information in the " / exception" topic, they trigger the processing logic;
[0035] Abnormal node release step: The cloud server receives and parses the abnormal node information of the " / exception" topic, releases the communication with the abnormal node, and writes the parsed abnormal information to a local file.
[0036] Specifically, the " / exception" topic represents the IROS node exception topic. The IROS node will automatically subscribe to the " / exception" topic when it starts. At the same time, the IROS node will automatically create a publisher and subscriber for the " / exception" topic for node crashes. As long as the topic name when creating the subscriber is consistent with the topic name when creating the publisher, the two IROS nodes can communicate with each other.
[0037] Specifically, in the topic subscription feedback step, it is as follows:
[0038] The IROS node starts, automatically subscribes to the " / exception" topic, and receives and responds to abnormal exit notifications from other IROS nodes in the IROS cluster;
[0039] A SIGSEGV signal processor is set in each IROS node, and the SIGSEGV signal processor is used to execute a preset fault diagnosis and reporting program when an abnormal exit of a node is detected.
[0040] Specifically, the preset fault diagnosis and reporting procedure is as follows: In the SIGSEGV signal processor, the backtrace and backtrace_symbols functions are used to collect the function call stack information when the exception occurs. Subsequently, the c++filt tool is used to convert the original function stack information into a human-readable C++ function name format. This information will be integrated into a structured IROS message, which contains the robot identifier where the exception occurred, the exception node information, and the converted function call stack data, and then published to the " / exception" topic.
[0041] It should be explained that the above-mentioned backtrace and backtrace_symbols functions are both existing functions. The backtrace() function can be used to obtain the current program stack address. A pointer array is provided, and the backtrace() function will fill the address of the call stack into it. The backtrace_symbols() can convert the stack address into readable information for printing. The c++filt tool is also an existing tool. The c++filt tool can be used to restore the names converted by the c++ compiler and convert them into human-readable C++ function name format, thereby generating a structured IROS message that can be interpreted later. The information is then published to the " / exception" topic to facilitate the subsequent normal IROS nodes and IROS cloud nodes to perform the next step.
[0042] In this embodiment, in the exception information receiving step, the normal nodes within the IROS cluster receive the abnormal node information in the " / exception" topic and trigger the processing logic, specifically: the normal nodes within the IROS cluster customize the callback function of the " / exception" topic according to actual needs.
[0043] Specifically, the above callback function needs to be set according to the specific scenario in order not to affect the normal operation of the entire robot cluster, such as: releasing the communication with the IROS abnormal node, detecting whether there is an IROS backup node in the robot cluster, and if there is an IROS backup node, notifying the cluster to assign the task of the IROS abnormal node to the IROS backup node; if there is no IROS backup node, try to reallocate the task of the IROS abnormal node to a normal IROS node, so as to restore the normal operation of the robot cluster and record the log information of the abnormality.
[0044] This method uses the characteristics of IROS to realize the function of automatically capturing abnormal nodes in the IROS cluster, and allows the IROS nodes of the IROS cluster to write custom callback functions to deal with the exit of abnormal nodes, thereby preventing abnormal nodes from affecting the normal operation of the IROS cluster.
[0045] In this embodiment, the abnormal node removal step is specifically as follows:
[0046] Set up a cloud server outside the IROS cluster to run the IROS cloud node, and establish a stable data communication link between the IROS cloud node and each IROS node in the IROS cluster;
[0047] The IROS cloud node receives the message in the " / exception" topic and executes the callback function in the IROS cloud node. The callback function in the IROS cloud node is used to parse the received exception information, terminate the communication between the IROS cloud node and the abnormal IROS node, and write the parsed exception information to a local file.
[0048] In this embodiment, a node abnormality analysis step is also included, specifically: maintenance personnel access the cloud server, quickly locate and analyze the cause of the node abnormality based on the abnormality record, and solve it.
[0049] That is, maintenance personnel can access the cloud server through the data communication link, obtain which abnormal IROS nodes have experienced abnormal crash events by consulting the local record file of abnormal information, and explore the root cause of the failure from the code level by analyzing the function call stack information recorded in the file.
[0050] This method can view and analyze IROS abnormal nodes anytime and anywhere by deploying a cloud server with IROS nodes, which helps to quickly locate the cause of the node abnormality, thereby accelerating the debugging cycle in the IROS development process.
[0051] The present application discloses a second embodiment, which is a system for automatically capturing abnormal exit of IROS nodes, including a topic subscription feedback module, an abnormal information receiving module and an abnormal node release module;
[0052] The topic subscription feedback module is used to subscribe to the " / exception" topic, automatically capture the abnormal information of the abnormal node, and send the abnormal information to the " / exception" topic;
[0053] The abnormal information receiving module is used for normal nodes in the IROS cluster to receive abnormal node information in the " / exception" topic and trigger processing logic;
[0054] The abnormal node release module is used for the cloud server to receive and parse the abnormal node information of the " / exception" topic, and to release the communication with the abnormal node, and at the same time write the parsed abnormal information into a local file.
[0055] Specifically, it also includes a node anomaly analysis module, and the specific function of the anomaly analysis module is: maintenance personnel access the cloud server, quickly locate and analyze the cause of the node anomaly based on the anomaly record, and solve it.
[0056] The present invention also discloses a third embodiment, which is a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for automatically capturing abnormal exits of IROS nodes described above are implemented.
[0057] In addition, the computer-readable storage medium of this embodiment may adopt any combination of one or more computer-readable storage media, wherein the computer-readable storage medium includes electrical, optical, electromagnetic, infrared or semiconductor systems, devices or components, or any combination thereof.
[0058] The present invention also discloses a fourth embodiment, which is a computer device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein:
[0059] The memory is used to store computer programs;
[0060] The processor is used to execute the steps of the above-mentioned method for automatically capturing abnormal exit of an IROS node by running the program stored in the memory.
[0061] As an embodiment of the present invention, the communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0062] As an implementation mode of the present invention, the communication interface is used for communication between the above-mentioned terminal and other devices.
[0063] As an embodiment of the present invention, the memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0064] As an embodiment of the present invention, the above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0065] Different from the existing technology, this method utilizes the characteristics of IROS to realize the function of automatically capturing abnormal nodes in the IROS cluster, and allows the IROS nodes of the IROS cluster to write custom callback functions to deal with the exit of abnormal nodes, thereby preventing abnormal nodes from affecting the normal operation of the IROS cluster. At the same time, through the cloud server equipped with IROS nodes, IROS abnormal nodes can be viewed and analyzed anytime and anywhere, which helps to quickly locate the cause of the node abnormality, thereby accelerating the debugging cycle in the IROS development process.
[0066] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for automatically capturing abnormal exit of an IROS node, characterized in that: include: Topic subscription feedback steps: Subscribe to the " / exception" topic, automatically capture the exception information of the abnormal node, and send the exception information to the " / exception" topic; Abnormal information receiving step: After the normal nodes in the IROS cluster receive the abnormal node information in the " / exception" topic, they trigger the processing logic; Abnormal node release step: The cloud server receives and parses the abnormal node information of the " / exception" topic, releases the communication with the abnormal node, and writes the parsed abnormal information to a local file.
2. The method for automatically capturing abnormal exit of an IROS node according to claim 1, characterized in that: It also includes a node anomaly analysis step, specifically: quickly locate and analyze the cause of the node anomaly based on the anomaly records in the cloud server and solve it.
3. The method for automatically capturing abnormal exit of an IROS node according to claim 1, characterized in that: In the topic subscription feedback step, specifically: The IROS node starts, automatically subscribes to the " / exception" topic, and receives and responds to abnormal exit notifications from other IROS nodes in the IROS cluster; A SIGSEGV signal processor is set in each IROS node, and the SIGSEGV signal processor is used to execute a preset fault diagnosis and reporting program when an abnormal exit of a node is detected.
4. The method for automatically capturing abnormal exit of an IROS node according to claim 3, characterized in that: The preset fault diagnosis and reporting procedure is specifically as follows: in the SIGSEGV signal processor, the backtrace and backtrace_symbols functions are used to collect the function call stack information when the exception occurs, and then the c++filt tool is used to convert the original function stack information into the C++ function name format. This information will be integrated into a structured IROS message, which includes the robot identification where the exception occurred, the exception node information and the converted function call stack data, and then published to the " / exception" topic.
5. The method for automatically capturing abnormal exit of an IROS node according to claim 1, characterized in that: In the abnormal information receiving step, the normal nodes in the IROS cluster receive the abnormal node information in the " / exception" topic and trigger the processing logic, specifically: the normal nodes in the IROS cluster customize the callback function of the " / exception" topic according to actual needs.
6. The method for automatically capturing abnormal exit of an IROS node according to claim 2, characterized in that: The abnormal node removal step specifically includes: Set up a cloud server outside the IROS cluster to run the IROS cloud node, and establish a stable data communication link between the IROS cloud node and each IROS node in the IROS cluster; The IROS cloud node receives the message in the " / exception" topic and executes the callback function in the IROS cloud node. The callback function in the IROS cloud node is used to parse the received exception information, terminate the communication between the IROS cloud node and the abnormal IROS node, and write the parsed exception information to a local file.
7. The method for automatically capturing abnormal exit of an IROS node according to claim 6, characterized in that: In the node exception analysis step, specifically: a local record file of exception information is stored in the cloud server, and the local record file records which abnormal IROS nodes have abnormal crash events and function call stack information.
8. A system that automatically captures abnormal exits of IROS nodes, characterized in that: It includes topic subscription feedback module, abnormal information receiving module and abnormal node release module; The topic subscription feedback module is used to subscribe to the " / exception" topic, automatically capture the abnormal information of the abnormal node, and send the abnormal information to the " / exception" topic; The abnormal information receiving module is used for normal nodes in the IROS cluster to receive abnormal node information in the " / exception" topic and trigger processing logic; The abnormal node release module is used for the cloud server to receive and parse the abnormal node information of the " / exception" topic, and to release the communication with the abnormal node, and at the same time write the parsed abnormal information into a local file.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for automatically capturing abnormal exit of an IROS node according to any one of claims 1 to 7 are implemented.
10. A computer device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; wherein: The memory is used to store computer programs; The processor is used to execute the steps of the method for automatically capturing abnormal exit of an IROS node according to any one of claims 1 to 7 by running the program stored in the memory.