A launch file generation method and device
By generating and validating launch files through a graphical drag-and-drop interface, the problem of unstable launch file generation was solved, improving software development efficiency and file stability.
Patent Information
- Application Number
- CN202210976540.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-15
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2042-08-15
AI Technical Summary
The launch files generated by existing technologies are prone to errors, making it difficult to run stably, especially in multi-person development teams where each person is responsible for different sections, making it difficult to detect errors.
Launch files are generated using a graphical drag-and-drop interface, and their validity is verified through depth-first traversal, reducing manual input errors and improving software development and debugging efficiency.
Generating launch files by dragging and dropping reduces errors from manual input, improves software development and debugging efficiency, reduces the burden of testing and troubleshooting, and ensures the stability of launch files.
Smart Images

Figure CN115374755B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the computer technical field, and in particular to a launch file generation method and device. BACKGROUND
[0002] A launch file is a formatted xml file, and its root node is a launch label. The launch file can be used to start multiple nodes at the same time. The basic idea is to list a group of nodes that need to be started at the same time in an XML format file.
[0003] In the prior art, a launch file is traversed in a depth-first manner, tag attributes are acquired in series, and the last successful setting is used, so if the value of a param is set in multiple places, the last one will be used. In addition, in the prior art, when a launch file is written, there is usually a situation that the same file exists under different package paths in the launch file. However, since a development team is usually composed of multiple persons, and each person is responsible for a different section, these errors are difficult to be found by developers, so that the generated launch file is difficult to run stably. SUMMARY
[0004] Embodiments of the present application provide a launch file generation method and device, which are used to solve the technical problem that the launch file generated in the prior art usually has errors, so that the generated launch file is difficult to run stably.
[0005] Embodiments of the present application adopt the following technical solutions:
[0006] The present application provides a launch file generation method. The method comprises the following steps: generating a launch file node tree; receiving an icon dragging instruction, and moving a tool icon contained in the icon dragging instruction to a corresponding node of the launch file node tree based on a preset dragging node rule; wherein different tool icons correspond to different launch file node types; receiving a node attribute editing instruction, and performing attribute editing on the corresponding node to generate a launch file; and receiving a verification instruction, and verifying the launch file, and determining that the launch file is successfully generated if the verification is correct.
[0007] Embodiments of the present application use an image-based interface dragging method to generate a launch file and verify whether the launch file is legal. The launch file is generated by dragging, which can reduce errors in manual input of the launch file, improve software development and debugging efficiency, and also verify whether the launch file can be used, thereby reducing the burden of testing and troubleshooting.
[0008] In an implementation of the present application, before the launch file node tree is generated, the method further comprises: determining the attribute value structure corresponding to each tool icon respectively; determining the xml format associated with each tool icon respectively; and determining the attribute editing box corresponding to each tool icon respectively.
[0009] In an implementation of the present application, based on the preset node dragging rule, the tool icon contained in the icon dragging instruction is moved to the corresponding node of the launch file node tree, specifically comprising: based on the preset node dragging rule, determining one or more reference nodes corresponding to the tool icon contained in the icon dragging instruction; comparing the corresponding node corresponding to the tool icon contained in the icon dragging instruction with the one or more reference nodes; in the case that the corresponding node belongs to the reference node, moving the tool icon contained in the icon dragging instruction to the corresponding node of the launch file node tree.
[0010] In an implementation of the present application, the node attribute editing instruction is received, and the attribute of the corresponding node is edited to generate the launch file, specifically comprising: receiving the node attribute editing instruction; determining the node type of the corresponding node to determine the corresponding node attribute editing box based on the node type; editing the attribute of the corresponding node based on the attribute information in the node attribute editing box; saving the edited attribute and updating the mandatory attribute label corresponding to the corresponding node at the same time; wherein the mandatory attribute label is related to the launch document corresponding to the launch file node tree, and the launch document comprises a launch tag.
[0011] In an implementation of the present application, the launch file node tree is generated, specifically comprising: receiving a new instruction, creating an empty launch file, generating a tree with only a launch root node, and creating a launch document with only a launch tag in the current page; or generating the launch file node tree by opening an existing launch file.
[0012] In an implementation of the present application, after the launch file node tree is generated by opening an existing launch file, the method further comprises: receiving a node dragging instruction, determining a node to be dragged in the opened existing launch file according to the node dragging instruction; moving the node to be dragged to a new launch file node tree to generate a new launch file.
[0013] In an implementation form of the present application, the check instruction is received, and the launch file is checked by depth-first traversal, specifically including: receiving the check instruction, and checking the launch file by depth-first traversal; wherein the checking of the launch file at least includes checking one or more of a yaml file and a rag parameter in the launch file.
[0014] In an implementation form of the present application, the launch file is checked by depth-first traversal, specifically including: traversing a launch file node in depth priority, and storing node information according to a node type; obtaining the node information, and determining a node type corresponding to the node information; and checking the node information based on the node type and a preset check rule.
[0015] In an implementation form of the present application, the node information is checked based on the node type and the preset check rule, specifically including: determining a corresponding preset check rule based on the node type; wherein the node type at least includes one of an include node, a param node, a rosparam node, a node node, an arg node, a group node, an env node and a remap node; different node types correspond to different preset check rules; the node information is checked based on the preset check rule, and a check result is recorded.
[0016] The embodiment of the present application provides a launch file generation device, including: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: generate a launch file node tree; receive an icon dragging instruction, and move a tool icon contained in the icon dragging instruction to a corresponding node of the launch file node tree based on a preset dragging node rule; wherein different tool icons correspond to different launch file node types respectively; receive a node attribute editing instruction, and edit attributes of the corresponding node to generate a launch file; receive a check instruction, and check the launch file, and determine that the launch file is successfully generated in a case that the check is correct.
[0017] The above at least one technical solution adopted by the embodiment of the present application can achieve the following beneficial effects: the embodiment of the present application generates a launch file by using an image interface dragging method and checks whether the launch file is legal. The launch file is generated by the dragging method, which can reduce errors in manual input of the launch file, improve software development and debugging efficiency, and check whether the launch file can be used, thereby reducing the burden of testing and troubleshooting. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the accompanying drawings in the following description only represent some embodiments described in the present application, and for those skilled in the art, other drawings can be obtained from these drawings without any creative effort. In the drawings:
[0019] Figure 1 A launch file generation method flow chart provided by the embodiments of the present application;
[0020] Figure 2 A launch file verification flow chart provided by the embodiments of the present application;
[0021] Figure 3 An attribute editing box diagram of a node provided by the embodiments of the present application;
[0022] Figure 4 An attribute editing box diagram of a group provided by the embodiments of the present application;
[0023] Figure 5 An attribute editing box diagram of args provided by the embodiments of the present application;
[0024] Figure 6 An attribute editing box diagram of env provided by the embodiments of the present application;
[0025] Figure 7 An attribute editing box diagram of param provided by the embodiments of the present application;
[0026] Figure 8 An attribute editing box diagram of rosparam provided by the embodiments of the present application;
[0027] Figure 9 An attribute editing box diagram of rmap provided by the embodiments of the present application;
[0028] Figure 10 An attribute editing box diagram of include provided by the embodiments of the present application;
[0029] Figure 11 A structure diagram of a launch file generation device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0030] The embodiments of the present application provide a launch file generation method and device.
[0031] In the following, the technical solutions according to the embodiments of the present application will be described clearly and completely in combination with the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all the other embodiments obtained by those skilled in the art without creative work should fall into the scope of protection of the present application.
[0032] The launch file is a formatted xml file, and the root node is the launch tag. The launch file can be used to start multiple nodes at the same time. The basic idea is to list a group of nodes to be started at the same time in an XML format file.
[0033] In the prior art, Roslaunch traverses the launch file by depth-first, serially acquires tag attributes, and finally sets successfully, so if multiple places set the value of the same param, the last one will be used. In addition, in the prior art, when writing the launch file, there is usually a case that the same file exists under different package paths in the launch file. However, since the development team is generally composed of multiple people, and each person is responsible for different blocks, these errors are difficult to be found by the developers, so that the generated launch file is difficult to run stably.
[0034] To solve the above problems, the embodiments of the present application provide a launch file generation method and device. The launch file is generated by using the image interface drag method, and whether the launch file is legal is verified. The launch file is generated by using the drag method, which can reduce the errors in manual input of the launch file, improve the software development and debugging efficiency, and also verify whether the launch file can be used, thereby reducing the burden of testing and troubleshooting.
[0035] The technical solutions according to the embodiments of the present application will be described in detail in combination with the drawings.
[0036] Figure 1 A launch file generation method flowchart is provided in the embodiments of the present application. As shown in Figure 1 The launch file generation method includes the following steps:
[0037] S101, a launch file node tree is generated.
[0038] In an embodiment of the present application, the attribute value structure corresponding to each tool icon is determined, and the xml format associated with each tool icon is determined. In addition, the attribute editing box corresponding to each tool icon is determined.
[0039] Specifically, the Launch file is a formatted xml file, whose root node is the launch tag, and the child nodes include the node, machine, include, arg, param, rosparam, group, remap, env and test tags.
[0040] Further, the attribute value structure of each tool icon is defined. The attributes of the node are shown in Table 1:
[0041] Pkg Type name Args Optional mechine Optional respawn Optional Respawn_delay Optional Required Optional Ns Optional Clear_params Optional Output Optional Cwd Optional Launch-perfix Optional If Optional
[0042] Table 1
[0043] The attributes of the include are shown in Table 2:
[0044] File Ns Optional Clear_params Optional Pass_all_args Optional
[0045] Table 2
[0046] The attributes of the remap are shown in Table 3:
[0047] From To
[0048] Table 3
[0049] The attributes of the env are shown in Table 4:
[0050] Name value
[0051] Table 4
[0052] The attributes of the param are shown in Table 5:
[0053] Name Value Optional Type Optional Textfile Optional Binfile Optional command Optional
[0054] Table 5
[0055] The attributes of the rosparam are shown in Table 6:
[0056] Command Optional File param ns Optional Subst_value Optional
[0057] Table 6
[0058] The attributes of the group are shown in Table 7:
[0059] Ns Optional Clear_params Optional
[0060] Table 7
[0061] The attributes of the arg are shown in Table 8:
[0062] Name Default Optional Value Optional doc Optional
[0063] Table 8
[0064] Further, after determining the attribute value structure corresponding to each tool icon respectively, the xml format associated with each icon is designed.
[0065] Further, the preset preset drag node rule is provided in the embodiment of the application. According to the launch file syntax:
[0066] param, remap, rosparam, arg, env do not have sub-tags;
[0067] group contains node, param, remap, rosparam, arg, include, env sub-tags;
[0068] Include contains arg and env sub-tags;
[0069] node contains param, remap, rosparam, env sub-tags;
[0070] The node can only be dragged to the node containing the current node type. For example: the arg node can be dragged to the group node and the include node, but cannot be dragged to the arg node or the param node.
[0071] In an embodiment of the application, a new instruction is received, an empty launch file is created, a node tree with only a launch root node is generated, and a launch document with only a launch tag is created in the current page, or a launch file node tree is generated by opening an existing launch file.
[0072] In an embodiment of the application, a node dragging instruction is received, and the to-be-dragged node is determined in the opened existing launch file according to the node dragging instruction. The to-be-dragged node is moved to the new launch file node tree to generate a new launch file.
[0073] Specifically, there are two ways to create a launch file. Way one is as follows:
[0074] First: click New to create an empty launch file, and a tree with only a launch root node is created, and a launch document with only a launch tag is displayed on the right side.
[0075] Second: drag an icon to the launch node tree, and a tag containing mandatory attributes is displayed on the right side at the corresponding position.
[0076] Third: Double-click the node on the launch node tree to open the node property editing box, modify the properties of the current node, click OK to close the current node editing box, and update the corresponding node properties on the right side.
[0077] Fourth: Click the Save button to save the generated launch file to the disk.
[0078] Method two uses the existing launch file to create as follows:
[0079] First: Click New to create an empty launch file, and at the same time create a tree with only the launch root node, and display a launch document with only the launch tag on the right side.
[0080] Second: Click the Import button to select the launch file to be used, and click OK to create a launch node tree.
[0081] Third: Drag a node from the existing launch file to the newly created launch node tree (including child nodes), at which time the data of the imported current node will be copied to the corresponding node position on the right side (including child nodes).
[0082] Fourth: Double-click the node on the launch node tree to open the node property editing box, modify the properties of the current node, click OK to close the current node editing box, and update the corresponding node properties on the right side.
[0083] Fifth: Click the Save button to save the generated launch file to the disk.
[0084] S102, receive an icon dragging instruction, and move a tool icon contained in the icon dragging instruction to a corresponding node of a launch file node tree based on a preset node dragging rule; wherein different tool icons correspond to different launch file node types.
[0085] In an embodiment of the present application, based on the preset node dragging rule, one or more reference nodes corresponding to the tool icon contained in the icon dragging instruction are determined. The corresponding node corresponding to the tool icon contained in the icon dragging instruction is compared with the one or more reference nodes. In the case where the corresponding node belongs to the reference node, the tool icon contained in the icon dragging instruction is moved to the corresponding node of the launch file node tree.
[0086] Specifically, when dragging a tool icon to the corresponding node in the node tree, it is necessary to determine whether the corresponding node conforms to the preset drag-and-drop node rules. That is, based on the preset drag-and-drop node rules, the reference node corresponding to the tool icon to be dragged is determined, and the corresponding node in the node tree is compared with the reference node to determine whether the corresponding node is contained within the reference node.
[0087] Furthermore, if the corresponding node is contained within the reference node, it is determined that the preset drag-and-drop node rules are met, and the tool icon contained in the icon drag-and-drop instruction can be moved to the corresponding node in the launch file node tree. If the corresponding node is not contained within the reference node, it is determined that the preset drag-and-drop node rules are not met, and in this case, the tool icon contained in the icon drag-and-drop instruction cannot be moved to the corresponding node in the launch file node tree.
[0088] S103. Receive node attribute editing instructions, edit the attributes of the corresponding node, and generate a launch file.
[0089] In one embodiment of this application, a node attribute editing instruction is received. The node type of the corresponding node is determined, and a corresponding node attribute editing box is determined based on the node type. The attributes of the corresponding node are edited based on the attribute information in the node attribute editing box. The edited attributes are saved, and the required attribute tags corresponding to the corresponding node are updated simultaneously. The required attribute tags are related to the launch document corresponding to the launch file node tree, and the launch document includes a launch tag.
[0090] Specifically, Figure 3 This is a schematic diagram of a node attribute editing box provided in an embodiment of this application, as shown below. Figure 3 As shown, you can set the attributes of a node through this attribute editing box. Figure 4 This is a schematic diagram of a group attribute editing box provided in an embodiment of this application, such as... Figure 4 As shown, you can set the attributes of the group node through this attribute editing box. Figure 5 This is a schematic diagram of an attribute edit box for args provided in an embodiment of this application, as shown below. Figure 5 As shown, the attributes of the args node can be set through this attribute edit box. Figure 6 This is a schematic diagram of an attribute editing box for an env object provided in an embodiment of this application, as shown below. Figure 6 As shown, the properties of the env node can be set through this property editing box. Figure 7 This is a schematic diagram of an attribute editing box for a param provided in an embodiment of this application, as shown below. Figure 7 As shown, the attributes of the param node can be set through this attribute editing box.Figure 8 An attribute editing box of a rosparam provided in an embodiment of the present application is shown in FIG. 6. As shown in the figure, the attribute of the rosparam node can be set through the attribute editing box. Figure 8 Figure 9 An attribute editing box of a rmap provided in an embodiment of the present application is shown in FIG. 7. As shown in the figure, the attribute of the rmap node can be set through the attribute editing box. Figure 9 Figure 10 An attribute editing box of an include provided in an embodiment of the present application is shown in FIG. 8. As shown in the figure, the attribute of the include node can be set through the attribute editing box. Figure 10
[0091] Specifically, the attribute setting is completed by double-clicking the node of the launch file node tree, opening the node attribute editing window, and inputting the name, type, selecting the package to which the node belongs, and the parameter information. In addition, the right side of the system displays the content of the generated launch file corresponding to the node tree in real time. The content of the launch file tag is modified by modifying the attribute of the node. The package name of the system is selected through the drop-down menu or manually input, which can effectively avoid the error that the used file or program under the package does not exist.
[0092] S104, receiving a verification instruction, verifying the launch file, and determining that the launch file is successfully generated if the verification is correct.
[0093] In an embodiment of the present application, the verification instruction is received, and the launch file is verified by depth-first traversal. The verification of the launch file at least includes verifying one or more of the yaml file, the yaml file, and the arg parameter in the launch file.
[0094] Specifically, the launch file node is traversed in depth-first manner, the node information is stored according to the node type, the node information is obtained, and the node type corresponding to the node information is determined. Based on the node type, the node information is verified based on the preset verification rule.
[0095] Specifically, based on the node type, the corresponding preset verification rule is determined, wherein the node type at least includes one of the include node, the param node, the rosparam node, the node node, the arg node, the group node, the env node, and the remap node. Different node types correspond to different preset verification rules. Based on the preset verification rule, the node information is verified, and the verification result is recorded.
[0096] Further,Figure 2 A launch file checking flow chart is provided for the embodiments of the present application. By Figure 2 The launch file checking flow can be further explained. First, the launch file is parsed, and the launch file nodes are traversed in depth priority, and the node information is stored according to the node type. Second, it is determined whether all reading is completed, if yes, the checking is completed, if no, the third step is executed. Third, the next node information is acquired, and the node type is determined.
[0097] Further, if the node is an include node, it is determined whether find is used, if yes, the package name is acquired, and it is determined whether the package name exists, if not, it is recorded, if yes, it is determined whether the included file exists, if not, it is recorded. If find is not used, it is determined whether the full path file exists, if not, it is recorded, and it is further determined whether all reading is completed. It is determined whether arg-name is used, if yes, it is determined whether the current arg-name exists, if not, it is recorded that the arg-name does not exist.
[0098] Further, if the node is a param node, it is determined whether the type is specified, if yes, it is determined whether the type is legal, if not, it is recorded. If the type is legal, the param name is added with the namespace and the path, and it is determined whether it exists, if yes, it is recorded that the param is set multiple times; if the type is specified, it is determined whether textfile, binfile or command is specified, if not, it is recorded that the param node is wrong; if specified, it is determined whether find is used, if yes, it is determined whether the package name exists, if not, it is recorded that the package name cannot be found; if exists, it is determined whether the file exists, if not, it is recorded that the file does not exist; and it is further determined whether all reading is completed. It is determined whether arg-name is used, if yes, it is determined whether the current arg-name exists, if not, it is recorded that the arg-name does not exist.
[0099] Further, if the rosparam node, determine the command type, if not one of load, dump, delete, then record rosparam, command type error; Again determine whether all read is complete. If yes, determine whether to use find + pkg form, if yes, then determine whether the package name exists, does not exist record package name not found; Exist to determine whether the file exists, if not exist, then record the file does not exist; Again determine whether all read is complete. Determine whether it is a yaml file, if yes, then check whether the yaml file is legal, and check whether the parameter exists. Determine whether to use arg-name, if use determine whether the current arg-name exists, does not exist record arg-name does not exist.
[0100] Further, if the node node, determine whether the pkg exists, if not exist record package name does not exist; Again determine whether all read is complete, if exist determine whether the program name corresponding to the type is under the current package, if not exist, then record the current program does not exist, determine whether all read is complete again. Determine whether to use arg-name, if use determine whether the current arg-name exists, does not exist record arg-name does not exist.
[0101] Further, if the arg node, determine whether the arg specifies a value or default, if not record arg does not specify value, return to determine whether all read is complete.
[0102] Further, if the group node, check whether the group is legal, if not legal record group is not legal, return to determine whether all read is complete.
[0103] Further, if the env node, check whether the attribute of env only contains name and value; If contains other attributes, then record env error.
[0104] Further, if the remap node, check whether the attribute of remap only contains from and to; If contains other attributes, then record remap error.
[0105] The embodiment of the application creates a launch file node tree by dragging, reduces the threshold of launch file writing, and is more convenient and efficient to use. By editing node attribute to set the content of the tag corresponding to the launch file, the writing of the launch file can be standardized, and the errors in writing the launch file can be effectively reduced. At the same time, by checking whether the launch file exists parameter coverage, the problem of circular reference, the problem of normal program startup and abnormal function can be effectively avoided, the debugging cycle is shortened, and the research and development efficiency is improved.
[0106] Figure 11 A structural schematic diagram of a launch file generation device is provided for an embodiment of the present application. As shown in the figure, the launch file generation device comprises: Figure 11
[0107] at least one processor; and
[0108] a memory in communication connection with the at least one processor; wherein
[0109] the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0110] generate a launch file node tree;
[0111] receive an icon dragging instruction, and move a tool icon contained in the icon dragging instruction to a corresponding node of the launch file node tree based on a preset dragging node rule; wherein different tool icons correspond to different launch file node types respectively;
[0112] receive a node attribute editing instruction, and perform attribute editing on the corresponding node to generate a launch file;
[0113] receive a verification instruction, and verify the launch file, and determine that the launch file is generated successfully in the case of no error.
[0114] Each of the embodiments in the present application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. Especially, the device, equipment and non-volatile computer storage medium embodiments are described simply because they are basically similar to the method embodiments, and the relevant parts can be referred to the part of the method embodiments.
[0115] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different than the order in which they are recited and still achieve desirable results. In addition, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In some implementations, multitasking and parallel processing can be advantageous.
[0116] The above merely provides an example of the present application, but is not intended to limit the present application. The example of the present application can be variously changed and modified by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the example of the present application should be included in the scope of claims of the present application.
Claims
1. A method of generating a launch file, the method comprising: The method comprises: generating a launch file node tree; receiving an icon dragging instruction, moving a tool icon contained in the icon dragging instruction to a corresponding node of the launch file node tree based on a preset dragging node rule, wherein different tool icons correspond to different launch file node types respectively; receiving a node attribute editing instruction, and performing attribute editing on the corresponding node to generate a launch file; receiving a verification instruction, and verifying the launch file, and determining that the launch file is successfully generated if the verification is correct; The method comprises: based on the preset dragging node rule, determining one or more reference nodes corresponding to the tool icon contained in the icon dragging instruction; comparing the corresponding node corresponding to the tool icon contained in the icon dragging instruction with the one or more reference nodes; in the case that the corresponding node belongs to the reference node, moving the tool icon contained in the icon dragging instruction to the corresponding node of the launch file node tree; The method comprises: receiving a node attribute editing instruction; determining the node type of the corresponding node to determine a corresponding node attribute editing box based on the node type; based on the attribute information in the node attribute editing box, performing attribute editing on the corresponding node; saving the edited attribute and updating the mandatory attribute label corresponding to the corresponding node at the same time; wherein the mandatory attribute label is related to a launch document corresponding to the launch file node tree, and the launch document comprises a launch tag; generating a launch file node tree by opening an existing launch file; After generating the launch file node tree by opening the existing launch file, the method further comprises: receiving a node dragging instruction, and determining a to-be-dragged node in the opened existing launch file according to the node dragging instruction; moving the to-be-dragged node to a new launch file node tree to generate a new launch file; The method comprises: receiving a verification instruction, and verifying the launch file by depth-first traversal; wherein the verification of the launch file at least comprises verifying one or more of a yaml file and a rag parameter in the launch file; The method comprises: in-depth priority traversal of the launch file node, and storing node information according to node type; obtaining node information and determining the node type corresponding to the node information; checking the node information according to preset checking rules based on the node type; checking the node information according to preset checking rules based on the node type, specifically including: determining the corresponding preset checking rules based on the node type; wherein the node type at least includes one of include node, param node, rosparam node, node node, arg node, group node, env node and remap node; different node types correspond to different preset checking rules; checking the node information based on the preset checking rules, and recording the checking result.
2. The method of claim 1, wherein, Before the launch file node tree is generated, the method further includes: determining the attribute value structure corresponding to each tool icon respectively; and determining the xml format associated with each tool icon respectively; and determining the attribute editing box corresponding to each tool icon respectively.
3. The method of claim 1, wherein, The launch file node tree is generated, specifically including: receiving a new instruction, creating an empty launch file, and generating a tree with only a launch root node, and creating a launch document with only a launch tag in the current page.
4. A launch file generation device, the device can perform a launch file generation method according to any one of claims 1-3; the device includes: at least one processor; and, a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: generate a launch file node tree; receive an icon dragging instruction, move the tool icon contained in the icon dragging instruction to the corresponding node of the launch file node tree based on the preset dragging node rule; wherein different tool icons correspond to different launch file node types respectively; receive a node attribute editing instruction, and edit the attributes of the corresponding node to generate a launch file; receive a checking instruction, and check the launch file; if the checking is correct, it is determined that the launch file is successfully generated.
Citation Information
Patent Citations
Editing method and device for XML (extensible markup language) file
CN105867995A
HTML5-based process definition method and system
CN110232162A