Simulation environment construction method and device, electronic equipment and storage medium

By constructing map point clouds and obstacle point clouds based on raster maps and determining the laser data of virtual mobile devices, the problems of resource waste and low testing efficiency in existing simulation technologies are solved, and the construction of an efficient simulation environment and resource utilization are achieved.

CN120688270APending Publication Date: 2025-09-23SHENZHEN LINGSI ROBOT CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510858514.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Existing simulation technologies require pre-building complete virtual scenes and configuring sensor models, which leads to waste of resources and low testing efficiency, making reuse difficult.

Method used

Based on the grid map, the map point cloud is determined, and the obstacle point cloud and virtual mobile device are constructed. The laser data of the virtual mobile device is determined through the map point cloud and obstacle point cloud, which reduces the calculation amount of simulation environment construction and improves resource utilization and testing efficiency.

Benefits of technology

By constructing the simulation environment through raster maps, efficient construction of the simulation environment and recycling of resources are achieved, the difficulty of adding virtual obstacles is reduced, and the simulation efficiency and accuracy are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120688270A_ABST
    Figure CN120688270A_ABST
Patent Text Reader

Abstract

The invention provides a simulation environment construction method and device, electronic equipment and a storage medium. The method comprises the following steps: determining a map point cloud based on a grid map; constructing an obstacle point cloud and a virtual mobile device in the map point cloud; and within a preset range of the virtual mobile device, determining laser data of the virtual mobile device based on the map point cloud and the obstacle point cloud. According to the method, the simulation test efficiency and the utilization rate of simulation resources can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of simulation technology, and in particular to a method, device, electronic device and storage medium for constructing a simulation environment. Background Art

[0002] Using simulation technology, we can build a simulation test platform through a fusion of virtual and real systems. This platform can then simulate the coordinated operation of sensors like radar in complex scenarios. Related technologies require pre-building complete virtual scenarios and configuring sensor models. This consumes significant computer resources and makes reuse difficult, leading to wasted resources and impacting the efficiency of intelligent system testing. Summary of the Invention

[0003] The embodiments of the present application disclose a method, device, electronic device and storage medium for constructing a simulation environment, which solves the technical problem that related simulation technologies cannot be reused, resulting in resource waste and affecting test efficiency.

[0004] The present application provides a method for constructing a simulation environment, the method comprising: determining a map point cloud based on a grid map; constructing an obstacle point cloud and a virtual mobile device in the map point cloud; and determining laser data of the virtual mobile device based on the map point cloud and the obstacle point cloud within a preset range of the virtual mobile device.

[0005] In some embodiments of the present application, determining a map point cloud based on a grid map includes: identifying obstacles in the grid map; determining a target grid corresponding to the obstacle in the grid map; and determining the map point cloud based on position information of the target grid.

[0006] In some embodiments of the present application, constructing an obstacle point cloud in the map point cloud includes: determining the static attributes and / or dynamic attributes of a preset obstacle; based on the static attributes, determining the local point cloud of the preset obstacle in a local coordinate system; based on the dynamic attributes, updating the position of the local point cloud in the local coordinate system; based on the position, converting the local point cloud to the global coordinate system corresponding to the map point cloud to obtain a virtual obstacle point cloud in the global coordinate system; and constructing the obstacle point cloud based on the virtual obstacle point cloud.

[0007] In some embodiments of the present application, determining the local point cloud of the preset obstacle in the local coordinate system based on the static attributes includes: fitting the contour point cloud corresponding to the preset obstacle based on the shape parameters in the static attributes; and determining the local point cloud based on the contour point cloud and the non-contour point cloud corresponding to the preset obstacle.

[0008] In some embodiments of the present application, updating the position of the local point cloud in the local coordinate system based on the dynamic attributes includes: updating the position based on preset pose information and random pose information in the dynamic attributes.

[0009] In some embodiments of the present application, the converting of the local point cloud to the global coordinate system corresponding to the map point cloud based on the position to obtain a virtual obstacle point cloud in the global coordinate system includes: performing a translation transformation and a rotation transformation on the local point cloud based on the position to determine the transformed local point cloud; and mapping the transformed local point cloud to the global coordinate system to obtain the virtual obstacle point cloud.

[0010] In some embodiments of the present application, mapping the transformed local point cloud to the global coordinate system to obtain the virtual obstacle point cloud includes: merging all transformed local point clouds in the global coordinate system to obtain a global point cloud; and determining the virtual obstacle point cloud based on the global point cloud.

[0011] In some embodiments of the present application, the method further includes: updating the laser data when the map point cloud and the obstacle point cloud change; or updating the laser data when the odometer information corresponding to the virtual mobile device changes.

[0012] In some embodiments of the present application, the laser data of the virtual mobile device is determined based on the map point cloud and the obstacle point cloud within the preset range of the virtual mobile device, including: determining a simulated laser beam based on preset laser parameters; determining a plurality of target point clouds located within the preset range based on the current posture of the virtual mobile device and the simulated laser beam; wherein the plurality of target point clouds include the map point cloud and / or the obstacle point cloud; determining the relative distance between each target point cloud and the virtual mobile device; and determining the laser data based on the relative distance and the plurality of target point clouds.

[0013] In some embodiments of the present application, determining the simulated laser beam based on preset laser parameters includes: determining the simulated laser beam based on one or more of the field of view angle parameters, angular resolution, and ranging range in the laser parameters.

[0014] In some embodiments of the present application, determining a plurality of target point clouds within the preset range based on the current position of the virtual mobile device and the simulated laser beam includes: determining, based on the current position, an emission direction of the virtual mobile device when simulating the emission of the simulated laser beam; wherein the simulated laser beam includes a plurality of simulated laser rays, and the emission direction includes a direction vector corresponding to each simulated laser ray; and determining the plurality of target point clouds from the map point cloud and the obstacle point cloud within the preset range based on the plurality of simulated laser rays.

[0015] In some embodiments of the present application, determining the emission direction of the virtual mobile device when simulating the emission of the simulated laser beam based on the current posture includes: determining the orientation angle of the virtual mobile device based on the current posture; determining the local angle corresponding to the simulated laser beam based on the orientation angle; and determining the emission direction based on the local angle.

[0016] In some embodiments of the present application, the multiple target point clouds are determined from the map point cloud and obstacle point cloud within the preset range based on the multiple simulated laser rays, including: within the preset range, determining the vertical distance between each map point cloud and each simulated laser ray, and between the obstacle point cloud and each simulated laser ray; and taking the map point cloud and / or obstacle point cloud whose vertical distance is less than or equal to a preset threshold as the target point cloud.

[0017] In some embodiments of the present application, the method further includes: if the vertical distance corresponding to any simulated laser ray is greater than the preset threshold, determining that there is no target point cloud corresponding to the direction vector of any simulated laser ray; and using the target point determined based on the ray range corresponding to any simulated laser ray as the target point cloud.

[0018] In some embodiments of the present application, determining the laser data based on the relative distance and the multiple target point clouds includes: determining the relative angle of each target point cloud relative to the virtual mobile device; based on each relative angle, determining the target point cloud closest to the virtual mobile device from the multiple target point clouds as the laser point cloud; and determining the laser data based on the distance between each laser point cloud and the virtual mobile device, and the corresponding relative angle.

[0019] In some embodiments of the present application, the method further includes: processing the distance between each laser point cloud and the virtual mobile device using preset Gaussian noise to obtain a distance value including Gaussian noise; accordingly, determining the laser data based on the distance between each laser point cloud and the virtual mobile device, and the corresponding relative angle, includes: determining the laser data based on the distance value and the relative angle.

[0020] In some embodiments of the present application, the method further includes: determining a simulation test result of the virtual mobile device based on the laser data.

[0021] The present application also provides a device for constructing a simulation environment, which includes: a determination module for determining a map point cloud based on a grid map; a construction module for constructing an obstacle point cloud and a virtual mobile device in the map point cloud; and a generation module for determining the laser data of the virtual mobile device based on the map point cloud and the obstacle point cloud within a preset range of the virtual mobile device.

[0022] The present application also provides an electronic device, which includes a processor and a memory, and the processor is used to implement the method for constructing the simulation environment when executing the computer program stored in the memory.

[0023] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for constructing a simulation environment is implemented.

[0024] In the method for constructing a simulation environment provided in the present application, a map point cloud is determined based on a grid map. By referring to the grid map, there is no need to build a map environment, which can reduce the amount of calculation required to build the simulation environment and improve the efficiency of the simulation. In addition, by using the grid map as the basis for building the simulation environment, the purpose of recycling the grid map to build the simulation environment is achieved, thereby improving the utilization rate of scene resources. Constructing obstacle point clouds and virtual mobile devices in the map point cloud reduces the difficulty of adding virtual obstacles to the simulation environment and enriches the application scenarios of the simulation environment. Within the preset range of the virtual mobile device, the laser data of the virtual mobile device is determined based on the map point cloud and the obstacle point cloud, which can achieve the effect of simulated laser and improve the efficiency of the simulation. To a certain extent, the efficiency and accuracy of the simulation are improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 It is a schematic diagram of an application scenario of the method for constructing a simulation environment provided in an embodiment of the present application.

[0026] Figure 2 It is a flowchart of the method for constructing a simulation environment provided in an embodiment of the present application.

[0027] Figure 3 It is a schematic diagram of a map point cloud provided in an embodiment of the present application.

[0028] Figure 4 Schematic diagram of an obstacle point cloud and a virtual mobile device provided in an embodiment of the present application.

[0029] Figure 5 This is a flowchart for constructing an obstacle point cloud provided in an embodiment of the present application.

[0030] Figure 6 This is a flow chart for determining laser data provided in an embodiment of the present application.

[0031] Figure 7 Schematic diagram of laser data provided in an embodiment of the present application.

[0032] Figure 8 This is a schematic diagram of laser data provided by another embodiment of the present application.

[0033] Figure 9 This is a schematic diagram of the movement of a virtual mobile device provided in an embodiment of the present application.

[0034] Figure 10 This is a schematic diagram of movement of a virtual mobile device provided by another embodiment of the present application.

[0035] Figure 11 This is a schematic diagram of movement of a virtual mobile device provided by another embodiment of the present application.

[0036] Figure 12 It is a structural diagram of the construction device of the simulation environment provided in the embodiment of the present application. DETAILED DESCRIPTION

[0037] To facilitate understanding, some illustrations of concepts related to the embodiments of the present application are given for reference.

[0038] It should be noted that, in this application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A alone, A and B together, and B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," and so on (if any) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or precedence.

[0039] Using simulation technology, we can build a simulation test platform by integrating virtual and real elements. This platform can then simulate the coordinated operation of sensors like radar in complex scenarios. Related technologies require pre-building a complete virtual scene and configuring sensor models.

[0040] In one example, the simulation test platform can be the gazebo simulation test platform, the stage_ros simulation test platform, etc. In order to achieve the effect of simulating a lidar, the gazebo simulation test platform needs to first create a virtual environment according to the needs, and add various objects and virtual lidar sensors to the virtual environment to achieve the effect of simulating lasers. This requires a large amount of computer resources. As a two-dimensional simulator, the stage_ros simulation test platform has a dimensional separation and scale difference between its world coordinate system (such as the pixel coordinates of a raster map) and the real sensor data (such as the pixel coordinate system of a camera image), making it difficult to align the coordinate systems of the image and the map. In this way, it is difficult to reuse scene resources to add some virtual obstacles. Therefore, related simulation technologies not only lead to a waste of resources but also affect the testing efficiency of intelligent systems.

[0041] In order to solve the technical problem that related simulation technologies cannot be reused, resulting in resource waste and affecting testing efficiency, this application proposes a method, device, electronic device and storage medium for constructing a simulation environment. By constructing a simulation environment based on a grid map and determining the laser data of a virtual mobile device through an obstacle point cloud and a map point cloud, the efficiency of constructing the simulation environment can be improved, and the simulation requirements of different application scenarios can be met. The application scenarios of the method for constructing a simulation environment of this application are first described below.

[0042] Figure 1 Schematic diagram of an application scenario of the method for constructing a simulation environment provided in an embodiment of the present application. The method for constructing a simulation environment provided in an embodiment of the present application is applied to an electronic device 10. The electronic device 10 can be an electronic device with a display screen, such as a mobile phone, a tablet computer, a smart wearable device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, a netbook, a vehicle-mounted device, a self-moving device, etc. The embodiment of the present application does not impose any restrictions on the specific type of the electronic device 10. The self-moving device can be any device with a self-moving function, such as a lawn mower robot, a sweeping robot, a snowplow, a cleaning robot, etc.

[0043] like Figure 1As shown, the electronic device 10 may include a display screen 100, a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104, and a bus 105. The processor 103 is coupled to the display screen 100, the communication interface 101, the memory 102, and the I / O interface 104 via the bus 105.

[0044] The display screen 100 can be a touch screen, which is an inductive touch-sensitive liquid crystal display device. Alternatively, the display screen 100 can also be a non-touch screen. The display screen 100 is used to display the simulation environment.

[0045] The communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as Universal Serial Bus (USB) and Controller Area Network (CAN). The wireless communication module may provide one or more wireless communication solutions such as Wireless Fidelity (Wi-Fi), Bluetooth (BT), mobile communication networks, Frequency Modulation (FM), Near Field Communication (NFC), and Infrared (IR). Memory 102 may include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). The RAM can be directly read and written by the processor 103 and can be used to store executable programs (e.g., machine instructions) for the operating system or other running programs, as well as user and application data.

[0046] Random access memory can include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0047] The non-volatile memory can also store executable programs and user and application data, etc., which can be pre-loaded into the random access memory for direct reading and writing by the processor 103. The non-volatile memory can include disk storage devices and flash memory.

[0048] The memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions. When the multiple instructions are executed by the processor 103, the method for constructing a simulation environment executed on the electronic device 10 can be implemented.

[0049] In other embodiments, the electronic device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 10 .

[0050] The processor 103 may include one or more processing units, for example, the processor 103 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0051] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute the computer program stored in the memory 102 to implement the above-mentioned method for constructing the simulation environment.

[0052] The I / O interface 104 is used to provide a channel for user input or output. For example, the I / O interface 104 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information.

[0053] The bus 105 is at least used to provide a channel for mutual communication among the communication module 101 , the memory 102 , the processor 103 , and the I / O interface 104 in the electronic device 10 .

[0054] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0055] Figure 2 This is a flow chart of a method for constructing a simulation environment provided by an embodiment of the present application, which is applied to electronic devices (such as Figure 1 According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0056] Step S201: determining a map point cloud based on a grid map.

[0057] In some embodiments of the present application, a grid map may be a map generated by a mobile device (such as a robot) scanning the environment using sensors (such as lidar, depth cameras, or ultrasound). A grid map, also known as an occupancy grid map, can reflect information about roadside and / or obstacles in the detection environment. A grid map can be used to describe / represent drivable and / or non-drivable areas in a physical environment. The division between non-drivable and drivable areas can primarily be based on the presence of static obstacles, although dynamic changes in static obstacles are not excluded. For example, a roadblock may be detected at a certain location at a certain time, but after a period of time, the roadblock at that location is removed. In one embodiment, the detection environment is divided into a certain number and size of grids. Based on the detection results of a detector, the probability of occupancy of each grid is determined. The occupancy probability of each grid is then mapped to the corresponding grid in the detection environment, thereby obtaining the drivable and / or non-drivable areas in the grid map. The detector may be a point cloud sensor, for example.

[0058] A grid map corresponding to the environment to be simulated is selected from the determined multiple grid maps. The environment to be simulated can be a residential area, an industrial park, a park, or any street, etc. This application does not limit the environment to be simulated. After the grid map is determined, the discrete grid information corresponding to each grid in the grid map is reversely converted into a point set in a continuous space. Each point in the point set has corresponding spatial coordinates and state attributes (such as the probability of being occupied, obstacle marking, etc.). Based on the spatial coordinates and state attributes, obstacles in the grid map are identified to determine the map point cloud.

[0059] In some embodiments of the present application, the state attribute is taken as an example of the probability of being occupied. The probability value corresponding to each grid in the grid map is obtained, and based on a pre-set probability threshold, the target grids with a probability greater than or equal to the probability threshold are filtered out from the grid map. In one example, if the probability value of the grid corresponding to the obstacle in the grid map is greater than or equal to 0.65, the probability threshold can be set to 0.65. In this way, the grids corresponding to the probability value greater than or equal to 0.65 are filtered out from the grid map, thereby determining the target grid corresponding to the obstacle in the grid map.

[0060] In another embodiment of the present application, taking the obstacle marking as an example, the corresponding attribute information can be marked on the grid map based on the probability value corresponding to each grid. For example, the attribute information corresponding to the obstacle can be marked as an obstacle grid. By identifying the attribute information, all obstacle grids can be filtered out from the grid map as target grids.

[0061] In some embodiments of the present application, after the target grid is determined, the location information of the target grid in the grid map (eg, spatial coordinate xy information) is extracted to construct a map point cloud. Figure 3 The figure shows the point cloud generated based on the raster map. Figure 3 The black areas shown represent obstacles in the grid map.

[0062] Step S202: constructing an obstacle point cloud and a virtual mobile device in the map point cloud.

[0063] In some embodiments of the present application, in order to enrich the application scenarios of simulation tests, point clouds of different objects (for example, obstacles or self-moving devices, etc.) can be added to any position of the map point cloud according to actual needs to simulate obstacles and self-moving devices (such as robots) in a real environment (physical space). In one example, static attributes or dynamic attributes can be set for the preset obstacles, or static attributes and dynamic attributes can be set for the preset obstacles at the same time. Through static attributes and / or dynamic attributes, virtual obstacle point clouds corresponding to preset obstacles are added to the map point cloud to meet the complex environment requirements in the physical space. Among them, the description of constructing obstacle point clouds in map point clouds can refer to the following Figure 5 The embodiment shown.

[0064] In addition, virtual mobile devices can be built in the map point cloud to simulate the movement of self-mobile devices in the physical space to meet the needs of device debugging, function reproduction, etc., and avoid using self-mobile devices for testing in real environments. Figure 4 As shown in Figure 1, it is a schematic diagram of constructing obstacle point cloud and virtual mobile device in map point cloud. Figure 4As shown, a virtual mobile device is constructed in the map point cloud. In order to simulate the movement of the virtual mobile device, an obstacle point cloud with a rectangular shape parameter can be constructed in the path section of the virtual mobile device.

[0065] Step S203 : determining laser data of the virtual mobile device based on the map point cloud and the obstacle point cloud within a preset range of the virtual mobile device.

[0066] In some embodiments of the present application, in order to simulate the behavior of a self-moving device in a real-world scenario using a virtual mobile device, the virtual mobile device can be given the same attributes and characteristics as an actual self-moving device. In one example, an actual self-moving device uses a laser radar (LiDAR) to emit multiple laser beams within a horizontal field of view (e.g., 270°) at a certain angular resolution (e.g., 1°). The actual self-moving device measures the time it takes for each laser beam to reflect back from an obstacle to calculate the distance between the current device location and the obstacle. Based on this distance and the angle at which the laser beam is emitted, the polar coordinates of the obstacle relative to the radar are determined. During the simulation process, the virtual mobile device can also simulate the emission of simulated laser beams by simulating the actual self-moving device.

[0067] To implement the process of emitting a simulated laser beam from a virtual mobile device, laser data can be determined based on the map point cloud and obstacle point cloud within a preset range of the virtual mobile device. In one example, laser parameters are pre-set based on actual needs. These laser parameters may include, but are not limited to, field of view angle parameters, angular resolution, and ranging range. A simulated laser beam is constructed based on the laser parameters. A preset range is determined based on the current position of the virtual mobile device. This preset range may include a circular area with a radius of 10m centered on the virtual mobile device. The above is only an example, and the preset range can also be set based on actual needs.

[0068] Within the preset range, the virtual mobile device can determine the target point cloud in the map point cloud and / or obstacle point cloud based on the current posture and the simulated laser beam. According to the relative distance between the target point cloud and the virtual mobile device, the laser data is determined based on the relative distance and multiple target point clouds. The specific process of determining the laser data can be referred to as follows Figure 6 Description of the illustrated embodiment.

[0069] Through the above embodiment, the map point cloud is determined based on the grid map. By referring to the grid map, there is no need to build a map environment, which can reduce the amount of calculation for building the simulation environment and improve the efficiency of the simulation. In addition, by using the grid map as the basis for building the simulation environment, the purpose of recycling the grid map to build the simulation environment is achieved, and the utilization rate of scene resources is improved. Constructing obstacle point clouds and virtual mobile devices in the map point cloud reduces the difficulty of adding virtual obstacles in the simulation environment and enriches the application scenarios of the simulation environment. Within the preset range of the virtual mobile device, the laser data of the virtual mobile device is determined based on the map point cloud and the obstacle point cloud, which can achieve the effect of simulated laser and improve the simulation efficiency. To a certain extent, the efficiency and accuracy of the simulation are improved.

[0070] Figure 5 This is a flowchart of the construction of the obstacle point cloud provided by the embodiment of this application. Figure 5 As shown, obstacle point clouds can be constructed in map point clouds according to actual needs, including the following steps.

[0071] Step S501: Determine the static attributes and / or dynamic attributes of a preset obstacle.

[0072] In some embodiments of the present application, users can configure basic attributes for pre-set obstacles. Basic attributes can include static attributes and / or dynamic attributes. Static attributes represent inherent characteristics that do not change over time or in the simulation environment and remain constant throughout the simulation. Examples include shape parameters (such as rectangle, circle, triangle, etc.), size parameters, initial position, and orientation. Dynamic attributes represent characteristics that change over time, events, or interactions and are dynamically updated during the simulation process. Examples include real-time pose, movement speed, and rotation speed.

[0073] Step S502: Determine a local point cloud of a preset obstacle in a local coordinate system based on static attributes.

[0074] In some embodiments of the present application, since the static properties do not change with time or changes in the simulation environment, the local point cloud of the preset obstacle in the local coordinate system can be determined based on the static properties. The local coordinate system can be a coordinate system constructed with the center of the preset obstacle as the origin, which is convenient for subsequent coordinate transformation. In one example, the local point cloud can be determined based on one or more of the shape parameters, size parameters, initial position and orientation in the static properties. Taking the determination of the local point cloud based on the shape parameters as an example, the contour point cloud corresponding to the preset obstacle can be fitted according to the shape parameters in the static properties to determine the bounding box of the preset obstacle. On the basis of determining the contour point cloud, the local point cloud in the local coordinate system is determined based on the contour point cloud and the non-contour point cloud corresponding to the preset obstacle.

[0075] If the shape parameter indicates that the obstacle is rectangular or square, sampling points are evenly obtained along the four sides of the rectangle or square to ensure a clear outline of the preset rectangular or square obstacle. After determining the outline of the rectangle or square, the contour points corresponding to the outline and the corresponding non-contour points within the outline are used as a local point cloud.

[0076] If the shape parameter indicates that the obstacle is circular, points are generated on the circumference at preset angle intervals to form a smooth circular boundary. After the circular boundary is determined, the contour points corresponding to the circular boundary and the corresponding non-contour points within the circular boundary are used as a local point cloud.

[0077] If the shape parameter indicates that the obstacle is a triangle, samples are taken along the three sides of the triangle while maintaining the closed geometry to form the outline of the triangle. The contour points corresponding to the triangle outline and the corresponding non-contour points within the outline are taken as the local point cloud.

[0078] The above shape parameters are only examples. The shape parameters can be set according to actual needs and this application does not limit this.

[0079] Step S503: updating the position of the local point cloud in the map point cloud based on the dynamic attributes.

[0080] In some embodiments of the present application, since dynamic attributes change with time, events, or interactions, the position of the local point cloud in the local coordinate system can be updated through the dynamic attributes as time, events, or interactions change. Preset pose information and random pose information are obtained from the dynamic attributes. The preset pose information may include the position and angle of the preset obstacle set according to actual needs, and the random pose information may include randomly changing the movement direction or speed of the preset obstacle to simulate the irregular movement of the preset obstacle through the random pose information.

[0081] After determining the local point cloud of a preset obstacle in the local coordinate system based on static attributes, dynamic attributes can be added to the local point cloud, allowing the position of the local point cloud in the local coordinate system to be updated based on the dynamic attributes. In one example, after determining the local point cloud of a rectangular preset obstacle in the local coordinate system, the position of the local point cloud of the rectangular preset obstacle in the local coordinate system can be updated in real time based on the position and angle in the preset pose information and the movement direction and speed in the random pose information.

[0082] Step S504 : converting the local point cloud into a global coordinate system corresponding to the map point cloud based on the position, and obtaining a virtual obstacle point cloud in the global coordinate system.

[0083] In some embodiments of the present application, after determining the position of the local point cloud of the preset obstacle in the local coordinate system, in order to ensure that the same coordinate system is used in the simulation environment, the local point cloud can be converted to the global coordinate system corresponding to the map point cloud. In one example, based on the position of the local point cloud corresponding to the preset obstacle in the local coordinate system, the local point cloud is subjected to translation and rotation transformation to determine the transformed local point cloud. The transformed local point cloud is mapped to the global coordinate system to obtain a virtual obstacle point cloud. For example, all transformed local point clouds in the global coordinate system are merged to obtain a global point cloud. The global point cloud is used as a virtual obstacle point cloud. By performing homogeneous coordinate transformation, the local point cloud and the map point cloud are in the same coordinate system, and the local point cloud can be mapped to the global map with high efficiency.

[0084] Step S505: constructing an obstacle point cloud based on the virtual obstacle point cloud.

[0085] In some embodiments of the present application, a virtual obstacle point cloud in a global coordinate system is used as an obstacle point cloud.

[0086] Through the above embodiment, corresponding static and / or dynamic attributes are configured for a local point cloud in a local coordinate system, thereby converting the local point cloud configured with static and / or dynamic attributes to a global coordinate system, thereby achieving the purpose of adding obstacle point clouds to the map point cloud. Furthermore, the difficulty of reusing scene resources to add virtual obstacles is resolved, thereby improving the efficiency of building simulation scenes.

[0087] Figure 6 This is a flow chart for determining laser data provided by the embodiment of the present application. Figure 6 As shown, within a preset range of the virtual mobile device, the laser data of the virtual mobile device is determined based on the map point cloud and the obstacle point cloud, including the following steps.

[0088] Step S601 : determining a simulated laser beam based on preset laser parameters.

[0089] In some embodiments of the present application, laser parameters include, but are not limited to, field of view angle parameters, angular resolution, and ranging range. The field of view angle parameters may be 270° (forward scanning) or 360° (omnidirectional scanning). The angular resolution may be 1°. The ranging range may be 10m. The above are merely examples, and laser parameters may be set based on actual needs. A simulated laser beam is constructed based on one or more of the field of view angle parameters, angular resolution, and ranging range.

[0090] In other embodiments of the present application, the laser parameters may further include a noise model. The noise model is added to the laser parameters to simulate sensor errors, thereby ensuring the accuracy of the simulated laser beam.

[0091] Step S602 : determining a plurality of target point clouds within a preset range based on the current posture of the virtual mobile device and the simulated laser beam.

[0092] In some embodiments of the present application, the preset range may be a circular area with the virtual mobile device as the center and a preset distance (such as 10m) as the radius. The present application does not limit the preset range. The current position of the virtual mobile device in the map point cloud is used as the base point to determine the emission direction of the simulated laser beam emitted by the virtual mobile device. In one example, the orientation angle of the virtual mobile device is determined according to the current position. The local angle corresponding to the simulated laser beam is determined according to the orientation angle. In one example, assuming that the current position of the virtual mobile device is ,in, Represents the heading angle. For each simulated laser beam, calculate its local angle in the global coordinate system (relative to the virtual mobile device's orientation). This is expressed as: simulated laser beam local angle laser_angle = -FOV / 2 + i * resolution. Here, i represents the laser beam index, and FOV represents the heading angle.

[0093] The emission direction is determined based on the local angle. If the simulated laser beam includes multiple simulated laser rays, the emission direction can include the direction vector corresponding to each simulated laser ray. This can be expressed as follows: the global direction vector corresponding to the simulated laser beam, ray_dir = [cos(θ + laser_angle), sin(θ + laser_angle)] . Each laser ray originates from the current position (x, y) of the virtual mobile device and is emitted in the direction ray_dir.

[0094] Based on multiple simulated laser beams, multiple target point clouds are identified from the map point cloud and obstacle point cloud within a preset range. For example, within the preset range, the vertical distance between each map point cloud and each simulated laser beam, as well as the vertical distance between the obstacle point cloud and each simulated laser beam, is determined. The vertical distance is combined with a preset threshold to filter out target point clouds from the map point cloud and / or obstacle point cloud. The preset threshold can be set based on the actual application and can also be half the point cloud density, which is not limited by this application.

[0095] In one example, if there is a map point cloud and / or obstacle point cloud with a vertical distance less than or equal to a preset threshold, it means that there is a map point cloud and / or obstacle point cloud that intersects with the simulated laser ray, then the map point cloud and / or obstacle point cloud with a vertical distance less than or equal to the preset threshold can be used as the target point cloud.

[0096] If the vertical distance corresponding to any simulated laser ray is greater than a preset threshold, it is determined that no map point cloud and / or obstacle point cloud intersects with the simulated laser ray, and that the direction vector corresponding to the simulated laser ray does not contain a target point cloud. In this case, the target point determined based on the ray range corresponding to the simulated laser ray is used as the target point cloud, where the target point is a constructed virtual point cloud.

[0097] Step S603: determining the relative distance between each target point cloud and the virtual mobile device.

[0098] In some embodiments of the present application, after the target point cloud is determined, the relative distance between each target point cloud and the virtual mobile device is calculated to determine the point cloud closest to the virtual mobile device through the relative distance.

[0099] Step S604: Determine laser data based on the relative distance and multiple target point clouds.

[0100] In some embodiments of the present application, target point clouds with the same relative angle relative to the virtual mobile device are grouped together. Based on the relative angle of each group, the target point cloud closest to the virtual mobile device is determined from among the multiple target point clouds as the laser point cloud. In one example, assuming that a first target point cloud and a second target point cloud have the same relative angle, and the relative distance between the first target point cloud and the virtual mobile device is less than the relative distance between the second target point cloud and the virtual mobile device, the first target point cloud is selected as the laser point cloud.

[0101] According to the distance between each laser point cloud and the virtual mobile device, and the corresponding relative angle, each laser point cloud is converted into polar coordinates to obtain laser data. In one example, the distance between each laser point cloud and the virtual mobile device is expressed by the formula range = , ( , ) represents the position of the laser point cloud P. The relative angle of the laser point cloud P relative to the virtual mobile device is angle = laser_angle. Laser data can be represented as an array, where each element corresponds to the range value of a virtual laser beam, expressed as: [range1, range2, ..., rangeN].

[0102] In other embodiments of the present application, to more closely approximate a real sensor, Gaussian noise can be added to the distance between each laser point cloud and the virtual mobile device, or random false positives can be performed (randomly generating invalid values ​​(such as 0 or the maximum value) with low probability). The distance between each laser point cloud and the virtual mobile device is processed using preset Gaussian noise to obtain a distance value including Gaussian noise. This is expressed as range_noisy = range + N(0, σ) (σ is the standard deviation of the noise). Laser data is determined based on the distance value and relative angle. In one example, based on the relative angle of each target point cloud relative to the virtual mobile device, target point clouds with the same relative angle are grouped together. Based on the relative angle of each category, the target point cloud closest to the virtual mobile device is determined from multiple target point clouds as the laser point cloud. Based on the distance value and the corresponding relative angle between each laser point cloud and the virtual mobile device, each laser point cloud is converted into polar coordinates to obtain laser data.

[0103] After the laser data is determined, if the map point cloud and obstacle point cloud change during the simulation test, the laser data needs to be updated synchronously. Alternatively, if the odometry information corresponding to the virtual mobile device changes, the laser data needs to be updated.

[0104] In some embodiments of the present application, after the construction of the simulation environment is completed, as the virtual mobile device simulates the movement of a real mobile device, the simulation test results of the virtual mobile device are generated in real time. In one example, assuming that the current position of the virtual mobile device is (0, 0, 0), and there is a rectangular obstacle 1 meter in front of the virtual mobile device, the laser data output by the simulated laser scan (FOV=270°, resolution 1°) may be: ranges = [10.0, 10.0, ..., 1.02, 1.01,1.00, 1.01, 1.02, ..., 10.0], where 1.00 indicates that a virtual obstacle is detected during the movement of the virtual mobile device, and 10.0 indicates that no virtual obstacle is detected during the movement of the virtual mobile device. Figure 7 and Figure 8 Describes the laser data determined under different simulation environments.

[0105] In such Figure 7 In the simulation environment shown in the figure, the map point cloud is determined based on the grid map, and the virtual mobile device and obstacle point cloud are added to the map point cloud. Based on the location of the virtual mobile device, if there is a virtual obstacle built based on the obstacle point cloud within the preset range, the following is generated based on the map point cloud and the obstacle point cloud: Figure 7 Laser data shown.

[0106] In such Figure 8In the simulation environment shown in FIG, based on the location of the virtual mobile device, there are virtual obstacles built based on the obstacle point cloud within the preset range, and the following is generated based on the map point cloud and the obstacle point cloud: Figure 8 Laser data shown.

[0107] Through the above embodiments, laser data is constructed based on the map point cloud and / or obstacle point cloud, which speeds up the efficiency of generating laser data, realizes the function of simulating the laser beam emitted by a real mobile device, and improves the simulation efficiency.

[0108] The following combination Figures 9 to 11 Describes the process of avoiding virtual obstacles using laser data.

[0109] like Figures 9 to 11 As shown, a map point cloud is generated based on the grid map, and laser data is generated based on the map point cloud and / or obstacle point cloud. A movement trajectory is generated based on the current position of the virtual mobile device and the position of the virtual obstacle. The virtual mobile device avoids the virtual obstacle based on the movement trajectory, for example, the virtual mobile device moves from Figure 9 Move the position shown to Figure 11 The navigation and obstacle avoidance functions of a real mobile device are simulated to avoid real obstacles, so as to test the navigation and obstacle avoidance functions of the system.

[0110] Through the above embodiments, virtual lasers are generated quickly and flexibly based on the grid map, and the point cloud generated by the real environment in the grid map is combined to test whether the navigation function (or other task functions) of the system is effective, avoiding the use of real mobile devices to test in the real environment, thereby effectively improving the efficiency of system detection.

[0111] Figure 12 It is a structural diagram of the construction device of the simulation environment provided in the embodiment of the present application.

[0112] In some embodiments, the simulation environment construction device 120 may include multiple functional modules composed of computer program segments. The computer program of each program segment in the simulation environment construction device 120 may be stored in the memory of the electronic device and executed by at least one processor to perform (see Figure 1 Description) Control functions of electronic equipment.

[0113] In this embodiment, the construction device 120 of the simulation environment can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a determination module 1201, a construction module 1202 and a generation module 1203. The determination module 1201 is used to determine the map point cloud based on the grid map; the construction module 1202 is used to construct an obstacle point cloud and a virtual mobile device in the map point cloud; the generation module 1203 is used to determine the laser data of the virtual mobile device based on the map point cloud and the obstacle point cloud within the preset range of the virtual mobile device. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, which are stored in a memory. In the embodiments of the present application, the definition of the construction device of the simulation environment can be found in the definition of the construction method of the simulation environment above, and will not be repeated here.

[0114] In one embodiment, determining a map point cloud based on a grid map includes: identifying obstacles in the grid map; determining a target grid corresponding to the obstacle in the grid map; and determining the map point cloud based on position information of the target grid.

[0115] In one embodiment, constructing an obstacle point cloud in the map point cloud includes: determining static attributes and / or dynamic attributes of a preset obstacle; determining a local point cloud of the preset obstacle in a local coordinate system based on the static attributes; updating a position of the local point cloud in the local coordinate system based on the dynamic attributes; converting the local point cloud to a global coordinate system corresponding to the map point cloud based on the position to obtain a virtual obstacle point cloud in the global coordinate system; and constructing the obstacle point cloud based on the virtual obstacle point cloud.

[0116] In one embodiment, determining the local point cloud of the preset obstacle in the local coordinate system based on the static attributes includes: fitting the contour point cloud corresponding to the preset obstacle based on the shape parameters in the static attributes; and determining the local point cloud based on the contour point cloud and the non-contour point cloud corresponding to the preset obstacle.

[0117] In one embodiment, updating the position of the local point cloud in the local coordinate system based on the dynamic attributes includes: updating the position based on preset pose information and random pose information in the dynamic attributes.

[0118] In one embodiment, the converting of the local point cloud to the global coordinate system corresponding to the map point cloud based on the position to obtain a virtual obstacle point cloud in the global coordinate system includes: performing a translation transformation and a rotation transformation on the local point cloud based on the position to determine the transformed local point cloud; and mapping the transformed local point cloud to the global coordinate system to obtain the virtual obstacle point cloud.

[0119] In one embodiment, mapping the transformed local point cloud to the global coordinate system to obtain the virtual obstacle point cloud includes: merging all transformed local point clouds in the global coordinate system to obtain a global point cloud; and determining the virtual obstacle point cloud based on the global point cloud.

[0120] In one embodiment, it further includes: updating the laser data when the map point cloud and the obstacle point cloud change; or updating the laser data when the odometer information corresponding to the virtual mobile device changes.

[0121] In one embodiment, the laser data of the virtual mobile device is determined based on the map point cloud and the obstacle point cloud within a preset range of the virtual mobile device, including: determining a simulated laser beam based on preset laser parameters; determining a plurality of target point clouds located within the preset range based on the current posture of the virtual mobile device and the simulated laser beam; wherein the plurality of target point clouds include the map point cloud and / or the obstacle point cloud; determining the relative distance between each target point cloud and the virtual mobile device; and determining the laser data based on the relative distance and the plurality of target point clouds.

[0122] In one embodiment, determining the simulated laser beam based on preset laser parameters includes determining the simulated laser beam based on one or more of a field of view angle parameter, an angular resolution, and a ranging range in the laser parameters.

[0123] In one embodiment, the determining of a plurality of target point clouds within the preset range based on the current position of the virtual mobile device and the simulated laser beam includes: determining, based on the current position, an emission direction of the virtual mobile device when simulating the emission of the simulated laser beam; wherein the simulated laser beam includes a plurality of simulated laser rays, and the emission direction includes a direction vector corresponding to each simulated laser ray; and determining, based on the plurality of simulated laser rays, the plurality of target point clouds from the map point cloud and the obstacle point cloud within the preset range.

[0124] In one embodiment, determining the emission direction of the simulated laser beam when the virtual mobile device simulates the emission of the simulated laser beam based on the current posture includes: determining the orientation angle of the virtual mobile device based on the current posture; determining the local angle corresponding to the simulated laser beam based on the orientation angle; and determining the emission direction based on the local angle.

[0125] In one embodiment, the determining of the multiple target point clouds from the map point cloud and the obstacle point cloud within the preset range based on the multiple simulated laser rays includes: determining the vertical distance between each map point cloud and each simulated laser ray, and between the obstacle point cloud and each simulated laser ray within the preset range; and taking the map point cloud and / or obstacle point cloud whose vertical distance is less than or equal to a preset threshold as the target point cloud.

[0126] In one embodiment, it also includes: if the vertical distance corresponding to any simulated laser ray is greater than the preset threshold, determining that the direction vector corresponding to any simulated laser ray does not have a target point cloud; and using the target point determined based on the ray range corresponding to any simulated laser ray as the target point cloud.

[0127] In one embodiment, determining the laser data based on the relative distance and the multiple target point clouds includes: determining the relative angle of each target point cloud relative to the virtual mobile device; based on each relative angle, determining the target point cloud closest to the virtual mobile device from the multiple target point clouds as the laser point cloud; and determining the laser data based on the distance between each laser point cloud and the virtual mobile device, and the corresponding relative angle.

[0128] In one embodiment, the method further includes: processing the distance between each laser point cloud and the virtual mobile device using preset Gaussian noise to obtain a distance value including Gaussian noise; accordingly, determining the laser data based on the distance between each laser point cloud and the virtual mobile device, and the corresponding relative angle, includes: determining the laser data based on the distance value and the relative angle.

[0129] In one embodiment, the method further includes: determining a simulation test result of the virtual mobile device based on the laser data.

[0130] An embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the methods in the above-mentioned embodiments of the present application.

[0131] The computer-readable storage medium may be an internal memory of the electronic device of the above-mentioned embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart memory card (SMC), a secure digital (SD) card, a flash memory card, etc.

[0132] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, applications required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc.

[0133] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0134] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0135] In the embodiments provided in this application, it should be understood that the disclosed devices / terminal devices and methods can be implemented in other ways. For example, the device / terminal device embodiments described above are merely illustrative. For example, the division of modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0136] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0137] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for constructing a simulation environment, characterized in that: The method comprises: Determine a map point cloud based on a raster map; Constructing an obstacle point cloud and a virtual mobile device in the map point cloud; Within a preset range of the virtual mobile device, laser data of the virtual mobile device is determined based on the map point cloud and the obstacle point cloud.

2. The method for constructing a simulation environment according to claim 1, wherein: Determining a map point cloud based on a grid map includes: identifying obstacles in the grid map; Determining a target grid corresponding to the obstacle in the grid map; The map point cloud is determined based on the position information of the target grid.

3. The method for constructing a simulation environment according to claim 1, wherein: The step of constructing an obstacle point cloud in the map point cloud includes: Determining static properties and / or dynamic properties of a predetermined obstacle; Determining a local point cloud of the preset obstacle in a local coordinate system based on the static attributes; Based on the dynamic attributes, updating the position of the local point cloud in the local coordinate system; Converting the local point cloud to a global coordinate system corresponding to the map point cloud based on the position to obtain a virtual obstacle point cloud in the global coordinate system; The obstacle point cloud is constructed based on the virtual obstacle point cloud.

4. The method for constructing a simulation environment according to claim 3, wherein: The determining, based on the static attributes, a local point cloud of the preset obstacle in a local coordinate system includes: Fitting a contour point cloud corresponding to the preset obstacle based on the shape parameters in the static attributes; The local point cloud is determined based on the contour point cloud and the non-contour point cloud corresponding to the preset obstacle.

5. The method for constructing a simulation environment according to claim 3, wherein: The updating of the position of the local point cloud in the local coordinate system based on the dynamic attribute includes: The position is updated based on the preset posture information and the random posture information in the dynamic attribute.

6. The method for constructing a simulation environment according to claim 3, wherein: The converting the local point cloud into a global coordinate system corresponding to the map point cloud based on the position to obtain a virtual obstacle point cloud in the global coordinate system includes: performing a translation transformation and a rotation transformation on the local point cloud based on the position to determine a transformed local point cloud; The transformed local point cloud is mapped to the global coordinate system to obtain the virtual obstacle point cloud.

7. The method for constructing a simulation environment according to claim 6, wherein: Mapping the transformed local point cloud to the global coordinate system to obtain the virtual obstacle point cloud includes: Merging all transformed local point clouds in the global coordinate system to obtain a global point cloud; Based on the global point cloud, the virtual obstacle point cloud is determined.

8. The method for constructing a simulation environment according to claim 1, wherein: The method further comprises: When the map point cloud and the obstacle point cloud change, update the laser data; or When the odometer information corresponding to the virtual mobile device changes, the laser data is updated.

9. The method for constructing a simulation environment according to claim 1, wherein: The determining, within a preset range of the virtual mobile device, laser data of the virtual mobile device based on the map point cloud and the obstacle point cloud includes: Determine a simulated laser beam based on preset laser parameters; Determining a plurality of target point clouds within the preset range based on the current position of the virtual mobile device and the simulated laser beam; wherein the plurality of target point clouds include the map point cloud and / or the obstacle point cloud; determining a relative distance between each target point cloud and the virtual mobile device; The laser data is determined based on the relative distance and the plurality of target point clouds.

10. The method for constructing a simulation environment according to claim 9, wherein: The step of determining a simulated laser beam based on preset laser parameters includes: The simulated laser beam is determined based on one or more of a field of view angle parameter, an angular resolution, and a ranging range among the laser parameters.

11. The method for constructing a simulation environment according to claim 9, wherein: The determining of a plurality of target point clouds located within the preset range based on the current posture of the virtual mobile device and the simulated laser beam includes: Determining, based on the current position, an emission direction of the simulated laser beam when the virtual mobile device simulates emitting the simulated laser beam; wherein the simulated laser beam includes a plurality of simulated laser rays, and the emission direction includes a direction vector corresponding to each simulated laser ray; Based on the multiple simulated laser rays, the multiple target point clouds are determined from the map point cloud and the obstacle point cloud within the preset range.

12. The method for constructing a simulation environment according to claim 11, wherein: The determining, based on the current posture, the emission direction of the simulated laser beam when the virtual mobile device simulates emission, includes: Determining a heading angle of the virtual mobile device based on the current posture; Based on the orientation angle, determining a local angle corresponding to the simulated laser beam; Based on the local angle, the emission direction is determined.

13. The method for constructing a simulation environment according to claim 11, wherein: The determining the plurality of target point clouds from the map point cloud and the obstacle point cloud within the preset range based on the plurality of simulated laser rays includes: Determine, within the preset range, the vertical distance between each map point cloud and each simulated laser ray, and between the obstacle point cloud and each simulated laser ray; The map point cloud and / or obstacle point cloud whose vertical distance is less than or equal to a preset threshold is used as the target point cloud.

14. The method for constructing a simulation environment according to claim 13, wherein: The method further comprises: If the vertical distance corresponding to any simulated laser ray is greater than the preset threshold, it is determined that the direction vector corresponding to any simulated laser ray does not have a target point cloud; The target point determined based on the ray range corresponding to any one of the simulated laser rays is used as the target point cloud.

15. The method for constructing a simulation environment according to claim 9, wherein: The determining of the laser data based on the relative distance and the plurality of target point clouds includes: determining a relative angle of each target point cloud relative to the virtual mobile device; Based on each relative angle, determining a target point cloud closest to the virtual mobile device from the multiple target point clouds as a laser point cloud; The laser data is determined based on the distance between each laser point cloud and the virtual mobile device, and the corresponding relative angle.

16. The method for constructing a simulation environment according to claim 15, wherein: The method further comprises: Processing the distance between each laser point cloud and the virtual mobile device using preset Gaussian noise to obtain a distance value including Gaussian noise; Accordingly, determining the laser data based on the distance between each laser point cloud and the virtual mobile device, and the corresponding relative angle, includes: The laser data is determined based on the distance value and the relative angle.

17. The method for constructing a simulation environment according to claim 1, wherein: The method further comprises: A simulation test result of the virtual mobile device is determined based on the laser data.

18. A device for constructing a simulation environment, characterized in that: The construction device of the simulation environment includes: A determination module, for determining a map point cloud based on a raster map; A construction module, configured to construct an obstacle point cloud and a virtual mobile device in the map point cloud; A generating module is used to determine the laser data of the virtual mobile device within a preset range of the virtual mobile device based on the map point cloud and the obstacle point cloud.

19. An electronic device, characterized in that: The electronic device includes a processor and a memory, the memory stores a computer program, and the processor implements the method for constructing a simulation environment as described in any one of claims 1 to 17 when executing the computer program.

20. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the method for constructing a simulation environment according to any one of claims 1 to 17 is implemented.

Citation Information

Patent Citations

  • Method, device, an apparatus and storage medium for generating simulation point cloud data

    CN109271893A

  • Data processing method and device, equipment and storage medium

    CN113244619A

  • Labeling method and device and electronic equipment

    CN114897669A

  • Point cloud data generation method and device, computer equipment and storage medium

    CN117392341A

  • Simulation scene generation method and device, electronic equipment and storage medium

    CN118212379A