Collision prediction method, self-moving device, and storage medium
By generating an outer graph covering the self-moving device and obstacles, and using the area relationship of the graph to determine collisions, the problem of balancing the accuracy of self-moving device collision prediction and resource consumption is solved, thus achieving efficient collision prediction.
Patent Information
- Application Number
- CN202510214972.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2026-08-25
AI Technical Summary
Existing technologies struggle to ensure accurate collision prediction for self-moving devices while reducing resource consumption.
By generating a first and second circumscribed graphic of the self-moving device to cover the device outline, and a third and fourth circumscribed graphic of the obstacle to cover the point cloud, collisions are determined by the area relationship of these graphics. The intersection of the second and fourth circumscribed graphics is further determined only when the first and third circumscribed graphics do not intersect, thus saving computing power.
It improves the accuracy of collision prediction and reduces computational resource consumption.
Smart Images

Figure CN122632820A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of self-moving device technology, and in particular to a collision prediction method, a self-moving device, and a storage medium. Background Technology
[0002] With the continuous advancement of technology and the rapid development of artificial intelligence, using self-moving equipment (such as lawnmowers, cleaners, cruisers, etc.) for operations can greatly improve work efficiency.
[0003] To ensure the safety and efficiency of self-moving devices, accurate collision prediction for obstacle avoidance is crucial. Related technologies often utilize algorithms such as geometric intersection to predict whether a self-moving device poses a collision risk with an obstacle.
[0004] However, due to factors such as the complexity of the algorithm, related technologies often struggle to find a balance between reducing the consumption of computing power and other resources and ensuring the accuracy of collision prediction. Summary of the Invention
[0005] In view of the above, it is necessary to provide a collision prediction method, a self-moving device, and a storage medium that can solve the technical problem of ensuring the accuracy of collision prediction while reducing resource consumption.
[0006] On one hand, this application provides a collision prediction method applied to a self-moving device. The method includes: predicting the motion path of the self-moving device based on its state parameters; generating a first circumscribed shape and a second circumscribed shape corresponding to the self-moving device at path points along the motion path based on the outline of the self-moving device, wherein the area of the first circumscribed shape is larger than the area of the second circumscribed shape; generating a third circumscribed shape and a fourth circumscribed shape corresponding to the obstacle based on the point cloud of the obstacle, wherein the area of the third circumscribed shape is larger than the area of the fourth circumscribed shape; determining the collision prediction result of the self-moving device against the obstacle based on the intersection of the second circumscribed shape and the fourth circumscribed shape if the first circumscribed shape intersects with the third circumscribed shape; and determining that the collision prediction result is that the self-moving device will not collide with the obstacle if the first circumscribed shape and the third circumscribed shape do not intersect.
[0007] On the other hand, this application provides a self-moving device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the self-moving device implements the collision prediction method. On the other hand, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor in a self-moving device, implements the collision prediction method.
[0008] In the collision prediction method of this embodiment, since the state parameters of the self-moving device can comprehensively reflect information such as the movement direction, speed, and direction of movement of the self-moving device, the possible movement path of the self-moving device can be accurately predicted based on the state parameters of the self-moving device. Based on the outline of the self-moving device, a first outer shape and a second outer shape are generated at the path points of the movement path, such that the first and second outer shapes can cover the outline of the self-moving device. Based on the point cloud of the obstacle, a third and a fourth outer shape corresponding to the obstacle are generated, such that the fourth and third outer shapes can cover the point cloud of the obstacle. Since the area of the first outer shape is larger than the area of the second outer shape, and the area of the third outer shape is larger than the area of the fourth outer shape, when the first and third outer shapes intersect, the second and fourth outer shapes may not necessarily intersect; conversely, if the first and third outer shapes do not intersect, the second and fourth outer shapes definitely will not intersect. When the first and third circumscribed graphs do not intersect, the collision prediction result is directly determined as the self-moving device will not collide with the obstacle, without needing to determine the intersection of the second and fourth circumscribed graphs, thus saving computational resources. Only when the first and third circumscribed graphs do not intersect will the collision prediction result be determined based on the intersection of the second and fourth circumscribed graphs, thus ensuring the accuracy of the collision prediction result. Attached Figure Description Figure 1 This is a flowchart of a collision prediction method provided in an embodiment of this application.
[0009] Figure 2 This is a schematic diagram of a motion path provided in an embodiment of this application.
[0010] Figure 3 This is a schematic diagram of a rotation path provided in an embodiment of this application.
[0011] Figure 4 This is a schematic diagram of the first external graphic provided in an embodiment of this application.
[0012] Figure 5 This is a schematic diagram of the first external graphic provided in another embodiment of this application.
[0013] Figure 6 This is a schematic diagram of a second external graphic provided in an embodiment of this application.
[0014] Figure 7This is a schematic diagram of a second external graphic provided in another embodiment of this application.
[0015] Figure 8 This is a schematic diagram of a dense point cluster and a single point cluster provided in an embodiment of this application.
[0016] Figure 9 This is a schematic diagram of a dense point cluster and a dual point cluster provided in another embodiment of this application.
[0017] Figure 10 This is a schematic diagram of a third external graphic provided in an embodiment of this application.
[0018] Figure 11 This is a schematic diagram of a third external graphic provided in another embodiment of this application.
[0019] Figure 12 This is a schematic diagram of the fourth external graphic provided in an embodiment of this application.
[0020] Figure 13 This is a schematic diagram of the fourth external graphic provided in an embodiment of this application.
[0021] Figure 14 This is a schematic diagram of the intersection of a first obstacle and a first spatial region provided in another embodiment of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.
[0024] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0025] This application provides a collision prediction method that can accurately predict collisions between a self-moving device and obstacles.
[0026] The collision prediction method provided in this application can be applied to one or more self-moving devices, which can be lawnmowers, cleaning robots, de-icing robots, and cruise robots, etc. This application does not limit the specific type of self-moving device.
[0027] In other embodiments of this application, the collision prediction method provided in this application can be applied to one or more electronic devices, wherein the electronic devices can be computers, tablets, mobile phones, servers, cloud servers, personal digital assistants (PDAs), game consoles, interactive network television (IPTV), smart wearable devices, etc. This application does not limit the type of electronic device.
[0028] To more clearly illustrate the collision prediction method provided in the embodiments of this application, the following will provide an example of a collision prediction method applied to a self-moving device.
[0029] like Figure 1 The diagram shown is a flowchart of a collision prediction method provided in one embodiment of this application. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. The method is applied to self-moving devices.
[0030] S11, predict the motion path of the self-moving device based on the state parameters of the self-moving device.
[0031] In some embodiments of this application, the state parameters may include information such as the current position, speed, acceleration and direction of movement of the self-moving device. The position of the self-moving device may be a single coordinate or multiple coordinates, and this application does not limit this.
[0032] In some embodiments of this application, the self-moving device can predict the movement path of the self-moving device within a preset time period in the future using a preset algorithm based on the current position, movement speed, movement acceleration and movement direction of the self-moving device.
[0033] This application does not limit the type of preset algorithm; for example, the preset algorithm can be a kinematic model or a probabilistic filtering algorithm such as Kalman filtering. The preset time period can be customized.
[0034] When the self-moving device is in motion, the motion path can be a rotation path used to control the self-moving device to rotate in place around a preset rotation center, wherein the radius of the first circumscribed shape corresponding to the rotation path is positively correlated with the rotational angular velocity of the self-moving device. For example, the preset rotation center can be the rear axis center of the self-moving device. The motion path can be a straight line, a curve, or other shapes.
[0035] Taking the rectangular outline of a self-moving device as an example, Figure 2 This is a schematic diagram of a motion path provided in an embodiment of this application. Figure 2 In the diagram, dashed lines represent the movement path, and arrows point in the direction of the movement path. Figure 2 The curves shown represent multiple possible predictions of the motion path. In practical applications, the motion path can be... Figure 2 One of the multiple curves shown. Figure 3 This is a schematic diagram of a rotation path provided in an embodiment of this application. Figure 3 The motion path shown is used to control the self-moving device to rotate in place around the rear axis center of the self-moving device.
[0036] In this embodiment, since the state parameters of the self-moving device can comprehensively reflect information such as its motion direction, speed, and trajectory, the possible motion path of the self-moving device can be accurately predicted based on these parameters. Because the radius of the first circumscribed shape corresponding to the rotation path is positively correlated with the rotational angular velocity of the self-moving device, the larger the rotational angular velocity, the larger the first circumscribed shape; conversely, the smaller the rotational angular velocity, the smaller the first circumscribed shape. Since a larger rotational angular velocity indicates a greater risk of the self-moving device rotating in place, enlarging the first circumscribed shape increases the area for collision prediction, thereby improving the safety of the self-moving device.
[0037] S12, based on the outline of the self-moving device, generate the first outer graphic and the second outer graphic corresponding to the self-moving device at the path points of the motion path.
[0038] In some embodiments of this application, the self-moving device can use all locations on the motion path as path points, or it can randomly select a portion of the locations on the motion path as path points. For example, the self-moving device can select the starting position, the center position, and the ending position on the motion path as path points.
[0039] Each path point has corresponding coordinates and heading angle information. The heading angle corresponding to each path point can be the angle between the direction of movement of the self-moving device at that path point and a preset reference direction. The preset reference direction can be customized. For example, the preset reference direction can be due east. For instance, if the direction of movement of the self-moving device at a path point is due north and the preset reference direction is due east, then the heading angle corresponding to that path point can be 90°.
[0040] Each path point has a corresponding first bounding shape and a second bounding shape, and the area of the first bounding shape corresponding to each path point is greater than the area of the corresponding second bounding shape. This application does not limit the shape of the first bounding shape and the second bounding shape. For example, the first bounding shape can be a circle, and the second bounding shape can be a rectangle. To clearly illustrate the generation process of the first bounding shape and the second bounding shape, the following will use a circle as the first bounding shape and a rectangle as the second bounding shape as examples.
[0041] For example, generating a first circumscribed shape corresponding to the self-moving device at a path point on the motion path based on the self-moving device's outline includes: determining the region position corresponding to the area occupied by the self-moving device's outline on the motion path based on the self-moving device's outline, the coordinates of the path point, and the heading angle; generating the smallest circumscribed circle of the region in the map as the first circumscribed shape based on the region position; or generating multiple circles covering the region in the map as the first circumscribed shape based on the region position. The multiple circles covering the region can overlap.
[0042] For example, generating a second bounding shape corresponding to the self-moving device at the path points of the motion path based on the outline of the self-moving device includes: generating the minimum bounding rectangle corresponding to the region in the map as the second bounding shape based on the region location.
[0043] For example, Figure 4 This is a schematic diagram of the first external graphic provided in an embodiment of this application. Figure 5 This is a schematic diagram of a first external graphic provided in another embodiment of this application. Figure 4 and Figure 5 In the diagram, the rectangle represented by the dashed line is the first circumscribed figure. Figure 4 and Figure 5 The rectangle represented by the dashed line is only one of the many possibilities for the first circumscribed rectangle, and is not limited to this in practical applications. Figure 6 This is a schematic diagram of the second external graphic provided in an embodiment of this application. Figure 7 This is a schematic diagram of a second external graphic provided in another embodiment of this application. Figure 6 and Figure 7 In the diagram, the shape of the second circumscribed figure is a circle. Figure 6and Figure 7 The circular region in the diagram represents only a number of possibilities for the second circumscribed figure, and is not limited to this in practical applications. Figures 4 to 5 The first outer graph in the example is for illustrative purposes only. Figures 6 to 7 The second circumscribed graph in the example is only for illustration purposes, and is not limited to this in actual applications.
[0044] In this embodiment, based on the outline of the self-moving device, a first bounding graphic and a second bounding graphic are generated at the path points of the motion path, such that the first bounding graphic and the second bounding graphic can cover the outline of the self-moving device. By randomly selecting some positions on the motion path as path points and generating the first bounding graphic and the second bounding graphic at the selected path points, the amount of computation can be reduced.
[0045] S13, Based on the point cloud of the obstacle, generate the third and fourth circumscribed graphs corresponding to the obstacle.
[0046] In some embodiments of this application, the self-moving device can detect obstacles using sensors to obtain point clouds of obstacles. These sensors include lidar and time-of-flight (TOF) sensors.
[0047] For example, the self-moving device generates a third circumscribed graph corresponding to an obstacle based on the point cloud of the obstacle, including: performing clustering processing on the point cloud to obtain multiple clusters; classifying the multiple clusters to obtain dense point clusters including multiple points, and / or, bipoint clusters including two isolated points, and / or, single point clusters including a single isolated point; if the multiple clusters include dense point clusters, generating a minimum circumscribed circle in the map including multiple points in the dense point clusters as the third circumscribed graph; if the multiple clusters include bipoint clusters, generating a minimum circumscribed circle in the map including two points in the bipoint clusters as the third circumscribed graph; if the multiple clusters include single point clusters, generating a circle in the map including a single point in the single point clusters as the third circumscribed graph, with the length of the self-moving device as the diameter.
[0048] The self-moving device can utilize clustering algorithms to cluster the point cloud, obtaining multiple clusters. For example, the clustering algorithm could be the K-means algorithm. In a dense point cluster, the distance between all points is less than the vehicle's length, and the curve connecting points outside the cluster is a closed shape. In a two-point cluster, the distance between two points is less than the vehicle's length, and the distance between two points and other points is greater than a preset distance. In a single-point cluster, the distance between a single point and other points is greater than a preset distance, which can be customized.
[0049] For example, Figure 8 This is a schematic diagram of a dense point cluster and a single point cluster provided in an embodiment of this application. Figure 8It includes two dense point clusters and one single point cluster. Each dense point cluster includes multiple points. The distance between all points in the dense point cluster is less than the length of the vehicle body, and the curve connecting the external points in the dense point cluster is a closed figure. The single point cluster includes an isolated single point.
[0050] For example, Figure 9 This is a schematic diagram of a dense point cluster and a dual point cluster provided in another embodiment of this application. Figure 9 It includes two dense point clusters and one bipoint cluster, where the bipoint cluster consists of two isolated points.
[0051] For example, Figure 10 This is a schematic diagram of a third external graphic provided in an embodiment of this application. Figure 11 This is a schematic diagram of a third external graphic provided in another embodiment of this application. Figure 10 and Figure 8 correspond, Figure 11 and Figure 9 Corresponding. In Figure 10 and Figure 11 In the process, for dense point clusters, the minimum bounding circle including multiple points in the dense point cluster is generated as the third bounding circle; for two-point clusters, the minimum bounding circle including two points in the two-point cluster is generated as the third bounding circle; for single-point clusters, a circle including a single point in the single-point cluster is generated on the map with the length of the self-moving device as the diameter as the third bounding circle. Figures 8 to 9 The distribution of the clusters is only an example. Figures 10 to 11 The third external graph in the example is only for illustration purposes, and is not limited to this in actual applications.
[0052] In other embodiments, the point cloud of obstacles can be preprocessed before clustering to filter out redundant points, thereby improving the quality of the point cloud. This preprocessing may include voxel filtering, etc.
[0053] For example, the self-moving device generates a fourth bounding shape corresponding to an obstacle based on the point cloud of the obstacle, including: if the plurality of clusters include dense point clusters, generating a minimum bounding rectangle in the map that includes multiple points in the dense point clusters as the fourth bounding shape; if the plurality of clusters include two-point clusters, generating a rectangle in the map that includes two points in the two-point clusters as the fourth bounding shape based on the distance between two points in the two-point clusters and the body length of the self-moving device; if the plurality of clusters include single-point clusters, generating a rectangle in the map that includes a single point in the single-point clusters as the fourth bounding shape, using the body length of the self-moving device as the side length.
[0054] Each cluster obtained by classifying the multiple clusters can have a corresponding third circumscribed shape and a fourth circumscribed shape, where the area of the third circumscribed shape is greater than the area of the corresponding fourth circumscribed shape. For example, a self-moving device can use the length of the self-moving device's body as one side length and the distance between two points in the two-point cluster as the other side length to generate a rectangle including two points within the two-point cluster as the fourth circumscribed shape.
[0055] To facilitate the intersection determination of the first and third circumscribed figures, as well as the intersection determination of the second and fourth circumscribed figures, the shape of the third circumscribed figure can be the same as the shape of the first circumscribed figure, and the shape of the fourth circumscribed figure can be the same as the shape of the second circumscribed figure.
[0056] For example, Figure 12 This is a schematic diagram of the fourth external graphic provided in one embodiment of this application. Figure 13 This is a schematic diagram of the fourth external graphic provided in an embodiment of this application. Figure 12 and Figure 10 correspond, Figure 13 and Figure 11 Corresponding. In Figure 12 and Figure 13 In the process, for dense point clusters, a minimum bounding rectangle including multiple points in the dense point cluster is generated as the fourth bounding shape; for two-point clusters, a rectangle including two points in the two-point cluster is generated as the fourth bounding shape, using the length of the self-moving device as one side length and the distance between two points in the two-point cluster as the other side length; for single-point clusters, a rectangle including a single point in the single-point cluster is generated in the map using the length of the self-moving device as the side length as the fourth bounding shape. Figures 12 to 13 The fourth circumscribed graph in the example is only for illustration purposes; in actual applications, it is not limited to this.
[0057] In this embodiment, based on the point cloud of the obstacle, a third and fourth circumscribed graph corresponding to the obstacle are generated. This ensures that the fourth and third circumscribed graphs closely approximate the distribution shape of the obstacle and cover its point cloud, thereby making collision prediction more accurate. Since the area of the first circumscribed graph is larger than the area of the second circumscribed graph, and the area of the third circumscribed graph is larger than the area of the fourth circumscribed graph, it can be determined that when the first and third circumscribed graphs intersect, the second and fourth circumscribed graphs may not necessarily intersect; conversely, if the first and third circumscribed graphs do not intersect, the second and fourth circumscribed graphs definitely will not intersect.
[0058] S14, determine whether the first circumscribed graph intersects with the third circumscribed graph.
[0059] In some embodiments of this application, the self-moving device can determine the intersection of the first and third circumscribed graphics of all path points on the motion path, or the self-moving device can select some path points from the first circumscribed graphics of all path points on the motion path and determine their intersection with the third circumscribed graphics. The number of first circumscribed graphics selected can be customized.
[0060] To clearly illustrate the method for determining the intersection of the first and third circumscribed figures, the following example uses circles as the shape of both figures. For instance, the self-moving device can determine the distance between the centers of the first and third circumscribed figures, as well as the sum of the radii of the first and third circumscribed figures. If the distance between the centers is less than or equal to the sum of the radii, the first and third circumscribed figures are determined to intersect; if the distance is greater than the sum of the radii, the first and third circumscribed figures are determined not to intersect.
[0061] In this embodiment, if at least one of the first circumscribed graphics of all path points or the first circumscribed graphics of the selected path points intersects with a third circumscribed graphic, step S15 is executed; if none of the first circumscribed graphics of all path points or the first circumscribed graphics of the selected path points intersect with any third circumscribed graphic, step S17 is executed. Compared to performing intersection judgment on the first circumscribed graphics and third circumscribed graphics of all path points on the motion path, performing intersection judgment on the first circumscribed graphics and third circumscribed graphics of selected path points reduces the amount of computation, thereby improving the speed of collision prediction.
[0062] S15, determine whether the second circumscribed graph of all path points intersects with the fourth circumscribed graph.
[0063] In some embodiments of this application, the self-moving device can determine whether the second circumscribed graph intersects with the fourth circumscribed graph using various methods, and this application does not limit this. For example, the self-moving device can use one or more algorithms such as Oriented Bounding Box (OBB), Axis-Aligned Bounding Box (AABB), Separating Axis Theorem, and Bounding Volume Hierarchy (BVH) to determine whether the second circumscribed graph of all path points intersects with the fourth circumscribed graph.
[0064] In this embodiment, if at least one second circumscribed graph intersects with the fourth circumscribed graph, step S16 is executed; if the second circumscribed graphs of all path points do not intersect with any of the fourth circumscribed graphs, step S17 is executed.
[0065] S16, determine that the collision prediction result indicates that the self-moving device has the possibility of colliding with the obstacle.
[0066] Considering that algorithms such as directional bounding box OBB, AABB, separating axis theorem, and BVH consume a lot of computing power, in this embodiment, the collision prediction result is determined based on the intersection of the second and fourth bounding graphics only when the first and third bounding graphics do not intersect. This saves computing power and ensures the accuracy of the collision prediction result. S17, The collision prediction result is determined to be that the self-moving device will not collide with the obstacle.
[0067] In this embodiment, when the first circumscribed graph and the third circumscribed graph do not intersect, the collision prediction result is directly determined to be that the self-moving device will not collide with the obstacle, without having to perform an intersection judgment on the second circumscribed graph and the fourth circumscribed graph. Therefore, it can save computing power and thus improve the collision prediction efficiency.
[0068] In the collision prediction method of this embodiment, since the state parameters of the self-moving device can comprehensively reflect information such as the movement direction, speed, and direction of movement of the self-moving device, the possible movement path of the self-moving device can be accurately predicted based on the state parameters of the self-moving device. Based on the outline of the self-moving device, a first outer shape and a second outer shape are generated at the path points of the movement path, such that the first and second outer shapes can cover the outline of the self-moving device. Based on the point cloud of the obstacle, a third and a fourth outer shape corresponding to the obstacle are generated, such that the fourth and third outer shapes can cover the point cloud of the obstacle. Since the area of the first outer shape is larger than the area of the second outer shape, and the area of the third outer shape is larger than the area of the fourth outer shape, when the first and third outer shapes intersect, the second and fourth outer shapes may not necessarily intersect; conversely, if the first and third outer shapes do not intersect, the second and fourth outer shapes definitely will not intersect. When the first and third circumscribed graphs do not intersect, the collision prediction result is directly determined as the self-moving device will not collide with the obstacle, without needing to determine the intersection of the second and fourth circumscribed graphs, thus saving computational resources. Only when the first and third circumscribed graphs do not intersect will the collision prediction result be determined based on the intersection of the second and fourth circumscribed graphs, thus ensuring the accuracy of the collision prediction result.
[0069] For example, such as Figure 14 The diagram shown is a structural schematic of a self-moving device provided in an embodiment of this application. Figure 14In this embodiment, the self-moving device 1 includes a main body and a memory 11, a processor 12, a power supply 13, a sensor 14, a working mechanism 15, a communication module 16, a positioning module 17, a drive wheel 18, and a bus 19 disposed on the main body. The processor 12 is coupled to the memory 11, the power supply 13, the sensor 14, the working mechanism 15, the communication module 16, the positioning module 17, and the drive wheel 18 via the bus 19.
[0070] Memory 11 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 12 and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may 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.
[0071] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 12. Non-volatile memory can include disk storage devices and flash memory.
[0072] The memory 11 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 12. The one or more computer programs include multiple instructions that, when executed by the processor 103, can implement a collision prediction method executed on the self-moving device 1.
[0073] In other embodiments, the self-moving device 1 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the self-moving device 1.
[0074] Processor 12 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.
[0075] The processor 12 provides computing and control capabilities, for example, the processor 12 is used to execute computer programs stored in the memory 11 to implement the collision prediction method described above.
[0076] The power source 13 is used to power the self-moving device. In one embodiment of this application, the power source 13 may include any one or more power supply devices of the type such as a battery, a fuel generator, a solar power generation module, or a wind power generation module.
[0077] Sensor 14 is used to acquire information for the self-moving device 1, such as environmental information and movement information of the self-moving device 1. In one embodiment of this application, sensor 14 may include one or more sensors of the type such as lidar, camera, infrared sensor, encoder, etc.
[0078] The working mechanism 15 is used to perform corresponding work tasks, such as mowing, de-icing, patrolling, sweeping, and spraying pesticides. In some embodiments of this application, the working mechanism 15 may include a motor, a transmission mechanism, and a blade disc. When the self-moving device is a lawnmower, the motor can drive the blade disc to rotate through the transmission mechanism to achieve the mowing function. The motor can also control the movement of the blades to adjust the mowing height and the mowing area.
[0079] The communication module 16 is used to enable communication between the self-moving device and other devices. In one embodiment of this application, the communication module 16 can interact with other devices via wired and / or wireless communication. The aforementioned wireless communication may include one or more combinations of communication methods such as Bluetooth communication, Wi-Fi communication, and Near Field Communication (NFC).
[0080] The positioning module 17 is used to determine the location of the self-moving device. In some embodiments of this application, the positioning module 17 may include one or more of the following types of positioning modules: Global Positioning System (GPS), inertial navigation system, real-time kinematic (RTK) carrier phase differential system, etc.
[0081] The drive wheel 18 is used to enable movement of the self-moving device. In some embodiments of this application, the drive wheel 18 can realize the movement function of the self-moving device according to the control of the processor 12. In some embodiments of this application, the drive wheel 18 may include a left drive wheel and a right drive wheel.
[0082] Bus 19 is used at least to provide a channel for communication between the memory 11, processor 12, power supply 13, sensor 14, working mechanism 15, communication module 16, positioning module 17, and drive wheel 18 in the self-moving device 1.
[0083] In other embodiments of this application, the self-moving device 1 may further include a collision avoidance section and a steering assembly. The collision avoidance section can be used to prevent the drive wheels 18 from colliding with obstacles or the like in front of the self-moving device. The steering assembly can be used to adjust the driving direction of the drive wheels 18.
[0084] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the self-moving device 1. In other embodiments of this application, the self-moving device 1 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0085] This application also provides a computer-readable storage medium storing a computer program, which includes program instructions. When the program instructions are executed, the method implemented can refer to the methods in the above embodiments of this application.
[0086] The computer-readable storage medium can be the internal memory of the self-movable device or electronic device described in the above embodiments, such as a hard disk or memory of the self-movable device or electronic device. The computer-readable storage medium can also be an external storage device of the self-movable device or electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the self-movable device or electronic device.
[0087] In some embodiments, a computer-readable storage medium may include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of a self-moving device or electronic device, etc.
[0088] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0089] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art 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.
[0090] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A collision prediction method applied to self-moving devices, characterized in that, The method includes: Based on the state parameters of the self-moving device, predict the motion path of the self-moving device; Based on the outline of the self-moving device, a first circumscribed graphic and a second circumscribed graphic corresponding to the self-moving device are generated at the path points of the motion path, wherein the area of the first circumscribed graphic is greater than the area of the second circumscribed graphic. Based on the point cloud of the obstacle, a third circumscribed shape and a fourth circumscribed shape corresponding to the obstacle are generated, wherein the area of the third circumscribed shape is greater than the area of the fourth circumscribed shape. If the first circumscribed graph intersects with the third circumscribed graph, the collision prediction result of the self-moving device for the obstacle is determined based on the intersection of the second circumscribed graph and the fourth circumscribed graph. If the first circumscribed graph does not intersect with the third circumscribed graph, the collision prediction result is determined to be that the self-moving device will not collide with the obstacle.
2. The collision prediction method as described in claim 1, characterized in that, The method further includes: The path points are determined based on random positions along the motion path.
3. The collision prediction method as described in claim 1 or 2, characterized in that, The step of generating the first circumscribed graphic corresponding to the self-moving device at the path points of the motion path based on the outline of the self-moving device includes: Based on the contour, the coordinates of the path points, and the heading angle, determine the region position corresponding to the area occupied by the contour on the motion path; Based on the location of the region, the smallest circumcircle of the region is generated as the first circumcircle shape; or, based on the location of the region, multiple circles covering the region are generated as the first circumcircle shape.
4. The collision prediction method as described in claim 3, characterized in that, The step of generating a second circumscribed graphic corresponding to the self-moving device at the path points of the motion path based on the outline of the self-moving device includes: Based on the location of the region, the minimum bounding rectangle corresponding to the region is generated as the second bounding shape.
5. The collision prediction method as described in claim 1, characterized in that, The motion path includes a rotation path for controlling the self-moving device to rotate in place, wherein the radius of the first circumscribed graphic corresponding to the rotation path is positively correlated with the rotational angular velocity of the self-moving device.
6. The collision prediction method as described in claim 1, characterized in that, The point cloud based on obstacles generates a third circumscribed graph corresponding to the obstacle, including: The point cloud is clustered to obtain multiple clusters; The multiple clusters are classified to obtain dense point clusters that include multiple points, and / or bipoint clusters that include two isolated points, and / or single point clusters that include a single isolated point; If the plurality of clusters includes the dense point cluster, generate the smallest circumcircle including the plurality of points as the third circumcircle; If the plurality of clusters includes the two-point cluster, generate the smallest circumcircle including the two points as the third circumcircle; If the plurality of clusters includes the single-point cluster, a circle including the single point is generated with the body length of the self-moving device as the diameter as the third circumscribed shape.
7. The collision prediction method as described in claim 6, characterized in that, The distance between all points in the dense point cluster is less than the vehicle body length, and the curve connecting the external points in the dense point cluster is a closed figure. The distance between two points in the double point cluster is less than the vehicle body length, and the distance between the two points and other points is greater than a preset distance. The distance between a single point in the single point cluster and other points is greater than the preset distance.
8. The collision prediction method as described in claim 6 or 7, characterized in that, The point cloud based on obstacles generates a fourth circumscribed graph corresponding to the obstacle, including: If the plurality of clusters includes the dense point cluster, generate the smallest bounding rectangle including the plurality of points as the fourth bounding shape; If the plurality of clusters includes the two-point cluster, a rectangle including the two points is generated as the fourth circumscribed shape based on the distance between the two points and the vehicle length; If the plurality of clusters includes the single-point cluster, a rectangle including the single point is generated using the vehicle body length as the side length as the fourth circumscribed shape.
9. The collision prediction method as described in claim 1, characterized in that, The method further includes: From the first bounding graph of all path points on the motion path, select multiple path points and their first bounding graphs to perform an intersection judgment with the third bounding graph; If at least one of the selected first circumscribed graphs does not intersect with the third circumscribed graph, then the intersection of the second circumscribed graphs of all path points with the fourth circumscribed graph is determined.
10. The collision prediction method as described in claim 1, characterized in that, The first and third circumscribed shapes are circular, and the method further includes: Determine the center-to-center distance between the center of the first circumscribed shape and the center of the third circumscribed shape, and determine the sum of the radii of the first circumscribed shape and the radii of the third circumscribed shape; If the distance between the centers is less than or equal to the sum of the radii, then the first circumscribed shape intersects with the third circumscribed shape. If the distance between the centers is greater than the sum of the radii, it is determined that the first circumscribed shape and the third circumscribed shape do not intersect.
11. A self-moving device, characterized in that, The self-moving device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the self-moving device implements the collision prediction method as described in any one of claims 1 to 10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor in a self-moving device, implements the collision prediction method as described in any one of claims 1 to 10.