Motion simulation method, system, and medium
Patent Information
- Application Number
- CN202310462311.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-25
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2043-04-25
AI Technical Summary
[0003]然而,在基于SolidWorks插件实现的模型关节配置的方案中,缺少用户交互界面,用户全程仅能在一个小弹窗内进行参数配置,无法提供直观易用的交互界面;缺少配置验证工具,使用插件前需要先完成,配置时无法调整模型
[0034]由上可知,本申请提供的运动仿真方法、系统以及介质,通过接收第一模型数据;进而根据接收到的选择数据确定目标轻量化模式,根据所述目标轻量化模式的预设配置,对所述第一模型数据进行减面处理得到第二模型数据;接着根据接收到的设置数据创建所述第二模型数据对应组件节点,并创建与所述组件节点关联的运动链接;在成功创建运动链接的情况下,根据接收到的绑定数据,将所述运动链接的子节点与所述第二模型数据对应的子模型节点进行关联;在成功绑定的情况下,根据接收到的第一配置数据,通过所述运动链接对与其关联的子模型节点进行仿真行为配置,以及对所述组件节点进行属性配置,得到第三模型数据;然后在处于所述自适应模型的配置状态时,根据接收到的第二配置数据,对所述组件节点的自适应参数进行配置;在处于所述系列类模型的配置状态时,根据接收到的第三配置数据,创建系列类型节点,并将同系列内不同型号的模型关联至所述系列类型节点;在配置完成后,得到第四模型数据;最后响应于接收到的导出请求,导出所述第四模型数据对应的模型数据文件。实现了通过提供了具备实时可视化交互的配置流程,配置过程可进行实时验证,降低后期修改的成本;通过模型控制脚本和模型运动关节配置的解耦,提高了配置文件的兼容性,同时软件上手难度低,降低了用户对模型仿真运动配置的学习成本。
Smart Images

Figure CN116628948B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of simulation technology, and more specifically, to a motion simulation method, system, and medium. Background Technology
[0002] In the automation industry, users typically use virtual simulation software to verify the feasibility of solutions and perform virtual debugging. Industry practitioners have a significant need for simulating and debugging self-designed non-standard mechanisms; that is, they need models that can simulate motion, which is achieved by controlling the model's joints, I / O signals, and other components. However, due to the diversity of solutions and mechanical structures, current simulation software only provides a limited number of built-in models, failing to meet the numerous non-standard and customized model requirements of users. Existing technologies include the following commonly used simulation methods: 1. Model joint configuration based on SolidWorks plugins: The robot's joints can be configured by installing the SW_URDF_EXPORTER plugin in SolidWorks, and the model and joint configuration data can be exported to the ROS operating system to ultimately achieve simulated robot motion; 2. Model motion script configuration based on UnityEditor: In UnityEditor, model motion is defined at the code level using scripting languages such as C# and JavaScript, and the AssetBundles resource package is exported for use in simulation software to ultimately achieve simulated motion of the robot and motion mechanism; 3. Model motion implementation based on animation: The joint animation of the model is pre-set in animation editing software, and the configured model and animation content are exported. The animation is then played in the simulation software to ultimately achieve model motion.
[0003] However, the model joint configuration solution based on SolidWorks plugins lacks a user interface. Users can only configure parameters within a small pop-up window, failing to provide an intuitive and easy-to-use interface. It also lacks configuration verification tools, requiring configuration before using the plugin, and preventing model adjustments during configuration. Users can only re-import the model and adjust it if errors are found during use through external software before reconfiguring. Simulation configuration depends on the plugin; if the simulation software lacks the corresponding model processing plugin, the user cannot import the configured model for use. Furthermore, the plugin cannot define the model's I / O signals and the motion controlled by those signals. In the UnityEditor-based model motion script configuration solution, the generated AssetBundles files are highly coupled, with model motion relationships and model characteristics closely linked. The generated files cannot be modified, and the configuration is only usable within Unity engine-developed simulation software. Configuration is difficult, requiring users to be proficient in UnityEditor and skilled in writing C# scripts. In the model motion implementation scheme based on animation persistence, the model motion process is simple and fixed, and can only play according to the preset animation. It cannot achieve precise control of multiple parameters, and the motion state cannot be interrupted or modified. The animation production is difficult and requires users to have animation production basics.
[0004] Effective technical solutions are urgently needed to address the above problems. Summary of the Invention
[0005] The purpose of this application is to provide a motion simulation method, system, and medium. By providing a configuration process with real-time visual interaction, the configuration process can be verified in real time, reducing the cost of later modifications. By decoupling the model control script and the model motion joint configuration, the compatibility of the configuration file is improved. At the same time, the software is easy to learn, reducing the learning cost for users of model simulation motion configuration.
[0006] Firstly, this application provides a motion simulation method, the motion simulation method comprising:
[0007] Receive the first model data;
[0008] The target lightweight mode is determined based on the received selection data, and the second model data is obtained by reducing the surface area of the first model data according to the preset configuration of the target lightweight mode.
[0009] Based on the received setting data, a component node corresponding to the second model data is created, and a motion link associated with the component node is created; if the motion link is successfully created, the child node of the motion link is associated with the sub-model node corresponding to the second model data based on the received binding data; if the binding is successful, the simulation behavior of the associated sub-model node is configured through the motion link and the attributes of the component node are configured based on the received first configuration data to obtain the third model data.
[0010] When in the configuration state of the adaptive model, the adaptive parameters of the component node are configured according to the received second configuration data; when in the configuration state of the series class model, a series type node is created according to the received third configuration data, and different models within the same series are associated with the series type node; after configuration is completed, the fourth model data is obtained.
[0011] In response to the received export request, the model data file corresponding to the fourth model data is exported.
[0012] Optionally, the first model data includes multiple model faces, each model face including multiple feature parameters. The step of reducing the number of faces in the first model data to obtain the second model data according to the preset configuration of the target lightweight mode includes:
[0013] The target threshold corresponding to each feature parameter is determined according to the preset configuration of the target lightweight mode;
[0014] The parameter values of the feature parameters of each model surface are compared with the corresponding target threshold;
[0015] In response to a comparison result where the feature parameters of the target model surface are lower than the corresponding target threshold, the target model surface is deleted from the first model data;
[0016] The remaining model surfaces of the first model data are then reorganized.
[0017] Optionally, creating a motion link associated with the component node includes:
[0018] Based on the mechanical structure hierarchy of the second model data, create motion links associated with the component nodes.
[0019] Optionally, configuring the simulation behavior of the associated sub-model nodes through the motion link includes:
[0020] The simulation behavior of the sub-model nodes is determined by configuring the position, angle, motion type, motion coordinate system, reference axis, and motion limit of the associated sub-model nodes through the motion link.
[0021] Optionally, configuring the attributes of the component node includes:
[0022] Configure the component name, the actual model and name corresponding to the bill of materials, and the component type of the component node.
[0023] Optionally, configuring the adaptive parameters of the component node includes:
[0024] Configure the node type, generation method, multiplier, direction, and direction offset of the component node.
[0025] Optionally, the feature parameters include surface dimensions and aperture diameter.
[0026] Secondly, this application provides a motion simulation system, the motion simulation system comprising:
[0027] The model import module is configured to provide an import interface for model data files and send the first received model data to the model lightweighting module.
[0028] The model lightweighting module is configured to provide a selection entry for a lightweighting mode, determine the target lightweighting mode based on the received selection data, and perform facet reduction processing on the received first model data according to the preset configuration of the target lightweighting mode to obtain second model data.
[0029] The module attribute module is configured to provide an entry point for creating motion links. Based on received setting data, it creates component nodes corresponding to the second model data and creates motion links associated with those component nodes. If a motion link is successfully created, based on received binding data, it associates the child nodes of the motion link with the sub-model nodes corresponding to the second model data. If binding is successful, based on received first configuration data, it configures the simulation behavior of the associated sub-model nodes and the attributes of the component nodes through the motion links to obtain the third model data.
[0030] The model parameterization module is configured to provide configuration entry points for adaptive models and series models; when in the configuration state of the adaptive model, it configures the adaptive parameters of the component node according to the received second configuration data; when in the configuration state of the series model, it creates a series type node according to the received third configuration data and associates different models within the same series to the series type node; after configuration, the fourth model data is obtained.
[0031] The model export module is configured to provide an export entry point for model data files. In response to a received export request, it exports the model data file corresponding to the fourth model data.
[0032] Optionally, the import interface supports importing models in the formats dae, usd, obj, fbx, stl, drc, ply, stp, step, glb, and gltf.
[0033] Thirdly, this application also provides a computer-readable storage medium including a motion simulation method program, which, when executed by a processor, implements the steps of the motion simulation method as described in any embodiment of this application.
[0034] As described above, the motion simulation method, system, and medium provided in this application receive first model data; then, based on the received selection data, determine a target lightweight mode; according to the preset configuration of the target lightweight mode, perform facet reduction processing on the first model data to obtain second model data; next, based on the received setting data, create component nodes corresponding to the second model data, and create motion links associated with the component nodes; if motion links are successfully created, based on the received binding data, associate the child nodes of the motion links with the child model nodes corresponding to the second model data; if binding is successful, based on the received first configuration data, configure the simulation behavior of the associated child model nodes and configure the attributes of the component nodes through the motion links to obtain third model data; then, in the configuration state of the adaptive model, configure the adaptive parameters of the component nodes according to the received second configuration data; in the configuration state of the series model, based on the received third configuration data, create a series type node and associate different models within the same series with the series type node; after configuration, obtain fourth model data; finally, in response to the received export request, export the model data file corresponding to the fourth model data. It provides a configuration process with real-time visual interaction, allowing for real-time verification of the configuration process and reducing the cost of later modifications. By decoupling the model control script and the model motion joint configuration, it improves the compatibility of configuration files. At the same time, the software is easy to learn, reducing the learning cost for users in configuring model simulation motion.
[0035] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0036] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application 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.
[0037] Figure 1 A flowchart of a motion simulation method provided in this application embodiment;
[0038] Figure 2 A schematic diagram of the motion link of a gantry shaft assembly provided in an embodiment of this application;
[0039] Figure 3 A schematic diagram illustrating the motion link and model data binding of a gantry shaft assembly provided in an embodiment of this application;
[0040] Figure 4 A schematic diagram illustrating the connection attribute configuration of a gantry shaft assembly provided in an embodiment of this application;
[0041] Figure 5 This is a schematic diagram illustrating an adaptive parameter configuration provided in an embodiment of this application.
[0042] Figure 6 A schematic diagram illustrating a series of node configurations provided in an embodiment of this application;
[0043] Figure 7 This is a schematic diagram of the structure of a motion simulation system provided in an embodiment of this application. Detailed Implementation
[0044] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally 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 represents selected embodiments of this 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.
[0045] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0046] Please refer to Figure 1 This is a flowchart illustrating a motion simulation method provided in an embodiment of this application. The motion simulation method is used in computer devices with computing capabilities, such as computers, mobile terminals, and servers. The motion simulation method includes the following steps:
[0047] Step S101: Receive the first model data;
[0048] It should be noted that step S101 is the model import stage, where users can import model data files into the computer device. Once the computer device receives the corresponding first model data, the model import process is complete. This step supports model formats such as dae, usdz, obj, fbx, stl, drc, ply, stp, step, glb, and gltf, ensuring compatibility with various file types.
[0049] Step S102: Determine the target lightweight mode based on the received selection data, and perform surface reduction processing on the first model data according to the preset configuration of the target lightweight mode to obtain the second model data;
[0050] It should be noted that step S102 is the model lightweighting step. Users can select a target lightweighting mode through the interactive interface to perform lightweighting processing on the first model data. Since motion simulation has high computational resource requirements, and different application scenarios also have requirements for real-time performance and accuracy, step S102 is specifically designed as a model lightweighting processing step. Optionally, the lightweighting mode can be set to three levels: low, medium, and high. Different levels correspond to different degrees of lightweighting. Users can select the target lightweighting mode according to their actual needs. The target lightweighting mode will reduce the surface area of the first model data according to the preset configuration to obtain the second model data.
[0051] In one embodiment, the first model data includes multiple model faces, each model face including multiple feature parameters. Based on a preset configuration of the target lightweight mode, the first model data is subjected to facet reduction processing to obtain second model data, including:
[0052] The target threshold for each feature parameter is determined based on the preset configuration of the target lightweight mode;
[0053] The parameter values of the feature parameters of each model surface are compared with the corresponding target threshold.
[0054] In response to the comparison result that the feature parameters of the target model surface are lower than the corresponding target threshold, the target model surface is deleted from the first model data;
[0055] The remaining model surfaces of the first model data are reorganized.
[0056] It should be noted that feature parameters can include surface dimensions and aperture diameters. Each feature parameter has different threshold levels, representing different degrees of lightweighting. For a first model dataset with multiple model surfaces, surfaces with feature parameters below the target threshold can be deleted, simplifying the first model dataset. Lightweighting reduces the model's size and complexity, thereby lowering computational resource requirements and improving simulation efficiency. It also speeds up simulations to meet real-time requirements and reduces noise and errors, improving the accuracy and reliability of simulation results. This prevents unexpected errors and deviations from occurring when the model is too complex, which could lead to unreliable simulation results.
[0057] Step S103: Create the component node corresponding to the second model data according to the received setting data, and create a motion link associated with the component node; if the motion link is successfully created, associate the child node of the motion link with the sub-model node corresponding to the second model data according to the received binding data; if the binding is successful, configure the simulation behavior of the associated sub-model node and configure the attributes of the component node through the motion link according to the received first configuration data to obtain the third model data.
[0058] It should be noted that step S103 is the model attribute setting stage, where users can configure component nodes, motion links, simulation behaviors, and component attributes through the interactive interface. In addition to confirming the node type as a component node, the data settings also include the associated parent nodes of that component node and the node names.
[0059] In one embodiment, creating a motion link associated with a component node includes:
[0060] Based on the mechanical structure hierarchy of the second model data, create motion links associated with component nodes.
[0061] It should be noted that the hierarchical sequence of mechanical structures refers to an organizational method in the design and manufacturing process of mechanical products, where the mechanical structure is progressively decomposed, combined, and optimized from the overall structure to the details. Typically, the design of a mechanical structure can start from the overall structure and gradually decompose it into different levels such as components, parts, and assemblies, and then design and optimize accordingly. Taking a gantry shaft assembly as an example, such as... Figure 2 As shown, links can be created in a three-tiered sequence: "base—first axis—second axis," with each tier allowing for the configuration of corresponding model data and simulation behaviors. For example... Figure 3 As shown, after the link is created, the child nodes of the motion link will be associated and bound to the child model nodes corresponding to the second model data. The link nodes: base, first axis and second axis will be bound to the corresponding model data.
[0062] In one embodiment, configuring the simulation behavior of associated sub-model nodes via motion links includes:
[0063] The simulation behavior of the sub-model nodes is determined by configuring their position, angle, motion type, motion coordinate system, reference axis, and motion limits through motion links.
[0064] It should be noted that the simulation behavior of a model refers to the process of analyzing, testing, and verifying a physical system or device through computer simulation by establishing corresponding mathematical models and operational rules. In this process, the behavior and characteristics of the physical system under different operating conditions can be simulated and observed by inputting different control parameters and initial conditions. Typically, specific simulation parameters for sub-model nodes can be configured, such as position, angle, motion type, motion coordinate system, reference axis, and motion limits, and the specific simulation behavior is determined based on these parameters. Taking one axis of a gantry shaft assembly as an example... Figure 4 As shown, the motion type is set to translation, the motion coordinate system is one axis, the reference axis is the positive Z-axis, and the motion limit is 0-1.5 meters. With the above settings, a motion joint can be defined that moves along the positive Z-axis of the defined link coordinate system and is limited to 0-1.5 meters.
[0065] In addition, the configuration of simulation behavior also includes the configuration of I / O semaphores, the input / output interface quantities of I / O modules, and the servo axis drivers and controllers. The simulation behavior of I / O semaphores and the input / output interface quantities of I / O modules refers to simulating the transmission and processing of I / O interface input / output signals in computer simulation. I / O semaphores are typically used to simulate data exchange between external devices (such as sensors, actuators, etc.) and the computer system. The simulation behavior of I / O semaphores needs to consider the following aspects: Input signal reading: Simulating the process of input signals from external devices being read by the I / O interface, including input signal type identification and data transmission protocol parsing; Signal processing and conversion: Processing and converting the read input signals into a format that the computer can recognize and process, and performing relevant data preprocessing and verification; Output signal transmission: Sending the results processed by the computer to external devices through the I / O interface, including output signal type selection and data transmission protocol encoding; Signal response and feedback: Simulating the process of external devices responding and providing feedback based on the output signals sent by the computer, so that the computer can determine whether the signals have been correctly transmitted and processed. By simulating and adjusting the behavior of I / O semaphores, we can test and optimize the data interaction between the computer system and external devices, ensuring the correctness and reliability of the data and improving the stability and performance of the computer system.
[0066] In addition, the simulation behavior of a servo axis driver refers to simulating the working principle and performance characteristics of a servo axis driver in computer simulation. Servo axis drivers are commonly used in various automation systems, such as machine tools, robots, and unmanned vehicles. The simulation behavior of a servo axis driver needs to consider the following aspects: Motion planning and control: Simulating the motion commands received by the servo axis driver and performing motion planning and control according to the commands. Typically, the servo axis driver needs to calculate appropriate output signals based on different motion planning algorithms (such as PID control algorithms) to achieve the expected motion trajectory and speed. Sensor data acquisition and processing: Simulating the monitoring and feedback of motion status by sensors (such as encoders, position sensors, etc.) inside the servo axis driver. Typically, these sensors need to send the detected data to the control chip of the servo axis driver for processing and calculation via AD converters, etc. Control signal output and response: Simulating the control chip of the servo axis driver outputting control signals (such as PWM signals) to the driver and monitoring the driver's response. Typically, these control signals need to have high accuracy and stability to ensure that the driver can move in the expected way. Simulation of motor characteristics: Simulating the characteristics of the motor equipped in the servo axis driver (such as moment of inertia, inductance, resistance, etc.). These characteristics typically have a significant impact on the performance of servo axis drives, such as response time, stability, and load capacity. By simulating and adjusting the behavior of servo axis drives, their performance and stability can be optimized, improving their application effectiveness and production efficiency in automation systems. Simulation also helps researchers better understand the working principles and motor characteristics of servo axis drives, enabling them to conduct more in-depth research.
[0067] Furthermore, controller simulation refers to the simulation and testing of the controller's working principle and performance in computer simulation. Controllers are commonly used in various control systems, such as automated production lines and smart home applications. Controller simulation needs to consider the following aspects: Control Algorithm: Simulating the control algorithm used by the controller (e.g., PID control algorithm), which performs calculations based on the input signal and outputs a control signal. The control algorithm analyzes the state of the control system and adjusts the output signal to enable the control system to respond more effectively to the input signal. Input Signal Reading and Processing: Simulating the controller's process of reading and parsing input signals (e.g., sensor signals). Typically, the controller needs to read signals from multiple sensors and perform corresponding data preprocessing and verification to ensure the sensitivity and reliability of the control system. Output Signal Sending and Response: Simulating the controller sending control signals (e.g., PWM signals) to actuators and monitoring the actuator's response. These control signals typically need to have high accuracy and stability to ensure the control system operates as expected. State Monitoring and Feedback: Simulating the controller's monitoring and feedback of the control system's state. Controllers typically rely on sensor signals and actuator responses to determine the state of the control system and adjust control algorithms accordingly to ensure stable operation under varying environments. Simulating and testing the controller's behavior allows for optimization of its performance and stability, improving its effectiveness and productivity in various control systems. Furthermore, simulation helps control system designers better understand the controller's operating principles and algorithms, facilitating more in-depth research.
[0068] In one embodiment, configuring the attributes of a component node includes:
[0069] Configure the component name, the actual model and name corresponding to the bill of materials, and the component type for the component node.
[0070] It's important to note that to enable the model to possess BOM (Bill of Material) attributes and simulation type, component nodes need to be configured. The component name is the name used during simulation, corresponding to the actual model number in the BOM, and the actual name is the actual name of the component model in the BOM. The component type represents the simulation attribute, stemming from the different functions and processing methods of different component types in simulation. It's worth emphasizing that simulation attributes refer to the physical or behavioral characteristics exhibited in computer simulation, reflecting the features of real-world objects or systems. By simulating and adjusting various attributes during the simulation process, a variety of complex phenomena can be simulated.
[0071] Step S104: When in the configuration state of the adaptive model, configure the adaptive parameters of the component node according to the received second configuration data; when in the configuration state of the series class model, create a series type node according to the received third configuration data, and associate different models within the same series with the series type node; after configuration, obtain the fourth model data.
[0072] It should be noted that step S104 is the parameterization configuration stage, where users can configure the parameterized model through the interactive interface. The parameterized model is divided into adaptive models and series models. For adaptive models, users need to select the model's joint axes, set whether it is a parameterized model, and define its adaptive growth direction, growth rules, and start and end points.
[0073] In one embodiment, configuring the adaptive parameters of a component node includes:
[0074] Configure the node type, generation method, multiplier, direction, and direction offset of the component node.
[0075] It should be noted that adaptive models can have different types of nodes. For example, there are generation nodes, which are nodes that change size, dimensions, etc., during parameterization; translation nodes, which are nodes that shift as the model changes during parameterization; and growth nodes, which are nodes that increase or decrease in quantity according to specific rules during parameterization. Furthermore, in adaptive parameters, such as... Figure 5 As shown, the configuration node type specifies the node type of the currently selected linked node; the configuration growth method specifies the node growth method, such as only X-axis, only XY-axis, only XYZ three axes, etc.; the configuration multiplier is the multiplier between the actual growth length of the node and the length set by the user, which can be used to set the growth step size; the configuration direction specifies the reference growth direction of the node; and the configuration direction offset specifies the offset amount in the reference direction.
[0076] It's worth noting that adaptive models are mathematical models that can automatically adjust themselves based on environmental conditions and data changes. Based on research in machine learning, statistics, and artificial intelligence, adaptive models can self-correct and optimize according to a given dataset and model prediction results. The main characteristics of adaptive models include: Self-adjustment capability: Adaptive models have strong self-adjustment capabilities, automatically adjusting parameters, structure, or algorithms based on environmental conditions and data changes to improve their prediction accuracy and generalization ability. Data-driven: The design and construction of adaptive models are based on learning from and analyzing large amounts of data, making the model closer to the data distribution and real-world situation. Diversity: Adaptive models can employ various algorithms, techniques, and strategies to build and optimize models to adapt to different application scenarios and needs. Real-time performance: Adaptive models can quickly respond to data and environmental changes and update model parameters and structure in a timely manner to ensure real-time performance.
[0077] In addition, such as Figure 6 As shown, the specific settings for creating a series type node can include series name, added model, component, component model, and component remarks. Specifically, configuring the series name sets the name of the current series, which contains multiple models; configuring the added model allows you to add models under the current series by clicking, with each model corresponding to a component; configuring the component selects the component that has been configured; configuring the component model sets the model name of the component within the series; and configuring the component remarks identifies and adds notes to the component.
[0078] Step S105: In response to the received export request, export the model data file corresponding to the fourth model data.
[0079] The above describes the process of receiving first model data, determining a target lightweight mode based on received selection data, and performing facet reduction on the first model data according to the preset configuration of the target lightweight mode to obtain second model data. Next, based on received setting data, component nodes corresponding to the second model data are created, and motion links associated with the component nodes are created. If a motion link is successfully created, child nodes of the motion link are associated with child model nodes corresponding to the second model data based on received binding data. If binding is successful, simulation behavior configuration is performed on the associated child model nodes and attribute configuration is performed on the component nodes through the motion links based on received first configuration data to obtain third model data. Then, in the configuration state of the adaptive model, adaptive parameters of the component nodes are configured based on received second configuration data. In the configuration state of the series model, a series type node is created based on received third configuration data, and different models within the same series are associated with the series type node. After configuration, fourth model data is obtained. Finally, in response to a received export request, the model data file corresponding to the fourth model data is exported. It provides a configuration process with real-time visual interaction, allowing for real-time verification of the configuration process and reducing the cost of later modifications. By decoupling the model control script and the model motion joint configuration, it improves the compatibility of configuration files. At the same time, the software is easy to learn, reducing the learning cost for users in configuring model simulation motion.
[0080] Please refer to Figure 7 This is a schematic diagram of the structure of a motion simulation system provided in an embodiment of this application, including a model import module, a model lightweighting module, a module attribute module, a model parameterization module, and a model export module;
[0081] Among them, the model import module is configured to provide an import interface for model data files and send the received first model data to the model lightweighting module;
[0082] The model lightweighting module is configured to provide a selection entry for a lightweighting mode, determine the target lightweighting mode based on the received selection data, and perform facet reduction processing on the received first model data according to the preset configuration of the target lightweighting mode to obtain second model data.
[0083] The module attribute module is configured to provide an entry point for creating motion links. Based on received setting data, it creates component nodes corresponding to the second model data and creates motion links associated with those component nodes. If a motion link is successfully created, based on received binding data, it associates the child nodes of the motion link with the sub-model nodes corresponding to the second model data. If binding is successful, based on received first configuration data, it configures the simulation behavior of the associated sub-model nodes and the attributes of the component nodes through the motion links to obtain the third model data.
[0084] The model parameterization module is configured to provide configuration entry points for adaptive models and series models; when in the configuration state of the adaptive model, it configures the adaptive parameters of the component node according to the received second configuration data; when in the configuration state of the series model, it creates a series type node according to the received third configuration data and associates different models within the same series to the series type node; after configuration, the fourth model data is obtained.
[0085] The model export module is configured to provide an export entry point for model data files. In response to a received export request, it exports the model data file corresponding to the fourth model data.
[0086] Optionally, the import interface supports importing models in the formats dae, usd, obj, fbx, stl, drc, ply, stp, step, glb, and gltf.
[0087] As described above, this motion simulation system provides a configuration process with real-time visual interaction, allowing for real-time verification of the configuration process and reducing the cost of later modifications. By decoupling the model control script and the model motion joint configuration, it improves the compatibility of configuration files. Furthermore, the software is easy to use, reducing the learning cost for users configuring model simulation motion. It is worth noting that this motion simulation system can be the execution entity of the motion simulation method described in any embodiment of this application, and has the same beneficial effects.
[0088] The present invention also provides a computer-readable storage medium comprising a motion simulation method program, wherein when executed by a processor, the motion simulation method program implements the steps of the motion simulation method as described in any of the preceding claims.
[0089] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0090] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0091] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0092] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0093] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This 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 methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.
Claims
1. A motion simulation method, characterized in that, The motion simulation method includes: Receive the first model data; The target lightweight mode is determined based on the received selection data, wherein the selection data is used to represent the lightweight mode selected by the user from three preset lightweight modes (low, medium, and high) through the interactive interface; and the second model data is obtained by reducing the facets of the first model data according to the preset configuration of the target lightweight mode. Based on the received setting data, a component node corresponding to the second model data is created. The setting data includes data for determining the node type as a component node, the associated parent node of the component node, and the node name. A motion link is created associated with the component node. If the motion link is successfully created, the child nodes of the motion link are associated with the sub-model nodes corresponding to the second model data based on the received binding data. The binding data represents the association and binding relationship between the child nodes of the motion link and the sub-model nodes corresponding to the second model data. If the binding is successful, based on the received first configuration data, simulation behavior configuration is performed on the associated sub-model nodes through the motion link, and attribute configuration is performed on the component nodes to obtain third model data. The first configuration data includes data for configuring the position, angle, motion type, motion coordinate system, reference axis, and motion limit of the sub-model nodes, and data for configuring the component name, the actual model and name corresponding to the bill of materials, and the component type of the component node. The parametric model is configured, which is divided into an adaptive model and a series model. When in the configuration state of the adaptive model, the adaptive parameters of the component nodes are configured according to the received second configuration data, wherein the second configuration data includes data for configuring the node type, generation method, multiplier, direction, and direction offset of the component nodes. When in the configuration state of the series model, a series type node is created according to the received third configuration data, and models of different models within the same series are associated with the series type node. The third configuration data includes data for configuring the series name, added model, component, component model, and component remarks. After configuration, fourth model data is obtained. In response to the received export request, the model data file corresponding to the fourth model data is exported.
2. The motion simulation method according to claim 1, characterized in that, The first model data includes multiple model faces, each model face including multiple feature parameters. The step of reducing the facets of the first model data according to the preset configuration of the target lightweight mode to obtain the second model data includes: The target threshold corresponding to each feature parameter is determined according to the preset configuration of the target lightweight mode; The parameter values of the feature parameters of each model surface are compared with the corresponding target threshold; In response to a comparison result where the feature parameters of the target model surface are lower than the corresponding target threshold, the target model surface is deleted from the first model data; The remaining model surfaces of the first model data are then reorganized.
3. The motion simulation method according to claim 1, characterized in that, The creation of motion links associated with the component nodes includes: Based on the mechanical structure hierarchy of the second model data, create motion links associated with the component nodes.
4. The motion simulation method according to claim 1, characterized in that, The configuration of simulation behavior for the associated sub-model nodes via the motion link includes: The simulation behavior of the sub-model nodes is determined by configuring the position, angle, motion type, motion coordinate system, reference axis, and motion limit of the associated sub-model nodes through the motion link.
5. The motion simulation method according to claim 1, characterized in that, The configuration of attributes for the component nodes includes: Configure the component name, the actual model and name corresponding to the bill of materials, and the component type of the component node.
6. The motion simulation method according to claim 1, characterized in that, Configuring the adaptive parameters of the component nodes includes: Configure the node type, generation method, multiplier, direction, and direction offset of the component node.
7. The motion simulation method according to claim 2, characterized in that, The characteristic parameters include surface dimensions and aperture diameter.
8. A motion simulation system, characterized in that, The motion simulation system includes: The model import module is configured to provide an import interface for model data files and send the first received model data to the model lightweighting module. The model lightweighting module is configured to provide a selection entry for a lightweighting mode, and to determine a target lightweighting mode based on the received selection data. The selection data is used to represent the lightweighting mode selected by the user from three preset lightweighting modes (low, medium, and high) through the interactive interface. Based on the preset configuration of the target lightweighting mode, the received first model data is subjected to a facet reduction process to obtain second model data. The module attribute module is configured to provide an entry point for creating motion links. Based on received setting data, it creates component nodes corresponding to the second model data. The setting data includes data for determining the node type as a component node, the associated parent node of the component node, and the node name. It then creates motion links associated with the component nodes. If the motion link is successfully created, based on received binding data, it associates the child nodes of the motion link with the sub-model nodes corresponding to the second model data. The binding data represents the association and binding relationship between the child nodes of the motion link and the sub-model nodes corresponding to the second model data. If the binding is successful, based on received first configuration data, it configures the simulation behavior of the associated sub-model nodes through the motion link and configures the attributes of the component nodes to obtain third model data. The first configuration data includes data for configuring the position, angle, motion type, motion coordinate system, reference axis, and motion limit of the sub-model nodes, and data for configuring the component name, the actual model and name corresponding to the bill of materials, and the component type of the component nodes. The model parameterization module is configured to provide a configuration entry point for parameterized models, which are divided into adaptive models and series models. When in the configuration state of the adaptive model, the adaptive parameters of the component nodes are configured according to the received second configuration data, wherein the second configuration data includes data for configuring the node type, generation method, multiplier, direction, and direction offset of the component nodes. When in the configuration state of the series model, a series type node is created according to the received third configuration data, and models of different models within the same series are associated with the series type node. The third configuration data includes data for configuring the series name, added model, component, component model, and component remarks. After configuration, fourth model data is obtained. The model export module is configured to provide an export entry point for model data files. In response to a received export request, it exports the model data file corresponding to the fourth model data.
9. The motion simulation system according to claim 8, characterized in that, The import interface supports importing models in the formats dae, usd, obj, fbx, stl, drc, ply, stp, step, glb, and gltf.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a motion simulation method program, which, when executed by a processor, implements the steps of the motion simulation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
UE4-based digital twin model lightweight optimization method and system
CN115809489A
Self-adaptive configuration method and system for linkage response of construction type, motion type, control type and optimization type
US20210286325A1