Component processing method, electronic equipment and storage medium
By constructing intelligent components and binding signal interfaces with the robot control cabinet, the problem of low efficiency in simulation modeling of complex tools in existing technologies is solved, and efficient and flexible robot simulation modeling is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
Existing technologies suffer from low operational efficiency, insufficient accuracy, and low automation in multi-state simulation of complex tools, failing to meet the needs for efficient and flexible robot simulation modeling.
By constructing intelligent components, determining the component status, binding signal interfaces with the robot control cabinet, and receiving trigger signals to switch component status, the component status can be visualized.
It enables efficient communication between intelligent components and robot control cabinet, meeting the needs of efficient and flexible robot simulation modeling, and improving operational efficiency and accuracy.
Smart Images

Figure CN121808877A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics, and more specifically, to a component processing method, electronic device, and storage medium. Background Technology
[0002] In the field of robot simulation, simulation modeling and state control of complex tools such as multi-joint actuators, retractable grippers, and combined operation terminals are among the core requirements.
[0003] Currently, most existing solutions use monolithic tool modeling, which cannot flexibly combine modules according to the tool's structure. This results in low modeling efficiency for complex tools, and the relative positions between modules are difficult to adjust independently. Furthermore, it is not easy to save multiple preset states, and the module positions need to be readjusted every time the working mode is switched. This operation is cumbersome and involves a large amount of repetitive work, making it difficult to adapt to the needs of multi-condition simulation.
[0004] Therefore, existing solutions suffer from drawbacks such as low operational efficiency, insufficient accuracy, and low automation in multi-state simulation of complex tools, and cannot meet the needs of efficient and flexible robot simulation modeling. Summary of the Invention
[0005] The purpose of this application is to address the shortcomings of the prior art by providing a component processing method, electronic device, and storage medium to solve the problems of low operational efficiency, insufficient accuracy, and low automation in the multi-state simulation of complex tools, which cannot meet the actual needs of efficient and flexible robot simulation modeling.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a component processing method, the method comprising: Based on the user's operation, a smart component is constructed and the state of at least one component of the smart component is determined. The smart component includes a base module and multiple movable modules. Determine multiple signal interfaces corresponding to the states of each component, and bind the multiple signal interfaces corresponding to the states of each component to the robot control cabinet. The multiple signal interfaces include: input signal interfaces and output signal interfaces. The system receives trigger signals from the robot control cabinet through the input signal interface. Based on the trigger signal, the component state of the smart component is switched to the component state corresponding to the input signal interface, and the smart component is displayed according to the component state.
[0007] As an optional implementation, the step of constructing a smart component and determining at least one component state of the smart component based on the user's operation includes: The intelligent component is constructed based on the user's module drag-and-drop operations and / or information input operations; In response to user stopping dragging and information input, the system obtains the current position information of each module in the smart component and determines a component state of the smart component based on the current position information of each module in the smart component.
[0008] As an optional implementation, obtaining the current location information of each module in the smart component includes: Obtain the first offset matrix of the base module in the world coordinate system, and use the first offset matrix as the current position information of the base module; Obtain the second offset matrix of each movable module relative to the base module, and use the second offset matrix as the current position information of the movable module.
[0009] As an optional implementation, binding multiple signal interfaces corresponding to the states of each component to the robot control cabinet includes: Bind the input signal interface corresponding to the state of each component to the trigger signal interface of the robot control cabinet; The output signal interface corresponding to the state of each component is bound to the feedback signal interface of the robot control cabinet.
[0010] As an optional implementation, receiving the trigger signal from the robot control cabinet through the input signal interface includes: Real-time monitoring of the signal status of the input signal interface; If the signal state reaches a preset trigger value, the signal from the input signal interface will be used as the trigger signal.
[0011] As an optional implementation, the method further includes: Obtain the control signal generated by the user triggering a preset control; Switch the component state of the smart component to the component state corresponding to the control signal, and display the smart component according to the component state.
[0012] As an optional implementation, the step of switching the component state of the smart component to the component state corresponding to the input signal interface according to the trigger signal, and displaying the smart component according to the component state, includes: When the intelligent component is in the component state corresponding to the input signal interface, the first target offset matrix of the base module in the world coordinate system and the second target offset matrix of each movable module relative to the base module are read. Based on the first target offset matrix and each of the second target offset matrices, determine the third target offset matrix of each movable module in the world coordinate system; The display positions of the base module and each movable module are updated based on the first target offset matrix of the base module in the world coordinate system and the third target offset matrix of each movable module in the world coordinate system.
[0013] As an optional implementation, after displaying the smart component according to its state, the method further includes: The output signal interface sends a feedback signal to the robot control cabinet, so that the robot control cabinet can determine, based on the feedback signal, that the intelligent component has switched to the component state corresponding to the input signal interface.
[0014] Secondly, embodiments of this application provide a component processing apparatus, the apparatus comprising: A building module is used to build a smart component based on user operations and determine the state of at least one component of the smart component, wherein the smart component includes a base module and multiple movable modules; A binding module is used to determine multiple signal interfaces corresponding to the states of each component and bind the multiple signal interfaces corresponding to the states of each component to the robot control cabinet. The multiple signal interfaces include: input signal interfaces and output signal interfaces. A receiving module is used to receive trigger signals from the robot control cabinet through the input signal interface; The display module is used to switch the component state of the smart component to the component state corresponding to the input signal interface according to the trigger signal, and to display the smart component according to the component state.
[0015] As an optional implementation, the building module is specifically used for: The intelligent component is constructed based on the user's module drag-and-drop operations and / or information input operations; In response to user stopping dragging and information input, the system obtains the current position information of each module in the smart component and determines a component state of the smart component based on the current position information of each module in the smart component.
[0016] As an optional implementation, the building module is specifically used for: Obtain the first offset matrix of the base module in the world coordinate system, and use the first offset matrix as the current position information of the base module; Obtain the second offset matrix of each movable module relative to the base module, and use the second offset matrix as the current position information of the movable module.
[0017] As an optional implementation, the binding module is specifically used for: Bind the input signal interface corresponding to the state of each component to the trigger signal interface of the robot control cabinet; The output signal interface corresponding to the state of each component is bound to the feedback signal interface of the robot control cabinet.
[0018] As an optional implementation, the receiving module is specifically used for: Real-time monitoring of the signal status of the input signal interface; If the signal state reaches a preset trigger value, the signal from the input signal interface will be used as the trigger signal.
[0019] As an optional implementation, the display module is also used for: Obtain the control signal generated by the user triggering a preset control; Switch the component state of the smart component to the component state corresponding to the control signal, and display the smart component according to the component state.
[0020] As an optional implementation, the display module is specifically used for: When the intelligent component is in the component state corresponding to the input signal interface, the first target offset matrix of the base module in the world coordinate system and the second target offset matrix of each movable module relative to the base module are read. Based on the first target offset matrix and each of the second target offset matrices, determine the third target offset matrix of each movable module in the world coordinate system; The display positions of the base module and each movable module are updated based on the first target offset matrix of the base module in the world coordinate system and the third target offset matrix of each movable module in the world coordinate system.
[0021] As an optional implementation, the apparatus further includes: a transmitting module, the transmitting module being used for: The output signal interface sends a feedback signal to the robot control cabinet, so that the robot control cabinet can determine, based on the feedback signal, that the intelligent component has switched to the component state corresponding to the input signal interface.
[0022] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the component processing method described in the first aspect above.
[0023] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the component processing method described in the first aspect above.
[0024] The beneficial effects of this application are: This application provides a component processing method, electronic device, and storage medium. Based on user operation, a smart component is constructed, and at least one component state of the smart component is determined. Multiple signal interfaces corresponding to each component state are identified, and both the input and output signal interfaces of these multiple signal interfaces are bound to a robot control cabinet. A trigger signal from the robot control cabinet is received through the input signal interface, and based on the trigger signal, the component state of the smart component is switched to the component state corresponding to the input signal interface, and the smart component is displayed according to the component state. By binding multiple signal interfaces corresponding to each component state to the robot control cabinet, a smart component capable of being triggered to multiple states is formed, establishing a communication link between the smart component and the robot control cabinet. Based on the trigger signal received from the input signal interface, the smart component is triggered in the robot simulation software platform to display the component state corresponding to that input signal interface, realizing the visualization of the smart component's component state, thereby meeting the needs of efficient and flexible robot simulation modeling. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 Flowchart of the component processing method provided in the embodiments of this application Figure 1 ; Figure 2 Flowchart of the component processing method provided in the embodiments of this application Figure 2 ; Figure 3 Flowchart of the component processing method provided in the embodiments of this application Figure 3 ; Figure 4 Flowchart of the component processing method provided in the embodiments of this application Figure 4 ; Figure 5 Flowchart of the component processing method provided in the embodiments of this application Figure 5 ; Figure 6Flowchart of the component processing method provided in the embodiments of this application Figure 6 ; Figure 7 Flowchart of the component processing method provided in the embodiments of this application Figure 7 ; Figure 8 A modular structure diagram of the component processing apparatus provided in the embodiments of this application; Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0028] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0029] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0030] In the field of robot simulation, simulation modeling and state control of complex tools are among the core requirements. Currently, most existing solutions employ monolithic tool modeling, which cannot flexibly combine modules according to the tool's structure. This results in low modeling efficiency for complex tools and difficulty in independently adjusting the relative positions of modules. Furthermore, it's not convenient to save multiple preset states; each time a working mode is switched, the module positions must be readjusted, leading to cumbersome operations and a large amount of repetitive work, making it difficult to adapt to multi-condition simulation requirements. In other words, existing solutions suffer from low operational efficiency, insufficient accuracy, and low automation in multi-state simulation of complex tools, failing to meet the needs for efficient and flexible robot simulation modeling.
[0031] Based on the above-mentioned problems, this application provides a component processing method that constructs and uses intelligent components and flexibly switches the component states of the intelligent components to meet the needs of efficient and flexible robot simulation modeling.
[0032] Figure 1 Flowchart of the component processing method provided in the embodiments of this application Figure 1 The subject executing this method can be any electronic device with computing power. For example... Figure 1 As shown, the method includes: S101. Based on the user's operation, construct a smart component and determine the state of at least one component of the smart component. The smart component includes a base module and multiple movable modules.
[0033] Optionally, in the robot simulation software platform, a SmartComponent is constructed based on the user's import and adjustment operations on the base module and multiple movable modules.
[0034] By adjusting the base module and multiple movable modules, the state of at least one component of the intelligent component can be determined. The component state can be a preset working state required by the intelligent component during robot simulation control, such as the preset working states of clamping, half-opening, and opening of the robot's joints.
[0035] S102. Determine the multiple signal interfaces corresponding to the status of each component, and bind the multiple signal interfaces corresponding to the status of each component to the robot control cabinet. The multiple signal interfaces include: input signal interfaces and output signal interfaces.
[0036] Optionally, a unique status identifier is assigned to each component state of the smart component, and multiple corresponding signal interfaces are configured for each component state of the smart component. The multiple signal interfaces corresponding to each component state are then bound to the robot control cabinet to form a smart component that can be triggered into multiple states.
[0037] Specifically, an input signal interface and an output signal interface are configured for each component state of the smart component, and the input signal interface and output signal interface corresponding to each component state are bound to the robot control cabinet to establish a communication link between the smart component and the robot control cabinet.
[0038] For example, the smart component has three states: state 1 is clamped, state 2 is half-open, and state 3 is open. State 1 is configured with one input signal interface (input_1) and one output signal interface (output_1); state 2 with one input signal interface (input_2) and one output signal interface (output_2); and state 3 with one input signal interface (input_3) and one output signal interface (output_3). Each input signal interface (input_1, input_2, input_3) and each output signal interface (output_1, output_2, output_3) is bound to the robot control cabinet, forming a smart component that can be triggered by the robot control cabinet to enter either a clamped, half-open, or open state.
[0039] S103. Receive trigger signals from the robot control cabinet through the input signal interface.
[0040] Optionally, the smart component is bound to the input signal interface of the robot control cabinet to receive a trigger signal from the robot control cabinet. The trigger signal is generated by the robot control cabinet according to the control command during the robot simulation control process to trigger the component state of the smart component.
[0041] For example, if it is necessary to trigger the clamping state of the smart component, a first control command is sent to the robot control cabinet, so that the robot control cabinet generates a first trigger signal and sends it to the input signal interface input_1 of the component state 1 (i.e., clamping state) of the bound smart component.
[0042] Accordingly, if it is necessary to trigger the half-open state of the smart component, a second control command is sent to the robot control cabinet, causing the robot control cabinet to generate a second trigger signal and send it to the input signal interface input_2 of the bound smart component's component state 2 (i.e., half-open state). If it is necessary to trigger the open state of the smart component, a third control command is sent to the robot control cabinet, causing the robot control cabinet to generate a third trigger signal and send it to the input signal interface input_3 of the bound smart component's component state 3 (i.e., open state).
[0043] S104. Based on the trigger signal, switch the component state of the smart component to the component state corresponding to the input signal interface, and display the smart component according to the component state.
[0044] Optionally, based on the trigger signal received by the input signal interface, the component state corresponding to the input signal interface is invoked, and the component state of the smart component is switched to the component state corresponding to the input signal interface, so that the smart component is displayed in the robot simulation software platform as the component state corresponding to the input signal interface.
[0045] In other words, based on the trigger signal received from the input signal interface, the intelligent component is triggered in the robot simulation software platform to display the component state corresponding to the input signal interface, thereby realizing the visualization of the component state of the intelligent component and meeting the needs of efficient and flexible robot simulation modeling.
[0046] For example, if the input signal interface input_1 of the smart component in component state 1 (i.e., clamped state) receives a first trigger signal, the smart component is triggered to display in the clamped state in the robot simulation software platform. If the input signal interface input_2 of the smart component in component state 2 (i.e., half-open state) receives a second trigger signal, the smart component is triggered to display in the half-open state in the robot simulation software platform. If the input signal interface input_3 of the smart component in component state 3 (i.e., open state) receives a third trigger signal, the smart component is triggered to display in the open state in the robot simulation software platform.
[0047] In this embodiment, based on user operations, a smart component is constructed, and at least one component state of the smart component is determined. Multiple signal interfaces corresponding to each component state are identified, and both the input and output signal interfaces of these multiple signal interfaces are bound to the robot control cabinet. Trigger signals from the robot control cabinet are received through the input signal interface, and based on the trigger signal, the component state of the smart component is switched to the component state corresponding to the input signal interface, and the smart component is displayed according to the component state. By binding multiple signal interfaces corresponding to each component state to the robot control cabinet, a smart component capable of being triggered to multiple states is formed, establishing a communication link between the smart component and the robot control cabinet. Based on the trigger signal received from the input signal interface, the smart component is triggered in the robot simulation software platform to display the component state corresponding to that input signal interface, realizing the visualization of the smart component's component state, thereby meeting the needs of efficient and flexible robot simulation modeling.
[0048] Figure 2 Flowchart of the component processing method provided in the embodiments of this application Figure 2 ,like Figure 2 As shown, step S101 above, which involves constructing a smart component and determining at least one component state of the smart component based on the user's operation, includes: S201. Construct smart components based on user module drag-and-drop operations and / or information input operations.
[0049] Optionally, in the intelligent component construction interface of the robot simulation software platform, the base module serves as a fixed, immovable reference carrier within the intelligent component. Multiple movable modules are used to realize state changes of the intelligent component, allowing for translation, rotation, and other positional transformations through user module dragging operations and / or information input operations.
[0050] Based on user input operations such as dragging and dropping movable modules with the mouse and / or inputting the position information of each movable module after movement via the keyboard, the position of each movable module can be flexibly moved to build smart components.
[0051] During the process of flexibly moving the positions of each movable module, the relative positional relationship between the base module and each movable module is displayed in real time, so that users can determine whether the smart component has reached the preset working state.
[0052] S202, respond to user stop dragging and information input, obtain the current position information of each module in the smart component, and determine a component state of the smart component based on the current position information of each module in the smart component.
[0053] Optionally, when the smart components reach a preset working state, the user stops dragging the movable modules and inputting information. The system monitors the user's operation status in real time, and when it detects that the user has stopped dragging and inputting information, it responds by triggering location information capture.
[0054] Specifically, the current position information of the base module and each movable module in the smart component is obtained, and a component state of the smart component is determined based on the current position information of the base module and each movable module in the smart component, and a unique state identifier is assigned to this component state of the smart component.
[0055] After determining one component state of the smart component, the steps of position transformation of each movable module and capture of position information of each module can be repeated to determine multiple component states of the smart component.
[0056] In this embodiment, a smart component is constructed based on the user's module dragging operations and / or information input operations. Upon responding to the user stopping dragging and inputting information, the current position information of each module within the smart component is obtained, and a component state of the smart component is determined based on this information. This enhances the flexibility and intuitiveness of constructing smart components.
[0057] Figure 3 Flowchart of the component processing method provided in the embodiments of this application Figure 3 ,like Figure 3As shown, step S202 above, which involves obtaining the current location information of each module in the smart component, includes: S301. Obtain the first offset matrix of the base module in the world coordinate system, and use the first offset matrix as the current position information of the base module.
[0058] Optionally, obtain the first offset matrix of the base module in the world coordinate system. , the first offset matrix This serves as the current position information for the base module.
[0059] Wherein, the world coordinate system is the global reference coordinate system of the robot simulation software platform, and the first offset matrix is... It can be a homogeneous transformation matrix, containing the translation parameters (X-axis / Y-axis / Z-axis coordinates) and rotation parameters (rotation angles around the X-axis / Y-axis / Z-axis) of the base module in the world coordinate system, to characterize the spatial position and attitude of the base module.
[0060] S302. Obtain the second offset matrix of each movable module relative to the base module, and use the second offset matrix as the current position information of the movable module.
[0061] Optionally, using the local coordinate system of the base module as a reference, the second offset matrix of the movable module relative to the base module is obtained. , the second offset matrix This serves as the current location information for the movable module.
[0062] Wherein, the second offset matrix It can also be a homogeneous transformation matrix, containing the relative translation and rotation parameters of the movable module relative to the base module, to characterize the spatial position and orientation of the movable module relative to the base module.
[0063] In this embodiment, the first offset matrix of the base module in the world coordinate system is obtained, and this first offset matrix is used as the current position information of the base module; the second offset matrix of each movable module relative to the base module is obtained, and this second offset matrix is used as the current position information of the movable module. This improves the reusability of the smart components and ensures the accuracy of switching the component state of the smart components based on position information.
[0064] Figure 4 Flowchart of the component processing method provided in the embodiments of this application Figure 4 ,like Figure 4 As shown, in step S102 above, multiple signal interfaces corresponding to the states of each component are bound to the robot control cabinet, including: S401. Bind the input signal interface corresponding to the status of each component to the trigger signal interface of the robot control cabinet.
[0065] Optionally, the robot control cabinet includes multiple trigger signal interfaces and multiple feedback signal interfaces, and the input signal interfaces corresponding to the status of each component are bound to the trigger signal interfaces of the robot control cabinet respectively.
[0066] Specifically, the input signal interface corresponding to the component status is bound to the trigger signal interface of the robot control cabinet according to the format of the binding object, the type of the binding signal, the binding interface identifier, and the preset trigger value. The binding object can be the robot control cabinet (cab), the type of the binding signal can be di or do, the binding interface identifier is the identifier of the robot control cabinet's trigger signal interface, such as 0, 2, 4, 6, etc., and the preset trigger value can be 1.
[0067] For example, if the input signal interface input_1 configured in component state 1 of the smart component is bound to the trigger signal interface 0 of the robot control cabinet, then the input signal interface input_1 is bound to cab:do:0:1, indicating that the bound object is the robot control cabinet, the type of the bound signal is do, the bound interface is identified as the trigger signal interface 0 of the robot control cabinet, and the preset trigger value is 1.
[0068] Accordingly, the input signal interface input_2 configured in component state 2 of the smart component is bound to the trigger signal interface 2 of the robot control cabinet. Then, the input signal interface input_2 is bound to cab:do:2:1, which means that the bound object is the robot control cabinet, the type of the bound signal is do, the bound interface is identified as the trigger signal interface 2 of the robot control cabinet, and the preset trigger value is 1.
[0069] Bind the input signal interface input_3 configured in component state 3 of the smart component to the trigger signal interface 4 of the robot control cabinet. Then, the input signal interface input_3 is bound to cab:do:4:1, which means that the bound object is the robot control cabinet, the type of the bound signal is do, the bound interface is identified as the trigger signal interface 4 of the robot control cabinet, and the preset trigger value is 1.
[0070] S402. Bind the output signal interface corresponding to the status of each component to the feedback signal interface of the robot control cabinet.
[0071] Optionally, the output signal interfaces corresponding to the states of each component are bound to the feedback signal interfaces of the robot control cabinet. Specifically, the binding of the output signal interfaces corresponding to the component states to the feedback signal interfaces of the robot control cabinet is performed according to the binding object, the type of the bound signal, the binding interface identifier, and the preset feedback value format.
[0072] The binding object can be a robot control cabinet, the type of the binding signal can be di or do, the binding interface identifier is the identifier of the feedback signal interface of the robot control cabinet, such as 1, 3, 5, 7, etc., and the preset feedback value can be 1.
[0073] For example, if the output signal interface output_1 of the component state 1 of the smart component is bound to the feedback signal interface 1 of the robot control cabinet, then the output signal interface output_1 is bound to cab:do:1:1, which means that the bound object is the robot control cabinet, the type of the bound signal is do, the bound interface is identified as the feedback signal interface 1 of the robot control cabinet, and the preset feedback value is 1.
[0074] Accordingly, the output signal interface output_2 configured in component state 2 of the smart component is bound to the feedback signal interface 3 of the robot control cabinet. Then, the output signal interface output_2 is bound to cab:do:3:1, which means that the bound object is the robot control cabinet, the type of the bound signal is do, the bound interface is identified as the feedback signal interface 3 of the robot control cabinet, and the preset feedback value is 1.
[0075] Bind the output signal interface output_3 configured in component state 3 of the smart component to the feedback signal interface 5 of the robot control cabinet. Then, the output signal interface output_3 is bound to cab:do:5:1, which means that the bound object is the robot control cabinet, the type of the bound signal is do, the bound interface identifier is the feedback signal interface 5 of the robot control cabinet, and the preset feedback value is 1.
[0076] In this embodiment, the input signal interfaces corresponding to the states of each component are bound to the trigger signal interfaces of the robot control cabinet, and the output signal interfaces corresponding to the states of each component are bound to the feedback signal interfaces of the robot control cabinet. A bidirectional communication link is established between the intelligent components and the robot control cabinet, enabling signal-triggered state switching and state execution result feedback, thereby achieving closed-loop control of the state switching of the intelligent components.
[0077] Figure 5 Flowchart of the component processing method provided in the embodiments of this application Figure 5 ,like Figure 5 As shown, in step S103 above, receiving a trigger signal from the robot control cabinet via the input signal interface includes: S501, Real-time monitoring of the signal status of the input signal interface.
[0078] Optionally, the signal status of the input signal interface of each component of the smart component can be monitored in real time.
[0079] For example, the signal states of the input signal interfaces input_1 (component state 1), input_2 (component state 2), and input_3 (component state 3) are monitored in real time. Since input_1 is bound to cab:do:0:1, input_2 to cab:do:2:1, and input_3 to cab:do:4:1, the signal states of do0 (triggered signal interface 0), do2 (triggered signal interface 2), and do4 (triggered signal interface 4) of the robot control cabinet are monitored in real time. The signal states can be 0 or 1.
[0080] S502. If the signal state reaches the preset trigger value, the signal from the input signal interface will be used as the trigger signal.
[0081] Optionally, if the signal state of the input signal interface reaches a preset trigger value, that is, if the signal state of the input signal interface is 1, then the signal of the input signal interface is used as the trigger signal.
[0082] For example, if the signal state of the input signal interface input_1 of component state 1 is 1, then the signal of the input signal interface input_1 is used as a trigger signal to trigger the smart component to switch to component state 1. If the signal state of the input signal interface input_2 of component state 2 is 1, then the signal of the input signal interface input_2 is used as a trigger signal to trigger the smart component to switch to component state 2. If the signal state of the input signal interface input_3 of component state 3 is 1, then the signal of the input signal interface input_3 is used as a trigger signal to trigger the smart component to switch to component state 3.
[0083] In this embodiment, the signal status of the input signal interface is monitored in real time. If the signal status reaches a preset trigger value, the signal from the input signal interface is used as the trigger signal. This improves the triggering efficiency and accuracy of state switching of the smart component.
[0084] Figure 6 Flowchart of the component processing method provided in the embodiments of this application Figure 6 ,like Figure 6 As shown, the method also includes: S601. Obtain the control signal generated by the user triggering the preset control.
[0085] Optionally, the robot simulation software platform has preset controls, which can be trig controls. When the user selects a component state and triggers the trig control, a control signal is generated.
[0086] Users can trigger the trig control by clicking the mouse or using a shortcut key. When the system detects that the user has triggered the preset control, it generates a control signal. The control signal is used to control the smart component to switch to the state of the component selected by the user.
[0087] S602. Switch the component status of the smart component to the component status corresponding to the control signal, and display the smart component according to the component status.
[0088] Optionally, based on the control signal, the component state corresponding to the control signal is invoked, and the component state of the smart component is switched to the component state corresponding to the control signal, so that the smart component is displayed in the robot simulation software platform as the component state corresponding to the control signal.
[0089] In other words, based on the control signal, the intelligent component is controlled to display the component state corresponding to the control signal in the robot simulation software platform, thereby realizing the visualization of the component state of the intelligent component and thus meeting the needs of efficient and flexible robot simulation modeling.
[0090] In this embodiment, a control signal generated by a user-triggered preset control is acquired, and the component state of the smart component is switched to the component state corresponding to the control signal. The smart component is then displayed according to the component state. When there is no need to rely on a robot control cabinet, the switching of the component state of the smart component can be directly driven by the control signal generated by the user-triggered preset control, improving the flexibility of component state switching.
[0091] Figure 7 Flowchart of the component processing method provided in the embodiments of this application Figure 7 ,like Figure 7 As shown, in step S104 above, the component state of the smart component is switched to the component state corresponding to the input signal interface according to the trigger signal, and the smart component is displayed according to the component state, including: S701. When the intelligent component is in the component state corresponding to the input signal interface, read the first target offset matrix of the base module in the world coordinate system and the second target offset matrix of each movable module relative to the base module.
[0092] Optionally, the component state corresponding to the input signal interface is taken as the target component state, and the first target offset matrix of the base module in the world coordinate system when the smart component is in the target component state is read. And the second target offset matrix of each movable module relative to the base module.
[0093] Wherein, the first target offset matrix Includes the translation and rotation parameters of the base module in the world coordinate system under the target component state. Second target offset matrix. Includes the relative translation and relative rotation parameters of the movable module relative to the base module in the target component state.
[0094] S702. Based on the first target offset matrix and each second target offset matrix, determine the third target offset matrix of each movable module in the world coordinate system.
[0095] Optionally, based on the first target offset matrix and the second target offset matrix The offset matrix of the movable module in the world coordinate system is determined based on the following formula. :
[0096] in, This is the offset matrix of the third target in the world coordinate system for the movable module. This is the second target offset matrix of the movable module relative to the base module. This is the first target offset matrix of the base module in the world coordinate system.
[0097] S703. Update the display position of the base module and each movable module according to the first target offset matrix of the base module in the world coordinate system and the third target offset matrix of each movable module in the world coordinate system.
[0098] Optionally, based on the first target offset matrix of the base module in the world coordinate system The third target offset matrix of the movable module in the world coordinate system is also updated synchronously to update the display position of the base module and each movable module, so that the smart component is displayed as the target component state, that is, the component state corresponding to the input signal interface, thus realizing the precise triggering of the target component state of the smart component.
[0099] In this embodiment, when the smart component is in the component state corresponding to the input signal interface, the first target offset matrix of the base module in the world coordinate system and the second target offset matrix of each movable module relative to the base module are read. Based on the first target offset matrix and each of the second target offset matrices, the third target offset matrix of each movable module in the world coordinate system is determined, and the display positions of the base module and each movable module are updated according to the first target offset matrix of the base module in the world coordinate system and the third target offset matrix of each movable module in the world coordinate system. This ensures that the smart component is displayed in the component state corresponding to the input signal interface, achieving precise triggering of the component state corresponding to the input signal interface of the smart component.
[0100] As an optional implementation, after displaying the smart component according to its component status in step S104 above, the method further includes: The system sends a feedback signal to the robot control cabinet through the output signal interface, so that the robot control cabinet can determine that the smart component has switched to the component state corresponding to the input signal interface based on the feedback signal.
[0101] Optionally, after determining that the smart component is displayed according to its component state—that is, after determining that the base module and each movable module in the smart component have completed position updates according to their respective target offset matrices—indicates that the smart component has switched to the component state corresponding to the input signal interface, a feedback signal is generated and sent to the feedback signal interface of the bound robot control cabinet through the output signal interface corresponding to the switched component state. This allows the robot control cabinet to determine that the smart component has switched to the component state corresponding to the input signal interface upon receiving the feedback signal.
[0102] For example, if the smart component has switched to component state 1 corresponding to input_1 of the input signal interface, since the output signal interface output_1 configured in component state 1 of the smart component is bound to the feedback signal interface 1 of the robot control cabinet, and the output signal interface output_1 is bound to cab:do:1:1, the signal state of control do1 changes from 0 to the preset feedback value 1. When the signal state of do1 changes to the preset feedback value 1, the feedback signal interface 1 of the robot control cabinet receives the feedback signal, and it can be determined that the smart component has switched to component state 1, that is, the smart component is in the clamping state at this time.
[0103] Correspondingly, if the smart component has switched to component state 2 corresponding to input_2 of the input signal interface, since the output signal interface output_2 configured in component state 2 of the smart component is bound to the feedback signal interface 3 of the robot control cabinet, and the output signal interface output_2 is bound to cab:do:3:1, the signal state controlling do3 changes from 0 to the preset feedback value 1. When the signal state of do3 changes to the preset feedback value 1, the feedback signal interface 3 of the robot control cabinet receives the feedback signal, and it can be determined that the smart component has switched to component state 2, that is, the smart component is in a half-open state at this time.
[0104] If the smart component has switched to component state 3 corresponding to input_3 of the input signal interface, since the output signal interface output_3 configured in component state 3 of the smart component is bound to the feedback signal interface 5 of the robot control cabinet, and the output signal interface output_3 is bound to cab:do:5:1, then the signal state controlling do5 changes from 0 to the preset feedback value 1. When the signal state of do5 changes to the preset feedback value 1, the feedback signal interface 5 of the robot control cabinet receives the feedback signal, which can determine that the smart component has switched to component state 3, that is, the smart component is in the open state at this time.
[0105] In this embodiment, a feedback signal is sent to the robot control cabinet through the output signal interface, enabling the robot control cabinet to determine that the intelligent component has switched to the component state corresponding to the input signal interface based on the feedback signal. This achieves closed-loop control of the intelligent component's state switching, resulting in a complete closed loop for the control of the intelligent component's state triggering, state switching, and state feedback.
[0106] Based on the same inventive concept, this application also provides a component processing device corresponding to the component processing method. Since the principle of the device in this application to solve the problem is similar to the component processing method described above in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0107] Figure 8 A modular structure diagram of the component processing device provided in the embodiments of this application, such as... Figure 8 As shown, the device includes: The construction module 801 is used to construct a smart component and determine the state of at least one component of the smart component based on the user's operation. The smart component includes a base module and multiple movable modules. The binding module 802 is used to determine multiple signal interfaces corresponding to the state of each component and bind the multiple signal interfaces corresponding to the state of each component to the robot control cabinet. The multiple signal interfaces include: input signal interfaces and output signal interfaces. The receiving module 803 is used to receive trigger signals from the robot control cabinet through the input signal interface; Display module 804 is used to switch the component state of the smart component to the component state corresponding to the input signal interface according to the trigger signal, and display the smart component according to the component state.
[0108] As an optional implementation, the construction module 801 is specifically used for: Build intelligent components based on user module drag-and-drop operations and / or information input operations; In response to user stopping dragging and information input, obtain the current position information of each module in the smart component, and determine a component state of the smart component based on the current position information of each module in the smart component.
[0109] As an optional implementation, the construction module 801 is specifically used for: Obtain the first offset matrix of the base module in the world coordinate system, and use the first offset matrix as the current position information of the base module; Obtain the second offset matrix of each movable module relative to the base module, and use the second offset matrix as the current position information of the movable module.
[0110] As an optional implementation, the binding module 802 is specifically used for: Bind the input signal interface corresponding to the state of each component to the trigger signal interface of the robot control cabinet; Bind the output signal interface corresponding to the status of each component to the feedback signal interface of the robot control cabinet.
[0111] As an optional implementation, the receiving module 803 is specifically used for: Real-time monitoring of the signal status of the input signal interface; If the signal state reaches the preset trigger value, the signal from the input signal interface will be used as the trigger signal.
[0112] As an optional implementation, the display module 804 is also used for: Obtain the control signal generated by the user triggering a preset control; Switch the smart component's state to the state corresponding to the control signal, and display the smart component according to the state.
[0113] As an optional implementation, the display module 804 is specifically used for: When the intelligent component is in the component state corresponding to the input signal interface, read the first target offset matrix of the base module in the world coordinate system and the second target offset matrix of each movable module relative to the base module; Based on the first target offset matrix and each of the second target offset matrices, determine the third target offset matrix of each movable module in the world coordinate system; Update the display positions of the base module and each movable module based on the first target offset matrix of the base module in the world coordinate system and the third target offset matrix of each movable module in the world coordinate system.
[0114] As an optional implementation, the device further includes: a transmitting module 805, which is used for: The system sends a feedback signal to the robot control cabinet through the output signal interface, so that the robot control cabinet can determine that the smart component has switched to the component state corresponding to the input signal interface based on the feedback signal.
[0115] This application also provides an electronic device, such as... Figure 9 The diagram shown is a schematic representation of the structure of an electronic device provided in an embodiment of this application, including a processor 91, a memory 92, and a bus 93. The memory 92 stores machine-readable instructions executable by the processor 91. When the electronic device is running, the processor 91 communicates with the memory 92 via the bus 93, and the processor 91 executes the machine-readable instructions to perform the steps of the component processing method in the aforementioned embodiment.
[0116] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the component processing method described in the foregoing embodiments.
[0117] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0118] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0119] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A component processing method, characterized in that, include: Based on the user's operation, a smart component is constructed and the state of at least one component of the smart component is determined. The smart component includes a base module and multiple movable modules. Determine multiple signal interfaces corresponding to the states of each component, and bind the multiple signal interfaces corresponding to the states of each component to the robot control cabinet. The multiple signal interfaces include: input signal interfaces and output signal interfaces. The system receives trigger signals from the robot control cabinet through the input signal interface. Based on the trigger signal, the component state of the smart component is switched to the component state corresponding to the input signal interface, and the smart component is displayed according to the component state.
2. The method according to claim 1, characterized in that, The step of constructing a smart component and determining the state of at least one component of the smart component based on the user's operation includes: The intelligent component is constructed based on the user's module drag-and-drop operations and / or information input operations; In response to user stopping dragging and information input, the system obtains the current position information of each module in the smart component and determines a component state of the smart component based on the current position information of each module in the smart component.
3. The method according to claim 2, characterized in that, The step of obtaining the current location information of each module in the smart component includes: Obtain the first offset matrix of the base module in the world coordinate system, and use the first offset matrix as the current position information of the base module; Obtain the second offset matrix of each movable module relative to the base module, and use the second offset matrix as the current position information of the movable module.
4. The method according to claim 1, characterized in that, The step of binding multiple signal interfaces corresponding to the states of each component to the robot control cabinet includes: Bind the input signal interface corresponding to the state of each component to the trigger signal interface of the robot control cabinet; The output signal interface corresponding to the state of each component is bound to the feedback signal interface of the robot control cabinet.
5. The method according to claim 1, characterized in that, Receiving trigger signals from the robot control cabinet via the input signal interface includes: Real-time monitoring of the signal status of the input signal interface; If the signal state reaches a preset trigger value, the signal from the input signal interface will be used as the trigger signal.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the control signal generated by the user triggering a preset control; Switch the component state of the smart component to the component state corresponding to the control signal, and display the smart component according to the component state.
7. The method according to claim 3, characterized in that, The step of switching the component state of the smart component to the component state corresponding to the input signal interface according to the trigger signal, and displaying the smart component according to the component state, includes: When the intelligent component is in the component state corresponding to the input signal interface, the first target offset matrix of the base module in the world coordinate system and the second target offset matrix of each movable module relative to the base module are read. Based on the first target offset matrix and each of the second target offset matrices, determine the third target offset matrix of each movable module in the world coordinate system; The display positions of the base module and each movable module are updated based on the first target offset matrix of the base module in the world coordinate system and the third target offset matrix of each movable module in the world coordinate system.
8. The method according to claim 1, characterized in that, After displaying the smart component according to its state, the method further includes: The output signal interface sends a feedback signal to the robot control cabinet, so that the robot control cabinet can determine, based on the feedback signal, that the intelligent component has switched to the component state corresponding to the input signal interface.
9. An electronic device, characterized in that, include: The electronic device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of the component processing method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the component processing method as described in any one of claims 1 to 8.