A method for setting dynamic parameters of an IROS system

CN116627480BActive Publication Date: 2026-09-25SHANDONG NEW GENERATION INFORMATION IND TECH RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310251407.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-16
Publication Date
2026-09-25
Estimated Expiration
2043-03-16

AI Technical Summary

Technical Problem

不过参数服务器存在无法在线动态更新的缺陷,如果Listener不主动查询参数值,就无法获知Talker是否已经修改了参数,这就导致IROS参数服务器有了很大局限

Benefits of technology

[0042]本专利提出了一种基于IROS系统动态参数设置的方法,以智能机器人操作系统IROS为依托,通过定义接口规范,创建插件描述信息描述文件,根据描述文件创建插件,并通过插件框架加载显示出来,最后通过界面操作更改参数的值,本发明使得参数的更改更加高效,方便;开发人员不用写一行代码,即可创建出想要的界面,完成参数的设置,降低了IROS动态参数设置的门槛。同时,本发明采用插件框架来管理插件,使得插件的扩展与升级都很方便。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116627480B_ABST
    Figure CN116627480B_ABST
Patent Text Reader

Abstract

The application discloses a method based on dynamic parameter setting of an IROS system, and relates to the field of intelligent robot development; a plug-in interface specification is defined, plug-in description information and plug-in interface information are defined, plug-in source code is generated according to a JSON file of the description information and the plug-in interface information, a makefile is created, a plug-in compiling script is generated, the plug-in is generated by calling the plug-in compiling script, the plug-in is copied to a corresponding plug-in framework directory, the plug-in is loaded through the plug-in framework, and the parameter setting of the IROS system is dynamically changed through the plug-in by using an interactive interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention discloses a method relating to the field of intelligent robot development, specifically a method for setting dynamic parameters based on the IROS system. Background Technology

[0002] ROS (Robot Operating System) is an open-source meta-operating system for robots. It provides the services expected of an operating system, including hardware abstraction, low-level device control, implementation of commonly used functions, inter-process message passing, and package management. It also provides the tools and library functions needed to acquire, compile, write, and run code across computers. ROS's primary goal is to support code reuse in robot research and development. IROS (Intelligent Robot Operating System) has similar functionality to ROS, replaces the open-source ROS kernel, provides ROS-compatible interfaces, solves issues related to ROS reliability, performance, and security, and adds new features, supporting cloud-based robot development, cloud-edge-device communication, and multi-robot collaboration.

[0003] IROS has a parameter server that provides global parameter storage and query services. However, the parameter server has a limitation: it cannot be dynamically updated online. If the Listener does not actively query the parameter values, it cannot know whether the Talker has modified the parameters. This significantly limits the IROS parameter server. Many scenarios require dynamic parameter updates, such as during debugging, especially in navigation and mapping applications where parameter values ​​in the program need frequent modification. Modifying command lines or writing executable files that permanently modify parameters are not feasible in these situations. Summary of the Invention

[0004] This invention addresses the problems of existing technologies by providing a method for dynamic parameter setting based on the IROS system. By dynamically changing parameters, development and debugging become simple and efficient. It can also be implemented through plugins, making the system easy to expand and maintain. By automatically generating plugins, the development efficiency of IROS applications is greatly improved.

[0005] The specific solution proposed in this invention is as follows:

[0006] This invention provides a method for dynamic parameter setting based on the IROS system. It defines a plugin interface specification, plugin description information, and plugin interface information. Based on a JSON file containing the description and interface information, it generates plugin source code, creates a Makefile, generates a plugin compilation script, and calls the compilation script to generate the plugin.

[0007] Copy the plugin to the corresponding plugin framework directory, load the plugin through the plugin framework, and use the plugin to dynamically change the parameter settings of the IROS system through the interactive interface.

[0008] Furthermore, the plugin description information in the method for setting dynamic parameters based on the IROS system includes: plugin name, package, installation path, path of generated source file and header file, path of Qt used, path of plugin interface file and path of plugin dependency library;

[0009] The plugin interface information includes: parameter name, parameter type, parameter default value, and parameter maximum and minimum value.

[0010] Furthermore, the method for setting dynamic parameters based on an IROS system, which involves generating plugin source code based on description information, creating a plugin compilation script, and calling the plugin compilation script to generate the plugin, includes:

[0011] Parse the JSON file containing plugin description and interface information to obtain the plugin description and interface information;

[0012] Generate plugin source code based on plugin description and interface information: Define export macros to generate plugin export files, and generate plugin description files, plugin header files, and source files.

[0013] Furthermore, the rules for generating source files in the method for dynamic parameter setting based on the IROS system include: parameter names are displayed using QLabel; parameter values ​​of string type are displayed using QLineEdit; parameter values ​​of integer type are displayed using QSlider, and default values ​​are displayed using QLineEdit; parameter values ​​of floating-point type are displayed using QSlider, and default values ​​are displayed using QLineEdit; parameter values ​​of boolean type are displayed using QCheckBox, and enumerated values ​​are displayed using QCombobox.

[0014] Furthermore, the process of generating the source file in the method for setting dynamic parameters of an IROS system includes:

[0015] S1: Create a Widget, and create a QGridLayout object grid.

[0016] S2: Determine if all plugin information has been read. If not, proceed to S3; otherwise, proceed to S9.

[0017] S3: Create a QLabel to display the parameter name, specifying the parent object as a Widget.

[0018] S4: Retrieve a plugin information entry, determine the plugin type, create the corresponding component according to the rules, specify the parent object as Widget, and fill in the plugin description information.

[0019] S5: Based on the component type, create the corresponding slot function, add code to the slot function to retrieve the component value, and update the corresponding plugin value.

[0020] S6: Associate components with slot functions.

[0021] S7: Create a QHBoxLayout object and add the components created by the current plugin to the horizontal layout object.

[0022] S8: Add the QHBoxLayout object to the grid, then return to S2.

[0023] S9: Create a QSubWindow and set the grid.

[0024] S10: Create and associate the corresponding function for the update button. In the response function, send a signal to publish the JSON data of the current plugin.

[0025] Furthermore, the creation of the makefile in the method for setting dynamic parameters based on the IROS system includes:

[0026] S1: Verify that the compilation tools required to generate the plugin exist, meet the version requirements, and are not missing dynamic link libraries. If any of these requirements are not met, an error message will be displayed; otherwise, proceed to S2.

[0027] S2: Generate the description information for the Makefile.

[0028] S3: Defines compiler command macros.

[0029] S4: Define the required header file paths.

[0030] S5: Define the paths and versions of the dependency libraries.

[0031] S6: Define the intermediate file name and path.

[0032] S7: Define the target file name and path.

[0033] S8: Command to generate intermediate compilation files.

[0034] S9: Command to generate the target file.

[0035] S10: Generates commands to clean up intermediate and target files.

[0036] S11: Generate installation commands.

[0037] Furthermore, the method for dynamic parameter setting based on the IROS system, which involves managing plugins through a plugin framework and dynamically changing the parameter settings of the IROS system through an interactive interface, includes: opening the plugin to be loaded through the interactive interface, verifying that the plugin information is correct, displaying the plugin interface, inputting the data to be changed, sending the changed data to the plugin framework, and calling the interface to update the parameter data after receiving the data through the plugin framework.

[0038] This invention also provides a device for dynamic parameter setting based on an IROS system, including a compilation module, a copying module, and an interaction module.

[0039] The compilation module defines the plugin interface specification, plugin description information, and plugin interface information. Based on the JSON file containing the description and interface information, it generates the plugin source code, creates a Makefile, generates the plugin compilation script, and calls the compilation script to generate the plugin.

[0040] The copy module copies the plugin to the corresponding plugin framework directory. The interaction module loads the plugin through the plugin framework and uses the plugin to dynamically change the parameter settings of the IROS system through the interactive interface.

[0041] The advantages of this invention are:

[0042] This patent proposes a method for dynamic parameter setting based on the IROS system. Relying on the IROS intelligent robot operating system, it defines interface specifications, creates plugin description files, creates plugins based on these files, loads and displays them through a plugin framework, and finally allows users to change parameter values ​​through the user interface. This invention makes parameter modification more efficient and convenient; developers can create the desired interface and complete parameter settings without writing a single line of code, lowering the barrier to entry for dynamic parameter setting in IROS. Furthermore, this invention uses a plugin framework to manage plugins, making plugin expansion and upgrades very convenient. Attached Figure Description

[0043] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation

[0044] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0045] This invention provides a method for dynamic parameter setting based on the IROS system. It defines a plugin interface specification, plugin description information, and plugin interface information. Based on a JSON file containing the description and interface information, it generates plugin source code, creates a Makefile, generates a plugin compilation script, and calls the compilation script to generate the plugin.

[0046] Copy the plugin to the corresponding plugin framework directory, load the plugin through the plugin framework, and use the plugin to dynamically change the parameter settings of the IROS system through the interactive interface.

[0047] Furthermore, the plugin description information in the method for setting dynamic parameters based on the IROS system includes: plugin name, package, installation path, path of generated source file and header file, path of Qt used, path of plugin interface file and path of plugin dependency library;

[0048] The plugin interface information includes: parameter name, parameter type, parameter default value, and parameter maximum and minimum value.

[0049] This invention is based on the communication function of IROS. Parameters can be changed using a mouse and keyboard, making development and debugging simple and efficient. It is implemented through plugins, making the system easy to expand and maintain. By automatically generating plugins, the development efficiency of IROS applications is greatly improved.

[0050] In specific applications, in some embodiments of the method of the present invention, plugins are automatically generated based on the technical solution of the present invention. The specific process is as follows:

[0051] (I) The process of generating plugins:

[0052] a) Define the plugin interface: Initialize the interface function, execute the command interface function, and close the plugin interface function according to the plugin interface definition.

[0053] b) Define plugin description information and plugin interface information: The plugin description information includes the plugin name, the package it belongs to, the installation path, the paths of the generated source files and header files, the path of the Qt used, the path of the plugin interface file, and the path of the plugin dependency library.

[0054] The plugin interface information includes: parameter name, parameter type, parameter default value, and parameter maximum and minimum value.

[0055] c) Parse the JSON file containing the plugin description and interface information. After parsing the JSON file, obtain the relevant information about the plugin and the interface component information.

[0056] d) Generate plugin source code, including: defining export macros to generate plugin export files; generating plugin description files, including the plugin name, version, description information, package, serial number, copyright, etc.; generating plugin header files, including creating plugin interface subclasses and overriding virtual functions, declaring child window member variables, declaring update slot functions, adding necessary header files, using the Q_PLUGIN_METADATA macro to bind the plugin ID and the description file used; generating source files, further specifying the rules for generating source files, including: parameter names are displayed using QLabel; parameter values ​​of string type are displayed using QLineEdit; parameter values ​​of integer type are displayed using QSlider, and default values ​​are displayed using QLineEdit; parameter values ​​of floating-point type are displayed using QSlider, and default values ​​are displayed using QLineEdit; parameter values ​​of boolean type are displayed using QCheckBox, and enumeration values ​​are displayed using QCombobox.

[0057] Furthermore, the process of generating the source file includes:

[0058] S1: Create a Widget, and create a QGridLayout object grid.

[0059] S2: Determine if all plugin information has been read. If not, proceed to S3; otherwise, proceed to S9.

[0060] S3: Create a QLabel to display the parameter name, specifying the parent object as a Widget.

[0061] S4: Retrieve a plugin information entry, determine the plugin type, create the corresponding component according to the rules, specify the parent object as Widget, and fill in the plugin description information.

[0062] S5: Based on the component type, create the corresponding slot function, add code to the slot function to retrieve the component value, and update the corresponding plugin value.

[0063] S6: Associate components with slot functions.

[0064] S7: Create a QHBoxLayout object and add the components created by the current plugin to the horizontal layout object.

[0065] S8: Add the QHBoxLayout object to the grid, then return to S2.

[0066] S9: Create a QSubWindow and set the grid.

[0067] S10: Create and associate the corresponding function for the update button. In the response function, send a signal to publish the JSON data of the current plugin.

[0068] e) Generate the Makefile: including:

[0069] S1: Verify that the compilation tools required to generate the plugin exist, meet the version requirements, and are not missing dynamic link libraries. If any of these requirements are not met, an error message will be displayed; otherwise, proceed to S2.

[0070] S2: Generate the description information for the Makefile.

[0071] S3: Defines compiler command macros.

[0072] S4: Define the required header file paths.

[0073] S5: Define the paths and versions of the dependency libraries.

[0074] S6: Define the intermediate file name and path.

[0075] S7: Define the target file name and path.

[0076] S8: Command to generate intermediate compilation files.

[0077] S9: Command to generate the target file.

[0078] S10: Generates commands to clean up intermediate and target files.

[0079] S11: Generate installation commands.

[0080] f) Create a compilation script and register the plugin information in the plugin management database.

[0081] (ii) Copy the plugin to the corresponding plugin framework directory, manage the plugin through the plugin framework, and dynamically change the parameter settings of the IROS system through the interactive interface, including: opening the plugin to be loaded through the interactive interface, verifying that the plugin information is correct, displaying the plugin interface, inputting the data to change the parameters, sending the changed data to the plugin framework, and calling the interface to update the parameter data after the plugin framework receives the data.

[0082] The method of this invention automatically generates plugin packages, loads plugins in the form of an interface, and modifies dynamic parameters through an interactive interface, which has good scalability. This method uses JSON to describe plugin information and automatically generates an interface library, making the setting of dynamic parameters in robot development simple, easy to use, and improving development efficiency.

[0083] This invention also provides a device for dynamic parameter setting based on an IROS system, including a compilation module, a copying module, and an interaction module.

[0084] The compilation module defines the plugin interface specification, plugin description information, and plugin interface information. Based on the JSON file containing the description and interface information, it generates the plugin source code, creates a Makefile, generates the plugin compilation script, and calls the compilation script to generate the plugin.

[0085] The copy module copies plugins to the corresponding plugin framework directory. The interaction module manages plugins through the plugin framework and dynamically changes the parameter settings of the IROS system through the interactive interface.

[0086] The information interaction and execution process between the modules in the above-mentioned device are based on the same concept as the method embodiment of the present invention, and the specific details can be found in the description of the method embodiment of the present invention, and will not be repeated here.

[0087] Similarly, this invention's device relies on the Intelligent Robot Operating System (IROS). By defining interface specifications, creating plugin description files, creating plugins based on these files, and loading and displaying them through a plugin framework, users can finally change parameter values ​​through the interface. This invention makes parameter modification more efficient and convenient; developers can create the desired interface and complete parameter settings without writing a single line of code, lowering the barrier to dynamic parameter setting in IROS. Furthermore, this invention uses a plugin framework to manage plugins, making plugin expansion and upgrades very convenient.

[0088] It should be noted that not all steps and modules in the above processes and device structures are mandatory; some steps or modules can be omitted as needed. The execution order of each step is not fixed and can be adjusted as required. The system structure described in the above embodiments can be a physical structure or a logical structure. That is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or they may be jointly implemented by certain components in multiple independent devices.

[0089] The above-described embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.

Claims

1. A method for setting dynamic parameters of an IROS system, characterized by defining... The plugin interface specification defines plugin description and interface information. Based on the JSON file containing the description and interface information, the plugin source code is generated. A Makefile is created, a plugin compilation script is generated, and the plugin is generated by calling the compilation script. Copy the plugin to the corresponding plugin framework directory, load the plugin through the plugin framework, and use the plugin to dynamically change the parameter settings of the IROS system through the interactive interface.

2. The method for setting dynamic parameters of an IROS system according to claim 1, characterized in that: The plugin description information includes: plugin name, package, installation path, generated source file and header file paths, Qt path used, plugin interface file path, and plugin dependency library path. The plugin interface information includes: parameter name, parameter type, parameter default value, and parameter maximum and minimum value.

3. A method for setting dynamic parameters of an IROS system according to claim 1 or 2, characterized in that: The process of generating plugin source code from a JSON file containing description and plugin interface information, creating a Makefile, generating a plugin compilation script, and calling the plugin compilation script to generate the plugin includes: Parse the JSON file containing plugin description and interface information to obtain the plugin description and interface information; Generate plugin source code based on plugin description and interface information: Define export macros to generate plugin export files, and generate plugin description files, plugin header files, and source files.

4. The method for setting dynamic parameters of an IROS system according to claim 3, characterized in that: The rules for generating source files include: parameter names are displayed using QLabel; parameter values ​​of string type are displayed using QLineEdit; parameter values ​​of integer type are displayed using QSlider, and default values ​​are displayed using QLineEdit; parameter values ​​of floating-point type are displayed using QSlider, and default values ​​are displayed using QLineEdit; parameter values ​​of boolean type are displayed using QCheckBox, and enumerated values ​​are displayed using QCombobox.

5. The method for setting dynamic parameters of an IROS system according to claim 4, characterized in that: The process of generating source files includes: S1: Create a Widget, and create a QGridLayout object grid. S2: Determine if all plugin information has been read. If not, proceed to S3; otherwise, proceed to S9. S3: Create a QLabel to display the parameter name, specifying the parent object as a Widget. S4: Retrieve a plugin information entry, determine the plugin type, create the corresponding component according to the rules, specify the parent object as Widget, and fill in the plugin description information. S5: Based on the component type, create the corresponding slot function, add code to the slot function to retrieve the component value, and update the corresponding plugin value. S6: Associate components with slot functions. S7: Create a QHBoxLayout object and add the components created by the current plugin to the horizontal layout object. S8: Add the QHBoxLayout object to the grid, then return to S2. S9: Create a QSubWindow and set the grid. S10: Create and associate the corresponding function for the update button. In the response function, send a signal to publish the JSON data of the current plugin.

6. The method for setting dynamic parameters of an IROS system according to claim 4, characterized in that: The creation of the makefile includes: S1: Verify that the compilation tools required to generate the plugin exist, meet the version requirements, and are not missing dynamic link libraries. If any of these requirements are not met, an error message will be displayed; otherwise, proceed to S2. S2: Generate the description information for the Makefile. S3: Defines compiler command macros. S4: Define the required header file paths. S5: Define the paths and versions of the dependency libraries. S6: Define the intermediate file name and path. S7: Define the target file name and path. S8: Command to generate intermediate compilation files. S9: Command to generate the target file. S10: Generates commands to clean up intermediate and target files. S11: Generate installation commands.

7. The method for setting dynamic parameters of an IROS system according to claim 1, characterized in that: The process of loading plugins through a plugin framework and dynamically changing the parameter settings of the IROS system through an interactive interface includes: opening the plugin to be loaded through the interactive interface, verifying that the plugin information is correct, displaying the plugin interface, inputting the data to be changed, sending the changed data to the plugin framework, and calling the interface to update the parameter data after receiving the data through the plugin framework.

8. A device for setting dynamic parameters based on an IROS system, characterized in that: This includes the compilation module, the copy module, and the interactive module. The compilation module defines the plugin interface specification, plugin description information, and plugin interface information. Based on the JSON file containing the description and interface information, it generates the plugin source code, creates a Makefile, generates the plugin compilation script, and calls the compilation script to generate the plugin. The copy module copies the plugin to the corresponding plugin framework directory. The interaction module loads the plugin through the plugin framework and uses the plugin to dynamically change the parameter settings of the IROS system through the interactive interface.

Citation Information

Patent Citations

  • Autonomous unmanned system software configuration item adjustment method based on genetic evolution

    CN112463629A

  • Method for calling IROS service based on plug-in framework

    CN115562678A