Automatic obstacle avoidance method for weeding robot
Through multimodal sensor data fusion and dynamic risk assessment, the obstacle avoidance ability of the weeding robot is optimized, and the problem of inaccurate obstacle identification in complex farmland environments is solved, achieving efficient and safe path planning.
Patent Information
- Application Number
- CN202510416777.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-07-18
AI Technical Summary
Existing weeding robots rely on a single sensor for obstacle detection in complex farmland environments, which are susceptible to noise interference, resulting in inaccurate identification of obstacles, and fixed path planning cannot adapt to real-time environmental changes, making it difficult to achieve efficient obstacle avoidance.
Multimodal sensor data fusion is adopted, including lidar, ultrasonic sensors and vision sensors, and combined with dynamic risk assessment and path cost calculation, a dynamic risk map is generated and obstacle avoidance path planning is optimized.
The weeding robots are improved to avoid obstacles and operating efficiency in complex farmland environments, ensuring safety and efficient path planning.
Smart Images

Figure CN120335439A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of agricultural robots, and particularly relates to an automatic obstacle avoidance method for a weeding robot. Background Art
[0002] Currently, the automatic obstacle avoidance technology of agricultural robots in complex farmland environments still has deficiencies. For example, existing weeding robots usually rely on a single sensor, such as lidar or ultrasonic waves, for obstacle detection. However, when facing unstructured terrains and various types of dynamic obstacles, sensor data is easily interfered by noise, resulting in inaccurate obstacle recognition or missed detection. In addition, the commonly used fixed path planning methods in the prior art cannot dynamically adjust the path according to real-time environmental changes, and it is difficult to meet the requirements of efficient and continuous obstacle avoidance. Therefore, there is an urgent need for an automatic obstacle avoidance method for a weeding robot that can still achieve precise obstacle avoidance and efficient path planning in complex farmland environments. This method should combine multi-modal sensor data fusion, dynamic risk assessment, and adaptive path planning, so that the robot can make timely and accurate obstacle avoidance decisions when facing irregular terrains and various types of obstacles, in order to improve the efficiency and safety of weeding operations. Summary of the Invention
[0003] Aiming at the above-mentioned existing technical deficiencies, the purpose of the present invention is to propose an automatic obstacle avoidance method for a weeding robot, aiming to solve the problem of simple obstacle avoidance relying only on single-sensor data in the prior art, especially the technical problem that existing methods cannot achieve real-time dynamic obstacle avoidance and efficient path planning under the conditions of complex terrains and various types of obstacles in farmland.
[0004] To solve the above technical problems, the present invention adopts the following technical solutions: The present invention provides an automatic obstacle avoidance method for a weeding robot, including:
[0005] Step S10: Based on the lidar, ultrasonic sensor, and vision sensor installed on the weeding robot, the environmental data of the operation area is collected in real time. The environmental data includes terrain information f1, the position information f2 of the obstacle, the size information f3 of the obstacle, the shape information f4 of the obstacle, and the motion characteristics f5 of the obstacle. The motion characteristics f5 of the obstacle include the speed v and acceleration a of the obstacle;
[0006] Step S20: Denoise the collected environmental data, and fuse the environmental data into a feature vector F = [f1, f2, f3, f4, f5];
[0007] Based on the feature vector F, risk classification of obstacles is performed through a dynamic risk assessment model; the risk assessment model classifies obstacles into three risk levels: low risk, medium risk, and high risk according to the size information f3, shape information f4, and motion characteristics f5 of the obstacles, and calculates the risk score R of the obstacles;
[0008] Step S30: Determine the high-risk area, medium-risk area, and low-risk area according to the risk score in step S20;
[0009] A dynamic risk map is formed by setting a large safety margin for the high-risk area, a medium safety margin for the medium-risk area, and a small safety margin for the low-risk area;
[0010] The risk scores of the obstacles are marked in the high, medium, and low-risk areas of the dynamic risk map;
[0011] Step S40: Generate multiple candidate obstacle avoidance paths based on the dynamic risk map. The candidate obstacle avoidance paths are comprehensively evaluated according to the distance, the risk score of the obstacle, and the required energy consumption, and the comprehensive path cost is calculated. The calculation formula is:
[0012]
[0013] where Cost is the comprehensive path cost, R i is the risk score of the i-th position point on the candidate obstacle avoidance path, D i is the distance cost of the i-th position point on the candidate obstacle avoidance path, E i is the energy consumption cost of the i-th position point on the candidate obstacle avoidance path, α and β are balance coefficients used to adjust the weights of distance and energy consumption in the path cost calculation, and n is the total number of position points;
[0014] Step S50: According to the calculation result of the comprehensive path cost, sort all candidate obstacle avoidance paths in ascending order, and select the candidate obstacle avoidance path with the lowest cost as the final travel path of the robot.
[0015] Preferably, in step S10, the lidar is used to obtain the terrain information f1 and the position information f2 of the obstacle, the ultrasonic sensor is used to obtain the size information f3 of the obstacle, and the vision sensor is used to identify the shape information f4 and motion characteristics f5 of the obstacle.
[0016] Preferably, in step S20, the formula used to calculate the risk score R of the obstacle is:
[0017] R = γ1×f3 + γ2×v + γ3×a + σ×(β1×f1 + β2×f2)
[0018] Wherein, R is the risk score of the obstacle, γ1 is the weight coefficient of the size information of the obstacle, γ2 is the weight coefficient of the speed of the obstacle, v is the speed of the obstacle, γ3 is the weight coefficient of the acceleration of the obstacle, a is the acceleration of the obstacle, σ is the comprehensive influence coefficient of the terrain and the position of the obstacle, β1 is the weight coefficient of the terrain information, and β2 is the weight coefficient of the position information of the obstacle.
[0019] Preferably, in step S20, the median filtering algorithm is used to process the collected environmental data for denoising.
[0020] Preferably, in step S30, when generating the dynamic risk map, the safety margin of the high-risk area within 180 degrees in front of the robot is preferentially expanded.
[0021] Preferably, in step S40, the distance is calculated in real time through the lidar data, and the required energy consumption is calculated in real time based on the moving speed of the robot and the terrain characteristics of the path.
[0022] Preferably, in step S50, when the comprehensive path costs are the same, the path with a shorter length in the low-risk area is preferentially selected.
[0023] The beneficial effects of the present invention are as follows: Compared with the problem of simple obstacle avoidance relying only on single-sensor data in the prior art, especially under the conditions of complex terrain and diverse types of obstacles in farmland, the prior art methods cannot achieve real-time dynamic obstacle avoidance and efficient path planning. Through multi-modal sensor data fusion, dynamic risk assessment, and path cost calculation, this application optimizes the obstacle avoidance ability and path planning of the weeding robot, thereby avoiding the problem that the operation efficiency of the robot is affected due to incomplete obstacle recognition or untimely obstacle avoidance in a complex environment, and improving the safety and operation efficiency of the robot in a dynamic farmland environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0025] Figure 1 It is a schematic flowchart of the first embodiment of an automatic obstacle avoidance method for a weeding robot provided by the present invention.
[0026] Figure 2 It is a schematic diagram of the system of an automatic obstacle avoidance method for a weeding robot provided by the present invention.
[0027] Figure 3Schematic diagram of the equipment for an automatic obstacle avoidance method of a weeding robot provided by the present invention. Detailed implementation manners
[0028] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0029] Embodiment 1: As Figure 1 shown, it is a flowchart of the first embodiment of the automatic obstacle avoidance method of the weeding robot of the present invention, and the first embodiment of the automatic obstacle avoidance method of the weeding robot of the present invention is proposed.
[0030] In the first embodiment, the automatic obstacle avoidance method of the weeding robot includes:
[0031] Step S10: Based on the lidar, ultrasonic sensor, and vision sensor installed on the weeding robot, the environmental data of the operation area is collected in real time. The environmental data includes terrain information f1, position information f2 of the obstacle, size information f3 of the obstacle, shape information f4 of the obstacle, and motion characteristics f5 of the obstacle. The motion characteristics f5 of the obstacle include the speed v and acceleration a of the obstacle;
[0032] It should be noted that the terrain information includes the height difference, slope, and terrain complexity of the robot's operation area, which is mainly used to help the robot identify terrain changes to adjust the traveling speed and path selection. The position information of the obstacle is the relative position based on the current position of the robot, which is used to judge the distance between the obstacle and the robot in real time, so as to preferentially avoid obstacles with a closer distance in the obstacle avoidance decision-making.
[0033] It should be understood that in order to better detect various types of obstacles, the size information and shape information of the obstacle are obtained by the ultrasonic sensor and the vision sensor respectively. The size information is mainly used to identify the physical size of the obstacle, while the shape information is used to distinguish dynamic obstacles such as animals and static obstacles such as stones.
[0034] Step S20: Denoise the collected environmental data and fuse the environmental data into a feature vector F = [f1, f2, f3, f4, f5];
[0035] Based on the feature vector F, the obstacles are classified according to risk through a dynamic risk assessment model; the risk assessment model divides the obstacles into three risk levels: low risk, medium risk, and high risk according to the size information f3, shape information f4, and motion characteristics f5 of the obstacle, and calculates the risk score R of the obstacle.
[0036] It should be noted that when denoising the collected environmental data, the median filtering algorithm can effectively remove noise. Especially in the case of large mutations or sharp interferences, it can maintain the smoothness and accuracy of the signal. This algorithm replaces each data point with the median value within its neighborhood, avoiding the signal distortion problem that may be brought by traditional filters.
[0037] It should be understood that the size information, shape information, and motion characteristics in the feature vector play an important role in the risk level division of obstacles. Among them, the size information is used to judge the physical threat degree of the obstacle, the shape information helps to identify the type of the obstacle, and the motion characteristics are used to judge the dynamic risk of the obstacle.
[0038] For example, when the feature vector shows that a certain obstacle has a high speed and acceleration, it will be judged as a high-risk level, and a safety margin will be added in the path planning to ensure that the robot can avoid the obstacle in time.
[0039] Step S30: Judge the high-risk area, medium-risk area, and low-risk area according to the risk score in step S20;
[0040] A dynamic risk map is formed by setting a large safety margin for the high-risk area, a medium safety margin for the medium-risk area, and a small safety margin for the low-risk area;
[0041] The risk scores of obstacles are marked in the high, medium, and low-risk areas in the dynamic risk map;
[0042] It should be noted that the division of the high-risk area, medium-risk area, and low-risk area is mainly based on the risk score of the obstacle. The higher the risk score of the obstacle, the more likely it is to pose a threat to the robot's movement. Therefore, a larger safety margin is set in the high-risk area to ensure that the robot has enough space to avoid when approaching high-risk obstacles.
[0043] It can be understood that the size of the safety margin will directly affect the flexibility in the robot's path planning. The high-risk area with a larger safety margin may limit the range of feasible paths for the robot, but it can effectively improve safety; while the low-risk area with a small safety margin can increase the flexibility of path planning and improve the efficiency of the robot's operation.
[0044] It should be understood that the safety margin in the medium-risk area is set to a medium size, which can not only reduce the detour distance of the robot when avoiding obstacles, but also ensure safety under controllable risks. The medium-risk area is mainly applicable to those obstacles with a large volume but slow movement, such as stones or vegetation.
[0045] For example, when the risk score of an obstacle exceeds a certain threshold, the system will identify it as a high-risk obstacle, mark it as a high-risk area in the dynamic risk map, and set a large safety margin. For example, if the obstacle is a fast-moving animal, the robot will give priority to avoiding it and maintaining a long distance during path planning to ensure the safety of the operation.
[0046] Step S40: Generate multiple candidate obstacle avoidance paths based on the dynamic risk map. The candidate obstacle avoidance paths are comprehensively evaluated according to distance, the risk score of the obstacle, and the required energy consumption, and the comprehensive path cost is calculated. The calculation formula is:
[0047]
[0048] where Cost is the comprehensive path cost, R i is the risk score of the i-th position point on the candidate obstacle avoidance path, D i is the distance cost of the i-th position point on the candidate obstacle avoidance path, E i is the energy consumption cost of the i-th position point on the candidate obstacle avoidance path, α and β are balance coefficients used to adjust the weights of distance and energy consumption in path cost calculation, and n is the total number of position points;
[0049] It should be noted that the distance cost is mainly used to reduce the total driving distance of the robot, thereby shortening the operation time; the energy consumption cost ensures that the robot selects a more energy-efficient route during path planning and extends the battery life.
[0050] It can be understood that the balance coefficients α and β can be adjusted according to the actual scenario. For example, in the case of limited energy, the weight of β can be increased so that the robot preferentially selects a low-energy consumption path; in the scenario where quick arrival is required, the weight of α can be appropriately increased to reduce the total distance of the path.
[0051] For example, when the robot faces a complex environment with multiple obstacles, the system will generate multiple candidate paths and calculate the comprehensive cost of each path according to the formula. Suppose path A has a high risk score but a short distance; path B has a low risk score but a long distance. According to the formula, if the weight of α is high, the system may preferentially select path A to shorten the distance; if the weight of β is high, the system may select path B to reduce energy consumption and avoid high-risk areas.
[0052] Step S50: According to the calculation result of the comprehensive path cost, sort all candidate obstacle avoidance paths in ascending order, and select the candidate obstacle avoidance path with the lowest cost as the final travel path of the robot.
[0053] It should be noted that the results of path cost calculation are used to sort the candidate obstacle avoidance paths, and the sorting is based on the magnitude of the comprehensive path cost. By sorting all candidate paths in ascending order, the system can preferentially select the path with the lowest cost, ensuring the best balance among the safety, energy consumption, and efficiency of the robot.
[0054] It can be understood that the path with the lowest cost is not necessarily the shortest path or the path with the lowest energy consumption, but the optimal solution after comprehensively considering factors such as risk score, distance, and energy consumption. This can improve the overall operation efficiency of the robot while ensuring the obstacle avoidance effect.
[0055] It should be understood that when selecting the final path, the system will continuously monitor the changes in obstacles on the path. If new high-risk obstacles are detected or the states of existing obstacles change, the system will re-execute the path cost calculation and sorting process to ensure that the robot can adjust the traveling path in real time and avoid potential dangers.
[0056] For example, in a farmland operation scenario, the system generates three candidate paths: Path A, Path B, and Path C. Suppose Path A has a low risk score but high energy consumption, Path B is shorter in distance but has a certain risk, and Path C has the lowest energy consumption but is longer in path length. By calculating the comprehensive path cost, the system may choose Path B because it achieves the best balance between distance and risk, thus ensuring that the robot can complete the operation safely and efficiently.
[0057] In addition, the present invention also provides an automatic obstacle avoidance system for a weeding robot. Please refer to Figure 2 , the system includes:
[0058] A data acquisition module, configured to collect environmental data of the operation area in real time based on a lidar, an ultrasonic sensor, and a vision sensor installed on the weeding robot. The environmental data includes terrain information f1, position information f2 of obstacles, size information f3 of obstacles, shape information f4 of obstacles, and motion characteristics f5 of obstacles. The motion characteristics f5 of obstacles include the speed v and acceleration a of obstacles;
[0059] A data processing module, configured to perform denoising processing on the collected environmental data and fuse the environmental data into a feature vector F = [f1, f2, f3, f4, f5];
[0060] Based on the feature vector F, perform risk classification on obstacles through a dynamic risk assessment model; the risk assessment model classifies obstacles into three risk levels: low risk, medium risk, and high risk according to the size information f3, shape information f4, and motion characteristics f5 of obstacles, and calculates the risk score R of obstacles;
[0061] A risk assessment module, configured to determine high-risk areas, medium-risk areas, and low-risk areas according to the risk scores in step S20;
[0062] A dynamic risk map is formed by setting a large safety margin for high-risk areas, a medium safety margin for medium-risk areas, and a small safety margin for low-risk areas;
[0063] The risk scores of obstacles are marked in the high, medium, and low-risk areas of the dynamic risk map;
[0064] A dynamic risk field generation module is configured to generate multiple candidate obstacle avoidance paths based on the dynamic risk map. The candidate obstacle avoidance paths are comprehensively evaluated according to the distance, the risk scores of obstacles, and the required energy consumption, and the comprehensive path cost is calculated. The calculation formula is:
[0065]
[0066] where Cost is the comprehensive path cost, R i is the risk score of the i-th position point on the candidate obstacle avoidance path, D i is the distance cost of the i-th position point on the candidate obstacle avoidance path, E i is the energy consumption cost of the i-th position point on the candidate obstacle avoidance path, α and β are balance coefficients used to adjust the weights of distance and energy consumption in the path cost calculation, and n is the total number of position points;
[0067] A path planning module is configured to sort all candidate obstacle avoidance paths in ascending order according to the calculation results of the comprehensive path cost, and select the candidate obstacle avoidance path with the lowest cost as the final travel path of the robot.
[0068] An automatic obstacle avoidance system for a weeding robot provided by the present invention adopts an automatic obstacle avoidance method for a weeding robot in the above embodiment, and can solve the technical problem of automatic obstacle avoidance for a weeding robot. Compared with the prior art, the beneficial effects of the automatic obstacle avoidance system for a weeding robot provided by the present invention are the same as those of the automatic obstacle avoidance method for a weeding robot provided in the above embodiment, and other technical features in the automatic obstacle avoidance system for a weeding robot are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.
[0069] The present invention provides an automatic obstacle avoidance device for a weeding robot. Please refer to Figure 3, a weed removal robot automatic obstacle avoidance device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute a weed removal robot automatic obstacle avoidance method in the first embodiment above. A weed removal robot automatic obstacle avoidance device in an embodiment of the present invention may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. A weed removal robot automatic obstacle avoidance device is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention. A weed removal robot automatic obstacle avoidance device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of a weed removal robot automatic obstacle avoidance device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow a weed removal robot automatic obstacle avoidance device to communicate with other devices wirelessly or wiredly to exchange data. Although a weed removal robot automatic obstacle avoidance device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems may be implemented or had.
[0070] The present invention also provides a computer program product, including a computer program which, when executed by a processor, implements the steps of an automatic obstacle avoidance method for a weeding robot as described above. The computer program product provided by the present invention can solve the technical problem of automatic obstacle avoidance for a weeding robot. Compared with the prior art, the beneficial effects of the computer program product provided by the present invention are the same as those of the automatic obstacle avoidance method for a weeding robot provided in the above embodiment, and will not be elaborated here.
[0071] In particular, according to the embodiments disclosed by the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed by the present invention include a computer program product which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processing device 1001, it executes the above-mentioned functions defined in the methods of the embodiments disclosed by the present invention.
[0072] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0073] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these changes and modifications.
Claims
1. An automatic obstacle avoidance method for a weeding robot, characterized in that, Including: Step S10: Based on the lidar, ultrasonic sensor, and vision sensor installed on the weeding robot, the environmental data of the operation area is collected in real time. The environmental data includes terrain information f1, the position information f2 of the obstacle, the size information f3 of the obstacle, the shape information f4 of the obstacle, and the motion characteristics f5 of the obstacle. The motion characteristics f5 of the obstacle include the speed v of the obstacle and the acceleration a of the obstacle. Step S20: Denoise the collected environmental data and fuse the environmental data into a feature vector F = [f1, f2, f3, f4, f5]. Based on the feature vector F, the obstacle is classified for risk through a dynamic risk assessment model; the risk assessment model divides the obstacle into three risk levels: low risk, medium risk, and high risk according to the size information f3, shape information f4, and motion characteristics f5 of the obstacle, and calculates the risk score R of the obstacle. Step S30: Determine the high-risk area, medium-risk area, and low-risk area according to the risk score in Step S20. A dynamic risk map is formed by setting a large safety margin for the high-risk area, a medium safety margin for the medium-risk area, and a small safety margin for the low-risk area. The risk scores of the obstacles are marked in the high, medium, and low-risk areas in the dynamic risk map. Step S40: Generate multiple candidate obstacle avoidance paths based on the dynamic risk map. The candidate obstacle avoidance paths are comprehensively evaluated according to the distance, the risk score of the obstacle, and the required energy consumption, and the comprehensive path cost is calculated. The calculation formula is: Among them, Cost is the comprehensive path cost, R i is the risk score of the i-th position point on the candidate obstacle avoidance path, D i is the distance cost of the i-th position point on the candidate obstacle avoidance path, E i is the energy consumption cost of the i-th position point on the candidate obstacle avoidance path, α and β are balance coefficients used to adjust the weights of distance and energy consumption in path cost calculation, and n is the total number of position points; Step S50: According to the calculation result of the comprehensive path cost, sort all the candidate obstacle avoidance paths in ascending order, and select the candidate obstacle avoidance path with the lowest cost as the final travel path of the robot.
2. The automatic obstacle avoidance method of a weeding robot according to claim 1, characterized in that, In Step S10, the lidar is used to obtain the terrain information f1 and the position information f2 of the obstacle, the ultrasonic sensor is used to obtain the size information f3 of the obstacle, and the vision sensor is used to identify the shape information f4 and the motion characteristics f5 of the obstacle.
3. The automatic obstacle avoidance method for a weeding robot according to claim 1, characterized in that In Step S20, the formula used to calculate the risk score R of the obstacle is: R = γ1×f3 + γ2×v + γ3×a + σ×(β1×f1 + β2×f2) Where, R is the risk score of the obstacle, γ1 is the weight coefficient of the size information of the obstacle, γ2 is the weight coefficient of the speed of the obstacle, v is the speed of the obstacle, γ3 is the weight coefficient of the acceleration of the obstacle, a is the acceleration of the obstacle, σ is the comprehensive influence coefficient of the terrain and the position of the obstacle, β1 is the weight coefficient of the terrain information, and β2 is the weight coefficient of the position information of the obstacle.
4. The automatic obstacle avoidance method of a weeding robot according to claim 1, wherein, In Step S20, the median filtering algorithm is used to denoise the collected environmental data.
5. The automatic obstacle avoidance method of a weeding robot according to claim 1, characterized in that In Step S30, when generating the dynamic risk map, the safety margin of the high-risk area within 180 degrees in front of the robot is preferentially expanded.
6. The automatic obstacle avoidance method of a weeding robot according to claim 1, characterized in that, In Step S40, the distance is calculated in real time through the lidar data, and the required energy consumption is calculated in real time based on the moving speed of the robot and the terrain characteristics of the path.
7. The automatic obstacle avoidance method of a weeding robot according to claim 1, characterized in that, In Step S50, when the comprehensive path costs are the same, the path in the low-risk area with a shorter path length is preferentially selected.