Method and device for constructing mobile robot communication reference system
By analyzing the communication matrix and generating core communication codes, and quickly reconstructing the reference system using the intermediate description language, the problem of difficulty in fully covering the communication scenario in the existing technology is solved, and efficient communication layer testing and communication reliability are achieved.
Patent Information
- Application Number
- CN202510462587.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-06-20
AI Technical Summary
The existing mobile robot communication reference system is difficult to fully cover the communication scenario in real business scenarios, and is difficult to adapt to the rapid changes in agile development and the interaction of heterogeneous communication protocols.
By analyzing the communication topological relationship between nodes in the communication matrix, generating core communication codes, and quickly reconstructing the reference system through the intermediate description language, the complete coverage simulation of real business scenarios is achieved.
It improves the coverage of communication layer tests in the field of mobile robots, enhances communication reliability, and supports conversion simulation between different communication protocols, realizing comprehensive simulation of the entire machine communication scenario.
Smart Images

Figure CN120186027A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mobile robots, and more particularly to a method and device for constructing a communication reference system for mobile robots. Background Art
[0002] In the field of mobile robots, there are a large number of software applications running, which can be divided into three categories: operating system, middleware, and application layer. The application layer programs are used to solve specific business requirements, the middleware software is used to coordinate different applications and operating system resources, and the operating system is responsible for managing device resources. In this huge system composed of these software, a perfect mechanism is needed to fully test the software to ensure normal functions, especially the reliability evaluation test of the communication layer.
[0003] In the robot operating system, application layer programs are often strongly related to specific businesses and belong to the division of algorithm functions; the normal operation of application programs also requires the guarantee of a reliable communication network, which belongs to the middleware software; in agile development, the development and testing of application layer and middleware software can be decoupled to achieve parallel development. However, the testing of middleware communication software often needs to rely on specific application layer programs to be fully tested.
[0004] In the field of mobile robots, digital twin technology can be used to utilize sensor data collected from real machines, and with the help of established mathematical models and simulation models, the state of the physical machine can be synchronously visualized in real time in the upper computer. However, with the development of the mobile robot field, application layer software has become increasingly complex, and the communication requirements have also become higher and higher, such as communication delay, real-time performance and other indicators. Therefore, it is increasingly necessary to decouple the testing of communication middleware software from application programs to make it fully tested, and then ensure the normal operation of the whole machine communication network.
[0005] Different from digital twin technology, a reference system is an imitation of application layer programs in a robot control system, which can simulate the behavior of middleware communication software in a simulated real communication scenario.
[0006] The existing methods for building a reference system often give a fixed communication node topology relationship, and mechanically simulate the real network communication situation of the whole robot by expanding the scale and type of communication nodes.
[0007] However, the reference system established by this method can only simulate the communication system in terms of the scale and magnitude of communication, and there is a large difference from the real application scenario. Especially in the specific topological relationship of the established communication nodes, there are also systematic errors with the real application scenario. Secondly, in the face of the continuously iterative update mode in agile development, the fixed communication node simulation method will be difficult to adapt to and cover the real application scenario in a timely manner. If the real communication scenario is covered by artificial development, omissions will often occur, and these mistakes are generally intolerable in the actual operating environment. Thirdly, this method is difficult to handle heterogeneous communication protocol methods. In the actual operating environment, there are often interactions of multiple communication protocols, which is also an important evaluation of the communication system.
[0008] Therefore, how to quickly construct a communication reference system for mobile robots, achieve full coverage simulation of the communication scenario in the real business scenario, improve the coverage of communication layer testing in the field of mobile robots, so as to help developers improve efficiency and communication reliability, is an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0009] In view of this, the present invention provides a method and device for constructing a communication reference system for mobile robots to solve some of the technical problems mentioned in the background art.
[0010] In order to achieve the above object, the present invention adopts the following technical solutions:
[0011] A method for constructing a communication reference system for mobile robots includes the following steps:
[0012] S1. Analyze the communication topological relationship between nodes stored in the communication matrix to obtain the information required to generate the core communication code;
[0013] S2. Decompose the communication matrix information into the topological relationship of nodes and the IDL description file, and then generate the framework code of the application layer program according to the specified communication protocol specification from the topological relationship;
[0014] S3. Decompose the communication matrix information into the topological relationship of nodes and the IDL description file, and then generate the communication interface code from the IDL description file;
[0015] S4. Generate a data source simulation program based on the generated application layer program and communication interface code.
[0016] Preferably, the specific content of step S1 includes:
[0017] S11. Obtain the communication matrix storing the communication relationship information of nodes;
[0018] S12. The matrix parsing tool parses the matrix information and generates an intermediate description language file to save the information, so as to achieve compatibility with communication matrices in different formats. The intermediate description language includes the topological relationship of nodes and the communication message type IDL.
[0019] Preferably, the intermediate description language includes the following key fields: the application layer simulation program name, the communication protocol type used by the current application, and the target protocol to be converted.
[0020] Preferably, the specific content of step S2 is as follows:
[0021] Based on the communication protocol type used by the current application, information is obtained from the intermediate description language according to different communication protocols; the received message is converted into the message type supported by the target protocol; and a complete simulation application is generated based on the application layer simulation program name.
[0022] Preferably, the specific content of step S3 is as follows:
[0023] The IDL description files under the requirements of different communication protocol specifications are generated from the data type information defined by the intermediate description language; under the generated multiple different communication protocols, a method for generating protocol type conversion is provided to the bridge to support multiple communication types defined in the communication matrix, so as to achieve coverage of the whole machine communication network simulation.
[0024] Preferably, the specific content of step S4 is as follows:
[0025] All application programs participating in the topological communication network are included in the communication matrix. In the mobile robot application, the data sending source is the data collected by the sensor, and the algorithm application program is the consumer of the data;
[0026] According to the intermediate description language, a reverse-generated simulated sensor application is supported to send data to the algorithm application program, simulate the communication load of the entire communication topology network, and achieve a data closed-loop.
[0027] A device for constructing a mobile robot communication reference system, based on the method for constructing a mobile robot communication reference system described above, includes a communication matrix acquisition module, a communication matrix information disassembling module, an application layer program generation module, a communication interface code generation module, and a simulation program generation module.
[0028] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for constructing a mobile robot communication reference system described above is implemented.
[0029] A processing terminal includes a memory and a processor. A computer program that can run on the processor is stored in the memory. When the processor executes the computer program, the method for constructing a communication reference system for a mobile robot as described above is implemented.
[0030] As can be seen from the above technical solutions, compared with the prior art, the present invention discloses a method and device for constructing a communication reference system for a mobile robot. By inputting the information of the communication matrix, a complete reference system is processed to have a communication scale and topological relationship equivalent to that of a real algorithm program, so as to realize the test of the communication middleware.
[0031] Compared with the traditional reference system solution, the present invention can quickly reconstruct the reference system for changes by defining an intermediate description language, realize the full coverage simulation of the communication scenarios in the real business scenarios, improve the coverage of the communication layer test in the field of mobile robots, and the communication reliability.
[0032] In addition, the present invention supports the conversion simulation between different communication protocols, simulates the communication scenario of the whole machine to the greatest extent; when generating the bridge application, a data source program will also be generated in reverse to realize the closed-loop of data, which is more conducive to the test and evaluation of the communication network of the whole machine.
[0033] The present invention helps to improve the development efficiency of developers and at the same time improve the reliability of the robot communication network. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0035] Figure 1 It is a schematic diagram of the method for constructing a communication reference system for a mobile robot provided by the present invention.
[0036] Figure 2 It is a schematic diagram of the generated application program of the communication reference system for a mobile robot provided by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0038] An embodiment of the present invention discloses a method for constructing a communication reference system for a mobile robot, as follows Figure 1 , including the following steps:
[0039] S1. Analyze the communication topology relationship between nodes stored in the communication matrix to obtain information required to generate core communication code;
[0040] S2. Decompose the communication matrix information into the topology relationship of nodes and the IDL description file, and then generate the framework code of the application layer program according to the specified communication protocol specification from the topology relationship;
[0041] S3. Decompose the communication matrix information into the topology relationship of nodes and the IDL description file, and then generate communication interface code from the IDL description file;
[0042] S4. Generate a data source simulation program based on the generated application layer program and communication interface code.
[0043] To further implement the above technical solution, the specific content of step S1 includes:
[0044] S11. Obtain a communication matrix storing node communication relationship information;
[0045] S12. Analyze the matrix information by a matrix parsing tool to generate an intermediate description language file to save the information, so as to achieve compatibility with communication matrices in different formats. The intermediate layer description language includes the topology relationship of nodes and the communication message type IDL;
[0046] Taking the dds node stored in the intermediate description language in yaml format as an example, it includes creating node information, such as: Domains / id, participants / id, topics / data_type, datawriters / name, datawriters / qos.
[0047] In this embodiment, the storage form of the node communication relationship information stored in the communication matrix includes but is not limited to forms such as using Excel, SQL database, json, etc. that can describe the node topology relationship; the communication matrix changes with the real communication topology relationship and is driven by user requirements and serves as a common basis for the interface layer and algorithm application program development.
[0048] To further implement the above technical solution, the intermediate description language includes the following key fields: the name of the application layer simulation program, the type of communication protocol currently used by the application, and the target protocol to be converted.
[0049] To further implement the above technical solution, the specific content of step S2 is:
[0050] Based on the type of communication protocol used by the current application, information is obtained from the intermediate description language according to different communication protocols; the received message is converted into a message type supported by the target protocol; and a complete simulation application is generated based on the application layer simulation program name.
[0051] To further implement the above technical solution, in step S3, data types for specific communications are generated through an IDL description file, and the specific content is as follows:
[0052] The data type information defined by the intermediate description language is used to generate IDL description files under the requirements of different communication protocol specifications. For example, in DDS, it is the dds_idl file, and in ROS2, it is the msg / srv definition file; under the multiple different communication protocols generated, methods for protocol type conversion are provided to the bridge to support multiple communication types defined in the communication matrix, achieving coverage of the entire machine communication network simulation.
[0053] To further implement the above technical solution, the specific content of step S4 is as follows:
[0054] All application programs participating in the topological communication network are included in the communication matrix. In the mobile robot application, the source of data transmission is the data collected by the sensor, and the algorithm application program is the consumer of the data;
[0055] Based on the intermediate description language, a simulation sensor application is supported to be generated in reverse to send data to the algorithm application program, simulate the communication load of the entire communication topology network, and achieve a data closed-loop.
[0056] In practical applications, a method for constructing a mobile robot communication reference system is used to generate all defined applications according to the communication matrix, such as Figure 2 , each box represents an application program, and each line represents a communication relationship.
[0057] A device for constructing a mobile robot communication reference system, based on a method for constructing a mobile robot communication reference system, includes a communication matrix acquisition module, a communication matrix information disassembling module, an application layer program generation module, a communication interface code generation module, and a simulation program generation module.
[0058] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements a method for constructing a mobile robot communication reference system.
[0059] A processing terminal includes a memory and a processor. A computer program that can run on the processor is stored in the memory, and when the processor executes the computer program, it implements a method for constructing a mobile robot communication reference system.
[0060] In the present specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.
[0061] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for constructing a mobile robot communication reference system, characterized in that: The following steps are involved: S1. Analyze the communication topology relationship between nodes stored in the communication matrix to obtain the information required to generate the core communication code; S2. Decompose the communication matrix information into the topological relationship of the nodes and the IDL description file, and then generate the framework code of the application layer program according to the topological relationship and the specified communication protocol specification; S3. Decompose the communication matrix information into the topological relationship of the nodes and the IDL description file, and then generate the communication interface code from the IDL description file; S4. Generate a data source simulation program based on the generated application layer program and communication interface code.
2. A method for constructing a mobile robot communication reference system according to claim 1, characterized in that: The specific contents of step S1 include: S11. Obtaining the communication matrix storing the communication relationship information of the nodes; S12. The matrix parsing tool parses the matrix information and generates an intermediate description language file to save the information, so as to achieve compatibility with communication matrices of different formats. The intermediate layer description language includes the topological relationship of the nodes and the communication message type IDL.
3. A method for constructing a mobile robot communication reference system according to claim 1, characterized in that: The intermediate description language includes the following key fields: the name of the application layer simulation program, the type of communication protocol used by the current application, and the target protocol that needs to be converted.
4. A method for constructing a mobile robot communication reference system according to claim 3, characterized in that: The specific content of step S2 is: Based on the communication protocol type used by the current application, according to different communication protocols, the intermediate description language obtains information; the received message is converted into the message type supported by the target protocol; And generate a complete framework code of the simulation application based on the application layer simulation program name.
5. The method for constructing a mobile robot communication reference system according to claim 1, characterized in that: The specific content of step S3 is: The data type information defined by the intermediate description language is used to generate IDL description files under the requirements of different communication protocol specifications; under the generated multiple different communication protocols, the method of generating protocol type conversion is provided to the bridge to support multiple communication types defined in the communication matrix and achieve coverage of the whole machine communication network simulation.
6. A method for constructing a mobile robot communication reference system according to claim 1, characterized in that: The specific content of step S4 is: The communication matrix includes all applications participating in the topological communication network. In mobile robot applications, the data source is the data collected by sensors, and the algorithm application is the consumer of the data; Based on the intermediate description language, it supports reverse generation of simulated sensor applications to send data to algorithm applications, simulate the communication load of the entire communication topology network, and realize data closed loop.
7. A device for constructing a mobile robot communication reference system, characterized in that: A method for constructing a mobile robot communication reference system based on any one of claims 1-6, comprising a communication matrix acquisition module, a communication matrix information disassembly module, an application layer program generation module, a communication interface code generation module and a simulation program generation module.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for constructing a mobile robot communication reference system as described in any one of claims 1 to 6 is implemented.
9. A processing terminal, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the method for constructing a mobile robot communication reference system as described in any one of claims 1 to 7 is implemented.