Collision risk detection method, apparatus, device, and storage medium
By obtaining the predicted pose of the obstacle within the collision detection range and interfering with the reference pose of the mobile device, the problem of inaccurate collision detection caused by the uncertainty of obstacle motion is solved, and a more accurate and efficient collision risk assessment is achieved.
Patent Information
- Application Number
- CN202211586158.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2042-12-09
AI Technical Summary
Existing collision detection solutions are not accurate enough due to the uncertainty of obstacle movement.
By acquiring the predicted pose of the target obstacle within the collision detection zone and interfering with the predicted pose of the mobile device at the reference time, and considering the changes in the obstacle's trajectory, the collision risk is determined.
It improves the accuracy and efficiency of collision detection, reduces invalid detections, and enhances the safety of obstacle avoidance for mobile devices.
Smart Images

Figure CN118168546B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of obstacle detection, and in particular to collision risk detection methods, apparatus, equipment and storage media. Background Technology
[0002] With the development of science and technology, mobile robots are being used in more and more scenarios. Mobile robots can move to their destination based on path planning to complete a certain task. During their movement, mobile robots need to safely and effectively avoid obstacles in the environment.
[0003] Obstacles in the environment can be categorized into static obstacles and dynamic obstacles based on their motion. Static obstacles are those that remain stationary, while dynamic obstacles are those whose positions change over time. For static obstacles, a mobile robot can simply bypass them upon detection. However, for dynamic obstacles, collision detection is necessary. A common collision detection scheme involves predicting the trajectory of the dynamic obstacle in the future and determining whether a collision will occur if the obstacle and the mobile robot overlap at the same future moment. However, due to the uncertainty of obstacle motion, the predicted trajectory of the dynamic obstacle may not be accurate, leading to inaccurate collision detection. Summary of the Invention
[0004] This application provides a collision risk detection method, apparatus, equipment, and storage medium to address the technical problem that existing collision detection solutions are not accurate enough.
[0005] Firstly, a collision risk detection method is provided, including:
[0006] When a target obstacle corresponding to a mobile device is detected, the predicted pose of the target obstacle in the collision detection interval is obtained. The collision detection interval is a prediction sub-time period within the prediction time period. The prediction sub-time period includes a reference time and several prediction times adjacent to the reference time.
[0007] The predicted pose of the target obstacle at the predicted time within the collision detection interval is compared with the predicted pose of the mobile device at the reference time to determine the collision risk between the mobile device and the target obstacle.
[0008] In this technical solution, when a target obstacle corresponding to the mobile device is detected, the predicted pose of the target obstacle within the collision detection interval is obtained. The predicted pose of the target obstacle at the predicted time within the collision detection interval is then compared with the predicted pose of the mobile device at the reference time to determine the collision risk between the mobile device and the target obstacle. Since the collision detection interval is a sub-time period within the prediction time period and includes the reference time and several prediction times adjacent to the reference time, it is equivalent to performing collision detection between the mobile device's pose at the reference time and the obstacle's pose at multiple prediction times within the time interval corresponding to the reference time. This takes into account the potential changes in the obstacle's trajectory due to its movement, thus making collision detection more accurate.
[0009] In conjunction with the first aspect, in one possible implementation, before obtaining the predicted pose of the target obstacle within the collision detection interval, the method further includes: predicting the motion trajectory of the target obstacle to obtain predicted information corresponding to the target obstacle. The predicted information includes the predicted velocity at the reference time and the velocity covariance matrix corresponding to the predicted velocity. The velocity covariance matrix is obtained by calculating the variance of possible predicted velocities at the reference time. The length of the collision detection interval is determined based on the predicted velocity and the velocity covariance matrix. By predicting the obstacle's motion trajectory to obtain the predicted velocity and velocity covariance matrix at the reference time, and determining the length of the collision detection interval based on the predicted velocity and velocity covariance matrix, the influence of the target obstacle's velocity and its uncertainty on the length of the obstacle's motion trajectory is considered, enabling more accurate collision detection.
[0010] In conjunction with the first aspect, in one possible implementation, the length of the collision detection interval is positively correlated with the predicted velocity and the velocity covariance matrix, respectively.
[0011] In conjunction with the first aspect, in one possible implementation, the length of the collision detection interval is non-linearly positively correlated with both the unit displacement at the reference time and the velocity covariance matrix, where the unit displacement is obtained based on the predicted velocity. This non-linear positive correlation between the length of the collision detection interval and the unit displacement and velocity covariance matrix allows the collision detection interval to cover more possible trajectories of obstacles, thereby making collision detection more accurate.
[0012] In conjunction with the first aspect, in one possible implementation, the prediction information further includes a predicted pose;
[0013] The step of predicting the motion trajectory of the target obstacle to obtain corresponding prediction information includes: determining the predicted velocity of the target obstacle in the sensor coordinate system based on its perceived pose; determining the velocity covariance matrix based on the predicted velocity in the sensor coordinate system; and determining the predicted pose of the target obstacle in the world coordinate system based on its predicted velocity in the sensor coordinate system. By first predicting the obstacle's motion trajectory in the sensor coordinate system to obtain its predicted velocity, and then converting it to the world coordinate system to obtain its trajectory, the obstacle's trajectory prediction does not depend on the results of the positioning module, thus enabling rapid prediction of the target obstacle's trajectory.
[0014] In conjunction with the first aspect, in one possible implementation, determining the predicted pose of the target obstacle in the world coordinate system based on its predicted velocity in the sensor coordinate system includes: processing the predicted velocity of the target obstacle in the sensor coordinate system at the current moment according to a first transformation relationship and a unit time to obtain the unit displacement of the target obstacle in the world coordinate system, where the first transformation relationship is the coordinate transformation relationship between the sensor coordinate system and the world coordinate system; and determining the predicted pose of the target obstacle in the world coordinate system based on the perceived pose of the target obstacle in the world coordinate system at the current moment and the unit displacement of the target obstacle in the world coordinate system. This method of determining the unit displacement of the obstacle in the world coordinate system based on its predicted velocity in the sensor coordinate system and the transformation relationship between the sensor coordinate system and the world coordinate system, thereby determining the predicted pose of the obstacle in the world coordinate system, is simple to implement.
[0015] In conjunction with the first aspect, in one possible implementation, the first transformation relationship is obtained based on the vector descriptions of the mobile device's device coordinate system in the world coordinate system at a first moment, the vector descriptions of the sensor coordinate system in the mobile device's device coordinate system at the first moment, the vector descriptions of the target obstacle in the sensor coordinate system at the first moment, the vector descriptions of the mobile device's device coordinate system in the world coordinate system at the current moment, and the vector descriptions of the sensor coordinate system in the mobile device's device coordinate system at the current moment, wherein the first moment is the previous moment of the current moment. By obtaining the transformation relationship between the sensor coordinate system and the world coordinate system based on the vector descriptions between the coordinate systems at the current moment and the previous moment, the implementation method is simple.
[0016] In conjunction with the first aspect, in one possible implementation, before determining the predicted pose of the target obstacle in the world coordinate system based on the perceived pose of the target obstacle in the world coordinate system at the current moment and the unit displacement of the target obstacle in the world coordinate system, the method further includes: determining the perceived pose of the target obstacle in the world coordinate system at the current moment based on a second transformation relationship and the perceived pose of the target obstacle in the sensor coordinate system at the current moment, wherein the second transformation relationship is the coordinate transformation relationship between the sensor coordinate system and the world coordinate system at the current moment.
[0017] In conjunction with the first aspect, in one possible implementation, the second transformation relationship is obtained based on the vector description of the device coordinate system of the mobile device at the current moment in the world coordinate system, the vector description of the sensor coordinate system at the current moment in the device coordinate system of the mobile device, and the vector description of the target obstacle at the current moment in the sensor coordinate system.
[0018] In conjunction with the first aspect, in one possible implementation, the step of interfering with the predicted pose of the target obstacle at a predicted time within the collision detection interval and the predicted pose of the mobile device at a reference time to determine the collision risk between the mobile device and the target obstacle includes: determining the contour information of the target obstacle at the target predicted time based on the predicted pose of the target obstacle at the target predicted time, where the target predicted time is any predicted time within the collision detection interval; determining the contour information of the mobile device at the reference time based on the predicted pose of the mobile device at the reference time; and determining that the outer contour of the target obstacle at the target predicted time coincides with the outer contour of the mobile device at the reference time based on the contour information of the target obstacle at the target predicted time and the contour information of the mobile device at the reference time, then determining that there is a collision risk between the mobile device and the target obstacle. By determining whether there is a collision risk between the obstacle and the mobile device by detecting the overlap between the outer contour of the obstacle within the collision detection interval and the outer contour of the mobile device at the reference time corresponding to the collision detection interval, the uncertainty of the obstacle trajectory is considered, which can improve the accuracy of collision detection.
[0019] In conjunction with the first aspect, in one possible implementation, the target obstacle is an obstacle that meets preset obstacle conditions. These preset obstacle conditions include: the outer contour of the current obstacle moving within the passable area of the mobile device; or the ratio between the intersection area of the outer contour of the current obstacle and the passable area and the outer contour of the current obstacle is greater than or equal to a preset ratio; or the distance between the current obstacle and the mobile device at the current moment is less than or equal to a preset distance; or the current position of the current obstacle is ahead of the current position of the mobile device; or the angle between the current heading of the current obstacle and the current heading of the mobile device is less than or equal to a preset angle. By setting multiple preset obstacle conditions, obstacles that will obviously not collide with the mobile device can be removed, eliminating some invalid collision detection and improving the efficiency of collision detection.
[0020] Secondly, a collision risk detection device is provided, comprising:
[0021] The trajectory prediction module is used to obtain the predicted pose of the target obstacle in the collision detection interval when a target obstacle corresponding to the mobile device is detected. The collision detection interval is a prediction sub-time period within the prediction time period. The prediction sub-time period includes a reference time and several prediction times adjacent to the reference time.
[0022] The collision detection module is used to perform interference judgment between the predicted pose of the target obstacle at the predicted time within the collision detection interval and the predicted pose of the mobile device at the reference time, so as to determine the collision risk between the mobile device and the target obstacle.
[0023] Thirdly, a computer device is provided, including a memory and one or more processors, the memory being connected to the one or more processors, the one or more processors being configured to execute one or more computer programs stored in the memory, the one or more processors, when executing the one or more computer programs, causing the computer device to implement the collision risk detection method of the first aspect described above.
[0024] Fourthly, a computer-readable storage medium is provided, which stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the collision risk detection method of the first aspect.
[0025] This application can achieve the following technical effects: Since the collision detection interval is a predicted sub-time period within the predicted time period and includes the reference time and several predicted times adjacent to the reference time, it is equivalent to performing collision detection between the pose of the mobile device at the reference time and the pose of the obstacle at multiple predicted times within the time interval corresponding to the reference time. It takes into account the possible changes in the trajectory of the obstacle due to the movement of the obstacle, thus making the collision detection more accurate. Attached Figure Description
[0026] Figure 1 A schematic flowchart of a collision risk detection method provided in an embodiment of this application;
[0027] Figure 2 This is a schematic diagram showing the external outline of the mobile device and the target obstacle provided in an embodiment of this application;
[0028] Figure 3 This is a schematic diagram of another collision risk detection method provided in an embodiment of this application;
[0029] Figure 4 A flowchart illustrating the prediction of an obstacle's trajectory is provided in this embodiment of the application.
[0030] Figure 5 A schematic diagram illustrating various vector representations provided in the embodiments of this application;
[0031] Figure 6 This is a schematic diagram of the structure of a collision risk detection device provided in an embodiment of this application;
[0032] Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0033] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0034] The technical solution of this application is applicable to target motion scenarios where multiple or more movable objects move in the same space. In the target motion scenario, multiple or more movable objects move along the same path. For one movable object, the other movable objects on the path are obstacles corresponding to that movable object. When the movable objects move in the target motion scenario, they need to avoid obstacles from each other. For example, the target motion scenario can be a spatial scenario containing various movable objects such as robots, motor vehicles, non-motor vehicles, and pedestrians, such as an underground parking garage or an industrial park.
[0035] The technical solution of this application can be specifically applied to mobile devices, such as food delivery robots, transport robots, and inspection robots, and is not limited to the examples given here. Optionally, the technical solution of this application can also be applied to other devices that have a connection or supporting relationship with the mobile device. The connection between the mobile device and other devices can be a wired connection or a wireless connection. For example, if the target device is an inspection robot, other devices can refer to a charging base station that is paired with the inspection robot, or other devices can refer to a backend server (such as a cloud server) corresponding to the inspection robot, with the backend server and the inspection robot transmitting data based on wireless communication.
[0036] The technical solution of this application is described in detail below.
[0037] See Figure 1 , Figure 1 This is a flowchart illustrating a collision risk detection method provided in an embodiment of this application. This method can be applied to the aforementioned mobile devices or other devices, such as... Figure 1 As shown, the method includes the following steps:
[0038] S101, when a target obstacle corresponding to the mobile device is detected, the predicted pose of the target obstacle in the collision detection range is obtained.
[0039] The target obstacle can be any obstacle currently located around the mobile device, detected by the obstacle detection sensor installed in the mobile device. The target obstacle can be a static or dynamic obstacle. Target obstacles include, but are not limited to, motor vehicles, non-motorized vehicles, or pedestrians. The obstacle detection sensor installed in the mobile device can detect obstacle information for all obstacles currently located around the mobile device. This obstacle information is used to indicate various obstacle conditions. Specifically, obstacle information can include pose information and contour information. Pose information reflects the position and orientation of the obstacle, while contour information reflects the shape and outline of the obstacle, such as whether the obstacle is circular, square, or elliptical. The obstacle detection sensor in the mobile device can include one or more of the following sensors: LiDAR, vision sensors (such as cameras), infrared sensors, etc. The pose information of the obstacle directly detected by the obstacle detection sensor is the perceived pose in the sensor coordinate system. This perceived pose in the sensor coordinate system is then transformed to the world coordinate system to obtain the perceived pose of the obstacle in the world coordinate system.
[0040] The collision detection interval is a time period containing multiple prediction moments, where each prediction moment refers to a future point in time. The time period corresponding to the collision detection interval is a sub-time period within the prediction time period. The prediction time period refers to the time period during which the trajectory of the obstacle is predicted; it is a future period and can be represented as t. a [t1, t2, ..., t n Let t0 be the current time, and n represent the total number of predicted times after the current time. The collision detection interval includes the reference time within the prediction time period and several predicted times adjacent to the reference time. The reference time is the time used as a reference within the prediction time period, which can be understood as the time when collision detection needs to be performed. The collision detection interval can be represented as t c [t k-l1 , t k-l1+1 , ..., t k , t k+1 , ..., t k+l2 ], where t k For the reference time, 0 ≤ l1 < k, 0 ≤ l2 ≤ nk.
[0041] The predicted pose of the target obstacle within the collision detection interval refers to its predicted pose in the world coordinate system within that interval. This predicted pose can be obtained from the predicted pose of the target obstacle within the world coordinate system over the prediction time period. The predicted pose of the target obstacle within the world coordinate system over the prediction time period is obtained by trajectory prediction of the target obstacle. The method for trajectory prediction of the target obstacle will be described later and will not be elaborated upon here. The predicted pose of the target obstacle at the i-th prediction time can be represented by (x... i y i θ i (x) i y i θ i (x) represents the predicted pose in the world coordinate system. i y i θ is used to reflect the position of the target obstacle. i Used to reflect the posture of the target obstacle.
[0042] S102, interferometry is performed between the predicted pose of the target obstacle at the predicted time within the collision detection range and the predicted pose of the mobile device at the reference time to determine the collision risk between the mobile device and the target obstacle.
[0043] Here, interferencing the predicted pose of the target obstacle at the predicted moment within the collision detection interval with the predicted pose of the mobile device at the reference moment means: based on the predicted pose of the target obstacle at the predicted moment within the collision detection interval and the predicted pose of the mobile device at the reference moment, the outer contour of the target obstacle at the predicted moment is overlapped with the outer contour of the mobile device at the reference moment. Since the collision detection interval includes the reference moment and several predicted moments adjacent to the reference moment, i.e., it includes multiple predicted moments, the outer contour of the target obstacle at each predicted moment within the collision detection interval can be overlapped with the outer contour of the mobile device at the reference moment separately; alternatively, the outer contour of the target obstacle at each predicted moment within the collision detection interval can be overlapped with the outer contour of the mobile device at the reference moment sequentially, stopping subsequent overlap detection once a collision risk between the target obstacle and the mobile device is detected.
[0044] Specifically, the collision risk between the mobile device and the target obstacle can be determined through the following steps A1-A4.
[0045] A1. Based on the predicted pose of the target obstacle at the target prediction time, determine the contour information of the target obstacle at the target prediction time.
[0046] Wherein, the target prediction time is any prediction time within the collision detection interval, which can be the aforementioned t. c Any one of the predictions.
[0047] Specifically, the contour information of the target obstacle at the target prediction time can be determined based on its predicted pose and the contour information detected by the obstacle detection sensor. This contour information indicates the outer contour of the target obstacle and its position at that time. The outer contour of the target obstacle can be represented by a polygon, and the contour information at the target prediction time indicates the corresponding polygon and its position at that time.
[0048] See Figure 2 Assuming Figure 2 In the diagram, polygon F represents the outer contour of the target obstacle, and the target prediction time is t. k+l2 The center of the target obstacle is at t k+l2 Time is located Figure 2 Point P1 in the equation indicates that the target obstacle is at point t. k+l2 The contour information of the moment is used to indicate Figure 2 polygon F in k+l2 and polygon F k+l2 The location.
[0049] A2. Determine the contour information of the mobile device at the reference time based on the predicted pose of the mobile device at the reference time.
[0050] The predicted pose of the mobile device at the reference time refers to its predicted pose in the world coordinate system at that time. The contour information of the mobile device at the reference time indicates its outer contour and position. The mobile device's outline can be represented by a polygon, and the contour information at the reference time indicates the corresponding polygon and its position.
[0051] See also Figure 2 Assuming Figure 2 In the diagram, polygon S represents the outer contour of the mobile device. Assume the center of the mobile device is at point t. k Time is located Figure 2 Point P2 in the diagram represents the contour information of the mobile device at the reference time, used to indicate... Figure 2 The polygon S in k and polygon S k The location.
[0052] A3. If, based on the outline information of the target obstacle at the target prediction time and the outline information of the mobile device at the reference time, it is determined that the outer outline of the target obstacle at the target prediction time coincides with the outer outline of the mobile device at the reference time, then it is determined that there is a collision risk between the mobile device and the target obstacle.
[0053] Specifically, if, based on the contour information of the target obstacle at the target prediction time and the contour information of the mobile device at the reference time, it is determined that the position of the polygon corresponding to the target obstacle at the target prediction time coincides with the position of the polygon corresponding to the mobile device at the reference time, then it is determined that the outer contour of the target device at the target prediction time coincides with the outer contour of the mobile device at the reference time. Conversely, if, based on the contour information of the target obstacle at the target prediction time and the contour information of the mobile device at the reference time, it is determined that the position of the polygon corresponding to the target obstacle at the target prediction time does not coincide with the position of the polygon corresponding to the mobile device at the reference time, then it is determined that the outer contour of the target device at the target prediction time does not coincide with the outer contour of the mobile device at the reference time. It should be understood that the aforementioned coincidence of the position of the polygon corresponding to the target obstacle at the target prediction time and the position of the polygon corresponding to the mobile device at the reference time means that at least a portion of the area of the polygon corresponding to the target obstacle at the target prediction time coincides with the area of the polygon corresponding to the mobile device at the reference time.
[0054] See also Figure 2 If the target prediction time is tk The center of the target obstacle is at t k Time is located Figure 2 Point P1 in the polygon F k The outer contour of the target obstacle is represented by t. k The location, the center of the mobile device is in t k Time is located Figure 2 Point P2 in the polygon S k The outer contour of the target obstacle is represented by t. k Position, F k With S k If there is no overlap, then the target device is at t. k The outer contour of the moment and the mobile device in t k The outer contour at time t does not coincide with the target's predicted time t; k+l2 The center of the target obstacle is at t k+l2 Time is located Figure 2 Point P3 in the polygon F k+l2 The outer contour of the target obstacle is represented by t. k+l2 Position, F k+l2 With S k If there is overlap, then the target device is determined to be at t. k+l2 The outer contour of the moment and the mobile device in t k The outer contours of the time points overlap.
[0055] A4. If, based on the contour information of the target obstacle at each predicted moment within the collision detection interval and the contour information of the mobile device at the reference moment, it is determined that the outer contour of the target obstacle at each predicted moment within the collision detection interval does not overlap with the outer contour of the mobile device at the reference moment, then it is determined that there is no risk of collision between the mobile device and the target obstacle at the reference moment.
[0056] In the case of detecting the overlap between the outer contour of the target obstacle at each predicted moment in the collision detection interval and the outer contour of the mobile device at the reference moment, steps A1 to A3 can be executed according to the predicted pose of the target obstacle at each predicted moment in the collision detection interval, thereby determining whether the outer contour of the target obstacle at each predicted moment in the collision detection interval overlaps with the outer contour of the mobile device at the reference moment.
[0057] When sequentially performing overlap detection between the outer contour of the target obstacle at each predicted moment within the collision detection interval and the outer contour of the mobile device at the reference moment, steps A1-A3 can be used to detect whether the outer contour of the target obstacle at the next predicted moment within the collision detection interval overlaps with the outer contour of the mobile device at the reference moment. This process continues until it is determined that the outer contour of the target obstacle at each predicted moment within the collision detection interval does not overlap with the outer contour of the mobile device at the reference moment. If steps A1-A3 detect overlap between the outer contour of the target obstacle at the previous predicted moment within the collision detection interval and the outer contour of the mobile device at the reference moment, the step of detecting whether the outer contour of the target obstacle at the next predicted moment overlaps with the outer contour of the mobile device at the reference moment can be omitted. This sequential detection method avoids invalid collision risk detection, saves computational resources, and improves the efficiency of collision risk detection.
[0058] The collision detection accuracy can be improved by determining whether there is a collision risk between the obstacle and the mobile device by comparing the outer contour of the obstacle within the collision detection interval with the outer contour of the mobile device at the reference time corresponding to the collision detection interval. This takes into account the uncertainty of the obstacle trajectory.
[0059] In the above Figure 1 In this technical solution, the predicted pose of the target obstacle within the collision detection interval is obtained, and the predicted pose of the target obstacle at the predicted time within the collision detection interval is compared with the predicted pose of the mobile device at the reference time to determine the collision risk between the mobile device and the target obstacle. Since the collision detection interval is a sub-time period within the prediction time period and includes the reference time and several prediction times adjacent to the reference time, it is equivalent to performing collision detection between the mobile device's pose at the reference time and the obstacle's pose at multiple prediction times within the time interval corresponding to the reference time. This takes into account the possible changes in the obstacle's trajectory due to its movement, thus making collision detection more accurate.
[0060] See Figure 3 , Figure 3 This is a schematic flowchart of another collision risk detection method provided in an embodiment of this application. This method can be applied to the aforementioned mobile devices or other devices, such as... Figure 3 As shown, the method includes the following steps:
[0061] S201, when a target obstacle corresponding to the mobile device is detected, the motion trajectory of the target obstacle is predicted to obtain the prediction information corresponding to the target obstacle.
[0062] The predicted information for the target obstacle includes the predicted velocity and velocity covariance matrix of the target obstacle at a reference time. The velocity covariance matrix at the reference time is obtained by calculating the variance of the possible predicted velocities of the target obstacle at the reference time. This predicted velocity and velocity covariance matrix can be in either the sensor coordinate system or the world coordinate system. The predicted velocity and velocity covariance matrices in the sensor coordinate system and the world coordinate system can be obtained through coordinate transformation. If the trajectory prediction of the target obstacle is performed in the sensor coordinate system, the predicted velocity and velocity covariance matrix obtained is in the sensor coordinate system. If calculations need to be performed using the predicted velocity and velocity covariance matrix in the world coordinate system, the predicted velocity and velocity covariance matrix in the sensor coordinate system can be transformed from the sensor coordinate system to the world coordinate system to obtain the predicted velocity and velocity covariance matrix in the world coordinate system. If the trajectory prediction of a target obstacle is performed in the world coordinate system, the predicted velocity and velocity covariance matrix obtained are the predicted velocity and velocity covariance matrices in the world coordinate system. If it is necessary to use the predicted velocity and velocity covariance matrix in the sensor coordinate system for calculation, the predicted velocity and velocity covariance matrix in the world coordinate system can be transformed from the world coordinate system to the sensor coordinate system to obtain the predicted velocity covariance matrix in the sensor coordinate system.
[0063] This application does not impose any restrictions on the specific coordinate system in which trajectory prediction is performed, or on the coordinate system in which the predicted velocity and velocity covariance matrix at the reference time are obtained.
[0064] The predicted velocity and velocity covariance matrix of the target obstacle at the reference time can be obtained from the predicted velocity and velocity covariance matrix obtained by predicting the trajectory of the target obstacle. The predicted velocity of the target obstacle at the reference time can be represented by (v... xk v yk v θk The predicted velocity of the target obstacle at the reference time can be obtained by averaging multiple possible velocities predicted at the reference time. xk v yk This is used to reflect the linear velocity of the target obstacle in two directions (X-axis and Y-axis) along the road, v θkThis reflects the angular velocity of the target obstacle rotating along the perpendicular direction (Z-axis) of the road. The velocity covariance matrix of the target obstacle at the reference time can be represented by [E]. xxk E yyk E θθk To represent, E xxk and E yyk E is used to indicate the uncertainty of the predicted velocity in the X and Y axes at the reference time, respectively. θθi This is used to indicate the uncertainty of the predicted velocity along the Z-axis at the reference time. For example, the velocity covariance matrix is calculated using Equations 1 through 6.
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071] Where m is the total number of possible predicted velocities of the target obstacle at the reference time.
[0072] In specific implementation, the current perceived pose of the target obstacle can be input into a pre-trained obstacle trajectory prediction model to predict the corresponding information of the target obstacle. The obstacle trajectory prediction model can be a policy-selection-based prediction model, an occupancy-grid-based prediction model, an energy map-based prediction model, etc., and this application does not impose any restrictions. In some possible cases, in addition to inputting the current perceived pose of the target obstacle into the pre-trained obstacle trajectory prediction model, the perceived pose of the target obstacle in historical time can also be input into the pre-trained obstacle trajectory prediction model to predict the corresponding information of the target obstacle. The specific time and duration of pose information input into the obstacle trajectory prediction model to predict the corresponding information of the target obstacle depends on the specific design of the obstacle trajectory prediction model, and this application does not impose any restrictions.
[0073] Specifically, if the perceived pose of the target obstacle in the world coordinate system is input into the obstacle trajectory prediction model, the predicted information corresponding to the target obstacle is the predicted information in the world coordinate system; if the perceived pose of the target obstacle in the sensor coordinate system is input into the obstacle trajectory prediction model, the predicted information corresponding to the target obstacle is the predicted information in the sensor coordinate system.
[0074] S202, determine the length of the collision detection interval based on the predicted velocity of the target obstacle at the reference time and the velocity covariance matrix of the target obstacle at the reference time.
[0075] The length of the collision detection interval is positively correlated with the predicted velocity of the target obstacle at the reference time and the velocity covariance matrix of the target obstacle at the reference time. That is, the larger the velocity and velocity covariance of the target obstacle at the reference time, the more trajectory changes caused by the movement of the target obstacle, and the longer the length of the collision detection interval.
[0076] In some possible cases, the length of the collision detection interval may be non-linearly positively correlated with the unit displacement of the target obstacle at the reference time and the velocity covariance matrix of the target obstacle at the reference time, respectively. The unit displacement of the target obstacle at the reference time is obtained based on the predicted velocity of the target obstacle at the reference time.
[0077] Specifically, the length of the collision detection interval and the collision detection range corresponding to the target obstacle can be determined through the following steps B1-B3.
[0078] B1. Perform nonlinear calculations on the unit displacement of the target obstacle at the reference time to obtain the length value of the first interval.
[0079] The first interval length value reflects the impact of the target obstacle's speed on the length of the time interval during which a collision may occur between the mobile device and the target obstacle. The larger the first interval length value, the greater the impact of the target obstacle's speed on the length of the time interval during which a collision may occur, and the longer the collision detection interval.
[0080] The unit displacement of the target obstacle at the reference time is equal to the product of the predicted velocity of the target obstacle at the reference time and the unit time, where unit time refers to the time difference between two adjacent prediction times; that is, the unit displacement of the target at the reference time is expressed as T. PkPk+1 .
[0081] It should be noted that, when the motion of the target obstacle is regarded as uniform motion, the unit displacement of the target obstacle is the same at each reference time, and the length value of the first interval of the target obstacle is the same at different reference times.
[0082] In practical implementation, after determining the unit displacement of the target obstacle at the reference time, the dependent variable of the first nonlinear function can be calculated based on the unit displacement of the target obstacle at the reference time as the independent variable of the first nonlinear function. The calculated dependent variable is then used as the length value of the first interval. The first nonlinear function is a nonlinear function with unit displacement as the independent variable, and the first nonlinear function can be characterized as f1(T) PkPk+1 The first nonlinear function can be an exponential function, a power function, a logarithmic function, etc., and this application does not impose any restrictions.
[0083] B2. Perform nonlinear calculations on the velocity covariance matrix of the target obstacle at the reference time to obtain the length value of the second interval.
[0084] The second interval length value reflects the impact of the uncertainty in the target obstacle's velocity on the length of the time interval in which a collision may occur between the mobile device and the target obstacle. A larger second interval length value indicates a greater impact of the uncertainty in the target obstacle's velocity on the length of the time interval in which a collision may occur, resulting in a longer collision detection interval. When the target obstacle's motion is considered uniform, the velocity covariance matrix of the target obstacle is the same at each reference time, and the second interval length value of the target obstacle is also the same at different reference times.
[0085] In practical implementation, based on the second nonlinear function, the velocity covariance matrix of the target obstacle at the reference time can be used as the independent variable of the second nonlinear function to calculate the dependent variable of the second nonlinear function. The calculated dependent variable is then used as the length of the second interval. The second nonlinear function is a nonlinear function with the velocity covariance matrix as the independent variable, and can be characterized as f2(Γ). k ), Γ k The velocity covariance matrix at the reference time [E] xxk E yyk E θθk The second nonlinear function can be an elliptic function, an exponential function, a polynomial function, etc., and this application does not impose any restrictions.
[0086] B3. Determine the length of the collision detection interval based on the length values of the first and second intervals, and determine the collision detection interval based on the length of the collision detection interval and the reference time.
[0087] The length of the collision detection interval is greater than the sum of the lengths of the first interval and the second interval.
[0088] In a specific example, the length of the collision detection interval can be equal to 2N+1, where N is the sum of the lengths of the first and second intervals, i.e., N = f1(T)PkPk+1 )+f2(Γ k The collision detection interval may include the reference time, N predicted times before the reference time, and N predicted times after the reference time, that is, l1 and l2 in the aforementioned step S101 are both N.
[0089] In another specific example, the length of the collision detection interval can also be N1 + N2 + 1, where N1 is the length of the first interval and N2 is the length of the second interval. The collision detection interval can include the reference time, N1 predicted times before the reference time, and N2 predicted times after the reference time, that is, l1 in the aforementioned step S101 is N1, N1 = f1(T PkPk+1 In the aforementioned step S101, l2 is always N2, N2 = f2(Γ) k ).
[0090] Not limited to the above examples, the length of the collision detection interval can have more possibilities. For example, l1 and l2 can also be N / 2, where N is the sum of the length values of the first interval and the second interval.
[0091] The length of the collision detection interval has a non-linear positive correlation with the covariance matrix of unit displacement and velocity, which allows the collision detection interval to cover more possible motion trajectories of obstacles, thus making collision detection more accurate.
[0092] In other possible cases, the length of the collision detection interval can also be linearly positively correlated with the unit displacement of the target obstacle at the reference time and the velocity covariance matrix of the target obstacle at the reference time, respectively. The length of the collision detection interval corresponding to the target obstacle can also be obtained by linearly calculating the unit displacement at the reference time and the velocity covariance matrix at the reference time.
[0093] S203, Obtain the predicted pose of the target obstacle within the collision detection zone.
[0094] S204, interferometry is performed between the predicted pose of the target obstacle at the predicted time within the collision detection range and the predicted pose of the mobile device at the reference time to determine the collision risk between the mobile device and the target obstacle.
[0095] The specific implementation methods of steps S203 to S204 can be referred to the description of steps S102 to S103 above, and will not be repeated here.
[0096] In the above Figure 3In the corresponding solution, after detecting the target obstacle corresponding to the mobile device, the trajectory of the target obstacle is predicted to obtain the predicted velocity and velocity covariance matrix of the target obstacle at the reference time. Based on the predicted velocity and velocity covariance matrix of the target obstacle at the reference time, the length of the collision detection interval is determined. This takes into account the influence of the velocity of the target obstacle and the uncertainty of the velocity on the length of the obstacle's trajectory, and can determine a more suitable collision detection interval, thereby achieving more accurate collision detection.
[0097] In some possible scenarios, when predicting the trajectory of a target obstacle, the predicted velocity of the obstacle can be predicted in the sensor coordinate system. Based on the predicted velocity in the sensor coordinate system, the predicted velocity, velocity covariance matrix, and predicted pose of the obstacle in the world coordinate system can be determined. This yields the predicted velocity, velocity covariance matrix, and predicted pose of the obstacle in the world coordinate system at each prediction moment within the prediction time period. The resulting prediction information for the target obstacle can include the predicted velocity, velocity covariance matrix, and predicted pose of the obstacle in the world coordinate system within the prediction time period.
[0098] See Figure 4 , Figure 4 This application provides a flowchart illustrating a method for predicting the trajectory of an obstacle. This method can be applied to the aforementioned mobile devices or other devices, such as… Figure 4 As shown, the method includes the following steps:
[0099] S401, based on the perceived pose of the target obstacle in the sensor coordinate system, determine the predicted velocity of the target obstacle in the sensor coordinate system.
[0100] The perceived pose of the target obstacle in the sensor coordinate system refers to the actual position and orientation of the target obstacle as perceived by the obstacle sensor of the mobile device. The perceived pose of the target obstacle in the sensor coordinate system is represented using coordinates. The perceived pose of the target obstacle in the sensor coordinate system includes the perceived pose of the target obstacle in the sensor coordinate system at the current moment.
[0101] The perceived pose of the target obstacle in the sensor coordinate system can be represented as (X, Y, θ).
[0102] Based on the perceived pose of the target obstacle in the sensor coordinate system, the predicted velocity of the target obstacle in the sensor coordinate system is determined. Similar to the predicted information of the target obstacle within the prediction time period described in step S201, the perceived pose of the target obstacle in the sensor coordinate system detected by the obstacle sensor can be input into a pre-prepared obstacle trajectory prediction model to obtain the predicted velocity of the target obstacle in the sensor coordinate system. The predicted velocity of the target obstacle in the sensor coordinate system includes the predicted velocity of the target obstacle at each prediction moment within the prediction time period in the sensor coordinate system. The predicted velocity of the target obstacle in the sensor coordinate system can be expressed as (v... xi v yi v θi The value of i can be from 1 to n, where n is the total number of prediction times within the prediction time period.
[0103] S402, determine the velocity covariance matrix of the target obstacle at the reference time based on the predicted velocity of the target obstacle in the sensor coordinate system.
[0104] If the velocity covariance matrix of the target at the reference time is the velocity covariance matrix in the sensor coordinate system, then formulas 1 to 6 in step S201 above can be used to determine the velocity covariance matrix of the target obstacle in the sensor coordinate system at the reference time based on the predicted velocity of the target obstacle in the sensor coordinate system at the reference time.
[0105] If the velocity covariance matrix of the target at the reference time is the velocity covariance matrix in the world coordinate system, then after determining the velocity covariance matrix of the target obstacle in the sensor coordinate system at the reference time, the velocity covariance matrix of the target obstacle in the sensor coordinate system at the reference time is transformed according to the first transformation relationship to obtain the velocity covariance matrix of the target obstacle in the world coordinate system at the reference time.
[0106] The first transformation relationship is obtained based on the vector description of the device coordinate system of the mobile device at the first moment in the world coordinate system, the vector description of the sensor coordinate system at the first moment in the device coordinate system of the mobile device, the vector description of the target obstacle at the first moment in the sensor coordinate system, the vector description of the device coordinate system of the mobile device at the current moment in the world coordinate system, and the vector description of the sensor coordinate system at the current moment in the device coordinate system of the mobile device. The first moment is the previous moment of the current moment.
[0107] Examples are given to illustrate the various vector descriptions in the first transformation relation. See also Figure 5 Assuming O is the origin of the world coordinate system, at the first moment (i.e., the moment before the current moment), the target obstacle is in Figure 4Point P4 in the diagram, the geometric center of the sensor is located at... Figure 4 Point G1 in the diagram represents the geometric center of the mobile device. Figure 4 At point B1 in the diagram, at the current moment, the target obstacle is... Figure 4 Point P5 in the diagram, the geometric center of the sensor is located at... Figure 4 Point G2 in the diagram represents the geometric center of the mobile device. Figure 4 Point B2 in the vector T. OB1 The vector T represents the device coordinate system of the mobile device in the world coordinate system at the first moment. OB1 This reflects the transformation relationship between the device coordinate system and the world coordinate system of the mobile device at the first moment, according to vector T at the first moment. OB1 Transforming vectors in the device coordinate system of a mobile device allows them to be represented in the world coordinate system. Vector T B1G1 The vector T is the sensor coordinate system's vector representation in the device coordinate system of the mobile device at the first moment. B1G1 This reflects the transformation relationship between the sensor coordinate system and the device coordinate system of the mobile device, according to vector T. B1G1 Transforming vectors in the sensor coordinate system allows them to be represented in the sensor coordinate system of the mobile device; vector T G1P4 Let T be the vector description of the target obstacle in the sensor coordinate system at the first moment, and let T be the position vector of the obstacle in the sensor coordinate system at the first moment; OB2 Let T be the vector representation of the device coordinate system of the mobile device in the world coordinate system at the current moment. OB2 This reflects the transformation relationship between the device coordinate system and the world coordinate system of the mobile device at the current moment, expressed in vector T. OB1 Transforming vectors in the device coordinate system of a mobile device allows them to be represented in the world coordinate system; vector T B2G2 The vector T is the current sensor coordinate system's vector representation within the mobile device's device coordinate system. B2G2 This reflects the transformation relationship between the sensor coordinate system and the device coordinate system of the mobile device, according to vector T. B2G2 Transforming vectors in the sensor coordinate system allows them to be represented in the mobile device's sensor coordinate system. Since the sensor is fixed to the mobile device, the transformation relationship between the sensor coordinate system and the mobile device's device coordinate system is constant and does not change over time. Therefore, vector T... B2G2 With vector T B1G1The same. The first transformation relationship is obtained by sequentially performing vector chain calculations on the vector descriptions of the device coordinate system of the mobile device at the first moment in the world coordinate system, the vector descriptions of the sensor coordinate system at the first moment in the device coordinate system of the mobile device, the vector descriptions of the target obstacle at the first moment in the sensor coordinate system, the vector descriptions of the device coordinate system of the mobile device at the current moment in the world coordinate system, and the vector descriptions of the sensor coordinate system at the current moment in the device coordinate system of the mobile device. The first transformation relationship can be expressed as:
[0108] Assume that the velocity covariance matrix of the target obstacle in the sensor coordinate system at the reference time is denoted as Γ0, and the velocity covariance matrix of the target obstacle in the world coordinate system at the reference time is denoted as Γ1. Γ1 can be calculated using the following formula 7:
[0109] Γ1=T G1P4 -1 T B1G1 -1 T OB1 -1 T OB2 T B2G2 T G1P4 Γ0 Formula 7
[0110] S403 determines the predicted pose of the target obstacle in the world coordinate system based on the predicted velocity of the target obstacle in the sensor coordinate system.
[0111] Here, the predicted pose of the target obstacle in the world coordinate system within the prediction time period refers to the information obtained by expressing the pose of the target obstacle using coordinates in the world coordinate system. The predicted pose of the target obstacle in the world coordinate system within the prediction time period can be determined through vector coordinate transformation.
[0112] Specifically, the predicted pose of the target obstacle in the world coordinate system can be determined through the following steps.
[0113] C1. Based on the first transformation relationship and unit time, process the predicted velocity of the target obstacle in the sensor coordinate system at the current moment to obtain the unit displacement of the target obstacle in the world coordinate system.
[0114] The introduction to the first conversion relationship and unit time can be found in the previous description, and will not be repeated here.
[0115] The predicted velocity of the target obstacle in the sensor coordinate system at the current moment includes the predicted velocity of the target obstacle at each prediction time in the sensor coordinate system at the current moment, that is, the predicted velocity of the target obstacle at time t1 in the sensor coordinate system at the current moment, the predicted velocity of the target obstacle at time t2 in the sensor coordinate system at the current moment, ..., the predicted velocity of the target obstacle at time t... n The predicted velocity in the sensor coordinate system at the current moment. The sensor coordinate system at the current moment refers to the coordinate system described above. Figure 5 G2 is the coordinate system with the origin.
[0116] Specifically, the unit displacement of the target obstacle in the world coordinate system can be calculated based on the following formula 8:
[0117]
[0118] Among them, T PiPi+1 T represents the unit displacement of the target obstacle in the world coordinate system. G1P4 -1 T B1G1 -1 T OB1 - 1 T OB2 T B2G2 T G1P4 For the first transformation relation, (v xi v yi ) is the target obstacle at t i The predicted velocity t in the sensor coordinate system at the current moment. i+1 -t i For each unit of time, i ranges from 1 to n, where n is the total number of prediction times within the prediction time period.
[0119] C2. Based on the perceived pose of the target obstacle in the world coordinate system at the current moment and the unit displacement of the target obstacle in the world coordinate system, determine the predicted pose of the target obstacle in the world coordinate system.
[0120] Specifically, the predicted pose of the target obstacle in the world coordinate system at the next prediction time is obtained based on the predicted pose of the target obstacle in the world coordinate system at the previous prediction time and the unit displacement of the target obstacle in the world coordinate system at the previous prediction time; the predicted pose of the target obstacle in the world coordinate system at the first prediction time is obtained based on the perceived pose of the target obstacle in the world coordinate system at the current time and the unit displacement of the target obstacle in the world coordinate system at the current time.
[0121] Specifically, when the prediction time is not the first prediction time, the predicted pose of the target obstacle in the world coordinate system can be calculated using Formula 9:
[0122]
[0123] Among them, (x i+1 y i+1 θ i+1 (x) represents the predicted pose of the target obstacle in the world coordinate system at the second prediction time. i y i θ i The first prediction time is the predicted pose of the target obstacle in the world coordinate system. The second prediction time is the next prediction time after the first prediction time.
[0124] When the prediction time is the first prediction time, the predicted pose of the target obstacle in the world coordinate system can be calculated using the following formula 10:
[0125]
[0126] Where (x1, y1, θ1) is the predicted pose of the target obstacle in the world coordinate system at the next moment (i.e., the first prediction moment) of the current moment, and (x0, y0, θ0) is the perceived pose of the target obstacle in the world coordinate system at the current moment. P0P1 This represents the unit displacement of the target obstacle in the world coordinate system.
[0127] T P0P1 The following formula 11 is used for calculation:
[0128]
[0129] Among them, T P0P1 Let v be the unit displacement of the target obstacle in the world coordinate system. x0 v y0 ) represents the velocity of the target obstacle in the sensor coordinate system at the current moment. The velocity of the target obstacle at the current moment can be obtained by combining the perceived pose of the target obstacle in the sensor coordinate system at the current moment. t1-t0 is the unit time.
[0130] Specifically, the perceived pose of the target obstacle in the world coordinate system at the current moment can be determined based on the second transformation relationship and the perceived pose of the target obstacle in the sensor coordinate system at the current moment.
[0131] The second transformation relationship is derived from the vector descriptions of the mobile device's device coordinate system in the world coordinate system at the current moment, and the vector descriptions of the sensor's coordinate system in the mobile device's device coordinate system at the current moment. The second transformation relationship is obtained by sequentially performing a vector chain calculation on the vector descriptions of the mobile device's device coordinate system in the world coordinate system at the current moment, and the vector descriptions of the sensor's coordinate system in the mobile device's device coordinate system at the current moment. Based on... Figure 5 For example, the second transformation relation can be expressed as: T OB2 T B2G2 .
[0132] The perceived pose of the target obstacle in the world coordinate system at the current moment can be calculated using the following formula 12:
[0133] T0 = T OB2 T B2G2 T G2P5 Formula 12
[0134] Where T0 is the vector description of the perceived pose of the target obstacle in the world coordinate system at the current moment, T0 is (x0, y0, θ0), T G2P5 is the vector description of the target obstacle in the sensor coordinate system at the current moment, and is the perceived pose of the target obstacle in the sensor coordinate system at the current moment.
[0135] In the above Figure 4 In the corresponding technical solution, after detecting the pose information of the target obstacle based on the sensor, the predicted velocity of the target obstacle in the sensor coordinate system within the prediction time period is determined directly based on the pose information of the target obstacle in the sensor coordinate system within the prediction time period. Then, based on the predicted velocity of the target obstacle in the sensor coordinate system within the prediction time period, the covariance matrix of the target obstacle, as well as the predicted velocity and predicted pose of the target obstacle in the world coordinate system within the prediction time period, are determined. This yields the predicted trajectory information of the target obstacle in the world coordinate system, achieving decoupling between the sensor module and the positioning module. This allows trajectory prediction to not depend on the results of the positioning module, thereby enabling rapid prediction of the target obstacle's trajectory and improving the speed of collision detection. Furthermore, decoupling the sensor module and the positioning module enhances the independence between modules, facilitating independent development and testing of each module.
[0136] In some possible cases, the above Figures 1-5 The target obstacles involved can be obstacles that meet the preset obstacle conditions.
[0137] The preset obstacle conditions are the criteria for obstacles that may collide with the mobile device. These conditions are used to exclude obstacles with a low probability of collision from the detected obstacles around the mobile device. If a target obstacle does not meet the preset obstacle conditions, it means that the target obstacle will not collide with the mobile device or has a low probability of collision, and can be ignored or discarded; collision detection for both the mobile device and the target obstacle is not required. If a target obstacle meets the preset obstacle conditions, it means that the target obstacle has a possibility of colliding with the mobile device, and collision detection for both the mobile device and the target obstacle is required.
[0138] Specifically, the preset obstacle conditions may include one or more of the following conditions:
[0139] Condition (1): The outer contour of the current obstacle is within the passable area of the mobile device at the current moment.
[0140] The passable area refers to a pre-defined passable area for the mobile device, such as a room. If the current obstacle is within the mobile device's passable area at the current moment, it means that the obstacle may intersect with the mobile device in motion. If the outer contour of the current obstacle is not within the mobile device's passable area, it means that the obstacle will not intersect with the mobile device in motion, and therefore no collision will occur. This eliminates the risk of a collision between the obstacle and the mobile device, and collision detection is unnecessary.
[0141] Condition (2): The ratio between the intersection area of the outer contour of the current obstacle and the passable area and the outer contour of the current obstacle is greater than or equal to the preset ratio.
[0142] If the ratio of the intersection area between the outer contour of the current obstacle and the passable area to the outer contour of the current obstacle is greater than or equal to a preset ratio, it indicates that there is a large intersection between the current obstacle and the passable area, and a collision between the current obstacle and the mobile device is possible. If the ratio of the intersection area between the outer contour of the current obstacle and the passable area to the outer contour of the current obstacle is less than the preset ratio, it indicates that there is a small intersection between the current obstacle and the passable area, and the probability of the obstacle entering the passable area and intersecting with the mobile device is small. Therefore, the risk of a collision between the current obstacle and the mobile device can be ruled out, and collision detection is not required.
[0143] Condition (3): The distance between the current obstacle and the mobile device at the current moment is less than or equal to the preset distance.
[0144] If the distance between the current obstacle and the mobile device at the current moment is less than or equal to the preset distance, it means that the distance between the current obstacle and the mobile device is relatively close, and a collision may occur. If the distance between the current obstacle and the mobile device at the current moment is greater than the preset distance, it means that the distance between the current obstacle and the mobile device is relatively far, and the probability of a collision is low, so collision detection is not required.
[0145] Condition (4): The current position of the obstacle is ahead of the current position of the mobile device, or the angle between the current heading of the obstacle and the current heading of the mobile device is greater than or equal to a preset angle.
[0146] If the current position of the obstacle is before the current position of the mobile device, or if the angle between the current heading of the obstacle and the current heading of the mobile device is greater than or equal to a preset angle, it indicates that the obstacle may collide with the mobile device. If the current position of the obstacle is after the current position of the mobile device and the angle between them is less than the preset angle, it indicates that the obstacle may be moving in a direction close to parallel to the mobile device, and the probability of the obstacle colliding with the mobile device is small, so collision detection is not required.
[0147] The preset obstacle conditions are not limited to the conditions mentioned above; other conditions are also possible, and this application does not impose any restrictions. When a target obstacle meets any of the above conditions, it is determined that the target obstacle meets the preset obstacle conditions. By setting multiple preset obstacle conditions, obstacles that are clearly unlikely to collide with the mobile device can be removed, thereby eliminating some invalid collision detection and improving the efficiency of collision detection.
[0148] It should be noted that for each prediction moment within the prediction time period, it can be used as a baseline moment. The above-described scheme can be used to determine whether there is a collision risk between the mobile device and the target obstacle at each prediction moment, thereby determining whether there is a collision risk between the mobile device and the target obstacle within the prediction time period. For each detected obstacle, the above-described scheme can be used to determine whether there is a collision risk between the mobile device and each obstacle within the prediction time period, thereby determining whether there is a collision risk between the mobile device and each obstacle within the prediction time period.
[0149] The method of this application has been described above; the apparatus of this application will be described below.
[0150] See Figure 6 , Figure 6 This is a schematic diagram of a collision risk detection device provided in an embodiment of this application. The collision risk detection device can be the aforementioned mobile device or computer device. Figure 6As shown, the collision risk detection device 40 includes:
[0151] The trajectory prediction module 401 is used to obtain the predicted pose of the target obstacle in the collision detection interval when a target obstacle corresponding to the mobile device is detected. The collision detection interval is a prediction sub-time period within the prediction time period. The prediction sub-time period includes a reference time and several prediction times adjacent to the reference time.
[0152] The collision detection module 402 is used to perform an interference judgment between the predicted pose of the target obstacle at the predicted time within the collision detection interval and the predicted pose of the mobile device at the reference time, so as to determine the collision risk between the mobile device and the target obstacle.
[0153] In one possible design, the trajectory prediction module 401 is further configured to predict the motion trajectory of the target obstacle to obtain prediction information corresponding to the target obstacle. The prediction information includes the predicted velocity at the reference time and the velocity covariance matrix corresponding to the predicted velocity. The velocity covariance matrix is obtained by calculating the variance of the possible predicted velocities at the reference time. The length of the collision detection interval is determined based on the predicted velocity and the velocity covariance matrix.
[0154] In one possible design, the length of the collision detection interval is positively correlated with the predicted velocity and the velocity covariance matrix, respectively.
[0155] In one possible design, the length of the collision detection interval is non-linearly positively correlated with the unit displacement at the reference time and the velocity covariance matrix, respectively, wherein the unit displacement is obtained based on the predicted velocity.
[0156] In one possible design, the prediction information further includes the predicted pose; the trajectory prediction module 401 is specifically used to: process the predicted velocity of the target obstacle in the sensor coordinate system at the current moment according to the first transformation relationship and unit time, so as to obtain the unit displacement of the target obstacle in the world coordinate system, wherein the first transformation relationship is the coordinate transformation relationship between the sensor coordinate system and the world coordinate system; and determine the predicted pose of the target obstacle in the world coordinate system according to the perceived pose of the target obstacle in the world coordinate system at the current moment and the unit displacement of the target obstacle in the world coordinate system.
[0157] In one possible design, the first transformation relationship is obtained based on the vector description of the device coordinate system of the mobile device at the first moment in the world coordinate system, the vector description of the sensor coordinate system at the first moment in the device coordinate system of the mobile device, the vector description of the target obstacle at the first moment in the sensor coordinate system, the vector description of the device coordinate system of the mobile device at the current moment in the world coordinate system, and the vector description of the sensor coordinate system at the current moment in the device coordinate system of the mobile device, wherein the first moment is the previous moment of the current moment.
[0158] In one possible design, the trajectory prediction module 401 is further configured to determine the perceived pose of the target obstacle in the world coordinate system at the current moment based on the second transformation relationship and the perceived pose of the target obstacle in the sensor coordinate system at the current moment, wherein the second transformation relationship is the coordinate transformation relationship between the sensor coordinate system and the world coordinate system at the current moment.
[0159] In one possible design, the second transformation relationship is obtained based on the vector description of the device coordinate system of the mobile device at the current moment in the world coordinate system and the vector description of the sensor coordinate system at the current moment in the device coordinate system of the mobile device.
[0160] In one possible design, the collision detection module 403 is specifically used to: determine the contour information of the target obstacle at the target prediction time based on the predicted pose of the target obstacle at the target prediction time, wherein the target prediction time is any prediction time within the collision detection interval; determine the contour information of the mobile device at the reference time based on the predicted pose of the mobile device at the reference time; if, based on the contour information of the target obstacle at the target prediction time and the contour information of the mobile device at the reference time, it is determined that the outer contour of the target obstacle at the target prediction time coincides with the outer contour of the mobile device at the reference time, then it is determined that there is a collision risk between the mobile device and the target obstacle.
[0161] In one possible design, the target obstacle is an obstacle that meets preset obstacle conditions; the preset obstacle conditions include: the outer contour of the current obstacle moves within the passable area of the mobile device; or the ratio between the intersection area of the outer contour of the current obstacle and the passable area and the outer contour of the current obstacle is greater than or equal to a preset ratio; or the distance between the current obstacle and the mobile device at the current moment is less than or equal to a preset distance; or the current position of the current obstacle is ahead of the current position of the mobile device, or the angle between the current heading of the current obstacle and the current heading of the mobile device is less than or equal to a preset angle.
[0162] It should be noted that, Figure 6 For any content not mentioned in the corresponding embodiments, please refer to the description of the foregoing method embodiments, which will not be repeated here.
[0163] The aforementioned device, upon detecting a target obstacle corresponding to the mobile device, acquires the predicted pose of the target obstacle within a collision detection interval. It then performs an interference judgment between the predicted pose of the target obstacle at a predicted time within the collision detection interval and the predicted pose of the mobile device at a reference time to determine the collision risk between the mobile device and the target obstacle. Since the collision detection interval is a sub-time period within the prediction time period and includes the reference time and several prediction times adjacent to it, it essentially performs collision detection between the mobile device's pose at the reference time and the obstacle's pose at multiple prediction times within the time interval corresponding to the reference time. This takes into account potential changes in the obstacle's trajectory due to its movement, thus making collision detection more accurate.
[0164] See Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device 50 provided in an embodiment of this application. The computer device 50 includes a processor 501 and a memory 502. The memory 502 is connected to the processor 501, for example, via a bus.
[0165] Processor 501 is configured to support the computer device 50 in performing the corresponding functions in the methods described in the above method embodiments. Processor 501 may be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The aforementioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0166] Memory 502 is used to store program code, etc. Memory 502 may include volatile memory (VM), such as random access memory (RAM); memory 502 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); memory 502 may also include combinations of the above types of memory.
[0167] Processor 501 can call the program code to perform the following operations:
[0168] When a target obstacle corresponding to a mobile device is detected, the predicted pose of the target obstacle in the collision detection interval is obtained. The collision detection interval is a prediction sub-time period within the prediction time period. The prediction sub-time period includes a reference time and several prediction times adjacent to the reference time.
[0169] The predicted pose of the target obstacle at the predicted time within the collision detection interval is compared with the predicted pose of the mobile device at the reference time to determine the collision risk between the mobile device and the target obstacle.
[0170] This application also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the method described in the foregoing embodiments.
[0171] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0172] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A collision risk detection method, characterized in that, include: When a target obstacle corresponding to a mobile device is detected, the predicted pose of the target obstacle in the collision detection interval is obtained. The collision detection interval is a prediction sub-time period within the prediction time period. The prediction sub-time period includes a reference time and several prediction times adjacent to the reference time. The predicted pose of the target obstacle at the predicted time within the collision detection interval is compared with the predicted pose of the mobile device at the reference time to determine the collision risk between the mobile device and the target obstacle. Before obtaining the predicted pose of the target obstacle within the collision detection range, the method further includes: The motion trajectory of the target obstacle is predicted to obtain the prediction information corresponding to the target obstacle. The prediction information includes the predicted velocity at the reference time and the velocity covariance matrix corresponding to the predicted velocity. The velocity covariance matrix is obtained by calculating the variance of the possible predicted velocities at the reference time. The length of the collision detection interval is determined based on the predicted velocity and the velocity covariance matrix. The length of the collision detection interval is positively correlated with the predicted velocity and the velocity covariance matrix, respectively. The length of the collision detection interval is non-linearly positively correlated with the unit displacement at the reference time and the velocity covariance matrix, respectively. The unit displacement is obtained based on the predicted velocity.
2. The method according to claim 1, characterized in that, The step of predicting the motion trajectory of the target obstacle to obtain prediction information corresponding to the target obstacle includes: Based on the perceived pose of the target obstacle in the sensor coordinate system, the predicted velocity of the target obstacle in the sensor coordinate system is determined; The velocity covariance matrix is determined based on the predicted velocity of the target obstacle in the sensor coordinate system; Based on the predicted velocity of the target obstacle in the sensor coordinate system, the predicted pose of the target obstacle in the world coordinate system is determined.
3. The method according to claim 2, characterized in that, The step of determining the predicted pose of the target obstacle in the world coordinate system based on the predicted velocity of the target obstacle in the sensor coordinate system includes: Based on the first transformation relationship and unit time, the predicted velocity of the target obstacle in the sensor coordinate system at the current moment is processed to obtain the unit displacement of the target obstacle in the world coordinate system. The first transformation relationship is the coordinate transformation relationship between the sensor coordinate system and the world coordinate system. Based on the perceived pose of the target obstacle in the world coordinate system at the current moment and the unit displacement of the target obstacle in the world coordinate system, the predicted pose of the target obstacle in the world coordinate system is determined.
4. The method according to claim 3, characterized in that, The first transformation relationship is obtained based on the vector description of the device coordinate system of the mobile device at the first moment in the world coordinate system, the vector description of the sensor coordinate system at the first moment in the device coordinate system of the mobile device, the vector description of the target obstacle at the first moment in the sensor coordinate system, the vector description of the device coordinate system of the mobile device at the current moment in the world coordinate system, and the vector description of the sensor coordinate system at the current moment in the device coordinate system of the mobile device, wherein the first moment is the previous moment of the current moment.
5. The method according to claim 3, characterized in that, Before determining the predicted pose of the target obstacle in the world coordinate system based on the perceived pose of the target obstacle in the world coordinate system at the current moment and the unit displacement of the target obstacle in the world coordinate system, the method further includes: Based on the second transformation relationship and the perceived pose of the target obstacle in the sensor coordinate system at the current moment, the perceived pose of the target obstacle in the world coordinate system at the current moment is determined. The second transformation relationship is the coordinate transformation relationship between the sensor coordinate system and the world coordinate system at the current moment.
6. The method according to claim 5, characterized in that, The second transformation relationship is obtained based on the vector description of the device coordinate system of the mobile device at the current moment in the world coordinate system and the vector description of the sensor coordinate system at the current moment in the device coordinate system of the mobile device.
7. The method according to any one of claims 1-6, characterized in that, The step of interfering with the predicted pose of the target obstacle at the predicted time within the collision detection interval and the predicted pose of the mobile device at the reference time to determine the collision risk between the mobile device and the target obstacle includes: Based on the predicted pose of the target obstacle at the target prediction time, the contour information of the target obstacle at the target prediction time is determined, where the target prediction time is any prediction time within the collision detection interval. Based on the predicted pose of the mobile device at the reference time, determine the contour information of the mobile device at the reference time; If, based on the outline information of the target obstacle at the target prediction time and the outline information of the mobile device at the reference time, it is determined that the outer outline of the target obstacle at the target prediction time coincides with the outer outline of the mobile device at the reference time, then it is determined that there is a collision risk between the mobile device and the target obstacle.
8. The method according to any one of claims 1-6, characterized in that, The target obstacle is an obstacle that meets the preset obstacle conditions; The preset obstacle conditions include: The outer contour of the current obstacle moves within the passable area of the mobile device; or The ratio of the intersection area between the outer contour of the current obstacle and the passable area to the outer contour of the current obstacle is greater than or equal to a preset ratio; or The distance between the current obstacle and the mobile device at the current moment is less than or equal to a preset distance; or The current position of the obstacle is ahead of the current position of the mobile device, or the angle between the current heading of the obstacle and the current heading of the mobile device is less than or equal to a preset angle.
9. A collision risk detection device, characterized in that, include: The trajectory prediction module is used to obtain the predicted pose of the target obstacle in the collision detection interval when a target obstacle corresponding to the mobile device is detected. The collision detection interval is a prediction sub-time period within the prediction time period. The prediction sub-time period includes a reference time and several prediction times adjacent to the reference time. The collision detection module is used to perform an interference judgment between the predicted pose of the target obstacle at the predicted time within the collision detection interval and the predicted pose of the mobile device at the reference time, so as to determine the collision risk between the mobile device and the target obstacle. The trajectory prediction module is further configured to: predict the motion trajectory of the target obstacle to obtain prediction information corresponding to the target obstacle, the prediction information including the predicted velocity at the reference time and the velocity covariance matrix corresponding to the predicted velocity, the velocity covariance matrix being obtained based on the variance of the possible predicted velocities at the reference time; and determining the length of the collision detection interval based on the predicted velocity and the velocity covariance matrix, the length of the collision detection interval being positively correlated with the predicted velocity and the velocity covariance matrix, and the length of the collision detection interval being non-linearly positively correlated with the unit displacement at the reference time and the velocity covariance matrix, the unit displacement being obtained based on the predicted velocity.
10. A computer device, characterized in that, The device includes a memory and a processor, the memory being connected to the processor, the processor being configured to execute one or more computer programs stored in the memory, and the processor, when executing the one or more computer programs, causing the computer device to perform the method as described in any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-8.
Citation Information
Patent Citations
Unmanned vehicle control method and device
CN111427369A
Vehicle positioning method and device
CN111522044A