A robot operating system and cross-platform development architecture and development method
Through the module conversion toolkit, the task module is converted from the first robot operating system to the second robot operating system, which solves the problem that algorithms cannot be directly run on different operating system platforms, and realizes seamless integration and operation across platforms, saving development Resources and improve compatibility.
Patent Information
- Application Number
- CN202411113068.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2044-08-14
AI Technical Summary
In the prior art, robot algorithms with the same action cannot be directly run on different operating system platforms, resulting in developers needing to perform repetitive development, wasting resources and time, and lack of compatibility and interoperability between different operating systems.
Using the module conversion toolkit, the task module on the first robot operating system platform is converted into a module compatible with the second robot operating system platform. Through standardized packaging and interface adaptation, the consistency of algorithm code is ensured, and the general task interface is implemented. Run seamlessly to avoid repeated development.
It realizes the seamless operation of the same set of code on different operating system platforms, saves development time and resources, enhances the universality and portability of modules, and improves the compatibility and scalability between operating system platforms.
Smart Images

Figure CN118642754B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of robot operating systems, and in particular to a robot operating system and a cross-platform development architecture and development method. Background Art
[0002] With the continuous advancement of science and technology, mobile robots have been increasingly widely used in many important fields such as civil and industrial.
[0003] A mobile robot is a complex system that integrates mechanical, electrical, control, and perception technologies. Its core controller is mostly based on industrial control computer hardware, and a robot-specific operating system is installed on the platform. Various software algorithms developed for robot control, perception, and computing decisions run on the operating system, ultimately completing the control and operation of the robot. It can be seen that the operating system plays a core and basic role in the robot control platform.
[0004] In actual applications, even if the same algorithm is used to execute the same action, when it needs to be run on different operating systems, developers have to perform targeted and repetitive development for different operating system platforms, resulting in a waste of development resources and time.
[0005] Based on this, a new development architecture is needed that can support the same algorithm running on different robot operating system platforms. Summary of the invention
[0006] In view of this, the embodiments of this specification provide a robot operating system and a cross-platform development architecture and development method, which are applied to the fields of artificial intelligence and robotics technology. By developing a module conversion toolkit, a task module developed on a first robot operating system platform is converted into a new module that can be compatible and run on a second robot operating system platform. This conversion process involves standardized encapsulation and interface adaptation, which ensures the consistency of the algorithm code, so that the same set of codes can run on different robot operating systems. In addition, by utilizing a universal task interface, the task module converted by the conversion module toolkit can run seamlessly on the second robot operating system platform, thereby avoiding repeated development work for different operating systems, improving the versatility and reusability of the module, effectively saving development time and development resources, and enhancing the compatibility and scalability between different operating system platforms.
[0007] The embodiments of this specification provide the following technical solutions:
[0008] The embodiment of the present specification provides a robot cross-platform development architecture, which is applied to a first robot operating system side, and the robot cross-platform development architecture includes: a task module set in the first robot operating system; wherein the task module includes a series of standardized API components, and the series of standardized API components are used to export the algorithm software designed by the user into a corresponding number of standardized APIs according to the core functions of the task module, wherein each of the standardized APIs is used to be correspondingly embedded in the corresponding functional layer in the conversion module, so as to be encapsulated into API data that can be used by the general task interface in the second robot operating system through the conversion module.
[0009] An embodiment of the present specification also provides a robot cross-platform development architecture, which includes: a conversion module, wherein the conversion module includes a plurality of first functional layers and a first API layer, each of the first functional layers is used to embed a corresponding standardized API to encapsulate the standardized API, wherein the standardized API is an API exported by a task module of a first robot operating system based on a kernel function from an algorithm software designed by a user; and, the first API layer is used to dock each of the encapsulated standardized APIs with a general task interface, wherein the general task interface is located in a second robot operating system, and a second API layer for docking is provided, and the second API layer is provided corresponding to the first API layer.
[0010] The embodiments of this specification also provide a robot cross-platform development architecture, which is applied to a second robot operating system. The robot cross-platform development architecture includes: a general task interface set in the second robot operating system, wherein the general task interface includes a second API layer and several second functional layers; the second API layer is set corresponding to the first API layer of the conversion module, and is used to obtain the corresponding description data content from the corresponding first API layer; the several second functional layers are used to form the description data content into an application interface and function implementation corresponding to the kernel in the second robot operating system.
[0011] The embodiments of this specification also provide a robot cross-platform development architecture, including: a task module, a conversion module and a general task interface;
[0012] The task module is arranged in the first robot operating system, and includes a series of standardized API components, wherein the series of standardized API components are used to export the algorithm software designed by the user into a corresponding number of standardized APIs according to the core functions of the task module, wherein each of the standardized APIs is used to be correspondingly embedded into a corresponding functional layer in the conversion module;
[0013] The conversion module includes a plurality of first function layers and a first API layer, wherein the plurality of first function layers are used to embed the corresponding standardized APIs to encapsulate the kernel functions of the task module and the standardized APIs, and the first API layer is used to connect the encapsulated standardized APIs with the corresponding second API layer in the general task interface;
[0014] The general task interface is set in the second robot operating system, including a second API layer and several second functional layers, wherein the second API layer is set corresponding to the first API layer, and is used to obtain corresponding data content from the encapsulated standardized API, and the several second functional layers are used to form the data content into corresponding application interfaces and function implementations in the second robot operating system.
[0015] The embodiment of this specification also provides a robot cross-platform development method, including:
[0016] Acquire algorithm software designed by a user, wherein the algorithm software is algorithm software for realizing robot motion control based on a first robot operating system;
[0017] By using any one of the robot cross-platform development frameworks, the algorithm software is exported to generate the corresponding first data;
[0018] Using any one of the robot cross-platform development frameworks, converting the first data into corresponding second data;
[0019] The second data is imported into the general task interface in any one of the robot cross-platform development frameworks, so that the algorithm software runs in the second robot operating system.
[0020] The embodiments of the present specification also provide a robot operating system, including: a task module in any one of the robot cross-platform development frameworks, or a general task interface in any one of the robot cross-platform development frameworks.
[0021] Preferably, the robot operating system further comprises: a conversion module in any one of the robot cross-platform development architectures.
[0022] Compared with the prior art, the at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects:
[0023] Through module conversion, the present application encapsulates the task module set in the first robot operating system and adapts it to the general task interface of the second robot operating system, thereby achieving seamless integration and operation across platforms, thereby achieving consistent operation of the same set of algorithm codes on different robot operating system platforms, avoiding repetitive development for different operating systems, saving development time and resources, and at the same time enhancing the versatility and portability of the module, improving the compatibility and scalability between different operating system platforms, and providing flexibility and efficiency for the development of robotics technology.
[0024] In addition, the module development and design of this application follows a set of standardized API design rules, which provides a standardized interface for the application of modules on other platforms, promotes the development and standardization of the core content of the module, significantly improves development efficiency and code reusability, ensures real-time and consistency across different operating system platforms, enhances the flexibility, scalability and ease of maintenance of the system, and effectively reduces maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0026] Figure 1 This is a schematic diagram of the cross-platform development architecture of the robot in this application;
[0027] Figure 2 It is a series of standardized API component diagrams exported by the task module in this application;
[0028] Figure 3 It is a schematic diagram of the internal logic implementation of the task module in this application;
[0029] Figure 4 is a schematic diagram of the relationship between the task module and the module converter in this application;
[0030] Figure 5 is a schematic diagram of the relationship between the new module in this application and the general task interface module;
[0031] Figure 6 It is a correspondence diagram between the first API layer of the conversion module in this application and the second API layer of the general task interface;
[0032] Figure 7 This is the task module architecture diagram in this application. DETAILED DESCRIPTION
[0033] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0034] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0035] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present application, it should be understood by those skilled in the art that an aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number and aspect described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0036] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0037] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the examples can be practiced without these specific details.
[0038] The core controller of the mobile robot is based on industrial control computer hardware, on which a robot-specific operating system is installed. These operating systems support the operation of key algorithms such as control, perception and decision-making, thereby ensuring the precise operation and function realization of the robot.
[0039] At present, there are many different types of robot operating systems in the industry, such as the Robot Operating System (ROS) developed by Google in the United States. However, due to the particularity of the operating system, even if the robot executes the same task algorithm (such as motion movements, sensor algorithms, etc.), it cannot be directly run on different robot operating systems. Therefore, the same task algorithm needs to be opened separately and repeatedly when applied to different robot operating system platforms, and cannot be directly applied across platforms. In other words, it is necessary to prioritize the cross-platform compatibility and interoperability between different robot operating systems.
[0040] For example, with the development of robot technology and the ecology of related fields, different companies will choose operating systems suitable for themselves according to the characteristics of their own products. Even within the same company, different operating systems are used for different product types and series to give full play to their respective advantages. For example, the ROS system is well-known for its large number of ecological users and open source attributes. It is currently the most widely used robot operating system. However, because different robot operating systems have their own characteristics, open personnel are required to develop robot application tasks for different operating system platforms, and repeatedly develop a large number of modules with the same functions, which increases the difficulty of development for developers, and makes subsequent maintenance and updates difficult, which also increases costs.
[0041] In view of this, we conducted an in-depth analysis of the robot operating system and explored improvements in cross-operating system applications, and found that the robot operating system can usually provide an API interface to facilitate developers to implement their own task designs based on the API. Therefore, if we can use the API interface provided by the robot operating system and make some improvements to the interface, it is possible to allow the same task algorithm software developed for the first operating system to run on two robot operating systems to complete the same task algorithm after API conversion, thereby eliminating the need for developers to repeatedly develop two sets of task algorithms for the two operating systems.
[0042] In the process of implementing the improvement ideas, we further discovered that: cross-platform operation for only two robot operating systems still has relatively large limitations, that is, once the robot operating system is changed, the API interface function of the operating system must be improved again, which will still increase repeated development work. Therefore, if the modular translator function can be added inside or outside the robot operating system, the same task algorithm can be quickly and flexibly adapted to run on different robot operating systems through modular conversion.
[0043] Based on this, the embodiment of this specification proposes a robot cross-platform development architecture, the overall idea is: Figure 1As shown in the figure, the algorithm software developed on the first robot operating system platform is still developed in the form of tasks. It only needs to form the tasks into a series of standardized APIs based on the task module, and then convert these standardized APIs into algorithm modules available on the second robot operating system platform. Among them, the conversion module can be used as a toolkit, that is, the "modular translator" in the figure, to convert the standardized API formed by the task module, such as standardizing the input and output interfaces, instruction call attributes, parameters, etc. of the code kernel in the task module, and encapsulating and converting them into interfaces and resource call modes available on the second robot operating system platform, realizing seamless integration and operation across platforms, thereby realizing the consistent operation of the same set of algorithm codes on different robot operating system platforms, avoiding repetitive development for different operating systems, saving development time and resources, and enhancing the versatility and portability of the module, providing flexibility and efficiency for the development of robotics technology.
[0044] The technical solutions provided by various embodiments of the present application are described below in conjunction with the accompanying drawings.
[0045] like Figure 1 and Figure 2 As shown, an embodiment of the present specification provides a robot cross-platform development architecture, which is applied to a first robot operating system side, and the robot cross-platform development architecture includes: a task module set in the first robot operating system; wherein the task module includes a series of standardized API components, and the series of standardized API components are used to export the algorithm software designed by the user into a corresponding number of standardized APIs according to the core functions of the task module, wherein each of the standardized APIs is used to be correspondingly embedded in the corresponding functional layer in the conversion module, so as to be encapsulated into API data that can be used by the general task interface in the second robot operating system through the conversion module.
[0046] Specifically, see Figure 1 , taking the first robot operating system platform and the second robot operating system platform (such as SAGE-OS and ROS, two different robot operating systems) as examples:
[0047] The algorithm software developed on the first robot operating system platform is developed in the form of a task module (task modular). This module is converted into an algorithm module that can be used on the second robot operating system platform through a module conversion toolkit (hereinafter referred to as module conversion). The module conversion toolkit is the "modular translator" in the figure. The module conversion converts the task module, that is, the input and output interfaces, instruction call attributes, parameters, etc. of the code kernel in the task module are standardized and encapsulated and converted into interfaces and resource call modes that can be used on other operating system platforms; the new module generated is the "New modular".
[0048] Figure 1 In the present invention, the CM API on the second robot operating system platform is a general task interface developed based on the platform, which is used to implement the interface with any other third-party operating system platform algorithm module.
[0049] The universal task interface is connected with the generated "new module" to complete the data interaction, instruction calling, task execution and other functions of the new module on the second robot operating system platform.
[0050] Ultimately, the task module (one set of source code) developed on the first robot operating system platform can be applied on the second robot operating system platform, avoiding repeated development on two operating system platforms.
[0051] On the contrary, the task module developed on the second robot operating system platform can be applied on the first robot operating system platform after conversion by the corresponding "modulartranslator".
[0052] like Figure 2 As shown, when developing a task module or an algorithm module on the first robot operating system platform, the task module or the algorithm module exports a Lite-SDK plug-in, which is composed of a series of standardized API components. Each standardized API in the task modular module is embedded in the corresponding functional layers in the modular translator to achieve adaptive encapsulation of the task modular kernel functions and APIs, ensuring that these APIs can be effectively used in the general task interface of the second operating system, thereby achieving cross-platform compatibility and functionality.
[0053] In one embodiment, the task module also includes a logic judgment unit and a register unit, wherein the logic judgment unit is used to judge the type of API currently being called before the series of standardized API components export the standardized API, and put the called API into the register unit so that the kernel can perform internal matching from the API stored in the register and then execute the corresponding API content call.
[0054] Specifically, the design of the task module includes two key components: the logic judgment unit and the register unit. The function of the logic judgment unit is to identify and judge the type of API that needs to be called before a series of standardized API components are exported. Once the API type is identified, the logic judgment unit stores the information of the API in the register unit. Subsequently, the kernel of the task module reads the stored API information from the register unit and performs internal matching to determine and execute the corresponding API content call, thereby ensuring that the module kernel can respond to external requests efficiently and accurately and perform corresponding operations.
[0055] In one embodiment, the task module also includes a numbering unit, which is used to number each API to be exported so as to mark the priority level of the API by the number. The priority level is divided into a high priority level and a low priority level. The high priority level is used to mark API calls that are sensitive to real-time and have high real-time requirements, and the low priority level is used to mark API calls that do not have high real-time requirements. After the logic judgment unit determines the API type, the number corresponding to the API is placed in the register unit so that the kernel can perform internal matching through the number in the register.
[0056] Specifically, Figure 3 As shown, when the code of the task module or algorithm module runs, it is executed based on the data and functional logic framework provided by these APIs. Each task module or algorithm module (hereinafter referred to as module) has a task "kernel" inside, and the task kernel exports a series of standardized API interfaces. Inside the module, each exported API is numbered and divided into two groups: high priority and low priority; as the name implies, high-priority API has the right to be executed first, and is suitable for API calls that are sensitive to real-time and have high real-time requirements. Low-priority API is suitable for calls that do not require high real-time performance. After determining the API type, the logic judgment unit puts the number corresponding to the API into the register unit so that the kernel can perform internal matching through the number in the register.
[0057] In one embodiment, the register unit includes a first register group and a second register group, wherein the first register group is used to store the number of a high priority API, and the second register group is used to store the number of a low priority API, and when the first register group stores the number of the high priority API, the first register group triggers the kernel to perform internal matching processing in an interrupt manner, and after the second register group stores the number of the low priority API, the kernel performs internal matching processing in a query manner.
[0058] Specifically, in the design of the task module, the register unit includes a first register group and a second register group. When the task module receives an external call from the outside or interacts with the outside, the API number judgment logic unit in the module kernel judges the type of API currently being called, and generates a corresponding number, and puts the number into the first register group or the second register group.
[0059] The kernel performs internal matching based on the API number stored in the register, and then executes the corresponding API content call. APIs with high priority numbers will be called first, similar to the interrupt mechanism. APIs with low priority numbers will be queried, and when a certain API number is matched, the kernel will execute the corresponding call.
[0060] The implementation mechanism of the task module or algorithm module in the above embodiment has the following advantages:
[0061] 1. The real-time properties of the module are reflected
[0062] Because mobile robots are used in industrial sites, they need to achieve a high degree of consistency with the production rhythm of the production line. Under normal circumstances, higher requirements are placed on the real-time performance of the robot. The real-time performance of internal software and algorithms is the basic guarantee for achieving the real-time performance of the entire robot. Therefore, from the perspective of the underlying logic and kernel operation mechanism of the task module or algorithm module, the above mechanism realizes the embodiment of the real-time properties of the module; it abandons the traditional module development process, which either develops a module as a real-time module or a non-real-time module according to the needs. The above mechanism realizes the unification of real-time and non-real-time performance within the same module.
[0063] 2. The module implements a standardized API logic architecture, which is more conducive to the core content development and standardized development of the module.
[0064] The core mechanism of the module in the above-mentioned embodiment solidifies the API logical architecture of the module and is applicable to modular development of any task type or algorithm type. Developers only focus their development efforts on the core development of the module content, and no longer pay attention to how to develop the API interface and logical implementation of a certain module. This is more conducive to standardized development work and improves the development efficiency and output of developers.
[0065] 3. Provides a standardized interface for the application of modules on other platforms
[0066] The API logic of the module in the above embodiment provides a unified, standard external interface and internal implementation mechanism for the module. According to different requirements of the external platform, it is easier to implement data interaction with the external platform based on the API, which is a standardized API interface.
[0067] In one embodiment, the plurality of standardized APIs include at least one or more of the following APIs: a data transmission API, a page jump API, a permission control API, and a calling channel API.
[0068] Specifically, Figure 2 As shown, when developing a task module or an algorithm module on the first robot operating system platform, the task module or the algorithm module exports a Lite-SDK plug-in, which is composed of a series of standardized API components, including at least one or more of the following APIs: data transmission API, page jump API, permission control API, call channel API, etc. The role of this series of standard APIs is to provide an interface and bridge with the outside according to the needs of the task module for running data, function calls, control logic, etc., so that the module can be more easily adapted and run on different operating system platforms after conversion by the module converter.
[0069] In one embodiment, the first robot operating system comprises a SAGE-OS robot operating system.
[0070] An embodiment of the present specification also provides a robot cross-platform development architecture, which includes: a conversion module, wherein the conversion module includes a plurality of first functional layers and a first API layer, each of the first functional layers is used to embed a corresponding standardized API to encapsulate the standardized API, wherein the standardized API is an API exported by a task module of a first robot operating system based on a kernel function from an algorithm software designed by a user; and, the first API layer is used to dock each of the encapsulated standardized APIs with a general task interface, wherein the general task interface is located in a second robot operating system, and a second API layer for docking is provided, and the second API layer is provided corresponding to the first API layer.
[0071] Specifically, Figure 4 As shown, the robot cross-platform development architecture includes: a conversion module responsible for converting a task module developed on a first robot operating system into a module that can be run on a second robot operating system.
[0072] In implementation, the first functional layer of each conversion module is responsible for embedding and encapsulating the standardized APIs in the task module of the first robot operating system. These standardized APIs are derived based on the kernel functions of the task module and represent the interface of the algorithm software designed by the user. The encapsulated standardized APIs are further connected to the general task interface in the second robot operating system through the first API layer.
[0073] The general task interface has a second API layer, which corresponds to the first API layer, ensuring compatibility and functionality in the second operating system. Through this hierarchical and modular encapsulation and docking mechanism, the conversion module enables the task module originally designed for the first operating system to run seamlessly on the second operating system, realizing cross-platform code reuse and functional adaptation, thereby improving development efficiency, avoiding repetitive development for different operating systems, saving development time and resources, and enhancing the versatility and portability of the module.
[0074] Therefore, the modular translator is essentially an intermediate tool, which can convert the task module developed on one platform into a task module that can be applied on other platforms. In layman's terms, it is a "packaging" tool that "puts" a shell on the original module, through which other platforms can interact with the module.
[0075] In one embodiment, the first API layer interacts with the general task interface via a data stack.
[0076] Specifically, the first API layer defines multiple data stacks, which are responsible for processing data from task modules and communicating with the general task interface according to established protocols and formats.
[0077] When the task module needs to exchange data or request services with the second operating system, the relevant data is first sent to the data stack of the first API layer. The data stack processes the data according to preset rules and protocols, such as data packaging, encryption, protocol conversion, etc., to ensure that the data can be correctly understood by the target operating system. The processed data is then sent to the general task interface through the API layer.
[0078] In the second API layer of the general task interface, the received data is parsed, decrypted, converted, etc. to ensure that the data can be correctly executed in the second operating system. The interactive method of the data stack not only ensures the security and accuracy of data transmission, but also improves the efficiency of data exchange, and realizes efficient communication between different operating system platforms and seamless integration of task modules.
[0079] In one embodiment, the first API layer includes one or more of the following data stacks for data interaction: a data channel stack, an interaction protocol stack, a network protocol stack, and a hardware abstraction stack.
[0080] Specifically, Figure 6 As shown, the first API layer includes one or more of the following data stacks for data interaction: data channel stack, interaction protocol stack, network protocol stack, and hardware abstraction stack.
[0081] Correspondingly, the second API layer of the general task interface also includes one or more data stacks for data interaction, and corresponds to those in the first API layer.
[0082] In one embodiment, the plurality of first functional layers include:
[0083] Platform abstraction layer: used to abstractly describe the hardware platform where the second robot operating system is located;
[0084] Network layer: a network protocol stack used to describe data exchange;
[0085] Protocol layer: used to describe the interactive network protocol related to the second robot operating system;
[0086] Service layer: used as a data channel;
[0087] Among them, each first functional layer is used to be correspondingly embedded in the corresponding standardized API to achieve the adaptive encapsulation of the core functions of the task module and the API, so that each standardized API is expressed as data of the corresponding functional layer based on data interaction.
[0088] Specifically, Figure 4 It shows the relationship between task modular and modular translator: the task module's series of APIs are the interface and bridge with external function information blocks.
[0089] In modular translator, the overall architecture is designed as four first-level functional layers and one API layer. The four first-level functional layers are:
[0090] Platform abstraction layer: It is an abstraction layer related to the hardware platform where the platform-related operating system to be converted is located;
[0091] Network layer: network protocol stack;
[0092] Protocol layer: interactive network protocol related to the platform to be converted;
[0093] Service layer: data channel, instruction call, etc.;
[0094] The API layer is the API that interfaces with the platform operating system to be converted;
[0095] Each API in the task modular module is embedded into the corresponding functional layers in the modular translator to achieve adaptive encapsulation of the task modular core functions and APIs. Finally, the modular translator provides an interface for the converted operating system platform in the form of an API layer, so that the original task module can interact and communicate with the new operating system platform.
[0096] In essence, module conversion (task modular) converts the control API in the task module into a module based on the data interaction network layer architecture, and prepares the corresponding API layer to interface with different operating system platforms, ensuring that the task module API can maintain its functionality and performance in the new operating system environment, achieving cross-platform compatibility and portability.
[0097] In one embodiment, the conversion module also includes a clock management unit and a register management unit. The clock management unit is used to unify the clock pace of the docking between the first API layer and the general task interface, and the register management unit is used to complete the bidirectional transmission of the docking between the first API layer and the general task interface under the control of the clock management unit.
[0098] Specifically, the clock management unit synchronizes the clock steps between the first API layer and the general task interface to ensure that both parties maintain a consistent time base during data interaction, thereby avoiding data synchronization problems caused by clock inconsistency. Under the unified scheduling of the clock management unit, the register management unit is responsible for executing the bidirectional data transmission task between the first API layer and the general task interface, and through the read and write operations of the register, it realizes the rapid access and transmission of data, ensuring the real-time and accuracy of data interaction, thereby ensuring the compatibility between different operating system platforms and the stability of data interaction.
[0099] In the common task interface (CM API), the execution layers of the operating system where the platform is located perform the work of fetching and placing data packets from each "stack" of the CM API according to the specified protocol, and the new module calls the resources of the new platform through the "stack"-"stack" content interaction on both sides.
[0100] The reading or writing of the "stacks" on both sides completes the corresponding bidirectional transmission under the unified clock pace, ultimately achieving the purpose of data interaction.
[0101] The "stack" and "stack" read and write operations under this "in-step" rule ensure the real-time and accuracy of data interaction, while improving the efficiency of data interaction.
[0102] The embodiments of this specification also provide a robot cross-platform development architecture, which is applied to a second robot operating system. The robot cross-platform development architecture includes: a general task interface set in the second robot operating system, wherein the general task interface includes a second API layer and several second functional layers; the second API layer is set corresponding to the first API layer of the conversion module, and is used to obtain the corresponding description data content from the corresponding first API layer; the several second functional layers are used to form the description data content into an application interface and function implementation corresponding to the kernel in the second robot operating system.
[0103] Specifically, Figure 5 As shown, the general task interface set in the second robot operating system includes a second API layer and a plurality of second function layers;
[0104] The second API layer corresponds to the first API layer in the conversion module, and receives and obtains the corresponding description data content from the first API layer. These data contents are encapsulated by the conversion module and contain all the information and instructions required by the task module, thereby achieving cross-platform.
[0105] In one embodiment, the plurality of second functional layers include:
[0106] Operating system time management layer: used to obtain the time data of the current operating system and to manage the time data corresponding to the first API layer in the conversion module;
[0107] Operating system application data layer: used to interact with the application data corresponding to the first API layer in the conversion module during runtime;
[0108] Operating system thread management layer: used for thread management functions when executing and calling corresponding to the first API layer in the conversion module;
[0109] Operating system abstraction layer: used to register the functions of the operating system layer into the corresponding first API layer of the conversion module, so that the corresponding first API layer of the conversion module can access the second robot operating system and the kernel resources of the second robot operating system;
[0110] Platform hardware abstraction layer: used to adapt the corresponding first API layer of the conversion module to the hardware platform of the second robot operating system.
[0111] Specifically, Figure 5As shown, the new module generated by converting the task module through module conversion realizes operation on the operating system platform through a unified API layer and a CM (Common Mode) API interface of the new operating system platform.
[0112] The CM API layer of the operating system includes several second functional layers, such as the operating system time management layer, which is used to obtain the time data of the current system and interface with the new module; the operating system application data layer, which implements the interaction with the application data of the new module when it is running; the operating system thread management layer, which implements the thread management function when executing and calling the new module; the operating system abstraction layer, which implements the registration of the operating system layer function to the new module, so that the new module can access the resources of the operating system and the operating system kernel through this layer. The platform hardware abstraction layer realizes the adaptability of the new module to the hardware platform of the new operating system.
[0113] Therefore, CM API is actually an interface module layer developed based on the new platform, which is specifically used to connect new modules and realize the adaptive application interface and function implementation of the new modules on the operating system platform.
[0114] In one embodiment, the common task interface (CM API) can interface with any number of "new modulars"; that is, all modules developed on other platforms that are converted into new modules through the modular translator need to interface with the CM API. It can be said that the CM API is the entry point for modules converted from other platforms to run on this platform. Modules developed on this platform do not need to go through the CM API.
[0115] In one embodiment, the general task interface further includes a general clock management unit for calling tasks of all modules and performing clock management control in a queued clock management manner;
[0116] And / or, the general task interface also includes a dedicated clock management unit, which is used to use a dedicated clock management method to perform clock management and control for module calling tasks with high priority requirements, high real-time requirements, or large data flow data interaction volume, and a queued clock management method to perform clock management and control for module calling tasks with low priority and low data flow data interaction volume.
[0117] Specifically, Figure 7 As shown in the figure, within the CM API framework, each clock management and register management has its own independent "stack" (array) to improve the operating efficiency of each module application. In this case, the overall efficiency is the highest (parallel mode), but it occupies more platform resources.
[0118] It is also possible for two or more modules to share a "stack". The clock management of these two or more modules will be configured as a sequential clock mode, or a "queue" clock mode, to complete data interaction in sequence. This saves platform resources, but the overall efficiency is reduced, and is suitable for module calls that do not require high real-time performance.
[0119] You can also dynamically configure the module call priority. For module calls with higher priority requirements, higher real-time requirements, or large data flow data interaction, use a separate or exclusive clock management method. For module calls with lower priority and lower data flow data interaction, use a queued clock management mode. For platforms with abundant resources, separate or exclusive clock management methods can be used more often.
[0120] For platforms with limited resources, a queue-based clock management approach can be used.
[0121] It should be noted that the dynamic configuration mechanism facilitates system expansion, allowing the system to flexibly adjust the clock management mode according to the current operating status and task requirements to adapt to different operating conditions and environmental changes; new modules can be flexibly integrated into the existing clock management framework according to their characteristics and requirements.
[0122] In one embodiment, different clock management is used for different task modules, such as Figure 7 As shown, it is marked as "clock management 1". For the CM API, there may be multiple clock managements, namely clock management 2, clock management 3, etc. Each clock management corresponds to a module converted from an external platform.
[0123] The same goes for register management.
[0124] In one embodiment, the second robot operating system includes a ROS robot operating system.
[0125] The embodiments of this specification also provide a robot cross-platform development architecture, including: a task module, a conversion module and a general task interface;
[0126] The task module is arranged in the first robot operating system, and includes a series of standardized API components, wherein the series of standardized API components are used to export the algorithm software designed by the user into a corresponding number of standardized APIs according to the core functions of the task module, wherein each of the standardized APIs is used to be correspondingly embedded into a corresponding functional layer in the conversion module;
[0127] The conversion module includes a plurality of first function layers and a first API layer, wherein the plurality of first function layers are used to embed the corresponding standardized APIs to encapsulate the kernel functions of the task module and the standardized APIs, and the first API layer is used to connect the encapsulated standardized APIs with the corresponding second API layer in the general task interface;
[0128] The general task interface is set in the second robot operating system, including a second API layer and several second functional layers, wherein the second API layer is set corresponding to the first API layer, and is used to obtain corresponding data content from the encapsulated standardized API, and the several second functional layers are used to form the data content into corresponding application interfaces and function implementations in the second robot operating system.
[0129] Specifically, the robot cross-platform development architecture includes: task module, conversion module and general task interface.
[0130] The task module is developed in the first robot operating system and contains a series of standardized API components. These components export the user-designed algorithm software as standardized APIs based on the core functions of the task module. Each standardized API is embedded in the corresponding functional layer in the conversion module to achieve encapsulation of core functions and APIs.
[0131] The conversion module consists of several first functional layers and a first API layer. The first functional layer is responsible for embedding and encapsulating the standardized API of the task module, and the first API layer is responsible for connecting these encapsulated APIs with the second API layer in the general task interface.
[0132] The general task interface is located in the second robot operating system, including a second API layer and several second functional layers. The second API layer is set corresponding to the first API layer, receives the data content of the standardized API from the first API layer, and the second functional layer uses this data content to build corresponding application interfaces and function implementations in the second operating system.
[0133] Through the above architecture, the developed task modules can be encapsulated and adapted through conversion modules, and seamlessly integrated and run on the second robot operating system. This not only improves the versatility and portability of the modules, but also avoids repeated development of the same functions on different operating systems, saving development time and resources, and enhancing the compatibility and scalability between different operating system platforms.
[0134] Based on the same inventive concept, the present application also provides a robot cross-platform development method corresponding to the aforementioned software architecture example, including:
[0135] Acquire algorithm software designed by a user, wherein the algorithm software is algorithm software for realizing robot motion control based on a first robot operating system;
[0136] By using any one of the robot cross-platform development frameworks applied to the first robot operating system side, the algorithm software is exported to the corresponding first data;
[0137] Using a conversion module in the robot cross-platform development framework, convert the first data into corresponding second data;
[0138] The second data is imported into the general task interface in any one of the robot cross-platform development frameworks, so that the algorithm software runs in the second robot operating system.
[0139] It should be noted that the aforementioned robot cross-platform development architecture implementation example can be used to divide and implement the functions of each module in the robot cross-platform development method, which will not be elaborated here.
[0140] Based on the same inventive concept, the present application also provides a robot operating system, including: a task module in the robot cross-platform development architecture, or a general task interface in the robot cross-platform development architecture.
[0141] Preferably, the robot operating system further includes: a conversion module in the robot cross-platform development architecture.
[0142] The present application proposes a cross-platform development architecture, including a modular development approach, a series of API implementation logic within the module, a conversion tool for converting the module to other platforms, and a common interface definition framework for the new module generated after conversion on other platforms.
[0143] In this specification, the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments described later, the description is relatively simple, and the relevant parts can be referred to the partial description of the previous embodiments.
[0144] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A device for a robot cross-platform development architecture, It is characterized in that Applied to the first robot operating system, the device of the robot cross-platform development architecture includes: a task module set in the first robot operating system; wherein the task module includes a series of standardized API components, and the series of standardized API components are used to export the algorithm software designed by the user into a corresponding number of standardized APIs according to the core functions of the task module, wherein each of the standardized APIs is used to be correspondingly embedded in the corresponding first functional layer in the conversion module, so as to realize the adaptive encapsulation of the core functions of the task module and the API, so that each of the standardized APIs is expressed as data of the corresponding functional layer based on data interaction, so as to be encapsulated into API data that can be used by the general task interface in the second robot operating system through the conversion module; The general task interface in the second robot operating system includes a second API layer and a plurality of second function layers; the second API layer is set corresponding to the first API layer of the conversion module, and is used to obtain the corresponding description data content from the corresponding first API layer; the plurality of second function layers are used to form the description data content into an application interface and function implementation corresponding to the kernel in the second robot operating system; The first functional layer comprises: Platform abstraction layer: used to abstractly describe the hardware platform where the second robot operating system is located; Network layer: a network protocol stack used to describe data exchange; Protocol layer: used to describe the interactive network protocol related to the second robot operating system; Service layer: used as a data channel.
2. The device for the robot cross-platform development framework according to claim 1, It is characterized in that The task module also includes a logic judgment unit and a register unit, wherein the logic judgment unit is used to judge the type of API currently being called before the series of standardized API components export the standardized API, and put the called API into the register unit so that the kernel can perform internal matching from the API stored in the register and then execute the corresponding API content call.
3. The device for the robot cross-platform development framework according to claim 2, It is characterized in that The task module also includes a numbering unit, which is used to number each API to be exported so as to mark the priority level of the API by the number. The priority levels are divided into high priority and low priority. The high priority level is used to mark API calls that are sensitive to real-time and have high real-time requirements, and the low priority level is used to mark API calls that do not have high real-time requirements. After determining the API type, the logic judgment unit puts the number corresponding to the API into the register unit so that the kernel can perform internal matching through the number in the register.
4. The device for the robot cross-platform development framework according to claim 3, It is characterized in that The register unit includes a first register group and a second register group, wherein the first register group is used to store the number of a high-priority API, and the second register group is used to store the number of a low-priority API. When the first register group stores the number of the high-priority API, it triggers the kernel to perform internal matching processing in an interrupt manner. After the second register group stores the number of the low-priority API, the kernel performs internal matching processing in a query manner.
5. The device for the robot cross-platform development framework according to claim 1, It is characterized in that The several standardized APIs include at least one or more of the following APIs: data transmission API, page jump API, permission control API, and calling channel API.
6. A device for a robot cross-platform development framework according to any one of claims 1 to 5, It is characterized in that The first robot operating system includes the SAGE-OS robot operating system.
7. A device for a robot cross-platform development architecture, It is characterized in that The device of the robot cross-platform development architecture includes: a conversion module, wherein the conversion module includes a plurality of first functional layers and a first API layer, each of the first functional layers is used to embed a corresponding standardized API to encapsulate the standardized API, so that each of the standardized APIs is expressed as data of a corresponding functional layer based on data interaction, wherein the standardized API is an API exported by a task module of a first robot operating system from an algorithm software designed by a user according to a kernel function; and, the first API layer is used to dock each of the encapsulated standardized APIs with a general task interface, wherein the general task interface is located in a second robot operating system, and is provided with a second API layer for docking, and the second API layer is correspondingly arranged with the first API layer to obtain corresponding description data content from the corresponding first API layer; The plurality of first functional layers include: Platform abstraction layer: used to abstractly describe the hardware platform where the second robot operating system is located; Network layer: a network protocol stack used to describe data exchange; Protocol layer: used to describe the interactive network protocol related to the second robot operating system; Service layer: used as a data channel; The general task interface in the second robot operating system also includes a plurality of second functional layers; the plurality of second functional layers are used to transform the description data content into an application interface and function implementation corresponding to the kernel in the second robot operating system.
8. The device for the robot cross-platform development framework according to claim 7, It is characterized in that The first API layer interacts with the general task interface through a data stack.
9. The device for the robot cross-platform development framework according to claim 8, It is characterized in that The first API layer includes one or more of the following data stacks for data interaction: data channel stack, interaction protocol stack, network protocol stack, hardware abstraction stack.
10. The device of the robot cross-platform development framework according to any one of claims 7 to 9, It is characterized in that The conversion module also includes a clock management unit and a register management unit. The clock management unit is used to unify the clock pace of the docking between the first API layer and the general task interface. The register management unit is used to complete the bidirectional transmission between the first API layer and the general task interface under the control of the clock management unit.
11. A device for a robot cross-platform development architecture, It is characterized in that Applied to the second robot operating system, the robot cross-platform development architecture includes: a general task interface set in the second robot operating system, wherein the general task interface includes a second API layer and a plurality of second function layers; the second API layer is set corresponding to the first API layer of the conversion module, and is used to obtain the corresponding description data content from the corresponding first API layer; the plurality of second function layers are used to form the description data content into an application interface and function implementation corresponding to the kernel in the second robot operating system; The conversion module further includes a plurality of first functional layers, each of which is used to embed a corresponding standardized API to encapsulate the standardized API, so that each standardized API is expressed as data of a corresponding functional layer based on data interaction, wherein the standardized API is an API derived by the task module of the first robot operating system from the algorithm software designed by the user according to the kernel function; and the first API layer is used to connect each of the encapsulated standardized APIs with the general task interface; The plurality of first functional layers include: Platform abstraction layer: used to abstractly describe the hardware platform where the second robot operating system is located; Network layer: a network protocol stack used to describe data exchange; Protocol layer: used to describe the interactive network protocol related to the second robot operating system; Service layer: used as a data channel.
12. The device of the robot cross-platform development framework according to claim 11, It is characterized in that The plurality of second functional layers include: Operating system time management layer: used to obtain the time data of the current operating system and to manage the time data corresponding to the first API layer in the conversion module; Operating system application data layer: used to interact with the application data corresponding to the first API layer in the conversion module during runtime; Operating system thread management layer: used for thread management functions when executing and calling corresponding to the first API layer in the conversion module; Operating system abstraction layer: used to register the functions of the operating system layer into the corresponding first API layer of the conversion module, so that the corresponding first API layer of the conversion module can access the second robot operating system and the kernel resources of the second robot operating system; Platform hardware abstraction layer: used to adapt the corresponding first API layer of the conversion module to the hardware platform of the second robot operating system.
13. The device for the robot cross-platform development framework according to claim 11, It is characterized in that The general task interface also includes a general clock management unit, which is used to call tasks for all modules and use a queued clock management method to perform clock management control; And / or, the general task interface also includes a dedicated clock management unit, which is used to use a dedicated clock management method to perform clock management and control for module calling tasks with high priority requirements, high real-time requirements, or large data flow data interaction volume, and a queued clock management method to perform clock management and control for module calling tasks with low priority and low data flow data interaction volume.
14. The device for the robot cross-platform development framework according to any one of claims 11 to 13, It is characterized in that The second robot operating system includes a ROS robot operating system.
15. A device for a robot cross-platform development architecture, It is characterized in that include: Task modules, conversion modules and general task interfaces; The task module is arranged in the first robot operating system, and includes a series of standardized API components, wherein the series of standardized API components are used to export the algorithm software designed by the user into a corresponding number of standardized APIs according to the core functions of the task module, wherein each of the standardized APIs is used to be correspondingly embedded into a corresponding functional layer in the conversion module; The conversion module includes a plurality of first function layers and a first API layer, wherein the plurality of first function layers are used to embed the corresponding standardized APIs to encapsulate the kernel functions of the task module and the standardized APIs, so that each of the standardized APIs is expressed as data of the corresponding function layer based on data interaction, and the first API layer is used to connect each of the encapsulated standardized APIs with the corresponding second API layer in the general task interface; The plurality of first functional layers include: Platform abstraction layer: used to abstractly describe the hardware platform where the second robot operating system is located; Network layer: a network protocol stack used to describe data exchange; Protocol layer: used to describe the interactive network protocol related to the second robot operating system; Service layer: used as a data channel; The general task interface is set in the second robot operating system, including a second API layer and several second functional layers, wherein the second API layer is set corresponding to the first API layer, and is used to obtain corresponding data content from the encapsulated standardized API, and the several second functional layers are used to form the data content into corresponding application interfaces and function implementations in the second robot operating system.
16. A robot cross-platform development method, It is characterized in that include: Acquire algorithm software designed by a user, wherein the algorithm software is algorithm software for realizing robot motion control based on a first robot operating system; By means of the device of the robot cross-platform development architecture as claimed in any one of claims 1 to 6, the algorithm software is exported with corresponding first data; Using the device of the robot cross-platform development architecture as described in any one of claims 7 to 10, converting the first data into corresponding second data; The second data is imported into the universal task interface in the device of the robot cross-platform development architecture as described in any one of claims 11-14, so that the algorithm software runs in the second robot operating system.
17. A robot operating system, It is characterized in that include: A task module in a device of a robot cross-platform development framework as claimed in any one of claims 1-6, or a general task interface in a robot cross-platform development framework as claimed in any one of claims 11-14.
18. A robot operating system, It is characterized in that The robot operating system comprises: a task module in the device of the robot cross-platform development framework as claimed in any one of claims 1 to 6 and a conversion module in the robot cross-platform development framework as claimed in any one of claims 7 to 10; Alternatively, the robot operating system includes: a general task interface in the device of the robot cross-platform development framework as described in any one of claims 11-14 and a conversion module in the robot cross-platform development framework as described in any one of claims 7-10.
Citation Information
Patent Citations
Cross-platform transplanting method and device for graphic engine
CN107450897A
Graphical development platform based on ROS (Robot Operating System)
CN107678746A
Unified platform management method and device, equipment and medium
CN116880894A
Cabin algorithm application system and method, vehicle-mounted hardware platform and medium
CN118193157A
Cloud server and method for converting software image of robot in cloud server
US20240111548A1
