A robotic simulation method, apparatus, and medium

By constructing a unified model file and a multi-level simulation architecture in robot simulation software, the inconsistency problem between different levels in the robot simulation system is solved, achieving efficient collaborative flow of simulation data and improved physical fidelity, while reducing trial and error costs and time.

CN123129158APending Publication Date: 2026-11-20RUANTONG TIANSHU INTELLIGENT (NANJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611380249.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

The lack of unified constraints between different levels in existing robot simulation systems leads to inconsistent results and makes it difficult to achieve a smooth transition from algorithm verification to actual deployment. High-precision simulations are computationally intensive and cannot meet real-time requirements, while low-precision simulations cannot be used for serious engineering verification. Furthermore, there is a lack of systematic state mapping and synchronous update mechanisms between different simulation levels.

Method used

By importing or building a robotic arm structure model into robot simulation software, a unified model file is generated, which includes mechanical structure, kinematic relationships, dynamic characteristics, control interface and sensor parameters. A multi-level simulation architecture is constructed, and a unified simulation scheduler is used to execute the execution plan of each level in sequence, establish a globally unified state vector, and realize bidirectional synchronous updates of parameters at each level.

Benefits of technology

It achieves consistency of states between simulation levels, improves the physical fidelity of robotic arm simulation and the universality of control interfaces, and significantly reduces the trial-and-error costs and cycle from simulation verification to real machine deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123129158A_ABST
    Figure CN123129158A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a robot simulation method, device and medium. The method comprises: importing or constructing a mechanical arm structure model in robot simulation software, and generating a unified model file of the mechanical arm structure model; constructing a multi-level simulation architecture, and sequentially executing execution schemes of each level according to the unified model file in sequence through a unified simulation scheduler according to the order of each level; constructing a unified state vector according to parameter values obtained after the execution schemes of each level, and if the parameter values in the unified state vector are updated, each level updates parameter values of each level based on the unified state vector and a mapping function between parameters, and updates the unified state vector based on the updated parameter values. The above scheme solves the problem of fragmentation of multiple simulation levels, and realizes high consistency of states, constraints and time steps between each simulation level by controlling unified modeling of kinematics, dynamics, sensors and scene simulation levels.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robot simulation technology, and in particular to a robot simulation method, device and medium. Background Technology

[0002] Robot simulation, also known as robot system simulation, is a technology that uses computers to simulate actual robot systems. It relies on a digital twin environment to train, test, and verify robot behavior. It can complete various development tasks without building physical prototypes, significantly reducing R&D costs and trial-and-error risks.

[0003] Existing robot simulation systems commonly suffer from the following technical problems: Simulation of robot control algorithms, kinematics, dynamics, sensors, and scene-level simulations are typically handled by different systems or models of varying precision, lacking unified constraints between layers, leading to inconsistent results. Control algorithms may pass verification in simulation environments, but exhibit significant deviations in real-world robot or hardware-in-the-loop (HIL) environments, making a smooth transition from algorithm verification to real-world deployment difficult. High-precision simulations are computationally intensive, failing to meet real-time operational requirements; while low-precision simulations offer real-time capabilities, they are unsuitable for rigorous engineering verification. Furthermore, there is a lack of systematic state mapping, error constraints, and synchronization mechanisms between different simulation levels (control level, joint level, rigid body level, system level). Summary of the Invention

[0004] This application provides a robot simulation method, device, and medium to achieve high consistency of states, constraints, and time steps between different simulation levels.

[0005] According to one aspect of this application, a robot simulation method is provided, the method comprising:

[0006] Import or build a robotic arm structure model in robot simulation software and generate a unified model file for the robotic arm structure model; wherein, the unified model file includes the mechanical structure, kinematic relationships, dynamic characteristics, control interface and sensor parameters of the robotic arm structure model;

[0007] Based on the unified model file, a multi-level simulation architecture is constructed. The unified simulation scheduler executes the execution plans of each level in the order of the unified model file. Each level includes a control algorithm layer, a joint kinematics layer, a rigid body dynamics layer, a sensor simulation layer, and a scene and environment interaction layer.

[0008] A unified state vector is constructed based on the parameter values ​​obtained after the execution scheme at each level. If any parameter value in the unified state vector is updated, each level updates its parameter values ​​based on the unified state vector and the mapping function between the parameters, and updates the unified state vector based on the updated parameter values ​​at each level.

[0009] According to one aspect of this application, a robot simulation device is provided, the device comprising:

[0010] A unified model file generation module is used to import or build a robotic arm structure model in robot simulation software and generate a unified model file for the robotic arm structure model; wherein, the unified model file includes the mechanical structure, kinematic relationships, dynamic characteristics, control interface and sensor parameters of the robotic arm structure model;

[0011] The scheduling and execution module is used to build a multi-level simulation architecture based on the unified model file. The unified simulation scheduler executes the execution plans of each level in the order of the unified model file. Each level includes a control algorithm layer, a joint kinematics layer, a rigid body dynamics layer, a sensor simulation layer, and a scene and environment interaction layer.

[0012] The update module is used to construct a unified state vector based on the parameter values ​​obtained after the execution scheme of each level. If there is a parameter value update in the unified state vector, each level updates the parameter values ​​of each level based on the unified state vector and the mapping function between the parameters, and updates the unified state vector based on the updated parameter values ​​of each level.

[0013] According to another aspect of this application, an electronic device is provided, the electronic device comprising:

[0014] At least one processor; and,

[0015] A memory that is communicatively connected to at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to perform the robot simulation method of any embodiment of this application.

[0017] According to another aspect of this application, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the robot simulation method of any embodiment of this application.

[0018] According to another aspect of this application, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the robot simulation method of any embodiment of this application.

[0019] The technical solution of this application embodiment involves importing or constructing a robotic arm structure model in robot simulation software and generating a unified model file for the robotic arm structure model. The unified model file includes the mechanical structure, kinematic relationships, dynamic characteristics, control interface, and sensor parameters of the robotic arm structure model. Based on the unified model file, a multi-level simulation architecture is constructed. A unified simulation scheduler executes the execution plans of each level sequentially according to the unified model file. Each level includes a control algorithm layer, a joint kinematics layer, a rigid body dynamics layer, a sensor simulation layer, and a scene and environment interaction layer. A unified state vector is constructed based on the parameter values ​​obtained after executing the plans at each level. If any parameter value in the unified state vector is updated, each level updates its parameter values ​​based on the unified state vector and the mapping function between the parameters, and updates the unified state vector based on the updated parameter values ​​at each level. The above solution completely solves the pain points of fragmented multi-module data and large virtual-real mapping deviation in traditional robot simulation by constructing a unified model file that includes mechanical structure, kinematics, dynamics, control interface and sensor parameters, and combining it with a multi-level simulation architecture and a bidirectional synchronous update mechanism for a globally unified state vector. It not only realizes the efficient collaborative flow of simulation data at all levels, but also significantly improves the physical fidelity of the robotic arm simulation and the universality of the control interface, and significantly reduces the trial and error cost and cycle of the robotic arm from simulation verification to real machine deployment.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 A flowchart of a robot simulation method provided in this application embodiment;

[0023] Figure 2 A flowchart illustrating a robot simulation method provided in another embodiment of this application;

[0024] Figure 3 A flowchart of a robot simulation method provided in another embodiment of this application;

[0025] Figure 4 This is a schematic diagram of the structure of a robot simulation device provided in an embodiment of this application;

[0026] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0028] It should be noted that the terms "first," "second," "third," "fourth," "actual," "preset," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] The acquisition, storage, use, and processing of data in this application comply with relevant national laws and regulations. The acquired data is obtained with authorization and will not be disclosed without permission, used for illegal purposes, purposes detrimental to the interests of others, or for personalized analysis or product promotion. It should be noted that certain software, components, models, and other existing industry solutions may be mentioned in the embodiments of this application. These should be considered exemplary and intended only to illustrate the feasibility of implementing the technical solution of this application, but do not imply that the applicant has already used or necessarily used the relevant content of such solutions.

[0030] Figure 1This is a flowchart illustrating a robot simulation method provided in an embodiment of this application. This embodiment is applicable to situations involving robot simulation. The method can be executed by a robot simulation device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:

[0031] S110. Import or construct a robotic arm structure model in robot simulation software and generate a unified model file for the robotic arm structure model; wherein, the unified model file includes the mechanical structure, kinematic relationships, dynamic characteristics, control interface, and sensor parameters of the robotic arm structure model.

[0032] Robot simulation software is a professional tool that uses a computer to build a virtual digital environment to simulate and verify the entire process of a robot's mechanical structure, motion logic, control algorithms, and sensor interactions. It allows for testing of all stages of robot development without building physical hardware, significantly reducing trial-and-error costs and deployment timelines. The robotic arm structural model can be imported into the robot simulation software or built within it. A unified model file is used to describe the parameters of the robotic arm structural model; only one unified model file is maintained for each robotic arm structural model. The unified model file includes the mechanical structure, kinematic relationships, dynamic characteristics, control interface, and sensor parameters of the robotic arm structural model. Integrating the robotic arm's mechanical structure, kinematic relationships, dynamic characteristics, control interface, and sensor parameters into a single standardized file avoids data inconsistencies caused by separate modeling of multiple modules, serving as the sole data source for full-level simulation.

[0033] In this embodiment, the robotic arm structure model can be imported into robot simulation software, or it can be constructed within the software. For the robotic arm structure model, relevant parameters can be configured and stored in a unified model file.

[0034] S120. Based on the unified model file, a multi-level simulation architecture is constructed. The execution scheme of each level is executed in the order of the unified model file by the unified simulation scheduler. Each level includes a control algorithm layer, a joint kinematics layer, a rigid body dynamics layer, a sensor simulation layer, and a scene and environment interaction layer.

[0035] The multi-level simulation architecture comprises multiple layers for simulation execution, including a control algorithm layer, a joint kinematics layer, a rigid body dynamics layer, a sensor simulation layer, and a scene and environment interaction layer. The control algorithm layer is the decision-making center of the entire simulation system, responsible for upper-level algorithm logic such as path planning, motion control, and task scheduling. It outputs control commands that meet the task objectives, directly addressing the developer's algorithm iteration needs to achieve precise control of the robot's motion behavior. The joint kinematics layer relies on the structural parameters of the robotic arm to complete forward and inverse kinematic calculations, converting the Cartesian space pose commands output from the upper layer into target angle values ​​corresponding to each joint, while simultaneously verifying motion boundary constraints to ensure that the robot's motion path conforms to the physical limitations of the mechanical structure. The rigid body dynamics layer simulates the robot's rigid body's mass, inertia, joint torques, and other physical properties based on a physics engine, calculating joint motion responses under real-world conditions, and reproducing dynamic interaction effects such as load changes and collisions, ensuring that the simulated motion conforms to real physical laws. The sensor simulation layer models the physical properties and workflows of various physical sensors, generating sensor data with realistic characteristics such as noise and distortion. This provides a massive amount of customizable training and testing samples for perception algorithms, significantly reducing data acquisition costs in real-world scenarios. The scene and environment interaction layer constructs a high-fidelity virtual scene containing elements such as obstacles, lighting, and physical materials, enabling bidirectional physical interaction between the robot and its environment. This provides a realistic external operating platform for end-to-end simulation, supporting the simulation and verification of various complex working conditions.

[0036] In this embodiment, a multi-level simulation architecture can be built on the basis of a unified model file. That is, with the unified model file as the only input, five independent and decoupled functional layers are built in logical order: control algorithm layer, joint kinematics layer, rigid body dynamics layer, sensor simulation layer, and scene and environment interaction layer. Each layer only reads the parameters it needs from the unified model file and does not need to import scattered configurations.

[0037] S130. Construct a unified state vector based on the parameter values ​​obtained after executing the scheme at each level. If there is a parameter value update in the unified state vector, then each level updates the parameter values ​​of each level based on the unified state vector and the mapping function between the parameters, and updates the unified state vector based on the updated parameter values ​​of each level.

[0038] Using a unified model file as the sole data source, key state parameters from all levels, including control, kinematics, and dynamics, are integrated into a globally shared unified state vector. Driven by a unified simulation scheduler, parameter updates at any level are synchronously written to this vector. At the same time, all levels read the latest state from the vector in real time to refresh their own parameters, forming a two-way closed-loop synchronization logic of "state vector update → full-level synchronization → new state of each level feeds back to the vector".

[0039] The unified state variable can take the following form:

[0040] ;

[0041] in, Let the joint position vector be... For joint velocity vectors, This is the joint acceleration vector; Let be the rigid body position vector. Let be the rigid body attitude rotation matrix. This represents the attitude parameters obtained after vectorizing the attitude rotation matrix; Let be the linear velocity vector of the rigid body. The angular velocity vector of the rigid body; To control the input vector, For the sensor output vector, It is the external force vector consisting of contact force and other external forces.

[0042] Each simulation layer reads or generates corresponding data from a unified state vector through a pre-established mapping function. (Joint state to...) The positive kinematic mapping of the pose of each link can be represented as:

[0043] ;

[0044] in, For the first Homogeneous transformation matrix of each link relative to the robot base coordinate system The positive kinematics function is established based on the robot's topological relationships, joint axes, and zero pose.

[0045] Joint speed up to the The mapping of the spatial velocities of the links can be expressed as:

[0046] ;

[0047] in, For the first The spatial velocity of each link For the first The Jacobian matrix corresponding to each link.

[0048] The mapping from control commands to the actual output of the actuator can be represented as:

[0049] ;

[0050] in, For the first The actuator output torque or driving force at each time step. For control commands, For the internal state of the actuator, and This is the mapping matrix determined based on the actuator parameters.

[0051] Robot status up to the The mapping of sensor outputs can be represented as:

[0052] ;

[0053] in, For sensor observation function, This represents the number of discrete time steps corresponding to the sensor delay. For zero bias of the sensor, For the first Sensor noise at each time step.

[0054] The mapping from environmental contact forces to joint generalized forces can be expressed as:

[0055] ;

[0056] in, Let Jacobian matrix be the contact point. The contact force at the point of contact. This refers to the generalized force formed after the contact force is mapped onto each joint.

[0057] Therefore, data at different levels is not simply copied, but transformed through mathematical functions determined by the robot's topology, coordinate system, joint axes, and sensor mounting relationships.

[0058] The technical solution of this application embodiment involves importing or constructing a robotic arm structure model in robot simulation software and generating a unified model file for the robotic arm structure model. The unified model file includes the mechanical structure, kinematic relationships, dynamic characteristics, control interface, and sensor parameters of the robotic arm structure model. Based on the unified model file, a multi-level simulation architecture is constructed. A unified simulation scheduler executes the execution plans of each level sequentially according to the unified model file. Each level includes a control algorithm layer, a joint kinematics layer, a rigid body dynamics layer, a sensor simulation layer, and a scene and environment interaction layer. A unified state vector is constructed based on the parameter values ​​obtained after executing the plans at each level. If any parameter value in the unified state vector is updated, each level updates its parameter values ​​based on the unified state vector and the mapping function between the parameters, and updates the unified state vector based on the updated parameter values ​​at each level. The above solution completely solves the pain points of fragmented multi-module data and large virtual-real mapping deviation in traditional robot simulation by constructing a unified model file that includes mechanical structure, kinematics, dynamics, control interface and sensor parameters, and combining it with a multi-level simulation architecture and a bidirectional synchronous update mechanism for a globally unified state vector. It not only realizes the efficient collaborative flow of simulation data at all levels, but also significantly improves the physical fidelity of the robotic arm simulation and the universality of the control interface, and significantly reduces the trial and error cost and cycle of the robotic arm from simulation verification to real machine deployment.

[0059] Figure 2 This is a flowchart illustrating a robot simulation method according to another embodiment of this application. This embodiment is an optimization based on the above embodiment; solutions not described in detail in this embodiment are found in the above embodiment. Figure 2 As shown, the method in this embodiment of the application specifically includes the following steps:

[0060] S210. Import the robotic arm structure model into the model editing module, or construct the robotic arm structure model using basic mechanical units.

[0061] S220. Establish the topological relationship between links, and determine the parent link, child link, rotation axis joint type, range of motion, and zero pose of each joint.

[0062] Topology describes the hierarchical structure of how the various components of the robotic arm are connected together via joints. The parent link serves as the motion reference. When calculating kinematics, the orientation of child links is calculated relative to the parent link. Child links are the links that actually undergo relative motion. The type of rotary axis joint determines the allowed degrees of freedom and motion patterns between links. Range of motion defines the physical limits of joint variables, preventing self-collisions or hardware damage during operation. Zero pose is the initial state of the robotic arm when all joint variables are zero; it is the reference point for kinematic calculations.

[0063] S230. Determine the dynamic parameters of each link; wherein the dynamic parameters include: mass, center of mass position, inertia tensor, and collision assembly.

[0064] Mass is the amount of matter contained in a link, and is a fundamental physical quantity for measuring the magnitude of the link's inertia. The center of mass is the average location of the link's mass distribution. The inertia tensor is a physical quantity describing the link's ability to resist angular acceleration when rotating about its axes. The collision aggregate is a set of simplified geometries used by the physics engine for collision detection.

[0065] S240. Determine the parameters of the sensor; the parameters of the sensor include the installation position, sampling frequency, delay and error parameters; the sensor includes an encoder, an image acquisition device, and a force sensor.

[0066] S250. Based on the topological relationship, dynamic parameters, and sensor parameters, generate a unified model file for the robotic arm structure model.

[0067] S260. Based on the unified model file, a multi-level simulation architecture is constructed. The execution scheme of each level is executed in the order of the unified model file by the unified simulation scheduler. Each level includes a control algorithm layer, a joint kinematics layer, a rigid body dynamics layer, a sensor simulation layer, and a scene and environment interaction layer.

[0068] In the unified model file, some parameters are fixed parameters that are set in advance during the modeling phase, while others are parameters that are dynamically obtained or corrected during calibration, simulation operation, or real robot testing. Not all parameters must be manually input in advance.

[0069] The parameters are divided into the following three categories.

[0070] The first category consists of fixed structural parameters, including link topology, joint type, joint axis, geometric dimensions, joint limits, and sensor mounting positions. These parameters are typically derived from mechanical design drawings, CAD models, URDF models, or technical documentation provided by robot manufacturers and are set during the modeling phase.

[0071] The second category consists of calibrable parameters, including link mass, center of mass, inertia tensor, joint friction coefficient, damping coefficient, actuator time constant, reducer clearance, and sensor zero bias. These parameters can be initially set to design or empirical values, and then calibrated and updated using real robot experimental data.

[0072] The third category consists of operational status parameters, including joint angles, joint velocities, joint accelerations, actuator outputs, contact forces, and current sensor readings. These parameters are not preset but are generated in real-time by each computational layer during the simulation.

[0073] For example, the maximum rotation range of a joint in a robotic arm is a fixed parameter; the joint friction coefficient can be obtained through calibration; and the current angle of the joint is a state variable that is updated in real time at each simulation time step.

[0074] To prevent different simulation layers from using different versions of parameters, the system sets a unique identifier, unit, coordinate system, data source, and version number for each parameter, and stores them uniformly in the robot model database.

[0075] S270. Construct a unified state vector based on the parameter values ​​obtained after executing the scheme at each level. If there is an update in the parameter value in the unified state vector, then each level updates the parameter value of each level based on the unified state vector and the mapping function between the parameters, and updates the unified state vector based on the updated parameter value of each level.

[0076] The solution in this embodiment imports a robotic arm structure model into the model editing module, or constructs a robotic arm structure model using basic mechanical units; establishes the topological relationships between links, determines the parent link, child link, rotation axis joint type, range of motion, and zero pose of each joint; determines the dynamic parameters of each link; wherein the dynamic parameters include: mass, center of mass position, inertia tensor, and collision aggregate; determines the parameters of the sensors; the sensor parameters include installation position, sampling frequency, delay, and error parameters; the sensors include encoders, image acquisition devices, and force sensors; and generates a unified model file of the robotic arm structure model based on the topological relationships, dynamic parameters, and sensor parameters. The above solution can generate a globally unified model file, which serves as the sole authoritative data source for the entire multi-level simulation system. All simulation levels are calculated and constrained based on this unified model file, fundamentally avoiding problems such as duplicate model definitions, inconsistent parameters, or semantic deviations between different simulation modules.

[0077] Figure 3 This is a flowchart illustrating a robot simulation method according to another embodiment of this application. This embodiment is an optimization based on the above embodiments; solutions not described in detail in this embodiment are found in the above embodiments. Figure 3 As shown, the method in this embodiment of the application specifically includes the following steps:

[0078] S310. Import or build a robotic arm structure model in robot simulation software and generate a unified model file for the robotic arm structure model; wherein, the unified model file includes the mechanical structure, kinematic relationships, dynamic characteristics, control interface and sensor parameters of the robotic arm structure model.

[0079] S320. Based on the unified model file, construct a multi-level simulation architecture.

[0080] S330. The control algorithm layer receives the target position, the current state of the robotic arm and sensor data, the trajectory planning, inverse kinematics and feedback control algorithms through a unified simulation scheduler, and generates parameter instructions for the robotic arm; wherein, the parameter instructions include joint position instructions, speed instructions and torque instructions.

[0081] For example, the unified simulation scheduler's scheduling control algorithm layer receives the target position, the current state of the robotic arm, and sensor data. It then runs trajectory planning, inverse kinematics, and feedback control algorithms to generate joint position commands, speed commands, or torque commands. For instance, the control algorithm layer outputs the following in the k-th control cycle:

[0082] ;

[0083] Alternatively, output torque control commands:

[0084] ;

[0085] in, This refers to the number of joints in the robotic arm. For the first The target angle of each joint For the first The target torque for each joint. For a six-axis robotic arm, .

[0086] S340. The kinematics layer of the joint is scheduled to convert the joint angle in the joint position command into a spatial pose based on the link length, joint axis and topological relationship, and to calculate the Jacobian matrix, joint velocity and end effector velocity.

[0087] S350: The rigid body dynamics layer is scheduled to calculate the actual motion response of the robotic arm based on the unknown joint commands, mass, inertia, friction, and external contact forces.

[0088] The rigid body dynamics layer calculates the actual motion response of the robotic arm based on joint commands, mass, inertia, friction, and external contact forces. Its dynamic equation can be expressed as:

[0089] ;

[0090] in, For the quality matrix, For Coriolis force and centrifugal force terms, For gravity, This is the term for joint friction. The joint torque output by the actuator. For external contact force, Let be the Jacobian matrix of the contact point.

[0091] S360: The scheduling sensor simulation layer generates sensor simulation data based on the real state obtained from the rigid body dynamics layer, and adds the parameters of the sensor.

[0092] S370. The scene and environment interaction layer is scheduled to detect the contact between the robotic arm, gripper, box and plane, calculate the contact point, contact depth, normal force and friction force, and feed the contact force back to the rigid body dynamics layer for cyclic execution.

[0093] The solution in this embodiment uses a unified simulation scheduler to schedule the control algorithm layer to receive the target position, the current state of the robotic arm, sensor data, trajectory planning, inverse kinematics, and feedback control algorithms, generating parameter commands for the robotic arm. These parameter commands include joint position commands, velocity commands, and torque commands. The joint kinematics layer is scheduled to convert the joint angles in the joint position commands into spatial poses based on link lengths, joint axes, and topological relationships, and calculate the Jacobian matrix, joint velocity, and end effector velocity. The rigid body dynamics layer is scheduled to calculate the actual motion response of the robotic arm based on the unknown joint commands, mass, inertia, friction, and external contact forces. The sensor simulation layer is scheduled to generate sensor simulation data based on the real state obtained from the rigid body dynamics layer and incorporate the sensor parameters. The scene and environment interaction layer is scheduled to detect the contact between the robotic arm, gripper, box, and plane, calculate the contact point, contact depth, normal force, and friction force, and feed the contact force back to the rigid body dynamics layer for cyclic execution. This solution allows the unified simulation scheduler to execute the simulations in a predetermined order, rather than running them independently, enabling each simulation layer to operate collaboratively and orderly within the same simulation cycle.

[0094] As a non-limiting implementation, the execution plan for each level is executed sequentially according to the unified model file by a unified simulation scheduler, including:

[0095] Establish a global simulation time, define the basic time step of dynamics, and create a unified state object in memory; wherein, the unified state object includes joint state, rigid body pose, rigid body velocity, control command, external force, sensor output and contact state;

[0096] Within each basic time step, the execution plans of each level are executed sequentially according to the unified model file in the order of each wind turbine, and the unified state object updated after the execution plan is written into the state cache of the next time step.

[0097] In this embodiment, a unified master clock, a unified state bus, a deterministic scheduling order, and state write permissions enable each simulation level to run collaboratively in the same simulation loop.

[0098] The system first establishes a global simulation time:

[0099] ;

[0100] in, The base time step number, This is the time step for the dynamics.

[0101] No. The unified state object corresponding to each basic time step can be represented as:

[0102] ;

[0103] in, For the set of poses of each rigid body, For the set of velocities of each rigid body, It is a set of collision and contact states.

[0104] Within each base time step, the system executes in the following order:

[0105] The first step is for the control algorithm layer to read the state and sensor data from the previous time step and generate control commands.

[0106] The second step is for the actuator model to convert control commands into actual output torque or driving force.

[0107] The third step is to detect collisions and calculate external contact forces in the scene interaction layer.

[0108] The fourth step involves the dynamics layer calculating the new joint acceleration, velocity, and position.

[0109] The fifth step involves the kinematic layer calculating the pose of each link and sensor based on the updated joint states.

[0110] The sixth step is for the sensor layer to generate the sensor output at the current timestamp.

[0111] Step 7: The consistency check module checks whether the state of each layer satisfies the joint constraints, topological constraints, and error thresholds.

[0112] The eighth step is to write the verified state into the state buffer for the next time step.

[0113] The system employs a double-buffering mechanism: one buffer stores (X_k), and the other buffer generates (X_{k+1}). Before all modules have completed their calculations for the current time step, no module is allowed to proceed to the next time step, thus creating a synchronization barrier.

[0114] Compared to existing technologies, traditional systems typically maintain separate copies of the robot state for control simulation, dynamics simulation, and visualization simulation. Data is loosely transmitted between modules via network messages, which can easily lead to inconsistent timestamps, duplicate integrations, inconsistent units, and state overlap. In this embodiment, only the state in the unified state bus is the authoritative state. Each layer can only read the unified state and write to its assigned fields according to predefined permissions. For example, the control layer can only write control commands, the dynamics layer can write joint motion states, and the sensor layer can write sensor outputs. This avoids multiple modules modifying the same state variable simultaneously.

[0115] As a non-limiting implementation, the process of determining the mapping function between the parameters includes:

[0116] After loading the unified model file, a robot topology tree is generated based on the relationship between parent and child links;

[0117] Generate a kinematic transformation chain based on the joint axis, joint zero pose, and link transformation matrix;

[0118] The required mass matrix parameters are calculated based on mass, inertia, and the dynamics of center of mass generation.

[0119] Establish a fixed transformation matrix from the sensor coordinate system to the coordinate system of the corresponding link based on the sensor's installation pose;

[0120] Generate an index table between the control interface fields and the unified status fields based on the joint name, number, and data type.

[0121] For example, the mapping relationship is automatically generated by the unified model compiler based on the topology, coordinate system definition, joint definition, and interface definition in the robot model.

[0122] After the unified model is loaded, the model compiler performs the following processing:

[0123] The first step is to generate a robot topology tree based on the relationship between parent and child links.

[0124] The second step is to generate a kinematic transformation chain based on the joint axis, joint zero pose, and link transformation matrix.

[0125] The third step is to calculate the required mass matrix parameters based on the mass, inertia, and center of mass to generate dynamics.

[0126] The fourth step is to establish a fixed transformation matrix from the sensor coordinate system to the corresponding link coordinate system based on the sensor's installation pose.

[0127] The fifth step is to generate an index table between the control interface fields and the unified status fields based on the joint name, number, and data type.

[0128] The mapping table between joint fields and unified status fields can be represented as follows:

[0129] ;

[0130] in, Joint name, Each joint is uniquely numbered. For data types, This is the index of the corresponding field in the unified state vector. This represents the number of joint fields.

[0131] The mapping table between sensor fields and unified state fields can be represented as follows:

[0132] ;

[0133] in, The name of the sensor. Each sensor has a unique identification number. The link to which the sensor belongs. The index of the sensor output in the unified state vector. This is a fixed transformation matrix relative to the sensor coordinate system and the coordinate system of the connecting rod. This represents the number of sensors.

[0134] No. The status update packet submitted by each simulation module can be represented as:

[0135] ;

[0136] in, For module identification, For the current unified timestamp, This refers to the set of fields or write mask that this module is allowed to write to. This represents the amount of status updates submitted by the module. This serves as a data validity identifier. Before writing to the next state buffer, the unified simulation scheduler verifies the timestamp, field write permissions, data type, unit, and validity.

[0137] For example, after the dynamics layer updates the joint angles, the scheduler does not directly send the angles to all modules one by one, but instead updates the unified state. Subsequently, the kinematic layer... The link pose is calculated, and the sensor layer then generates sensor data based on the new link pose.

[0138] For modules with different sampling frequencies, the system employs integer multiple rate scheduling. The execution interval of each module can be expressed as:

[0139] ;

[0140] when Execute the first There are several modules. Among them, This is the sampling period for this module. This is the fundamental time step for dynamics. For example, The control cycle is The camera cycle is The control layer executes every 4 basic time steps, and the camera executes every 20 basic time steps. All data still uses a unified simulation timestamp.

[0141] As a non-limiting implementation, the method further includes:

[0142] The corresponding simulation accuracy mode is determined based on the actual application scenario; wherein, the simulation accuracy mode includes rapid verification mode, engineering verification mode and high-fidelity simulation mode;

[0143] Using the same unified model file, state definition, and interface specification for the robotic arm under different simulation accuracy modes, the execution schemes at each level are scheduled according to the numerical solution method, basic time step, physical constraints, and calculation accuracy corresponding to each simulation accuracy mode.

[0144] In this embodiment, the rapid verification mode is primarily used for quick testing of algorithm logic, task flow, and trajectory reachability. This mode can employ a larger time step, such as 5 to 20 milliseconds, and uses simplified actuator models, simplified collision models, and idealized sensor models. For tasks that do not require verification of force conditions, only kinematic calculations or simplified dynamic calculations can be run to improve simulation speed.

[0145] The engineering verification mode is primarily used for control parameter tuning, mechanical motion verification, collision checks, and pre-deployment testing. This mode employs a complete rigid body dynamics model, actuator response model, joint friction model, contact model, and sensor noise and delay model. The base time step can be set from 1 to 5 milliseconds.

[0146] High-fidelity simulation mode is primarily used for rigorous engineering verification of high-speed collisions, precision assembly, flexible mechanisms, reducer clearances, and the performance of high-precision sensors. This mode employs smaller time steps, such as 0.1 to 1 millisecond, and utilizes higher-order integration methods, finer collision meshes, nonlinear friction models, and more complex sensor physics models.

[0147] The three modes are executed through a simulation configuration set. For example:

[0148] The set of simulation accuracy modes can be uniformly represented as:

[0149] ;

[0150] in, Based on the time step, Configure the numerical solver. Configure the collision model. Configure friction and constraint models. Configure the sensor model.

[0151] The fast verification mode can be represented as follows:

[0152] ;

[0153] The engineering verification model can be represented as follows:

[0154] ;

[0155] A high-fidelity simulation mode can be represented as follows:

[0156] ;

[0157] in, This represents kinematic interpolation or simplified dynamic solution. This represents the solution of the dynamics of a complete rigid body. This indicates higher-order integrals or high-precision dynamic solutions; , and These represent simplified colliders, standard colliders, and fine-grained collision meshes, respectively. , and These represent an ideal sensor model, a sensor model including noise and delay, and a high-fidelity sensor physical model, respectively. The time steps mentioned above are just examples and can be configured according to robot type, task requirements, and computing resources.

[0158] When switching modes, the robot model is not rebuilt, nor is the current state cleared. The system saves the current unified state, loads the solver parameters of the target mode, and uses the current state as the initial state of the new solver to continue the simulation.

[0159] Different precision modes share the same robot model, state definitions, and interface specifications. Regardless of the selected simulation mode, the number of joints, link lengths, joint names, coordinate system, mass parameters, control command fields, and sensor data fields of the robotic arm remain unchanged. The only differences are the methods and granularity used to calculate these states.

[0160] For example, when the same six-axis robotic arm performs a grasping task:

[0161] In the fast verification mode, after the control algorithm outputs the joint target angle, the system can directly update the joint angle through interpolation and perform basic collision detection without calculating the motor torque and joint elasticity in detail.

[0162] In engineering verification mode, the same joint target angle is first entered into the servo controller, and then the actual joint motion is calculated based on the actuator time constant, torque limit, friction and the robot arm dynamics equation.

[0163] In high-fidelity mode, in addition to the above calculations, the reducer clearance, joint flexibility, fine contact surface, and higher frequency sensor response are further calculated.

[0164] The input structure read by the control algorithm is always the same in all three modes, and the output instruction structure is also the same. Therefore, when switching modes, there is no need to modify the control algorithm, only to switch the simulation solution configuration.

[0165] As a non-limiting implementation, the method further includes:

[0166] The sensor simulation layer is scheduled to simulate sensor output data based on the sensor type, installation pose, and parameter characteristics defined in the unified model file, so that the sensor data in the simulation environment is consistent with the real system in terms of time characteristics, data format, and error characteristics.

[0167] For example, a joint encoder and a depth camera are used as examples to illustrate this.

[0168] For the joint encoder, the dynamics layer first obtains the actual joint angles. The sensor layer generates the output based on the encoder's sampling frequency, communication delay, resolution, zero bias, and noise.

[0169] ;

[0170] in, To account for the actual joint angles after communication or sampling delays, For encoder delay, Zero bias, It is random noise. This is the quantization function determined based on the encoder resolution.

[0171] Assuming the true joint angle is 1.000 radians, the encoder zero bias is 0.002 radians, the current noise is -0.001 radians, and the resolution is 0.001 radians, the output result will be approximately 1.001 radians, instead of directly outputting the ideal value of 1.000 radians.

[0172] For depth cameras, the system installs the camera transformation matrix according to the unified model:

[0173] ;

[0174] in, For the corresponding link In the robot base coordinate system The current pose in the image. Sensor coordinate system Relative to the coordinate system of the link The fixed installation transformation matrix.

[0175] For a six-dimensional force sensor that simultaneously incorporates three-dimensional force and three-dimensional torque, a force spinor is used for coordinate transformation. Let Then, the force spinor in the base coordinate system can be transformed to the sensor local coordinate system as follows:

[0176] ;

[0177] in, This is the adjoint matrix corresponding to the homogeneous transformation. After completing the coordinate transformation, range limits, zero bias, drift, and noise are added to obtain the final simulation output of the force sensor.

[0178] Determine the camera's actual position and orientation at the current moment.

[0179] The scene rendering module generates a depth map based on camera intrinsics, focal length, image resolution, field of view, and scene geometry, and then adds depth error, missing points, distortion, and latency.

[0180] The generated data uses the same data structure, coordinate system name, timestamp format, and units as the real camera. The control algorithm cannot distinguish whether the data comes from a simulated camera or a real camera.

[0181] For force sensors, the system obtains the end force based on a contact model and transforms it to the sensor's local coordinate system. Then, range limits, zero bias, drift, and noise are added to generate six-dimensional force and torque data.

[0182] As a non-limiting implementation, the method further includes:

[0183] Define a unified robot input / output interface. In the simulation environment, this interface is implemented by the simulation adapter, and in the real robot environment, the same interface is implemented by the physical robot adapter.

[0184] The system first defines a unified robot input / output interface, for example:

[0185] iRobotIO

[0186] {

[0187] ReadJointState();

[0188] ReadSensorData();

[0189] SendJointCommand();

[0190] SendCartesianCommand();

[0191] }

[0192] The control algorithm only calls the aforementioned unified interface and does not directly access the simulation engine or the real robot driver.

[0193] In the simulation environment, this interface is implemented by the simulation adapter:

[0194] SimulationRobotAdapter: IRobotIO;

[0195] The adapter reads joint status and sensor data from the unified simulation state bus and writes control commands into the simulation actuator model.

[0196] In a real robotic environment, the same interface is implemented using a physical adapter:

[0197] RealRobotAdapter: IRobotIO;

[0198] The adapter reads real robot data and sends commands via industrial bus, robot SDK, ROS topic, or network protocol.

[0199] The field names, units, joint order, coordinate system definitions, and control mode semantics in the unified data structure and unified control instructions are completely consistent in simulation and actual operation.

[0200] For example, "position mode" uniformly represents the target joint position, with the unit being radians; "torque mode" uniformly represents the target joint torque, with the unit being Newton-meters. Differences in protocols between different robot manufacturers are converted by the physical adapter and cannot be exposed to the control algorithm.

[0201] During deployment, you only need to replace the interface implementation bound to the control program from SimulationRobotAdapter to RealRobotAdapter; the control algorithm code itself does not need to be modified.

[0202] In this embodiment, the system supports comparative analysis of data across different simulation levels and can align and compare simulation data with real robot operation data to evaluate simulation consistency and system errors. The system uses a unified recording format for both simulation and real robot data. First, the simulation and real data are aligned based on timestamps. If the two sets of data have different sampling periods, the same time series is obtained through linear interpolation or zero-order hold-out.

[0203] For joint angles, the system calculates the root mean square error:

[0204] ;

[0205] in, This represents the number of aligned sampling points. For the first Simulated joint angles at each sampling point For the first The actual joint angles at each sampling point.

[0206] The maximum absolute error can be expressed as:

[0207] ;

[0208] The discrete time delay between the simulation curve and the actual curve can be determined by cross-correlation:

[0209] ;

[0210] in, The number of discrete lag steps with the highest correlation. For the corresponding time delay, This represents the aligned sampling period. In practice, the two sets of data can also be mean-trimmed and normalized before calculating the cross-correlation.

[0211] For example, the comparative data for a certain joint is shown in Table 1:

[0212] Table 1

[0213]

[0214] Based on the above data:

[0215] The errors are as follows: , , , and ,therefore:

[0216] ;

[0217] ;

[0218] As an example, the acceptance criteria for this ordinary motion verification task can be set as follows:

[0219] ;

[0220] ;

[0221] ;

[0222] If the above example thresholds are met, the consistency evaluation result for this joint is considered passed. The above thresholds are for illustrative purposes only; actual thresholds should be configured based on robot type, task accuracy, sampling period, and acceptance criteria.

[0223] For the terminal trajectory, the first The three-dimensional position error of each sampling point can be expressed as:

[0224] ;

[0225] The root mean square position error of the terminal trajectory can be expressed as:

[0226] ;

[0227] For contact-based tasks, further comparisons can be made regarding the consistency of the initial contact time error, maximum contact force error, stable grasping time error, and sliding state to form a comprehensive consistency evaluation result tailored to the specific task.

[0228] Figure 4 This is a schematic diagram of a robot simulation device provided in an embodiment of this application. The device can execute the robot simulation method provided in any embodiment of this application, and possesses the corresponding functional modules and beneficial effects of the method execution. Figure 4 As shown, the device includes:

[0229] The unified model file generation module 410 is used to import or build a robotic arm structure model in robot simulation software and generate a unified model file of the robotic arm structure model; wherein, the unified model file includes the mechanical structure, kinematic relationships, dynamic characteristics, control interface and sensor parameters of the robotic arm structure model;

[0230] The scheduling and execution module 420 is used to construct a multi-level simulation architecture based on the unified model file, and execute the execution scheme of each level in the order of the unified model file according to the order of each level through the unified simulation scheduler; wherein, each level includes a control algorithm layer, a joint kinematics layer, a rigid body dynamics layer, a sensor simulation layer, and a scene and environment interaction layer.

[0231] The update module 430 is used to construct a unified state vector based on the parameter values ​​obtained after the execution scheme of each level. If there is a parameter value update in the unified state vector, each level updates the parameter values ​​of each level based on the unified state vector and the mapping function between the parameters, and updates the unified state vector based on the updated parameter values ​​of each level.

[0232] In this embodiment, the unified model file generation module 410 imports or constructs a robotic arm structure model in robot simulation software and generates a unified model file for the robotic arm structure model, including:

[0233] Import the robotic arm structure model into the model editing module, or construct the robotic arm structure model using basic mechanical units;

[0234] Establish the topological relationships between links, and determine the parent link, child link, rotation axis joint type, range of motion, and zero pose of each joint;

[0235] Determine the dynamic parameters of each link; wherein the dynamic parameters include: mass, center of mass position, inertia tensor, and collision aggregate;

[0236] Determine the parameters of the sensor; the sensor parameters include installation location, sampling frequency, delay, and error parameters; the sensor includes an encoder, an image acquisition unit, and a force sensor;

[0237] Based on the topological relationships, dynamic parameters, and sensor parameters, a unified model file for the robotic arm structure model is generated.

[0238] In this embodiment, the scheduling execution module 420 executes the execution plan of each level sequentially according to the unified model file using a unified simulation scheduler, including:

[0239] The control algorithm layer receives the target position, the current state of the robotic arm and sensor data, and performs trajectory planning, inverse kinematics and feedback control algorithms through a unified simulation scheduler to generate parameter commands for the robotic arm; wherein, the parameter commands include joint position commands, speed commands and torque commands;

[0240] The kinematics layer of the joint is scheduled to convert the joint angles in the joint position command into spatial pose based on the link length, joint axis and topological relationship, and calculate the Jacobian matrix, joint velocity and end effector velocity;

[0241] The rigid body dynamics layer is scheduled to calculate the actual motion response of the robotic arm based on the unknown joint commands, mass, inertia, friction, and external contact forces.

[0242] The scheduling sensor simulation layer generates sensor simulation data based on the real state obtained from the rigid body dynamics layer, and adds the parameters of the sensor;

[0243] The scene and environment interaction layer is scheduled to detect the contact between the robotic arm, gripper, box and plane, calculate the contact point, contact depth, normal force and friction force, and feed the contact force back to the rigid body dynamics layer for cyclic execution.

[0244] In this embodiment, the scheduling execution module 420 executes the execution plan of each level sequentially according to the unified model file using a unified simulation scheduler, including:

[0245] Establish a global simulation time, define the basic time step of dynamics, and create a unified state object in memory; wherein, the unified state object includes joint state, rigid body pose, rigid body velocity, control command, external force, sensor output and contact state;

[0246] Within each basic time step, the execution plans of each level are executed sequentially according to the unified model file in the order of each wind turbine, and the unified state object updated after the execution plan is written into the state cache of the next time step.

[0247] In this embodiment of the application, the process by which the update module 430 determines the mapping function between the parameters includes:

[0248] After loading the unified model file, a robot topology tree is generated based on the relationship between parent and child links;

[0249] Generate a kinematic transformation chain based on the joint axis, joint zero pose, and link transformation matrix;

[0250] The required mass matrix parameters are calculated based on mass, inertia, and the dynamics of center of mass generation.

[0251] Establish a fixed transformation matrix from the sensor coordinate system to the coordinate system of the corresponding link based on the sensor's installation pose;

[0252] Generate an index table between the control interface fields and the unified status fields based on the joint name, number, and data type.

[0253] In this embodiment of the application, the apparatus further includes an adaptive execution module, configured to:

[0254] The corresponding simulation accuracy mode is determined based on the actual application scenario; wherein, the simulation accuracy mode includes rapid verification mode, engineering verification mode and high-fidelity simulation mode;

[0255] Using the same unified model file, state definition, and interface specification for the robotic arm under different simulation accuracy modes, the execution schemes at each level are scheduled according to the numerical solution method, basic time step, physical constraints, and calculation accuracy corresponding to each simulation accuracy mode.

[0256] In this embodiment of the application, the method further includes a simulation module, used for:

[0257] The sensor simulation layer is scheduled to simulate sensor output data based on the sensor type, installation pose, and parameter characteristics defined in the unified model file, so that the sensor data in the simulation environment is consistent with the real system in terms of time characteristics, data format, and error characteristics.

[0258] In this embodiment of the application, the method further includes an interface definition module, used for:

[0259] Define a unified robot input / output interface. In the simulation environment, this interface is implemented by the simulation adapter, and in the real robot environment, the same interface is implemented by the physical robot adapter.

[0260] The robot simulation device provided in this application embodiment can execute a robot simulation method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects of the execution method.

[0261] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement embodiments of this application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital processors, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of this application as described herein and / or the first preset requirements.

[0262] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0263] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0264] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as robot simulation methods.

[0265] In some embodiments, the robot simulation method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the robot simulation method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the robot simulation method by any other suitable means (e.g., by means of firmware).

[0266] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0267] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable robot simulation device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0268] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0269] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0270] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0271] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0272] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the robot simulation method provided in any embodiment of this application.

[0273] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0274] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired information of the technical solution of this application can be achieved, and this is not limited herein.

[0275] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made based on the first design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A robot simulation method, characterized in that, The method includes: Import or build a robotic arm structure model in robot simulation software and generate a unified model file for the robotic arm structure model; wherein, the unified model file includes the mechanical structure, kinematic relationships, dynamic characteristics, control interface and sensor parameters of the robotic arm structure model; Based on the unified model file, a multi-level simulation architecture is constructed. The unified simulation scheduler executes the execution plans of each level in the order of the unified model file. Each level includes a control algorithm layer, a joint kinematics layer, a rigid body dynamics layer, a sensor simulation layer, and a scene and environment interaction layer. A unified state vector is constructed based on the parameter values ​​obtained after the execution scheme at each level. If any parameter value in the unified state vector is updated, each level updates its parameter values ​​based on the unified state vector and the mapping function between the parameters, and updates the unified state vector based on the updated parameter values ​​at each level.

2. The method according to claim 1, characterized in that, Import or build a robotic arm structure model in robot simulation software, and generate a unified model file for the robotic arm structure model, including: Import the robotic arm structure model into the model editing module, or construct the robotic arm structure model using basic mechanical units; Establish the topological relationships between links, and determine the parent link, child link, rotation axis joint type, range of motion, and zero pose of each joint; Determine the dynamic parameters of each link; wherein the dynamic parameters include: mass, center of mass position, inertia tensor, and collision aggregate; Determine the parameters of the sensor; the sensor parameters include installation location, sampling frequency, delay, and error parameters; the sensor includes an encoder, an image acquisition unit, and a force sensor; Based on the topological relationships, dynamic parameters, and sensor parameters, a unified model file for the robotic arm structure model is generated.

3. The method according to claim 1, characterized in that, The unified simulation scheduler executes the execution plan for each level in sequence according to the unified model file, including: The control algorithm layer receives the target position, the current state of the robotic arm and sensor data, and performs trajectory planning, inverse kinematics and feedback control algorithms through a unified simulation scheduler to generate parameter commands for the robotic arm; wherein, the parameter commands include joint position commands, speed commands and torque commands; The kinematics layer of the joint is scheduled to convert the joint angles in the joint position command into spatial pose based on the link length, joint axis and topological relationship, and calculate the Jacobian matrix, joint velocity and end effector velocity; The rigid body dynamics layer is scheduled to calculate the actual motion response of the robotic arm based on the unknown joint commands, mass, inertia, friction, and external contact forces. The scheduling sensor simulation layer generates sensor simulation data based on the real state obtained from the rigid body dynamics layer, and adds the parameters of the sensor; The scene and environment interaction layer is scheduled to detect the contact between the robotic arm, gripper, box and plane, calculate the contact point, contact depth, normal force and friction force, and feed the contact force back to the rigid body dynamics layer for cyclic execution.

4. The method according to claim 1 or 3, characterized in that, The unified simulation scheduler executes the execution plan for each level in sequence according to the unified model file, including: Establish a global simulation time, define the basic time step of dynamics, and create a unified state object in memory; wherein, the unified state object includes joint state, rigid body pose, rigid body velocity, control command, external force, sensor output and contact state; Within each basic time step, the execution plans of each level are executed sequentially according to the unified model file in the order of each wind turbine, and the unified state object updated after the execution plan is written into the state cache of the next time step.

5. The method according to claim 1, characterized in that, The process of determining the mapping function between the parameters includes: After loading the unified model file, a robot topology tree is generated based on the relationship between parent and child links; Generate a kinematic transformation chain based on the joint axis, joint zero pose, and link transformation matrix; The required mass matrix parameters are calculated based on mass, inertia, and the dynamics of center of mass generation. Establish a fixed transformation matrix from the sensor coordinate system to the coordinate system of the corresponding link based on the sensor's installation pose; Generate an index table between the control interface fields and the unified status fields based on the joint name, number, and data type.

6. The method according to claim 1, characterized in that, The method further includes: The corresponding simulation accuracy mode is determined based on the actual application scenario; wherein, the simulation accuracy mode includes rapid verification mode, engineering verification mode and high-fidelity simulation mode; Using the same unified model file, state definition, and interface specification for the robotic arm under different simulation accuracy modes, the execution schemes at each level are scheduled according to the numerical solution method, basic time step, physical constraints, and calculation accuracy corresponding to each simulation accuracy mode.

7. The method according to claim 1, characterized in that, The method further includes: The sensor simulation layer is scheduled to simulate sensor output data based on the sensor type, installation pose, and parameter characteristics defined in the unified model file, so that the sensor data in the simulation environment is consistent with the real system in terms of time characteristics, data format, and error characteristics.

8. The method according to claim 1, characterized in that, The method further includes: Define a unified robot input / output interface. In the simulation environment, this interface is implemented by the simulation adapter, and in the real robot environment, the same interface is implemented by the physical robot adapter.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the robot simulation method according to any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the robot simulation method according to any one of claims 1-8.