Method for robot to avoid moving obstacle, storage medium and indoor robot

By combining visual camera and LiDAR data, the robot can identify and predict the trajectory of moving obstacles in real time, solving the problem of the robot being unable to avoid obstacles in dynamic environments and enabling the robot to drive safely and smoothly in complex environments.

CN119717825BActive Publication Date: 2026-02-03福建汉特云智能科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411904322.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2026-02-03
Estimated Expiration
2044-12-23

AI Technical Summary

Technical Problem

Existing robots have difficulty avoiding dynamic obstacles in advance, which can cause them to get stuck or collide during operation.

Method used

By combining visual camera and LiDAR data, moving obstacles can be identified and tracked in real time, their trajectories predicted, and avoidance paths planned using cost maps. This combines the environmental understanding capabilities of visual cameras with the precise ranging advantages of LiDAR, improving the accuracy and predictive ability of moving obstacle locations.

Benefits of technology

In complex and ever-changing indoor environments, the probability of the robot colliding with obstacles is significantly reduced, making the robot move more smoothly and ensuring the safety and reliability of operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119717825B_ABST
    Figure CN119717825B_ABST
Patent Text Reader

Abstract

The application discloses a method for avoiding moving obstacles by a robot, a storage medium and an indoor robot, and the method comprises the following steps: obtaining a yaw angle and a pitch angle of a moving obstacle relative to a camera when the moving obstacle is identified by the camera; calculating a distance between a center of the moving obstacle and the robot according to the yaw angle, the pitch angle, a laser value and an angle when the moving obstacle is identified by a laser radar, and forming position information of the moving obstacle; obtaining a plurality of sets of position information within a preset frequency of the moving obstacle; predicting a running track of the moving obstacle according to the plurality of sets of position information corresponding to the moving obstacle, calculating a collision area between the moving obstacle and the robot, marking the collision area on a cost map; and planning a driving route according to the cost map and the collision area. By accurately identifying and predicting the behavior of the moving obstacle, the probability of collision between the robot and the obstacle is significantly reduced, and the driving of the robot is more smooth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot path planning technology, and more particularly to a method for indoor robots to avoid moving obstacles. Background Technology

[0002] With the increasing number and complexity of indoor service robot applications, obstacle avoidance technology faces new challenges. In real-world environments, many obstacles are moving, which adds extra difficulty to robot navigation. Traditionally, robots rely on LiDAR (Light Detection and Ranging) to detect the position of static obstacles, but when facing dynamic obstacles, they often fail to avoid them in advance or experience stuttering during navigation. Summary of the Invention

[0003] Therefore, it is necessary to provide methods, storage media, and indoor robots for robots to avoid moving obstacles, in order to solve the problem that existing robots rely on LiDAR to detect the position of static obstacles, but when facing dynamic obstacles, they often fail to avoid them in advance or experience stuttering during the movement.

[0004] To achieve the above objectives, this embodiment provides a method for a robot to avoid moving obstacles, comprising the following steps:

[0005] Acquire the yaw and pitch angles of the moving obstacle relative to the camera when the camera identifies the moving obstacle;

[0006] Based on the yaw angle, pitch angle, and the laser value and angle when the LiDAR identifies the moving obstacle, the distance between the center of the moving obstacle and the robot is calculated, and the position information of the obstacle is formed.

[0007] Acquire multiple sets of location information for moving obstacles within a preset frequency range;

[0008] Predict the trajectory of the moving obstacle based on multiple sets of location information corresponding to the moving obstacle, calculate the collision area between the moving obstacle and the robot, and mark the collision area on the cost map;

[0009] Plan your travel route based on the cost map and collision area;

[0010] When predicting the trajectory of a moving obstacle based on multiple sets of location information corresponding to the moving obstacle, the following steps are also included:

[0011] The travel distance d of the moving obstacle is calculated using the following formula:

[0012] ;

[0013] Where (Xn,Yn) is the position information of the nth point of the moving obstacle;

[0014] The speed V of the moving obstacle can be calculated using the following formula:

[0015] ;

[0016] Where t is the running time of the moving obstacle;

[0017] The trajectory H of the moving obstacle can be predicted using the following formula:

[0018] ;

[0019] ;

[0020]

[0021] Where S is the distance between the (n-1)th point and the nth point of the moving obstacle, and the yaw angle Yaw of the last point of the moving obstacle is taken as the direction.

[0022] When calculating the collision area between the moving obstacle and the robot, and marking the collision area on the cost map, the following steps are also included:

[0023] Obtain the robot's trajectory M: ;

[0024] The distance W between the moving obstacle and the robot is calculated using the following formula:

[0025]

[0026] The distance threshold W between the moving obstacle and the robot is calculated using the following formula. r :

[0027]

[0028] Where W1 is the width of the robot, W2 is the width of the moving obstacle, and W3 is the threshold data;

[0029] The distance W between the moving obstacle and the robot is less than the distance threshold W. R The location is the collision zone between the moving obstacle and the robot.

[0030] Furthermore, when acquiring the yaw angle and pitch angle of the moving obstacle relative to the camera during camera recognition of the moving obstacle, the following steps are also included:

[0031] Obtain the center information (X,Y), focal length (fx,fy), and optical center (cx,cy) of the BOX box for each frame when the camera recognizes moving obstacles.

[0032] The yaw angle of the moving obstacle relative to the camera is calculated using the following formula:

[0033] ;

[0034] The pitch angle of the moving obstacle relative to the camera is calculated using the following formula:

[0035] .

[0036] Furthermore, when calculating the distance between the center of the moving obstacle and the robot based on the yaw angle, pitch angle, and the laser value and angle when the LiDAR identifies the moving obstacle, the following steps are also included:

[0037] The camera is oriented in the same direction as the lidar, and the two are positioned vertically.

[0038] The angle A2 of the moving obstacle relative to the lidar is calculated using the following formula:

[0039] ;

[0040] Where A1 is the radar center angle value;

[0041] Based on the angle value A2, we can calculate the number of laser beams that the moving obstacle is illuminated by the LiDAR. We can then read the distance values ​​corresponding to these laser beams and calculate their average value to obtain the distance between the center of the moving obstacle and the robot.

[0042] Furthermore, the lidar is a single-line lidar.

[0043] Furthermore, the camera uses the YOLOv7 algorithm to identify moving obstacles.

[0044] Furthermore, it also includes the following steps:

[0045] The DeepSORT multi-object tracking algorithm is used to track multiple moving obstacles, and the location information of each moving obstacle is numbered.

[0046] To achieve the above objectives, this embodiment also provides a computer-readable storage medium having a computer program stored thereon; when the computer program is executed by a processor, it can implement a method for a robot to avoid moving obstacles as described in any of the above embodiments.

[0047] To achieve the above objectives, this embodiment also provides an indoor robot, including a storage medium and a processor. The storage medium stores a computer program, which, when executed by the processor, can implement a method for a robot to avoid moving obstacles as described in any of the above embodiments.

[0048] Unlike existing technologies, the above technical solution has the following beneficial effects:

[0049] This method is applicable not only to static environments but also adapts well to dynamically changing scenarios, enabling robots to move freely in complex and varied indoor environments. By accurately identifying and predicting the behavior of moving obstacles, it significantly reduces the probability of collisions between the robot and obstacles, making robot movement smoother, ensuring operational safety, and providing users with a safer and more reliable service experience.

[0050] The above description of the invention is merely an overview of the technical solution of this application. In order to enable those skilled in the art to better understand the technical solution of this application and to implement it based on the description and drawings, and to make the above-mentioned objectives and other objectives, features and advantages of this application easier to understand, the following description is provided in conjunction with the specific embodiments and drawings of this application. Attached Figure Description

[0051] The accompanying drawings are only used to illustrate the principles, implementation methods, applications, features, and effects of specific embodiments of the present invention and other related contents, and should not be considered as limitations on this application.

[0052] Figure 1 This is one of the flowcharts for the method of robot avoiding moving obstacles in this embodiment;

[0053] Figure 2 This is the second flowchart of the method for the robot to avoid moving obstacles in this embodiment;

[0054] Figure 3 This is the third flowchart of the method for the robot to avoid moving obstacles in this embodiment;

[0055] Figure 4 This is the fourth flowchart of the method for the robot to avoid moving obstacles in this embodiment;

[0056] Figure 5 This is the fifth flowchart of the method for a robot to avoid moving obstacles in this embodiment. Detailed Implementation

[0057] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this application in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this application and are therefore intended to limit the scope of protection of this application.

[0058] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this application, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.

[0059] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit this application.

[0060] In the description of this application, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " in this document generally indicates that the preceding and following objects have an "or" logical relationship.

[0061] In this application, terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy or order relationship between these entities or operations.

[0062] Unless otherwise specified, the use of terms such as “comprising,” “including,” “having,” or other similar expressions in this application is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.

[0063] As understood in the Examination Guidelines, in this application, expressions such as "greater than," "less than," and "exceeding" are understood to exclude the stated number; expressions such as "above," "below," and "within" are understood to include the stated number. Furthermore, in the description of the embodiments in this application, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times," unless otherwise explicitly specified.

[0064] In the description of the embodiments of this application, the space-related expressions used, such as "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "vertical," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential," indicate the orientation or positional relationship based on the orientation or positional relationship shown in the specific embodiments or drawings. They are only for the purpose of describing the specific embodiments of this application or for the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.

[0065] Unless otherwise expressly specified or limited, the terms "installation," "connection," "linking," "fixing," and "setting," as used in the description of the embodiments of this application, should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral setting; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two components or the interaction between two components. For those skilled in the art to which this application pertains, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.

[0066] Please see Figures 1 to 5 This embodiment provides a method for a robot to avoid moving obstacles, including the following steps:

[0067] Step S101: Obtain the yaw angle and pitch angle of the moving obstacle relative to the camera when the camera identifies the moving obstacle;

[0068] Step S102: Based on the yaw angle, pitch angle, and the laser value and angle when the LiDAR identifies the moving obstacle, calculate the distance between the center of the moving obstacle and the robot, and form the obstacle's position information;

[0069] Step S103: Obtain multiple sets of position information of the moving obstacle within a preset frequency;

[0070] Step S104: Predict the trajectory of the moving obstacle based on multiple sets of location information corresponding to the moving obstacle, calculate the collision area between the moving obstacle and the robot, and mark the collision area on the cost map.

[0071] Step S105: Plan the travel route based on the cost map and the collision area.

[0072] This method leverages the environmental understanding capabilities of visual cameras and the precise ranging advantages of lidar. By fusing these two different types of sensor information, it improves the accuracy of determining the location of moving obstacles. Simultaneously, by analyzing time-series data, it can effectively predict the future location of moving obstacles, allowing for proactive responses and collision avoidance. Furthermore, using a cost map as a decision support tool visually represents the risk level at various locations in the environment, guiding the robot to select the optimal path.

[0073] The above technical solution has the following beneficial effects:

[0074] This method is applicable not only to static environments but also adapts well to dynamically changing scenarios, enabling robots to move freely in complex and varied indoor environments. By accurately identifying and predicting the behavior of moving obstacles, it significantly reduces the probability of collisions between the robot and obstacles, making robot movement smoother, ensuring operational safety, and providing users with a safer and more reliable service experience.

[0075] Please see Figure 1 and Figure 2 In this embodiment, when acquiring the yaw angle and pitch angle of the moving obstacle relative to the camera when the camera identifies the moving obstacle, the following steps are also included:

[0076] Step S1011: Obtain the center information (X,Y) of the BOX box, the focal length (fx,fy) of the camera, and the optical center (cx,cy) of the camera in each frame when recognizing moving obstacles.

[0077] Step S1012: Calculate the yaw angle (Yaw) of the moving obstacle relative to the camera using the following formula:

[0078] ;

[0079] The pitch angle of the moving obstacle relative to the camera is calculated using the following formula:

[0080] .

[0081] The camera captures images in real time, and each frame is used to identify obstacles. An object detection algorithm identifies the bounding boxes (BOX) of moving obstacles. For each frame, the center coordinates (X, Y) of the bounding box are extracted and retained, representing the actual pixel position of the identified obstacle in the image. Camera intrinsic parameters are obtained after camera calibration. The focal length (fx, fy) corresponds to the focal length between the x and y axes, and the optical center (cx, cy) is the origin of the image coordinate system, usually the center point of the image.

[0082] In this embodiment, the DeepSORT multi-object tracking algorithm is used to track multiple moving obstacles, and the location information of each moving obstacle is numbered. For each detected target, its appearance features (such as color, texture, etc.) are extracted, and these features will be used in the subsequent matching process. Each tracked moving obstacle is given a unique ID number, which remains unchanged throughout the tracking process, and can be correctly identified even if the target temporarily leaves the field of view and then reappears.

[0083] Please see Figure 1 and Figure 3 In this embodiment, when calculating the distance between the center of the moving obstacle and the robot based on the yaw angle, pitch angle, and the laser value and angle when the LiDAR identifies the moving obstacle, the following steps are also included:

[0084] In step S1021, the camera is oriented in the same direction as the LiDAR, and they are positioned vertically. The visual sensor (camera) is used to capture environmental images and identify moving obstacles within them. The LiDAR provides high-precision distance measurement data. The camera and LiDAR are positioned vertically, with their x and y axes coinciding in the spatial coordinate system, but their z axes differing.

[0085] Step S1022: Calculate the angle A2 of the moving obstacle relative to the lidar using the following formula:

[0086] ;

[0087] Where A1 is the radar center angle value;

[0088] Step S1023: Based on angle value A2, the number of laser beams illuminating the moving obstacle by the LiDAR can be calculated. The distance values ​​corresponding to these laser beams are read, and their average value is calculated to obtain the distance between the center of the moving obstacle and the robot. For the specific calculation formula, please refer to:

[0089]

[0090] Here, angle_increment represents the resolution of the LiDAR, and angle represents which laser beam from the LiDAR illuminates the obstacle. By reading the distance values ​​of the relevant laser beams from the LiDAR and calculating their average value, the distance between the obstacle and the LiDAR can be obtained, thus determining the location of the obstacle.

[0091] In summary, by combining the laser values ​​and angles of each LiDAR with the angles between the moving obstacle and the camera obtained through depth recognition, the position of the center of the moving obstacle from the robot is calculated, and the position information of each obstacle is saved according to its number.

[0092] In this embodiment, to further enhance the obstacle avoidance capability and environmental adaptability of the indoor service robot, a single-line LiDAR (SLAM) is specifically recommended. This LiDAR has a wide scanning range, from 0 to 3π / 2 radians (equivalent to 0 to 270 degrees), which covers not only the entire field of view in front of the robot but also a portion of the lateral area, thus greatly enhancing its perception of the surrounding environment. Simultaneously, the center angle value A1 of the LiDAR corresponds to 3π / 4 (i.e., 135 degrees). Camera field of view: -π / 4 to π / 4 (corresponding to -45 degrees to 45 degrees).

[0093] Please see Figure 1 and Figure 4 In this embodiment, when predicting the trajectory of a moving obstacle based on multiple sets of location information corresponding to the moving obstacle, the following steps are also included:

[0094] Step S1041: Calculate the distance d traveled by the moving obstacle using the following formula (Euclidean formula):

[0095] ;

[0096] Where (Xn,Yn) is the position information of the nth point of the moving obstacle;

[0097] Step S1042, the moving speed V of the obstacle is calculated using the following formula:

[0098] ;

[0099] Where t is the running time of the moving obstacle;

[0100] Step S1043: The trajectory H of the moving obstacle is predicted using the following formula:

[0101] ;

[0102] ;

[0103]

[0104] Where S is the distance between the (n-1)th point and the nth point of the moving obstacle, and the yaw angle Yaw of the last point of the moving obstacle is taken as the direction.

[0105] The Euclidean distance formula is used to calculate the straight-line distance between two consecutive points (X1, Y1) and (X2, Y2) in space, representing the distance traveled on a short trajectory. Once the distance and the time difference t are known, the average velocity formula can be used to calculate the average velocity of this short trajectory. If the yaw angle (Yaw) of the last point is known, it can be assumed that the object will continue moving in that direction. Combining velocity and direction, the possible future position of a moving obstacle can be predicted, and the distance to the next point can be calculated using displacement, for example, by... The x-coordinate of the next point is calculated, where X1 and X0 represent the x-coordinates of the previous point. The x-coordinate of the next point is calculated, and Y1 and Y0 represent the y-coordinate of the previous point. This process is repeated based on time, thus obtaining a predicted trajectory.

[0106] In this embodiment, to accurately capture and analyze the motion characteristics of each moving obstacle, the system records the obstacle's position information at a preset frequency (e.g., but not limited to 100 Hz, i.e., 100 times per second). Each recorded position data point includes the obstacle's coordinates (e.g., X, Y coordinates), and may also include other relevant information such as altitude (Z coordinate) and yaw angle. The system retains the most recent 100 to 130 sets of such position data to form a dataset. This range is chosen to ensure sufficient data points to accurately depict the obstacle's trajectory without adding unnecessary computational burden due to excessive data. These data points not only reflect the obstacle's historical path but are also used to calculate its average velocity, acceleration, and determine its current direction of motion.

[0107] In this embodiment, when calculating the collision area between the moving obstacle and the robot and marking the collision area on the cost map, the following steps are also included:

[0108] Obtain the robot's trajectory M: ;

[0109] The distance W between the moving obstacle and the robot is calculated using the following formula:

[0110]

[0111] The distance threshold W between the moving obstacle and the robot is calculated using the following formula. r :

[0112]

[0113] Wherein, W1 is the width of the robot, W2 is the width of the moving obstacle, and W3 is the threshold data. The threshold data is preferably below 0.3m and above 0.1m, and can be set to 0.1, 0.2, or 0.3.

[0114] The distance W between the moving obstacle and the robot is less than the distance threshold W. r The location is the collision zone between the moving obstacle and the robot.

[0115] Set a time interval [t1, t2]. Within this interval, for each time point tn, calculate whether the distance between the obstacle and the robot is less than W using the Euclidean distance formula. The robot's width is W1, the obstacle's width is W2, and the threshold value is 0.2. The formula is... Points can be set between 0.1m and 0.3m, and points where the robot's trajectory intersects with the obstacle's trajectory can be registered as obstacles.

[0116] In this embodiment, the camera identifies moving obstacles using the YOLOv7 algorithm. YOLOv7 introduces new network architecture design and technical optimizations, such as E-ELAN (Enhanced Efficient Layer Aggregation Network), to improve computational efficiency. YOLOv7 uses an improved PANet (Path Aggregation Network) structure to enhance information exchange between features at different scales, thereby better capturing large, medium, and small targets. To improve adaptability to targets of different shapes and sizes, YOLOv7 dynamically adjusts the size and proportion of anchor boxes, allowing the model to more flexibly match the actual data distribution.

[0117] In this embodiment, the robot avoids obstacles based on the cost map of the navigation system. The cost map is used to identify obstacles in the scene, and the data for updating the cost map comes from various sensor data.

[0118] In existing robot path planning, the lack of effective detection of moving obstacles leads to less smooth robot movement and lower efficiency in complex environments. To address this issue, this invention proposes a deep learning-based intelligent obstacle avoidance method that combines visual and lidar data to achieve efficient identification, tracking, and obstacle avoidance of moving obstacles in the environment.

[0119] Please see Figure 5Specifically, the robot uses high-performance cameras and advanced deep learning algorithms to capture and identify moving obstacles in real time. It calculates the yaw angle between the obstacle and the camera position and assigns a number to each moving obstacle. Using LiDAR data and angles, as well as the yaw angles obtained from depth recognition, the robot calculates the position of each obstacle and saves each set of position data according to its number. It can record 100-130 sets of data at 100Hz. Based on the obstacle's number and multiple sets of position data, it calculates the moving object's direction and speed. Based on the robot's current speed, position, and direction, it calculates potential collision areas and marks them as obstacles on a cost map. Then, it performs route planning. This improves the robot's throughput efficiency, enhances scene adaptability, and avoids collisions with obstacles.

[0120] This embodiment also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program can implement the method for a robot to avoid moving obstacles as described in any of the above embodiments, such as... Figures 1 to 5 As shown.

[0121] This embodiment also provides an indoor robot, including a storage medium and a processor. The storage medium stores a computer program, and when the computer program is executed by the processor, it can implement the method for a robot to avoid moving obstacles as described in any of the above embodiments, such as... Figures 1 to 5 As shown. Indoor robots include, but are not limited to, cleaning robots, delivery robots, and butler robots. Cleaning robots are used to automatically clean and maintain the hygiene of homes or commercial premises. They can navigate autonomously and avoid obstacles, ensuring efficient completion of cleaning work. Delivery robots are used to deliver packages within specific areas (such as office buildings, campuses, and residential areas). They can safely coexist with people and other moving objects and accurately deliver items to designated locations. Butler robots can perform a range of tasks, such as greeting visitors, providing information and guidance, and monitoring environmental security. These robots typically possess high levels of human-computer interaction capabilities and intelligent decision-making mechanisms.

[0122] Finally, it should be noted that although the above embodiments have been described in the text and drawings of this application, this should not limit the scope of patent protection of this application. Any technical solutions that are based on the essential concept of this application and utilize the content described in the text and drawings of this application, resulting in equivalent structural or procedural substitutions or modifications, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of patent protection of this application.

Claims

1. A method for a robot to avoid moving obstacles, characterized in that, Includes the following steps: Acquire the yaw and pitch angles of the moving obstacle relative to the camera when the camera identifies the moving obstacle; Based on the yaw angle, pitch angle, and the laser value and angle when the LiDAR identifies the moving obstacle, the distance between the center of the moving obstacle and the robot is calculated, and the position information of the obstacle is formed. Acquire multiple sets of location information for moving obstacles within a preset frequency range; Predict the trajectory of the moving obstacle based on multiple sets of location information corresponding to the moving obstacle, calculate the collision area between the moving obstacle and the robot, and mark the collision area on the cost map; Plan your travel route based on the cost map and collision area; When predicting the trajectory of a moving obstacle based on multiple sets of location information corresponding to the moving obstacle, the following steps are also included: The travel distance d of the moving obstacle is calculated using the following formula: ; Where (Xn,Yn) is the position information of the nth point of the moving obstacle; The speed V of the moving obstacle can be calculated using the following formula: ; Where t is the running time of the moving obstacle; The trajectory H of the moving obstacle can be predicted using the following formula: ; ; Where S is the distance between the (n-1)th point and the nth point of the moving obstacle, and the yaw angle Yaw of the last point of the moving obstacle is taken as the direction; When calculating the collision area between the moving obstacle and the robot, and marking the collision area on the cost map, the following steps are also included: Obtain the robot's trajectory M: ; The distance W between the moving obstacle and the robot is calculated using the following formula: The distance threshold W between the moving obstacle and the robot is calculated using the following formula. r : Where W1 is the width of the robot, W2 is the width of the moving obstacle, and W3 is the threshold data; The distance W between the moving obstacle and the robot is less than the distance threshold W. R The location is the collision zone between the moving obstacle and the robot.

2. The method according to claim 1, characterized in that, When acquiring the yaw angle and pitch angle of the moving obstacle relative to the camera during camera recognition of a moving obstacle, the following steps are also included: Obtain the center information (X,Y), focal length (fx,fy), and optical center (cx,cy) of the BOX box for each frame when the camera recognizes moving obstacles. The yaw angle of the moving obstacle relative to the camera is calculated using the following formula: ; The pitch angle of the moving obstacle relative to the camera is calculated using the following formula: 。 3. The method according to claim 1 or 2, characterized in that, When calculating the distance between the center of the moving obstacle and the robot based on the yaw angle, pitch angle, and the laser value and angle when the LiDAR identifies the moving obstacle, the following steps are also included: The camera is oriented in the same direction as the lidar, and the two are positioned vertically. The angle A2 of the moving obstacle relative to the lidar is calculated using the following formula: ; Where A1 is the radar center angle value; Based on the angle value A2, we can calculate the number of laser beams that the moving obstacle is illuminated by the LiDAR. We can then read the distance values ​​corresponding to these laser beams and calculate their average value to obtain the distance between the center of the moving obstacle and the robot.

4. The method according to claim 3, characterized in that, The lidar is a single-line lidar.

5. The method according to claim 1, characterized in that, The camera uses the YOLOv7 algorithm to identify moving obstacles.

6. The method according to claim 1, characterized in that, It also includes the following steps: The DeepSORT multi-object tracking algorithm is used to track multiple moving obstacles, and the location information of each moving obstacle is numbered.

7. A computer-readable storage medium, characterized in that, It stores a computer program; when the computer program is executed by a processor, it can implement the method for a robot to avoid moving obstacles as described in any one of claims 1-6.

8. An indoor robot, characterized in that, It includes a storage medium and a processor, wherein the storage medium stores a computer program, and the computer program, when executed by the processor, is capable of implementing the method for a robot to avoid moving obstacles as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Multi-obstacle prediction navigation obstacle avoidance method based on single-line laser radar

    CN116576857A

  • Dynamic obstacle avoidance method for robot

    CN117806332A