A method for setting IROS system parameters
By standardizing parameter value types and type interfaces in the ROS system, and combining RPC remote calls and permission verification, the problem of insecure parameter modification was solved, and the reliability and security of parameter modification were achieved.
Patent Information
- Application Number
- CN202310468968.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-04-27
AI Technical Summary
In ROS systems, parameter modification is insecure, unfriendly, and prone to errors, especially since type modification and deletion lack permission verification, leading to incorrect node operation that is difficult to detect.
By obtaining parameter value types, verifying type matching, creating interfaces corresponding to the types, modifying parameter values and types, modifying parameter values and types under namespaces, using RPC remote calls to achieve synchronization, and providing permission verification and parameter server registration interfaces.
It improves the reliability and security of parameter server modifications, ensures the correctness of parameter values and types, synchronizes parameters between nodes, and reduces the occurrence of errors.
Smart Images

Figure CN116521395B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for setting IROS system parameters, belonging to the field of IROS system parameter technology. Background Technology
[0002] ROS 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, replacing the open-source ROS kernel, providing ROS-compatible interfaces, solving issues related to ROS reliability, performance, and security, and adding new features such as support for cloud-based robot development, cloud-edge-device communication, and multi-robot collaboration.
[0003] ROS has a parameter server that provides global parameter storage and query services, and a command-line tool for setting parameters. However, this tool lacks permission checks for parameter modifications, especially type changes and deletions, making such modifications extremely dangerous. Furthermore, ROS allows multiple nodes to modify the same parameter but doesn't provide a callback interface to notify the nodes. This can lead to incorrect node operation, and such errors are difficult to detect. Setting parameters via the command-line tool in ROS is also problematic if the parameter type is complex, as the input process is unfriendly and prone to errors. Summary of the Invention
[0004] The purpose of this invention is to provide a method for setting parameters based on IROS system parameters, which improves the reliability and security of modifying parameter servers.
[0005] To achieve the above objectives, the present invention employs the following technical solution:
[0006] Step 1: Obtain the parameter value type. The parameter type includes basic data type, basic data array type, and complex data type. The basic data type includes integer, floating-point, boolean, and string types. The basic data array type includes integer array, floating-point array, boolean array, and string array. The complex data type is composed of basic data type and basic array type and is saved through xmlrpcvvle.
[0007] Step 2: Modify the parameter value. Obtain the parameter value corresponding to the parameter name via RPC. After modifying the parameter value, check whether the type matches according to the corresponding type. If they match, the modification is successful; otherwise, the modification fails. Modify the parameter type.
[0008] Step 3: Modify the parameter value type. Determine the parameter type corresponding to the parameter value obtained through RPC. For basic data types and basic array types, save it directly as the corresponding type. If it is not a basic data type or basic array type, create the parameter type separately. After modifying the parameter type, repeat Step 2 to modify the parameter.
[0009] Step 4: Modify the namespace. Combine the names and corresponding values of all parameters under this namespace into a YAML format for display. By modifying the YAML format data, you can modify the values and types of all parameters under this namespace.
[0010] Preferably, the specific steps for modifying the parameter value are as follows:
[0011] Step 1: Obtain the name of the parameter to be modified, and retrieve the value of the parameter to be modified via RPC call;
[0012] Step 2: Determine the type of the parameter value; if it is a simple data type, then proceed to Step 3 to create the parameter value; otherwise, create a group named after the corresponding parameter name and repeat Step 2.
[0013] Step 3: Create a basic data type or basic type array interface.
[0014] If it is a Boolean value, create a Boolean interface and set the parameter value;
[0015] If the value is an integer, create an integer interface and set the parameter value.
[0016] If it is a floating-point number, create a floating-point interface and set the parameter value;
[0017] If the data type is string, create a string type interface and set the parameter values;
[0018] Preferably, the type of the modified parameter value is modified as follows:
[0019] The parameter value type is obtained through RPC remote call, the parameter name is displayed through label, the original parameter value type is displayed through combobox, the parameter value type is selected through drop-down menu, the corresponding interface is created, and then the parameter value can be modified according to the method described in the IROS system parameter setting method.
[0020] Preferably, the step of creating a separate parameter value type is as follows:
[0021] Step 1: Enter a value in YAML format or enter a structure type. If the input is a struct structure;
[0022] Step 2: Create YAML format data based on the struct structure and fill in the default values;
[0023] Step 3: Verify the validity of the YAML format data. If valid, create the corresponding interface based on the structure.
[0024] Step 4: Modify the parameter values according to the method described in the IROS system parameter setting method.
[0025] Preferably, the namespace modification steps are as follows:
[0026] Step 1: Obtain all parameters under the namespace, as well as the permissions of the parameters;
[0027] Step 2: Determine if the user has write permissions for a node. If not, the user can only view and not modify; if so, proceed to Step 3.
[0028] Step 3: Obtain the value of each parameter via RPC call;
[0029] Step 4: Based on the nesting relationship of namespaces, save all parameters and values under this namespace as a YAML::NODE node;
[0030] Step 5: When the user makes an edit, check if the content of the text box conforms to the YAML syntax format. If it does not, set it to the original value. If it does, convert the text to a YAML::NODE node.
[0031] Step 6: Convert the YAML::NODE node to the xmlrpcvalue type, call the RPC interface to update the parameter value. If the update is successful, refresh the node list. If it fails, restore the original value after user confirmation.
[0032] Preferably, the method further includes batch modification of parameters, with the following specific steps: select the corresponding YAML file according to the parameters to be modified, load the contents of the YAML file as YAML::NODE nodes; then use YAML::NODE nodes to create a parameter list tree, and create the corresponding parameter value interface according to the type of the YAML::NODE node values.
[0033] A device for setting IROS system parameters includes: at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: obtain parameter type, modify parameter value, modify parameter value type, and modify namespace.
[0034] A non-volatile computer storage medium stores computer-executable instructions, wherein the computer-executable instructions are configured to: obtain parameter type, modify parameter value, modify parameter value type, and modify namespace.
[0035] The advantages of this invention are as follows: Based on the intelligent robot operating system IROS, this invention standardizes parameter value types, creates interfaces corresponding to each parameter value type, creates parameter value modification interfaces and interactive interfaces, and then allows users to change parameter values through interface operations. Finally, synchronization with the parameter server is achieved through RPC remote calls (including tokens). This solution makes parameter changes more secure and reliable; the parameter server provides an interface for registering parameter updates, enabling parameter synchronization between nodes. Furthermore, binding parameter value types to names allows for verification of parameter value errors, further improving the reliability and security of modifications to the parameter server. Attached Figure Description
[0036] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.
[0037] Figure 1 This is a schematic diagram of the main structure of Embodiment 1 of the present invention. Detailed Implementation
[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0039] A method for setting parameters based on IROS system, characterized by including parameter value type classification, parameter value modification, parameter value type modification, namespace modification, and batch parameter modification;
[0040] The parameter types include basic data types, basic data array types, and complex data types. The basic data types include integer, floating-point, boolean, and string types. The basic data array types include integer arrays, floating-point arrays, boolean arrays, and string arrays. The complex data types are composed of basic data types and basic array types and are stored using xmlrpcvvle.
[0041] The parameter value modification process involves retrieving the parameter value corresponding to the parameter name via RPC and modifying the parameter value according to the data type. The specific steps for modifying the parameter value are as follows:
[0042] Step 1: Obtain the name of the parameter value to be modified, and retrieve the value of the parameter to be modified through an RPC call;
[0043] Step 2: Determine the type of the parameter value; if it is a simple data type, proceed to Step 3 to create the parameter value interface; otherwise, create a group interface named after the corresponding parameter name and repeat Step 2.
[0044] Step 3: Create a basic data type or basic type array interface.
[0045] If it is a Boolean value, create a Boolean interface and set the parameter value;
[0046] If the value is an integer, create an integer interface and set the parameter value.
[0047] If it is a floating-point number, create a floating-point interface and set the parameter value;
[0048] If the data type is string, create a string type interface and set the parameter values;
[0049] The process of modifying parameter value type first determines the type being modified. For basic data types and basic array types, the parameter is created directly. If it is not a basic data type or basic array type, it is created separately. The parameter value type is displayed through a label for the parameter name, through a combobox for the parameter value type, and through a lineedit for the parameter value.
[0050] The steps for creating a separate parameter value type are as follows:
[0051] Step 1: Enter a value in YAML format or enter a structure type. If the input is a struct structure;
[0052] Step 2: Create YAML format data based on the struct structure and fill in the default values;
[0053] Step 3: Verify that the YAML format data is valid. If it is valid, create the corresponding interface based on the structure.
[0054] Preferably, the namespace modification steps are as follows:
[0055] Step 1: Obtain all parameters under the namespace, as well as the permissions of the parameters;
[0056] Step 2: Determine if the user has write permissions for a node. If not, the user can only view and not modify; if so, proceed to Step 3.
[0057] Step 3: Obtain the value of each parameter via RPC call;
[0058] Step 4: Based on the nesting relationship of namespaces, save all parameters and values under this namespace as a YAML::NODE node;
[0059] Step 5: When the user makes an edit, check if the content of the text box conforms to the YAML syntax format. If it does not, set it to the original value. If it does, convert the text to a YAML::NODE node.
[0060] Step 6: Convert the YAML::NODE node to the xmlrpcvalue type, call the RPC interface to update the parameter value. If the update is successful, refresh the node list. If it fails, restore the original value after user confirmation.
[0061] The method also includes batch parameter modification, with the following specific steps: Select the corresponding YAML file for the parameters to be modified, load the contents of the YAML file as YAML::NODE nodes; then use YAML::NODE nodes to create a parameter list tree, and create the corresponding parameter value interface according to the type of the YAML::NODE node values.
[0062] The method also implements permission judgment for modifying parameters by adding the user and group to the parameters.
[0063] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for setting IROS system parameters, characterized in that, Includes the following steps; Step 1: Obtain the parameter value type. The parameter value type includes basic data type, basic data array type, and complex data type. The basic data type includes integer, floating-point, boolean, and string types. The basic data array type includes integer array, floating-point array, boolean array, and string array. The complex data type is composed of basic data types and is stored using xmlrpcvvle. Step 2: Modify the parameter value. Obtain the parameter value corresponding to the parameter name via RPC. After modifying the parameter value, check whether the type matches according to the corresponding type. If they match, the modification is successful; otherwise, the modification fails. Modify the parameter type. Step 3: Modify the parameter value type. Determine the parameter type corresponding to the parameter value obtained through RPC. For basic data types and basic array types, save it directly as the corresponding type. If it is not a basic data type or basic array type, create the parameter type separately. After modifying the parameter type, repeat Step 2 to modify the parameter. Step 4: Modify the namespace, combine the names and corresponding values of all parameters under this namespace into a YAML format for display, and modify the values and types of all parameters under this namespace by modifying the YAML format data; The specific steps for modifying the parameter value are as follows: Step 1: Obtain the name of the parameter to be modified, and retrieve the value of the parameter to be modified via RPC call; Step 2: Determine the type of the parameter value; if it is a simple data type, then proceed to Step 3 to create the interface corresponding to the parameter; otherwise, create a group named after the corresponding parameter name and repeat Step 2. Step 3: Create a basic data type or basic type array interface. If it is a Boolean value, create a Boolean interface and set the parameter value; If the value is an integer, create an integer interface and set the parameter value. If it is a floating-point number, create a floating-point interface and set the parameter value; If the data type is string, create a string type interface and set the parameter values; The steps for modifying the namespace are as follows: Step 1: Obtain all parameters under the namespace, as well as the permissions of the parameters; Step 2: Determine if the user has write permissions for a node. If not, the user can only view and not modify; if so, proceed to Step 3. Step 3: Obtain the value of each parameter via RPC call; Step 4: Based on the nesting relationship of namespaces, save all parameters and values under this namespace as a YAML::NODE node; Step 5: When the user makes an edit, check if the content of the text box conforms to the YAML syntax format. If it does not, set it to the original value. If it does, convert the text to a YAML::NODE node. Step 6: Convert the YAML::NODE node to the xmlrpcvalue type, call the RPC interface to update the parameter value. If the update is successful, refresh the node list. If it fails, restore the original value after user confirmation.
2. The method for setting IROS system parameters according to claim 1, characterized in that, The type of the modified parameter value: The parameter value type is obtained through RPC remote call, the parameter name is displayed through label, the original parameter value type is displayed through combobox, the parameter value type is selected through drop-down menu, the corresponding interface is created, and then the parameter value can be modified according to claim 1.
3. The method for setting IROS system parameters according to claim 1, characterized in that, The steps for creating a separate parameter value type are as follows: Step 1: Enter a value in YAML format or enter a structure type. If the input is a struct structure; Step 2: Create YAML format data based on the struct structure and fill in the default values; Step 3: Verify the validity of the YAML format data. If valid, create the corresponding interface based on the structure. Step 4: Modify the parameter value according to claim 1.
4. The method for setting IROS system parameters according to claim 1, characterized in that, The method also includes batch parameter modification, with the following specific steps: Select the corresponding YAML file for the parameters to be modified, load the contents of the YAML file as YAML::NODE nodes; then use YAML::NODE nodes to create a parameter list tree, and create the corresponding parameter value interface according to the type of the YAML::NODE node values.
5. A device based on IROS system parameter settings, characterized in that, include: At least one processor, and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: obtain parameter types, modify parameter values, modify parameter value types, and modify namespaces according to any one of claims 1-4 based on IROS system parameter setting.
6. A non-volatile computer storage medium, characterized in that, The system stores computer-executable instructions, which are configured to: obtain parameter types, modify parameter values, modify parameter value types, and modify namespaces according to any one of claims 1-4 based on the IROS system parameter setting method.
Citation Information
Patent Citations
Parameter processing method and device, computing equipment and storage medium
CN112308590A
Yaml file conversion method and device
CN114741082A