A method and device for building a robot simulation environment for an agricultural scene

CN122966844APending Publication Date: 2026-10-23BEIJING ZHIYUAN ZHIHE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611097115.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0005]为此,本发明提供一种面向农业场景的机器人仿真环境搭建方法及装置,解决现有农业机器人仿真搭建方式建模效率低、田间真实特征还原度差,无法批量复现各类田间失败工况,且缺少标准化仿真复现校验与闭环评测体系等问题

Benefits of technology

[0122]第一,采用六层分层参数化建模搭配农艺约束采样,能够快速批量生成多样化农田场景,场景资产复用与批量构建效率得到提升。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122966844A_ABST
    Figure CN122966844A_ABST
Patent Text Reader

Abstract

The application discloses a kind of robot simulation environment construction method and device for agricultural scene, this method is first according to agricultural constraint multi-level split agricultural operation scene, build scene parameter space;Using Latin hypercube sampling sampling, by agricultural constraint verification correction obtains compliance scene parameter sample.Relying on sample, combined with dynamics, wheel-ground contact model configuration robot physical parameter completes modeling, again configuration hardware parameter builds sensor degradation model.Through USD interface generation with unique random seed standard basic scene library.Extract field failure event multidimensional feature, mapping encapsulation failure scene package;Based on Gaussian kernel mechanism disturbance generates long tail fault working condition, disturbance rule is injected into process to obtain enhanced scene library.Simulation is carried out and data is stored, and the consistency of multiple rounds of simulation verification is reproduced, and the quality of scene library is evaluated by multiple indexes, and if it does not meet the standard, scene parameters and long tail working condition disturbance range are iteratively updated.The application solves the problems of low modeling efficiency in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot simulation technology, specifically to a method and apparatus for building a robot simulation environment for agricultural scenarios. Background Technology

[0002] With the rapid development of intelligent agricultural machinery and autonomous agricultural robot technology, algorithms for field navigation, crop recognition, and operation control rely on extensive field conditions for iterative verification. However, on-site field trials suffer from long cycles, high costs, and the difficulty in reproducing extremely dangerous conditions. Therefore, algorithm testing based on virtual simulation has become the mainstream R&D approach. Currently, the industry mainly adopts two types of agricultural scenario simulation construction schemes: The first relies on general robot simulation platforms such as Isaac Sim and Gazebo, manually importing robot 3D models, configuring sensor plugins, and manually arranging fields, crops, and obstacles and setting basic physical parameters through a visual editor to quickly construct basic simulation scenarios; the second uses procedural scene generation technology, taking basic geometric parameters such as row spacing, plant spacing, and plot size as input, and generating standardized crop row layouts in batches through scripts, enabling the batch production of regular farmland scenarios and reducing repetitive modeling workload. Both schemes have been widely applied to the simulation of robot navigation algorithms in standard flat farmland, and can complete the preliminary verification of perception, planning, and control logic under basic working conditions such as conventional straight-line movement and inter-row traversal.

[0003] Existing simulation construction solutions struggle to simultaneously achieve scene realism, batch iteration efficiency, and fault condition reproducibility in complex field agricultural scenarios, exhibiting multiple inherent drawbacks: First, general simulation platforms heavily rely on manual modeling and scene-by-scene parameter configuration. Crop, terrain, and soil assets lack standardized parameterized templates, resulting in low efficiency in scene asset reuse and batch generation, hindering the rapid construction of large-scale datasets covering various soil, crop, and obstacle combinations. Second, traditional procedural generation relies solely on a limited number of geometric parameters to drive the scene, failing to accurately depict complex field features such as terrain undulations, soil hardness differences, crop lodging and missing plants, and random obstacles. Furthermore, the low coupling degree between field contact dynamics, multi-sensor distortion degradation, and the overall scene design results in poor simulation performance. There is a significant discrepancy between real data and actual field data, reducing the reliability of algorithm evaluation. Third, the existing solution lacks a standardized mechanism for recording, mapping, and replaying failure samples from real fields. Extreme long-tail failures such as getting stuck, skidding, sensor misses, and path planning failures cannot be automatically generated. Failures can only be simulated by manually modifying parameters, making it difficult to expand failure conditions in batches. Fourth, the existing simulation process lacks a unified reproduction verification and closed-loop evaluation system. Scene parameters, random seeds, and time-series data lack standardized storage specifications. The consistency of multiple simulation outputs under the same condition cannot be quantitatively verified. The coverage of scene library conditions and the effectiveness of fault reproduction lack unified quantitative evaluation indicators, making it impossible to iteratively optimize the scene generation logic based on the evaluation results.

[0004] Therefore, there is an urgent need for a method to build a robot simulation environment for agricultural scenarios to solve the problems of low modeling efficiency and poor reproduction of real field features in existing technologies. Summary of the Invention

[0005] To address these issues, this invention provides a method and apparatus for building a robot simulation environment for agricultural scenarios, which solves the problems of low modeling efficiency, poor reproduction of real field features, inability to reproduce various field failure conditions in batches, and lack of a standardized simulation reproduction verification and closed-loop evaluation system in existing agricultural robot simulation building methods.

[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for building a robot simulation environment for agricultural scenarios, comprising:

[0007] Based on preset agronomic constraints, the agricultural operation scenario is divided into several levels, and the parameter value range and probability distribution are configured for each level to construct a scenario parameter space.

[0008] The scenario parameter space is sampled using a Latin hypercube sampling strategy to obtain sampled parameters; the sampled parameters are then verified using a preset agronomic constraint rule library, and parameters that do not meet the constraints are discarded or corrected to generate standardized scenario parameter samples that meet agronomic logic.

[0009] Based on the standardized scenario parameter samples, the physical parameters of the agricultural robot are configured through rigid body dynamics equations and wheel-ground contact models to complete the binding of the robot's physical model.

[0010] Based on the completed robot physical model, configure the inherent hardware parameters, construct a sensor observation degradation model, and output a time-series observation generation rule with real noise distortion.

[0011] Based on the standardized scene parameter samples, the robot physical model, and the sensor observation degradation model, standardized scene instances are generated through the USD asset instantiation interface of the simulation platform; a unique random seed and parameter configuration are bound to each standardized scene instance to form a standard basic scene library.

[0012] Extract multi-dimensional feature vectors from failure events in actual field vehicles or historical simulation logs; map the multi-dimensional feature vectors to scene parameter mutation rules and sensor degradation superposition rules, and encapsulate them into a standardized failure scene package;

[0013] Based on the standardized failure scenario package, and combined with the Gaussian kernel similarity determination mechanism, long-tailed variant failure conditions are generated by perturbation in the neighborhood of the set parameters; the standardized failure scenario package and the perturbation rules corresponding to the long-tailed variant failure conditions are used as additional scenario configurations and fed back into the standard basic scenario library generation process to generate an enhanced simulation scenario library.

[0014] Based on the standard basic scenario library and the enhanced simulation scenario library, a full-process simulation is performed and the simulation data is stored; several rounds of simulation are repeated for the same random seed scenario, and the consistency of scenario reproduction is verified by the reproduction correlation coefficient; the quality of the standard basic scenario library and the enhanced simulation scenario library is evaluated by setting quality evaluation indicators; when the evaluation fails, parameter optimization feedback is output; based on the parameter optimization feedback, the perturbation expansion range of the scenario parameter space and the long-tailed variant failure condition is iteratively updated.

[0015] As a preferred solution for building robot simulation environments for agricultural scenarios, the agricultural operation scenario is divided into six levels: terrain geometry layer, soil physics layer, crop morphology layer, obstacle distribution layer, ambient lighting layer, and operation constraint layer.

[0016] The topographic geometry layer is described by scale parameters, furrow parameters, slope parameters, and field ridge and ditch parameters; the soil physical layer is described by zonal friction coefficient, resistance coefficient, subsidence parameters, and stiffness and damping parameters; the crop morphology layer is described by row spacing parameters, plant spacing parameters, density parameters, lodging and missing plant parameters, plant height parameters, and shading parameters; the obstacle distribution layer is described by obstacle type, location distribution, and size parameters; the ambient light layer is described by light intensity, light direction, fog and dust concentration, and backlight parameters; and the operational constraint layer is described by coverage area parameters, restricted area parameters, inter-row passage parameters, and safety boundary parameters.

[0017] As a preferred solution for building a robot simulation environment for agricultural scenarios, during the sampling of the scenario parameter space using the Latin hypercube sampling strategy, the sampling uniformity index and the scene diversity coverage index are quantified by the sampling uniformity index and the Shannon entropy index, respectively.

[0018] The formula for calculating the sampling uniformity index is as follows:

[0019]

[0020] In the formula, This is a sample point matrix; This represents the number of sampling points; For the first One sampling point; For parameter space dimension; This is a sampling uniformity index; the larger the index, the more uniformly the sampling points are distributed in the parameter space.

[0021] The formula for calculating the Shannon entropy index is as follows:

[0022] In the formula, A collection of generated scenes; Number of scene categories; For the first The proportion of scene types in the scene set; This represents the scene diversity entropy value; a larger value indicates a more diverse scene coverage.

[0023] As a preferred solution for building a robot simulation environment for agricultural scenarios, in the process of configuring the physical parameters of an agricultural robot through the rigid body dynamics equations and the wheel-ground contact model, the physical parameters include: the structural inertia of the chassis, drive mechanism and actuator, actuator boundary constraints and wheel-ground contact parameters;

[0024] The expression for the rigid body dynamics equation is:

[0025]

[0026] In the formula, q is a generalized coordinate vector; It is a generalized velocity vector; M(q) is the generalized acceleration vector; M(q) is the mass inertia matrix. G(q) is the matrix of Coriolis force and centrifugal force; G(q) is the gravity vector; τ is the joint driving torque vector; J is the Jacobian matrix; This is the external contact force vector;

[0027] The expression for calculating the contact force using the aforementioned wheel-to-ground contact model is:

[0028]

[0029]

[0030] In the formula, Normal contact force; It is a tangential contact force; The normal penetration depth; Normal penetration velocity; This is the tangential displacement; Tangential velocity; , These are the normal and tangential stiffness, respectively. , denoted as normal and tangential damping coefficients, respectively; μ is the friction coefficient.

[0031] As a preferred solution for building a robot simulation environment for agricultural scenarios, the inherent hardware parameters configured in the process of constructing the sensor observation degradation model include the inherent hardware parameters of the camera sensor, lidar sensor, wheel speedometer and inertial measurement unit.

[0032] The sensor observation degradation model includes a camera sensor observation degradation model and a lidar point cloud degradation model;

[0033] The expression for the camera sensor observation degradation model is:

[0034]

[0035] In the formula, For ideal observation images; The image is a degraded observation image; Crop shading transformation operator; For atmospheric environment transformation operators; For motion fuzzy transform operators; Sensor noise;

[0036] The expression for the lidar point cloud degradation model is:

[0037]

[0038] In the formula, For an ideal point cloud set; For the degraded point cloud set; For the first An ideal point; This is the noise perturbation vector; For point Distance to the sensor; This is the distance-related noise figure; Based on the base noise level.

[0039] As a preferred method for building robot simulation environments in agricultural scenarios, the multidimensional feature vector expression for failure events is:

[0040]

[0041] In the formula, It is a multidimensional feature vector; This represents the robot's state vector before the failure. The feature vector observed before the failure; This is the sequence vector of actions performed before the failure. Encode the event type to trigger it; Duration of the event;

[0042] In the process of mapping the multidimensional feature vector to scene parameter mutation rules and sensor degradation superposition rules, the failed scene mapping function is expressed as follows:

[0043]

[0044] In the formula, For failure mapping functions; This is the scene parameter mutation vector; This is the sensor parameter degradation vector; This is the set of rules for external disturbances.

[0045] As a preferred solution for building a robot simulation environment for agricultural scenarios, in the process of generating the long-tailed variant failure condition by perturbing within the neighborhood of the set parameters based on the standardized failure scenario package and combined with the Gaussian kernel similarity determination mechanism, the neighborhood of the set parameters is a perturbation range of ±10-20% of the parameters; the expression of the Gaussian kernel similarity determination mechanism is:

[0046]

[0047] In the formula, This is the original failure feature vector; To expand the failed feature vector; For kernel bandwidth parameters;

[0048] when hour, Considered as a valid expanded sample; among them, This is the similarity threshold.

[0049] As a preferred solution for building a robot simulation environment for agricultural scenarios, the simulation data includes the following during the full-process simulation data storage process: hierarchical parameters for each scenario, random seeds, sensor timing sequences, robot control timing sequences, and fault event marker simulation data. The simulation data is stored in a hierarchical binary format: the top layer is the experimental batch directory, the middle layer is the scenario instance directory, and the bottom layer stores the sensor and control timing sequence files with timestamps.

[0050] In the process of verifying the consistency of scene reproduction through the reproduction correlation coefficient, the formula for calculating the reproduction correlation coefficient is as follows:

[0051]

[0052] In the formula, and The output time-series vectors of two independent runs under the same random seed; It is the covariance function; It is the variance function; To reproduce the correlation coefficient, when The consistency of reproduction is deemed acceptable.

[0053] As a preferred solution for building a robot simulation environment for agricultural scenarios, in the process of evaluating the quality of the standard basic scenario library and the enhanced simulation scenario library through the set quality evaluation indicators, the set quality evaluation indicators include: parameter space coverage, working condition type coverage, and failure working condition reproducibility rate.

[0054] The expression for the parameter space coverage is:

[0055]

[0056] In the formula, For the first The parameter space sub-regions covered by each scene instance; The total region of the target parameter space; The total number of scene instances generated; For scene coverage;

[0057] The expression for the coverage rate of the operating condition type is:

[0058]

[0059] In the formula, For operating condition type coverage; This represents the number of independent operating condition categories already covered by the scenario library. To preset the total number of all operating condition categories;

[0060] The expression for the failure condition recurrence rate is:

[0061]

[0062] In the formula, The reproducibility rate of the failed operating condition; The number of failure conditions in which the failure event can be reliably reproduced; This represents the total number of all failed operating conditions.

[0063] This invention also provides a robot simulation environment construction device for agricultural scenarios, employing the above-mentioned robot simulation environment construction method for agricultural scenarios, including:

[0064] The scenario parameter space construction module is used to construct the scenario parameter space based on preset agronomic constraints by dividing the agricultural operation scenario into several levels and configuring the parameter value range and probability distribution for each level.

[0065] The standardized scene parameter sample generation module is used to sample the scene parameter space using a Latin hypercube sampling strategy to obtain sampled parameters; to verify the sampled parameters using a preset agronomic constraint rule library, and to discard or correct parameters that do not meet the constraints, thereby generating standardized scene parameter samples that meet agronomic logic.

[0066] The robot physical model binding module is used to configure the physical parameters of the agricultural robot based on the standardized scene parameter samples, through rigid body dynamics equations and wheel-ground contact models, and to complete the robot physical model binding.

[0067] The sensor observation degradation model construction module is used to configure inherent hardware parameters based on the bound robot physical model, construct a sensor observation degradation model, and output time-series observation generation rules with real noise distortion.

[0068] The standard basic scene library generation module is used to generate standardized scene instances based on the standardized scene parameter samples, the robot physical model, and the sensor observation degradation model through the USD asset instantiation interface of the simulation platform; and to bind a unique random seed and parameter configuration to each of the standardized scene instances to form a standard basic scene library.

[0069] The standardized failure scenario package acquisition module is used to extract multi-dimensional feature vectors of failure events from failure events in actual field vehicles or historical simulation logs; map the multi-dimensional feature vectors to scene parameter mutation rules and sensor degradation superposition rules, and encapsulate them into a standardized failure scenario package;

[0070] The enhanced simulation scenario library generation module is used to generate long-tailed variant failure conditions by perturbing the standardized failure scenario package and combining the Gaussian kernel similarity judgment mechanism in the neighborhood of set parameters; the standardized failure scenario package and the perturbation rules corresponding to the long-tailed variant failure conditions are used as additional scenario configurations and sent back to the standard basic scenario library generation process to generate the enhanced simulation scenario library.

[0071] The simulation and iterative optimization module is used to perform full-process simulation and store simulation data based on the standard basic scenario library and the enhanced simulation scenario library; to repeatedly perform several rounds of simulation on the same random seed scenario and to verify the consistency of scenario reproduction by using the reproduction correlation coefficient; to evaluate the quality of the standard basic scenario library and the enhanced simulation scenario library by setting quality evaluation indicators; to output parameter optimization feedback when the evaluation fails; and to iteratively update the perturbation expansion range of the scenario parameter space and the long-tailed variant failure condition based on the parameter optimization feedback.

[0072] As a preferred solution for a robot simulation environment construction device for agricultural scenarios, the scenario parameter space construction module divides the agricultural operation scenario into six levels: terrain geometry layer, soil physics layer, crop morphology layer, obstacle distribution layer, ambient lighting layer, and operation constraint layer during the process of dividing the agricultural operation scenario into several levels.

[0073] The topographic geometry layer is described by scale parameters, furrow parameters, slope parameters, and field ridge and ditch parameters; the soil physical layer is described by zonal friction coefficient, resistance coefficient, subsidence parameters, and stiffness and damping parameters; the crop morphology layer is described by row spacing parameters, plant spacing parameters, density parameters, lodging and missing plant parameters, plant height parameters, and shading parameters; the obstacle distribution layer is described by obstacle type, location distribution, and size parameters; the ambient light layer is described by light intensity, light direction, fog and dust concentration, and backlight parameters; and the operational constraint layer is described by coverage area parameters, restricted area parameters, inter-row passage parameters, and safety boundary parameters.

[0074] As a preferred solution for building a robot simulation environment for agricultural scenarios, the standardized scene parameter sample generation module quantifies the sampling uniformity and scene diversity coverage by means of sampling uniformity index and Shannon entropy index during the sampling of the scene parameter space through the Latin hypercube sampling strategy.

[0075] The formula for calculating the sampling uniformity index is as follows:

[0076]

[0077] In the formula, This is a sample point matrix; This represents the number of sampling points; For the first One sampling point; For parameter space dimension; This is a sampling uniformity index; the larger the index, the more uniformly the sampling points are distributed in the parameter space.

[0078] The formula for calculating the Shannon entropy index is as follows:

[0079]

[0080] In the formula, A collection of generated scenes; Number of scene categories; For the first The proportion of scene types in the scene set; This represents the scene diversity entropy value; a larger value indicates a more diverse scene coverage.

[0081] As a preferred solution for building a robot simulation environment for agricultural scenarios, in the robot physical model binding module, during the process of configuring the physical parameters of the agricultural robot through the rigid body dynamics equation and the wheel-ground contact model, the physical parameters include: the structural inertia of the chassis, drive mechanism and actuator, actuator boundary constraints and wheel-ground contact parameters;

[0082] The expression for the rigid body dynamics equation is:

[0083]

[0084] In the formula, q is a generalized coordinate vector; It is a generalized velocity vector; M(q) is the generalized acceleration vector; M(q) is the mass inertia matrix. G(q) is the matrix of Coriolis force and centrifugal force; G(q) is the gravity vector; τ is the joint driving torque vector; J is the Jacobian matrix; This is the external contact force vector;

[0085] The expression for calculating the contact force using the aforementioned wheel-to-ground contact model is:

[0086]

[0087]

[0088] In the formula, Normal contact force; It is a tangential contact force; The normal penetration depth; Normal penetration velocity; This is the tangential displacement; Tangential velocity; , These are the normal and tangential stiffness, respectively. , denoted as normal and tangential damping coefficients, respectively; μ is the friction coefficient.

[0089] As a preferred solution for building a robot simulation environment for agricultural scenarios, the sensor observation degradation model construction module configures the inherent hardware parameters of the camera sensor, lidar sensor, wheel speedometer and inertial measurement unit during the construction of the sensor observation degradation model.

[0090] The sensor observation degradation model includes a camera sensor observation degradation model and a lidar point cloud degradation model;

[0091] The expression for the camera sensor observation degradation model is:

[0092]

[0093] In the formula, For ideal observation images; The image is a degraded observation image; Crop shading transformation operator; For atmospheric environment transformation operators; For motion fuzzy transform operators; Sensor noise;

[0094] The expression for the lidar point cloud degradation model is:

[0095]

[0096] In the formula, For an ideal point cloud set; For the degraded point cloud set; For the first An ideal point; This is the noise perturbation vector; For point Distance to the sensor; This is the distance-related noise figure; Based on the base noise level.

[0097] As a preferred solution for building a robot simulation environment for agricultural scenarios, the multidimensional feature vector expression of the failure event in the standardized failure scenario package acquisition module is:

[0098]

[0099] In the formula, It is a multidimensional feature vector; This represents the robot's state vector before the failure. The feature vector observed before the failure; This is the sequence vector of actions performed before the failure. Encode the event type to trigger it; Duration of the event;

[0100] In the process of mapping the multidimensional feature vector to scene parameter mutation rules and sensor degradation superposition rules, the failed scene mapping function is expressed as follows:

[0101]

[0102] In the formula, For failure mapping functions; This is the scene parameter mutation vector; This is the sensor parameter degradation vector; This is the set of rules for external disturbances.

[0103] As a preferred solution for building a robot simulation environment for agricultural scenarios, in the enhanced simulation scenario library generation module, during the process of generating the long-tailed variant failure condition by perturbing within the neighborhood of the set parameters based on the standardized failure scenario package and combined with the Gaussian kernel similarity determination mechanism, the neighborhood of the set parameters is a perturbation range of ±10-20% of the parameters; the expression of the Gaussian kernel similarity determination mechanism is:

[0104]

[0105] In the formula, This is the original failure feature vector; To expand the failed feature vector; For kernel bandwidth parameters;

[0106] when hour, Considered as a valid expanded sample; among them, This is the similarity threshold.

[0107] As a preferred solution for building a robot simulation environment for agricultural scenarios, the simulation and iterative optimization module includes the following simulation data during the full-process simulation data storage process: hierarchical parameters of each scenario, random seeds, sensor timing sequences, robot control timing sequences, and fault event marker simulation data; the simulation data adopts hierarchical binary storage: the top layer is the experimental batch directory, the middle layer is the scenario instance directory, and the bottom layer stores the sensor and control timing files with timestamps;

[0108] In the process of verifying the consistency of scene reproduction through the reproduction correlation coefficient, the formula for calculating the reproduction correlation coefficient is as follows:

[0109]

[0110] In the formula, and The output time-series vectors of two independent runs under the same random seed; It is the covariance function; It is the variance function; To reproduce the correlation coefficient, when The consistency of reproduction is deemed acceptable.

[0111] As a preferred solution for building a robot simulation environment for agricultural scenarios, in the simulation and iterative optimization module, during the process of evaluating the quality of the standard basic scenario library and the enhanced simulation scenario library through the set quality evaluation indicators, the set quality evaluation indicators include: parameter space coverage, working condition type coverage, and failure working condition reproducibility rate.

[0112] The expression for the parameter space coverage is:

[0113]

[0114] In the formula, For the first The parameter space sub-regions covered by each scene instance; The total region of the target parameter space; The total number of scene instances generated; For scene coverage;

[0115] The expression for the coverage rate of the operating condition type is:

[0116]

[0117] In the formula, For operating condition type coverage; This represents the number of independent operating condition categories already covered by the scenario library. To preset the total number of all operating condition categories;

[0118] The expression for the failure condition recurrence rate is:

[0119]

[0120] In the formula, The reproducibility rate of the failed operating condition; The number of failure conditions in which the failure event can be reliably reproduced; This represents the total number of all failed operating conditions.

[0121] The present invention has the following advantages:

[0122] First, by adopting a six-layer hierarchical parametric modeling combined with agronomic constraint sampling, diverse farmland scenes can be generated quickly in batches, improving the efficiency of scene asset reuse and batch construction.

[0123] Second, it integrates rigid body dynamics, wheel-to-ground contact, and multi-sensor degradation models to closely match various real-world environmental disturbances caused by soil, light, and crops in the field, thereby reducing the data discrepancy between simulation and reality.

[0124] Third, real-world failure events can be packaged into standardized scenario packages and extended to long-tail failure conditions, automatically expanding extreme failure samples without the need for manual construction of failure scenarios.

[0125] Fourth, it is equipped with a complete simulation data storage, reproduction verification and multi-dimensional quantitative evaluation system, which can judge the overall working condition coverage level of the scenario library, and can also iteratively optimize the scenario generation logic.

[0126] Fifth, the entire process relies on a simulation platform to automatically complete scene generation, fault injection, and evaluation, significantly reducing the number of field trials and lowering the time and manpower costs of robot algorithm iteration. Attached Figure Description

[0127] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0128] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0129] Figure 1 This is a flowchart illustrating a method for building a robot simulation environment for agricultural scenarios, as provided in Embodiment 1 of the present invention.

[0130] Figure 2 This is a schematic diagram of a layered parameterized farmland simulation scenario example in one possible embodiment provided in Embodiment 1 of the present invention;

[0131] Figure 3 This is a visualization diagram of the Stage resource structure and failure conditions of the simulation platform in one possible embodiment of Embodiment 1 of the present invention;

[0132] Figure 4 This is a schematic diagram of the dynamic simulation operation of an agricultural robot in one possible embodiment provided in Embodiment 1 of the present invention;

[0133] Figure 5 This is a schematic diagram of the architecture of a robot simulation environment construction device for agricultural scenarios provided in Embodiment 2 of the present invention. Detailed Implementation

[0134] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0135] Example 1

[0136] See Figure 1 Embodiment 1 of the present invention provides a method for building a robot simulation environment for agricultural scenarios, including the following steps:

[0137] S1. Based on preset agronomic constraints, the agricultural operation scenario is divided into several levels, and the parameter value range and probability distribution are configured for each level to construct the scenario parameter space.

[0138] S2. The scenario parameter space is sampled using a Latin hypercube sampling strategy to obtain sampling parameters; the sampling parameters are verified using a preset agronomic constraint rule library, and parameters that do not meet the constraint conditions are discarded or corrected to generate standardized scenario parameter samples that meet agronomic logic.

[0139] S3. Based on the standardized scenario parameter samples, configure the physical parameters of the agricultural robot through rigid body dynamics equations and wheel-ground contact model to complete the binding of the robot's physical model;

[0140] S4. Based on the completed robot physical model, configure the inherent hardware parameters, construct the sensor observation degradation model, and output the time-series observation generation rules with real noise distortion.

[0141] S5. Based on the standardized scene parameter samples, the robot physical model, and the sensor observation degradation model, generate standardized scene instances through the USD asset instantiation interface of the simulation platform; bind a unique random seed and parameter configuration to each standardized scene instance to form a standard basic scene library;

[0142] S6. Extract multi-dimensional feature vectors of failure events from actual field vehicles or historical simulation logs; map the multi-dimensional feature vectors to scene parameter mutation rules and sensor degradation superposition rules, and encapsulate them into a standardized failure scene package;

[0143] S7. Based on the standardized failure scenario package, and combined with the Gaussian kernel similarity determination mechanism, long-tailed variant failure conditions are generated by perturbation in the neighborhood of the set parameters; the standardized failure scenario package and the perturbation rules corresponding to the long-tailed variant failure conditions are used as additional scenario configurations and sent back to the standard basic scenario library generation process to generate an enhanced simulation scenario library.

[0144] S8. Based on the standard basic scenario library and the enhanced simulation scenario library, perform full-process simulation and store simulation data; repeat several rounds of simulation for the same random seed scenario, and verify the consistency of scenario reproduction by using the reproduction correlation coefficient; evaluate the quality of the standard basic scenario library and the enhanced simulation scenario library by setting quality evaluation indicators; when the evaluation fails, output parameter optimization feedback; iteratively update the perturbation expansion range of the scenario parameter space and the long-tailed variant failure condition based on the parameter optimization feedback.

[0145] In this embodiment, in step S1, based on preset agronomic constraints, the agricultural operation scenario is divided into several levels, and the parameter value range and probability distribution are configured for each level to construct a scenario parameter space.

[0146] Specifically, agricultural operation scenarios are broken down into several combinable layers using parameters: topographic geometry (scale, furrows, slope, and ditches, etc.), soil and surface physics (zonal friction, resistance, subsidence, and stiffness damping, etc.), crop morphology (row spacing, density, lodging, missing plants, plant height, and shading), obstacles and debris, environment and lighting (conditions affecting imaging and visibility), and operation objectives and constraints (covered areas, restricted areas, inter-row access, and safety boundaries). Each layer is described by its value range and distribution. Instances are generated through sampling batches, and correlation constraints are used to avoid combinations that obviously violate agronomic principles.

[0147] In this embodiment, the agricultural operation scenario is decomposed into six levels, and each level is independently configured and coupled through parameter space.

[0148] Topographic geometry layer: described by scale parameters, furrow parameters, slope parameters, and field ridge and ditch parameters. Specifically, scale parameters include plot length of 50-500 meters and plot width of 20-200 meters; furrow parameters include furrow height of 0.1-0.5 meters, furrow width of 0.5-2.0 meters, and furrow spacing of 1.0-3.0 meters; slope parameters include longitudinal slope of -15° to +15° and transverse slope of -10° to +10°; field ridge and ditch parameters include field ridge width of 0.3-1.0 meters and ditch depth of 0.2-0.8 meters.

[0149] Soil physical layer: described by zonal friction coefficient, drag coefficient, settlement parameters, and stiffness-damping parameters. Friction coefficient is set according to surface zoning: 0.6-0.8 for dry hard ground, 0.3-0.5 for moist soft ground, and 0.1-0.3 for muddy ground; drag coefficient ranges from 0.05 to 0.3; settlement parameters include: maximum settlement depth of 0.05-0.3 meters and settlement stiffness of 1000-5000 N / m; stiffness-damping parameters include: normal stiffness of 5000-20000 N / m, tangential stiffness of 1000-5000 N / m, and damping coefficient of 50-500 N·s / m.

[0150] Crop morphology layer: described by row spacing, plant spacing, density, lodging and missing plant parameters, plant height, and shading parameters. Row spacing is 0.3-0.8 meters, plant spacing is 0.1-0.4 meters, and planting density is 10-50 plants / square meter; lodging and missing plant parameters include lodging rate of 0-30% and missing plant rate of 0-10%; plant height is 0.3-1.5 meters; shading parameters include canopy coverage of 0.3-0.9.

[0151] Obstacle distribution layer: Described by obstacle type, location distribution, and size parameters. Obstacle types include stones, mounds of earth, fallen straw, and farm implements; location distribution uses Poisson distribution or uniform distribution; size parameters include obstacle height of 0.05-0.5 meters and width of 0.1-1.0 meters.

[0152] Ambient illumination layer: described by light intensity, light direction, fog and dust concentration, and backlight parameters. Light intensity ranges from 1000 to 100000 lux; light direction is represented by azimuth angle 0-360° and elevation angle 0-90°; fog and dust concentration ranges from 0-0.5; and backlight parameters are represented by backlight angle 0-30°.

[0153] The operation constraint layer is described by parameters for the coverage area, restricted area, inter-row passage, and safety boundary. The coverage area is represented by the coordinates of the vertex of a polygon; the restricted area is also represented by a polygon and has a priority set; the inter-row passage parameters include the allowed passage width of 0.5-1.5 meters; and the safety boundary distance is 0.2-1.0 meters.

[0154] The parameters of each layer are described using a range of values ​​and a probability distribution, and batch sampling is performed in the parameter space using Latin hypercube sampling. After sampling, agronomic constraints are applied, for example: when the slope exceeds 10°, the settlement parameter is prohibited from being set greater than 0.2 meters; when the lodging rate exceeds 20%, the canopy coverage must be greater than 0.6.

[0155] In one possible implementation, taking a simulation built with NVIDIA Isaac Sim as an example, the above-mentioned layers correspond to the asset organization in the Stage, and can be related to... Figure 2For comparison: the main viewport's regular rows and field boundaries represent terrain geometry; multiple named land surfaces under Ground correspond to geometric partitions such as ridges and paths, and carry partition physical parameters to represent differences in dryness, wetness, softness, and hardness; prototypes such as Instancer and RiceTuft under Plants correspond to differences in crop layer row spacing, density, growth, and canopy occlusion; PhysicsScene and partition materials support the physical simulation of the land surface; the robot Prim moves under dynamic constraints, and its feasible region and restricted areas are aligned with the job constraint layer and layout; obstacles and environmental degradation can be switched between geometric, lighting, or sensor parameters. The scripts within Content and USD solidify the parameters into a reproducible scene. Figure 2 This is a schematic diagram of a self-consistent instance obtained from a single sampling.

[0156] In this embodiment, in step S2, the scene parameter space is sampled using a Latin hypercube sampling strategy to obtain sampling parameters; the sampling parameters are verified using a preset agronomic constraint rule library, and parameters that do not meet the constraint conditions are discarded or corrected to generate standardized scene parameter samples that meet agronomic logic.

[0157] Specifically, in this embodiment, a predefined agronomic constraint rule library is defined, and each rule contains a condition expression and a constraint action. After Latin hypercube sampling is completed, the constraint rule library is traversed, and samples that do not meet the constraint conditions are discarded or corrected. The correction operations include parameter truncation, resampling, or scaling.

[0158] In this embodiment, during the sampling of the scene parameter space using the Latin hypercube sampling strategy, the sampling uniformity index and the scene diversity coverage are quantified by the sampling uniformity index and the Shannon entropy index, respectively.

[0159] The formula for calculating the sampling uniformity index is as follows:

[0160]

[0161] In the formula, This is a sample point matrix; This represents the number of sampling points; For the first One sampling point; For parameter space dimension; This is a sampling uniformity index; the larger the index, the more uniformly the sampling points are distributed in the parameter space.

[0162] The formula for calculating the Shannon entropy index is as follows:

[0163] In the formula, A collection of generated scenes; Number of scene categories; For the first The proportion of scene types in the scene set; This represents the scene diversity entropy value; a larger value indicates a more diverse scene coverage.

[0164] In this embodiment, in step S3, based on the standardized scene parameter samples, the physical parameters of the agricultural robot are configured through the rigid body dynamics equation and the wheel-ground contact model to complete the binding of the robot's physical model.

[0165] Specifically, based on the rigid body dynamics equations and the wheel-ground contact model, the structural inertia, actuator boundary constraints, and wheel-ground contact parameters of the chassis, drive mechanism, and actuator are configured.

[0166] The expression for the rigid body dynamics equation is:

[0167]

[0168] In the formula, q is a generalized coordinate vector; It is a generalized velocity vector; M(q) is the generalized acceleration vector; M(q) is the mass inertia matrix. G(q) is the matrix of Coriolis force and centrifugal force; G(q) is the gravity vector; τ is the joint driving torque vector; J is the Jacobian matrix; This is the external contact force vector.

[0169] The expression for calculating the contact force using the aforementioned wheel-to-ground contact model is:

[0170]

[0171]

[0172] In the formula, Normal contact force; It is a tangential contact force; The normal penetration depth; Normal penetration velocity; This is the tangential displacement; Tangential velocity; , These are the normal and tangential stiffness, respectively. , denoted as normal and tangential damping coefficients, respectively; μ is the friction coefficient.

[0173] In this embodiment, the mass, center of mass position, and inertia tensor of each link of the robot are obtained by exporting from CAD models or by experimental measurement. Joint constraints limit the range of motion of each degree of freedom. For example, the speed range of the drive wheel is 0-300 rpm, the steering angle range is -45° to +45°, and the range of joint angles of the robotic arm is set according to the specific structure.

[0174] In the process of establishing a physically consistent robot model, a physics engine is used to implement rigid body, joint constraints, and wheel-ground contact, allowing slippage, lateral deviation, and reduced maneuverability to occur naturally. The operating mechanism then limits the range of motion and control interface, and participates in collision and effect evaluation. For example... Figure 4 As shown, the robot's links in Stage correspond to the above dynamics and solution configurations in PhysicsScene.

[0175] In this embodiment, in step S4, based on the completed robot physical model, the inherent hardware parameters are configured, a sensor observation degradation model is constructed, and a time-series observation generation rule with real noise distortion is output.

[0176] Specifically, data is generated based on actual installation and sampling characteristics, and configurable parameters are used to simulate occlusion, fog, backlight, motion blur, latency, and frame drops, making the training distribution closer to the field.

[0177] This step generates time-series observation data based on the actual installation pose and sampling characteristics, and introduces configurable degradation parameters to simulate observation distortion under field conditions.

[0178] Among them, a1, the camera sensor: intrinsic and extrinsic parameters are configured according to the actual installation position and orientation. Intrinsic parameters include focal length and principal point coordinates; extrinsic parameters include the translation vector and rotation matrix of the camera relative to the robot base. RGB images, depth images, or semantic segmentation images are generated. Degradation effect package:

[0179] Motion blurring: blur kernel length l blur =v·t exp ·k motion Where v is the camera's speed; t exp For exposure time; k motion The fuzzy coefficient is 0.5-2.0.

[0180] Exposure variation: The exposure time t is dynamically adjusted according to the light intensity. exp With gain;

[0181] Lens distortion: A radial distortion model is adopted, with distortion coefficients k1, k2, and k3 ranging from -0.5 to 0.5;

[0182] Fog and dust obstruction: Atmospheric scattering model is used. Where β is the scattering coefficient: 0.01-0.5; d is the depth distance;

[0183] Backlight glare: When the incident angle of the light source is less than the threshold, glare spots are superimposed on a specific area of ​​the image.

[0184] a2. LiDAR sensor: Configure the number of scan lines N according to the actual installation location. scan 16-128 lines, field of view (FOV) (360° horizontally, -25° to +15° vertically), ranging accuracy (acc) range ±2-5cm, angular resolution res angle 0.1-0.4°. Degradation effects include:

[0185] Rain and fog attenuation: Point cloud return intensity attenuation factor ,in d is the extinction coefficient, 0.01-0.2; d is the measurement distance.

[0186] Multipath reflection: When a laser beam encounters multiple reflecting surfaces, spurious points may be generated, with a probability p. multipath Values ​​range from 0.01 to 0.1;

[0187] Point cloud sparsification: The density of point clouds at long distances is reduced to simulate the characteristics of real lidar.

[0188] a3. Wheel speedometer and inertial measurement unit: The wheel speedometer operates at the actual sampling frequency f. wheel (50-200 Hz) Output odometer data; Inertial Measurement Unit (IMU) sampling frequency f imu (100-1000 Hz), outputting triaxial acceleration and triaxial angular velocity. Degradation effects include zero-bias drift b. zero (Acceleration 0.01-0.1m / s², angular velocity 0.01-0.5° / s) and Gaussian noise σ (acceleration 0.001-0.01m / s², angular velocity 0.001-0.1° / s).

[0189] In this embodiment, the sensor observation degradation model includes a camera sensor observation degradation model and a lidar point cloud degradation model;

[0190] The expression for the camera sensor observation degradation model is:

[0191]

[0192] In the formula, For ideal observation images; The image is a degraded observation image; Crop shading transformation operator; For atmospheric environment transformation operators; For motion fuzzy transform operators; Sensor noise;

[0193] The expression for the lidar point cloud degradation model is:

[0194]

[0195] In the formula, For an ideal point cloud set; For the degraded point cloud set; For the first An ideal point; This is the noise perturbation vector; For point Distance to the sensor; This is the distance-related noise figure; Based on the base noise level.

[0196] In this embodiment, in step S5, based on the standardized scene parameter samples, the robot physical model, and the sensor observation degradation model, standardized scene instances are generated through the USD asset instantiation interface of the simulation platform; a unique random seed and parameter configuration are bound to each standardized scene instance to form a standard basic scene library.

[0197] Specifically, the template configuration is first read to determine the baseline values ​​and distribution types of parameters for each layer; then, parameter samples are generated according to the sampling method; agronomic constraints are applied to filter invalid combinations; and finally, the scene instantiation interface is called to convert the parameters into a USD scene file.

[0198] The system automatically generates typical and complex working conditions in batches within a template and parameter space, randomly covering physics, crop and obstacle layouts, lighting textures, and sensor perturbations. Parameters and random seeds are recorded to ensure reproducibility. Figure 3 The script and USD will output the parameters to the scenarios shown in the groups such as Ground and Plants.

[0199] In this embodiment, the predefined typical working condition templates include: straight-line operation on flat land: slope α and β are close to 0, there are no obstacles, and the crop rows are arranged regularly; regular crop row traversal: standard row spacing and plant spacing, no lodging or missing plants; barrier-free access scenario: only access path constraints are set.

[0200] Predefined complex working condition templates include: traversing undulating terrain: slopes α and β vary within ±10°, and the ground surface is undulating; operating in lodged crop areas: the lodged proportion is in the range of 10-30%; mixed obstacle avoidance: containing multiple types of obstacles randomly distributed; multi-constraint collaborative scenarios: multiple constraints such as coverage areas, restricted areas, and safety boundaries exist simultaneously.

[0201] Based on the template, random perturbations are applied to the parameters of each layer of the scene to generate working case instances that cover the parameter space boundaries. The random perturbations adopt uniform distribution, normal distribution, or triangular distribution. For each generated scene instance, a random seed (64-bit integer) and complete parameter configuration are recorded, supporting the reproduction of the same scene using the seed.

[0202] In this embodiment, in step S6, multidimensional feature vectors of failure events are extracted from failure events in actual field vehicles or historical simulation logs; the multidimensional feature vectors are mapped to scene parameter mutation rules and sensor degradation superposition rules, and encapsulated into a standardized failure scene package.

[0203] Specifically, real failures are categorized into types, states, and observation segments, and mapped to injectable rules such as abrupt changes in surface parameters, combinations of observation degradation, and obstacle placement, forming reusable failure scenario packages, and extending similar long tails within their neighborhoods. For example... Figure 3 As shown, high-contrast color blocks on the ground can indicate the landing points where the landing failed or was constrained in the scene.

[0204] This step maps real-world job failure events to a combination of scenario parameter mutation rules and observation degradation rules, forming a reusable failure scenario package.

[0205] Among them, failure events are extracted from real operation logs or historical simulation records. Failure event types include: stuck: the robot gets stuck on soft ground and cannot get out; slipping and losing control: insufficient wheel adhesion causes the trajectory to deviate; collision with obstacles: collision with rocks, field ridges, etc.; missed target: the sensor fails to detect crop rows or obstacles; path planning failure: unable to find a feasible path.

[0206] Extract the scene state, robot state, and sensor observation segments before and after the failure event. The time window is usually 5-10 seconds before the failure to 2-5 seconds after the failure.

[0207] In this embodiment, the reasons for failure are analyzed and mapped to scene parameter mutation rules. For example: a sudden drop in local friction coefficient: μ drops from 0.6 to 0.2, simulating a muddy area; a sudden change in terrain slope: α changes from 5° to 15°, simulating the edge of a field ridge; obstacle position shift: obstacle position shifts Δx and Δy (0.1-0.5 meters), simulating undetected obstacles.

[0208] The observation degradation combination rules include a superposition configuration of multiple degradation effects, such as: fog and dust occlusion (β=0.3) + motion blur (l blur =10 pixels) + underexposure (gain=0.5).

[0209] In this embodiment, the encapsulation format of the failure scenario package includes: failure event metadata (type, timestamp, location), a list of scenario parameter mutation rules, observation degradation configuration, and original observation fragment index. It supports expanding and generating variant scenarios within a neighborhood of similar parameters, with the neighborhood expansion using a perturbation range of ±10-20% of the parameters.

[0210] When replaying failed samples, the system first loads the failure scenario package, parses the scenario parameter mutation rules and observation degradation configuration; then injects the above rules into the procedural scenario generation process to generate a simulation scenario containing failure conditions; finally, it drives the robot model to run in the scenario to reproduce the failure event.

[0211] In this embodiment, the multidimensional feature vector expression for the failure event is:

[0212]

[0213] In the formula, It is a multidimensional feature vector; This represents the robot's state vector before the failure. The feature vector observed before the failure; This is the sequence vector of actions performed before the failure. Encode the event type to trigger it; The duration of the event.

[0214] In the process of mapping the multidimensional feature vector to scene parameter mutation rules and sensor degradation superposition rules, the failed scene mapping function is expressed as follows:

[0215]

[0216] In the formula, For failure mapping functions; This is the scene parameter mutation vector; This is the sensor parameter degradation vector; This is the set of rules for external disturbances.

[0217] In this embodiment, in step S7, based on the standardized failure scenario package and combined with the Gaussian kernel similarity determination mechanism, long-tailed variant failure conditions are generated by perturbation in the neighborhood of the set parameters; the standardized failure scenario package and the perturbation rules corresponding to the long-tailed variant failure conditions are used as additional scenario configurations and sent back to the standard basic scenario library generation process to generate an enhanced simulation scenario library.

[0218] Specifically, in the process of generating the long-tailed variant failure condition by perturbing within the neighborhood of the set parameters based on the standardized failure scenario package and combined with the Gaussian kernel similarity determination mechanism, the set parameter neighborhood is a perturbation range of ±10-20% of the parameter; the expression of the Gaussian kernel similarity determination mechanism is:

[0219]

[0220] In the formula, This is the original failure feature vector; To expand the failed feature vector; For kernel bandwidth parameters;

[0221] when hour, Considered as a valid expanded sample; among them, This is the similarity threshold.

[0222] In this embodiment, in step S8, a full-process simulation is performed and the simulation data is stored based on the standard basic scenario library and the enhanced simulation scenario library; several rounds of simulation are repeated for the same random seed scenario, and the consistency of scenario reproduction is verified by the reproduction correlation coefficient; the quality of the standard basic scenario library and the enhanced simulation scenario library is evaluated by setting quality evaluation indicators; when the evaluation fails, parameter optimization feedback is output; based on the parameter optimization feedback, the perturbation expansion range of the scenario parameter space and the long-tailed variant failure condition is iteratively updated.

[0223] Specifically, during the full-process simulation data storage process, the simulation data includes: scene parameter configuration: all parameter values ​​at six levels; random seed: a 64-bit integer; sensor observation timing: observation data of each sensor arranged by timestamp; robot control timing: control instructions of each actuator arranged by timestamp; key event markers: the type and timestamp of collision events, boundary crossing events, task completion events, and failure / termination events; the simulation data adopts hierarchical binary storage: the top layer is the experimental batch directory, the middle layer is the scene instance directory, and the bottom layer stores the sensor and control timing files with timestamps.

[0224] In this embodiment, multiple regression runs (typically 3-5 times) are performed on a scene with a fixed seed or fixed parameter configuration to verify the consistency between the observation time series and the control time series. Numerical errors are allowed within a preset threshold range, for example: position error <1cm, velocity error <0.01m / s, and image pixel difference <1%.

[0225] In the process of verifying the consistency of scene reproduction through the reproduction correlation coefficient, the formula for calculating the reproduction correlation coefficient is as follows:

[0226]

[0227] In the formula, and The output time-series vectors of two independent runs under the same random seed; It is the covariance function; It is the variance function; To reproduce the correlation coefficient, when The consistency of reproduction is deemed acceptable.

[0228] In this embodiment, as Figure 4As shown, the performance overlay reflects the real-time recorded operating status. In evaluating the quality of the standard basic scenario library and the enhanced simulation scenario library using the defined quality evaluation indicators, the defined quality evaluation indicators include: parameter space coverage, operating condition type coverage, and failure condition reproducibility rate.

[0229] The expression for the parameter space coverage is:

[0230]

[0231] In the formula, For the first The parameter space sub-regions covered by each scene instance; The total region of the target parameter space; The total number of scene instances generated; This refers to scene coverage.

[0232] The expression for the coverage rate of the operating condition type is:

[0233]

[0234] In the formula, For operating condition type coverage; This represents the number of independent operating condition categories already covered by the scenario library. This is the preset total number of all operating condition categories.

[0235] The expression for the failure condition recurrence rate is:

[0236]

[0237] In the formula, The reproducibility rate of the failed operating condition; The number of failure conditions in which the failure event can be reliably reproduced; This represents the total number of all failed operating conditions.

[0238] The application scenarios of this invention are as follows:

[0239] In the research and development of field robots for large-scale planting of rice, vegetables and other crops, this invention can generate various farmland simulation conditions in batches, supporting the iterative debugging of navigation and perception algorithms.

[0240] In the pre-field simulation test scenario of agricultural robots, this invention can reproduce various field failure conditions and reduce the frequency of outdoor field operation tests.

[0241] In the scenario of batch construction of offline datasets for agricultural machinery algorithms, this invention relies on hierarchical parametric modeling to automatically generate diverse scene observation data, thereby expanding the training materials for the algorithms.

[0242] In extreme working condition performance verification scenarios for agricultural robots, this invention can be extended to generate long-tailed fault simulation cases to complete the testing of the robot's extreme working capabilities.

[0243] In the context of standardized construction and version iteration of simulation scenario libraries, this invention has the ability to perform simulation reproduction verification and closed-loop optimization, continuously improving the coverage of farmland simulation environment.

[0244] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.

[0245] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0246] Example 2

[0247] See Figure 5 Embodiment 2 of the present invention also provides a robot simulation environment construction device for agricultural scenarios, comprising:

[0248] The scene parameter space construction module 001 is used to construct the scene parameter space based on preset agronomic constraints by dividing the agricultural operation scene into several levels and configuring the parameter value range and probability distribution for each level.

[0249] The standardized scene parameter sample generation module 002 is used to sample the scene parameter space using a Latin hypercube sampling strategy to obtain sampled parameters; to verify the sampled parameters using a preset agronomic constraint rule library, and to discard or correct parameters that do not meet the constraint conditions, thereby generating standardized scene parameter samples that meet agronomic logic.

[0250] The robot physical model binding module 003 is used to configure the physical parameters of the agricultural robot based on the standardized scene parameter samples, through rigid body dynamics equations and wheel-ground contact model, and complete the robot physical model binding.

[0251] The sensor observation degradation model construction module 004 is used to configure inherent hardware parameters based on the bound robot physical model, construct a sensor observation degradation model, and output time-series observation generation rules with real noise distortion.

[0252] The standard basic scene library generation module 005 is used to generate standardized scene instances based on the standardized scene parameter samples, the robot physical model, and the sensor observation degradation model through the USD asset instantiation interface of the simulation platform; and to bind a unique random seed and parameter configuration to each of the standardized scene instances to form a standard basic scene library.

[0253] The standardized failure scenario package acquisition module 006 is used to extract multi-dimensional feature vectors of failure events from failure events in actual field vehicles or historical simulation logs; map the multi-dimensional feature vectors to scene parameter mutation rules and sensor degradation superposition rules, and encapsulate them into a standardized failure scenario package;

[0254] The enhanced simulation scene library generation module 007 is used to generate long-tailed variant failure conditions by perturbing the neighborhood of the standardized failure scene package and combining the Gaussian kernel similarity judgment mechanism; and to send back the perturbation rules corresponding to the standardized failure scene package and the long-tailed variant failure conditions as scene additional configurations to the standard basic scene library generation process to generate the enhanced simulation scene library.

[0255] The simulation and iterative optimization module 008 is used to perform full-process simulation and store simulation data based on the standard basic scenario library and the enhanced simulation scenario library; to repeatedly perform several rounds of simulation on the same random seed scenario and to verify the consistency of scenario reproduction by using the reproduction correlation coefficient; to evaluate the quality of the standard basic scenario library and the enhanced simulation scenario library by setting quality evaluation indicators; to output parameter optimization feedback when the evaluation fails; and to iteratively update the perturbation expansion range of the scenario parameter space and the long-tailed variant failure condition based on the parameter optimization feedback.

[0256] In this embodiment, in the standardized scene parameter sample generation module 002, during the process of sampling the scene parameter space using the Latin hypercube sampling strategy, the sampling uniformity index and the scene diversity coverage index are quantified respectively using the sampling uniformity index and the Shannon entropy index.

[0257] The formula for calculating the sampling uniformity index is as follows:

[0258]

[0259] In the formula, This is a sample point matrix; This represents the number of sampling points; For the first One sampling point; For parameter space dimension; This is a sampling uniformity index; the larger the index, the more uniformly the sampling points are distributed in the parameter space.

[0260] The formula for calculating the Shannon entropy index is as follows:

[0261] In the formula, A collection of generated scenes; Number of scene categories; For the first The proportion of scene types in the scene set; This represents the scene diversity entropy value; a larger value indicates a more diverse scene coverage.

[0262] In this embodiment, in the robot physical model binding module 003, during the process of configuring the physical parameters of the agricultural robot through the rigid body dynamics equation and the wheel-ground contact model, the physical parameters include: the structural inertia of the chassis, drive mechanism and actuator, actuator boundary constraints and wheel-ground contact parameters;

[0263] The expression for the rigid body dynamics equation is:

[0264]

[0265] In the formula, q is a generalized coordinate vector; It is a generalized velocity vector; M(q) is the generalized acceleration vector; M(q) is the mass inertia matrix. G(q) is the matrix of Coriolis force and centrifugal force; G(q) is the gravity vector; τ is the joint driving torque vector; J is the Jacobian matrix; This is the external contact force vector;

[0266] The expression for calculating the contact force using the aforementioned wheel-to-ground contact model is:

[0267]

[0268]

[0269] In the formula, Normal contact force; It is a tangential contact force; The normal penetration depth; Normal penetration velocity; This is the tangential displacement; Tangential velocity; , These are the normal and tangential stiffness, respectively. , denoted as normal and tangential damping coefficients, respectively; μ is the friction coefficient.

[0270] In this embodiment, the inherent hardware parameters configured in the sensor observation degradation model construction module 004 during the construction of the sensor observation degradation model include the inherent hardware parameters of the camera sensor, lidar sensor, wheel speedometer and inertial measurement unit.

[0271] The sensor observation degradation model includes a camera sensor observation degradation model and a lidar point cloud degradation model;

[0272] The expression for the camera sensor observation degradation model is:

[0273]

[0274] In the formula, For ideal observation images; The image is a degraded observation image; Crop shading transformation operator; For atmospheric environment transformation operators; For motion fuzzy transform operators; Sensor noise;

[0275] The expression for the lidar point cloud degradation model is:

[0276]

[0277] In the formula, For an ideal point cloud set; For the degraded point cloud set; For the first An ideal point; This is the noise perturbation vector; For point Distance to the sensor; This is the distance-related noise figure; Based on the base noise level.

[0278] In this embodiment, the multidimensional feature vector expression of the failure event in the standardized failure scenario package acquisition module 006 is:

[0279]

[0280] In the formula, It is a multidimensional feature vector; This represents the robot's state vector before the failure. The feature vector observed before the failure; This is the sequence vector of actions performed before the failure. Encode the event type to trigger it; Duration of the event;

[0281] In the process of mapping the multidimensional feature vector to scene parameter mutation rules and sensor degradation superposition rules, the failed scene mapping function is expressed as follows:

[0282]

[0283] In the formula, For failure mapping functions; This is the scene parameter mutation vector; This is the sensor parameter degradation vector; This is the set of rules for external disturbances.

[0284] In this embodiment, in the enhanced simulation scene library generation module 007, during the process of generating the long-tailed variant failure condition by perturbing within the neighborhood of the set parameters based on the standardized failure scene package and combined with the Gaussian kernel similarity determination mechanism, the neighborhood of the set parameters is a perturbation range of ±10-20% of the parameters; the expression of the Gaussian kernel similarity determination mechanism is:

[0285]

[0286] In the formula, This is the original failure feature vector; To expand the failed feature vector; For kernel bandwidth parameters;

[0287] when hour, Considered as a valid expanded sample; among them, This is the similarity threshold.

[0288] In this embodiment, during the process of storing the simulation data in the simulation and iterative optimization module 008, the simulation data includes: hierarchical parameters of each scenario, random seeds, sensor timing, robot control timing, and fault event marker simulation data; the simulation data adopts hierarchical binary storage: the top layer is the experimental batch directory, the middle layer is the scenario instance directory, and the bottom layer stores the sensor and control timing files with timestamps;

[0289] In the process of verifying the consistency of scene reproduction through the reproduction correlation coefficient, the formula for calculating the reproduction correlation coefficient is as follows:

[0290]

[0291] In the formula, and The output time-series vectors of two independent runs under the same random seed; It is the covariance function; It is the variance function; To reproduce the correlation coefficient, when The consistency of reproduction is deemed acceptable.

[0292] In this embodiment, in the simulation and iterative optimization module 008, during the process of evaluating the quality of the standard basic scenario library and the enhanced simulation scenario library through the set quality evaluation indicators, the set quality evaluation indicators include: parameter space coverage, working condition type coverage, and failure working condition reproducibility rate.

[0293] The expression for the parameter space coverage is:

[0294]

[0295] In the formula, For the first The parameter space sub-regions covered by each scene instance; The total region of the target parameter space; The total number of scene instances generated; For scene coverage;

[0296] The expression for the coverage rate of the operating condition type is:

[0297]

[0298] In the formula, For operating condition type coverage; This represents the number of independent operating condition categories already covered by the scenario library. To preset the total number of all operating condition categories;

[0299] The expression for the failure condition recurrence rate is:

[0300]

[0301] In the formula, The reproducibility rate of the failed operating condition; The number of failure conditions in which the failure event can be reliably reproduced; This represents the total number of all failed operating conditions.

[0302] It should be noted that the information interaction and execution process between the modules of the above system are based on the same concept as the method embodiment in Embodiment 1 of this application, and the resulting technical effects are the same as those in the method embodiment of this application. For details, please refer to the description in the method embodiment shown above in this application, and it will not be repeated here.

[0303] Example 3

[0304] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium storing program code for a method of building a robot simulation environment for an agricultural scenario. The program code includes instructions for executing the method of building a robot simulation environment for an agricultural scenario according to Embodiment 1 or any possible implementation thereof.

[0305] Computer-readable storage media can be any available medium that a computer can access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0306] Example 4

[0307] Embodiment 4 of the present invention provides an electronic device, including: a memory and a processor;

[0308] The processor and the memory communicate with each other via a bus; the memory stores program instructions that can be executed by the processor, and the processor can call the program instructions to execute a method for building a robot simulation environment for agricultural scenarios, as described in Embodiment 1 or any possible implementation thereof.

[0309] Specifically, a processor can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.

[0310] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable system. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0311] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing systems. They can be centralized on a single computing system or distributed across a network of multiple computing systems. Optionally, they can be implemented using program code executable by a computing system, thereby storing them in a storage system for execution by the computing system. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0312] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A method for building a robot simulation environment for agricultural scenarios, characterized in that, include: Based on preset agronomic constraints, the agricultural operation scenario is divided into several levels, and the parameter value range and probability distribution are configured for each level to construct a scenario parameter space. The scenario parameter space is sampled using a Latin hypercube sampling strategy to obtain sampled parameters; the sampled parameters are then verified using a preset agronomic constraint rule library, and parameters that do not meet the constraints are discarded or corrected to generate standardized scenario parameter samples that meet agronomic logic. Based on the standardized scenario parameter samples, the physical parameters of the agricultural robot are configured through rigid body dynamics equations and wheel-ground contact models to complete the binding of the robot's physical model. Based on the completed robot physical model, configure the inherent hardware parameters, construct a sensor observation degradation model, and output a time-series observation generation rule with real noise distortion. Based on the standardized scene parameter samples, the robot physical model, and the sensor observation degradation model, standardized scene instances are generated through the USD asset instantiation interface of the simulation platform; a unique random seed and parameter configuration are bound to each standardized scene instance to form a standard basic scene library. Extract multi-dimensional feature vectors from failure events in actual field vehicles or historical simulation logs; map the multi-dimensional feature vectors to scene parameter mutation rules and sensor degradation superposition rules, and encapsulate them into a standardized failure scene package; Based on the standardized failure scenario package, and combined with the Gaussian kernel similarity determination mechanism, long-tailed variant failure conditions are generated by perturbation in the neighborhood of the set parameters; the standardized failure scenario package and the perturbation rules corresponding to the long-tailed variant failure conditions are used as additional scenario configurations and fed back into the standard basic scenario library generation process to generate an enhanced simulation scenario library. Based on the standard basic scenario library and the enhanced simulation scenario library, a full-process simulation is performed and the simulation data is stored; the same random seed scenario is repeatedly simulated in several rounds, and the consistency of scenario reproduction is verified by the reproduction correlation coefficient; The quality of the standard basic scene library and the enhanced simulation scene library is evaluated by setting quality evaluation indicators; when the evaluation fails to meet the standards, the output parameters are optimized and feedback is provided. Based on the parameter optimization feedback, the perturbation expansion range of the scenario parameter space and the long-tailed variant failure condition is iteratively updated.

2. The method for building a robot simulation environment for agricultural scenarios according to claim 1, characterized in that, In the process of breaking down agricultural operation scenarios into several levels, the agricultural operation scenarios are divided into six levels: terrain geometry layer, soil physics layer, crop morphology layer, obstacle distribution layer, ambient lighting layer, and operation constraint layer. The topographic geometry layer is described by scale parameters, furrow parameters, slope parameters, and field ridge and ditch parameters; the soil physical layer is described by zonal friction coefficient, resistance coefficient, subsidence parameters, and stiffness and damping parameters; the crop morphology layer is described by row spacing parameters, plant spacing parameters, density parameters, lodging and missing plant parameters, plant height parameters, and shading parameters; the obstacle distribution layer is described by obstacle type, location distribution, and size parameters; the ambient light layer is described by light intensity, light direction, fog and dust concentration, and backlight parameters; and the operational constraint layer is described by coverage area parameters, restricted area parameters, inter-row passage parameters, and safety boundary parameters.

3. The method for building a robot simulation environment for agricultural scenarios according to claim 2, characterized in that, During the sampling of the scene parameter space using the Latin hypercube sampling strategy, the sampling uniformity index and the scene diversity coverage index are quantified by the sampling uniformity index and the Shannon entropy index, respectively. The formula for calculating the sampling uniformity index is as follows: In the formula, This is a sample point matrix; This represents the number of sampling points; For the first One sampling point; For parameter space dimension; The index is the sampling uniformity index. The larger the index, the more uniformly the sampling points are distributed in the parameter space. The formula for calculating the Shannon entropy index is as follows: In the formula, A collection of generated scenes; Number of scene categories; For the first The proportion of scene types in the scene set; This represents the scene diversity entropy value; a larger value indicates a more diverse scene coverage.

4. The method for building a robot simulation environment for agricultural scenarios according to claim 3, characterized in that, In the process of configuring the physical parameters of the agricultural robot using the rigid body dynamics equations and the wheel-ground contact model, the physical parameters include: the structural inertia of the chassis, drive mechanism and actuator, actuator boundary constraints and wheel-ground contact parameters; The expression for the rigid body dynamics equation is: In the formula, q is a generalized coordinate vector; It is a generalized velocity vector; M(q) is the generalized acceleration vector; M(q) is the mass inertia matrix. G(q) is the matrix of Coriolis force and centrifugal force; G(q) is the gravity vector; τ is the joint driving torque vector; J is the Jacobian matrix; This is the external contact force vector; The expression for calculating the contact force using the aforementioned wheel-to-ground contact model is: In the formula, Normal contact force; It is a tangential contact force; The normal penetration depth; Normal penetration velocity; This is the tangential displacement; Tangential velocity; , These are the normal and tangential stiffness, respectively. , denoted as normal and tangential damping coefficients, respectively; μ is the friction coefficient.

5. The method for building a robot simulation environment for agricultural scenarios according to claim 4, characterized in that, In the process of constructing the sensor observation degradation model, the configured inherent hardware parameters include the inherent hardware parameters of the camera sensor, lidar sensor, wheel speedometer and inertial measurement unit. The sensor observation degradation model includes a camera sensor observation degradation model and a lidar point cloud degradation model; The expression for the camera sensor observation degradation model is: In the formula, For ideal observation images; The image is a degraded observation image; Crop shading transformation operator; For atmospheric environment transformation operators; For motion fuzzy transform operators; Sensor noise; The expression for the lidar point cloud degradation model is: In the formula, For an ideal point cloud set; For the degraded point cloud set; For the first An ideal point; This is the noise perturbation vector; For point Distance to the sensor; This is the distance-related noise figure; Based on the base noise level.

6. The method for building a robot simulation environment for agricultural scenarios according to claim 5, characterized in that, The multidimensional feature vector expression for the failure event is: In the formula, It is a multidimensional feature vector; This represents the robot's state vector before the failure. The feature vector observed before the failure; This is the sequence vector of actions performed before the failure. Encode the event type to trigger it; Duration of the event; In the process of mapping the multidimensional feature vector to scene parameter mutation rules and sensor degradation superposition rules, the failed scene mapping function is expressed as: In the formula, For failure mapping functions; This is the scene parameter mutation vector; This is the sensor parameter degradation vector; This is the set of rules for external disturbances.

7. The method for building a robot simulation environment for agricultural scenarios according to claim 6, characterized in that, In the process of generating the long-tailed variant failure condition by perturbing within the neighborhood of the set parameters based on the standardized failure scenario package and combined with the Gaussian kernel similarity determination mechanism, the set parameter neighborhood is a perturbation range of ±10-20% of the parameter; the expression of the Gaussian kernel similarity determination mechanism is: In the formula, This is the original failure feature vector; To expand the failed feature vector; For kernel bandwidth parameters; when hour, Considered as a valid expanded sample; among them, This is the similarity threshold.

8. The method for building a robot simulation environment for agricultural scenarios according to claim 7, characterized in that, During the full-process simulation data storage process, the simulation data includes: hierarchical parameters for each scenario, random seeds, sensor timing sequences, robot control timing sequences, and fault event marker simulation data; the simulation data adopts hierarchical binary storage: the top layer is the experimental batch directory, the middle layer is the scenario instance directory, and the bottom layer stores the sensor and control timing files with timestamps; In the process of verifying the consistency of scene reproduction through the reproduction correlation coefficient, the formula for calculating the reproduction correlation coefficient is as follows: In the formula, and The output time-series vectors of two independent runs under the same random seed; It is the covariance function; It is the variance function; To reproduce the correlation coefficient, when The consistency of reproduction is deemed acceptable.

9. The method for building a robot simulation environment for agricultural scenarios according to claim 8, characterized in that, In the process of evaluating the quality of the standard basic scenario library and the enhanced simulation scenario library through the set quality evaluation indicators, the set quality evaluation indicators include: parameter space coverage, working condition type coverage and failure working condition reproducibility rate; The expression for the parameter space coverage is: In the formula, For the first The parameter space sub-regions covered by each scene instance; The total region of the target parameter space; The total number of scene instances generated; For scene coverage; The expression for the coverage rate of the operating condition type is: In the formula, For operating condition type coverage; This represents the number of independent operating condition categories already covered by the scenario library; To preset the total number of all operating condition categories; The expression for the failure condition recurrence rate is: In the formula, The reproducibility rate of the failed operating condition; The number of failure conditions in which the failure event can be reliably reproduced; This represents the total number of all failed operating conditions.

10. A robot simulation environment construction device for agricultural scenarios, employing the robot simulation environment construction method for agricultural scenarios as described in any one of claims 1-9, characterized in that, include: The scenario parameter space construction module is used to construct the scenario parameter space based on preset agronomic constraints by dividing the agricultural operation scenario into several levels and configuring the parameter value range and probability distribution for each level. The standardized scene parameter sample generation module is used to sample the scene parameter space using a Latin hypercube sampling strategy to obtain sampled parameters; to verify the sampled parameters using a preset agronomic constraint rule library, and to discard or correct parameters that do not meet the constraints, thereby generating standardized scene parameter samples that meet agronomic logic. The robot physical model binding module is used to configure the physical parameters of the agricultural robot based on the standardized scene parameter samples, through rigid body dynamics equations and wheel-ground contact models, and to complete the robot physical model binding. The sensor observation degradation model construction module is used to configure inherent hardware parameters based on the bound robot physical model, construct a sensor observation degradation model, and output time-series observation generation rules with real noise distortion. The standard basic scene library generation module is used to generate standardized scene instances based on the standardized scene parameter samples, the robot physical model, and the sensor observation degradation model through the USD asset instantiation interface of the simulation platform; and to bind a unique random seed and parameter configuration to each of the standardized scene instances to form a standard basic scene library. The standardized failure scenario package acquisition module is used to extract multi-dimensional feature vectors of failure events from failure events in actual field vehicles or historical simulation logs; map the multi-dimensional feature vectors to scene parameter mutation rules and sensor degradation superposition rules, and encapsulate them into a standardized failure scenario package; The enhanced simulation scenario library generation module is used to generate long-tailed variant failure conditions by perturbing the standardized failure scenario package and combining the Gaussian kernel similarity judgment mechanism in the neighborhood of set parameters; the standardized failure scenario package and the perturbation rules corresponding to the long-tailed variant failure conditions are used as additional scenario configurations and sent back to the standard basic scenario library generation process to generate the enhanced simulation scenario library. The simulation and iterative optimization module is used to perform full-process simulation and store simulation data based on the standard basic scene library and the enhanced simulation scene library; to repeat the simulation for the same random seed scene for several rounds, and to verify the consistency of scene reproduction by reproducibility coefficient; The quality of the standard basic scene library and the enhanced simulation scene library is evaluated by setting quality evaluation indicators; when the evaluation fails to meet the standards, the output parameters are optimized and fed back. Based on the parameter optimization feedback, the perturbation expansion range of the scenario parameter space and the long-tailed variant failure condition is iteratively updated.