Sanitation vehicle automatic following control method and system

By constructing an electronic fence for sanitation operations and dividing it into three-dimensional grids, combined with environmental data and dynamic path planning, the problems of inaccurate parking and low efficiency in sanitation operations have been solved, enabling precise, safe, and efficient following of vehicles and improving the intelligence level and safety of sanitation operations.

CN122195088APending Publication Date: 2026-06-12YUNSHAN ENVIRONMENTAL TECH (SHANDONG) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YUNSHAN ENVIRONMENTAL TECH (SHANDONG) CO LTD
Filing Date
2026-03-20
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In current sanitation operations, sanitation workers often work in complex environments, with stopping points located far from the core work area or in dangerous areas. This results in low efficiency, high labor intensity, and existing following equipment that suffers from power waste and low safety.

Method used

By constructing an electronic fence for sanitation workers' operations, dividing the work into three-dimensional work grids, acquiring environmental data and marking fixed obstacles, safe areas, and work heat sets, optimizing coordinates using Kalman filtering, filtering target parking positions, and planning following paths using the DWA algorithm, combined with dynamic obstacle avoidance speed adjustment and PID steering control, the vehicle can achieve precise, safe, and efficient following.

Benefits of technology

It enables precise parking of the vehicle in irregular work areas, reduces the distance sanitation workers have to travel to and from dumping garbage, lowers energy consumption, improves environmental compatibility and safety, and enhances work efficiency and intelligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122195088A_ABST
    Figure CN122195088A_ABST
Patent Text Reader

Abstract

This invention discloses an automatic following control method for sanitation vehicles. , This includes constructing an electronic fence for sanitation workers' operations, dividing the area of ​​the electronic fence into a three-dimensional work grid, obtaining the first work coordinates of the sanitation workers within the first work grid, and the first position coordinates of the vehicle within the first work grid; setting a time window to obtain the second work coordinates of the sanitation workers, generating the second position coordinates of the vehicle based on the second work coordinates, where the second work coordinates are the coordinates within the second work grid, and the second position coordinates are the target parking position of the vehicle within the second work grid determined based on the environmental data; planning a following path for the vehicle based on the second position coordinates, enabling the vehicle to travel along the following path to the second position coordinates, and achieving automatic following and safe and efficient parking of sanitation vehicles based on intelligent decision-making, solving the problems of low efficiency and high labor intensity caused by sanitation workers repeatedly going back and forth to dump garbage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of following robots, and in particular to an automatic following control method and system for sanitation vehicles. Background Technology

[0002] With the acceleration of urbanization, the efficiency of street cleaning and the labor intensity of sanitation workers are directly related to the quality of urban environmental maintenance. Currently, sanitation workers generally use manual sweeping and fixed garbage carts for street cleaning. This means that sanitation workers carry independent garbage collection carts and, after cleaning an area, must return to the cart to empty the garbage. This repetitive operation not only leads to low efficiency but also significantly increases the labor intensity of sanitation workers, becoming a technical problem restricting the intelligent upgrading of sanitation operations.

[0003] While existing automatic following technology has been applied in some scenarios, it has significant technical shortcomings: Firstly, the actual working areas of sanitation workers are irregularly shaped due to factors such as road orientation, greenery, and building distribution, resulting in numerous obstacles. Secondly, the stopping positions of existing following devices are not comprehensively judged based on the historical working habits of sanitation workers and real-time environmental data, which can easily lead to stopping points being far from the core working area or located in dangerous areas. In addition, some technologies use a full-process tail-following method, which not only wastes electricity but also easily interferes with pedestrians and traffic in densely populated street scenarios, and may even result in losing track of the target, further reducing operational safety and practicality.

[0004] Therefore, there is a need for an automatic following control method for sanitation vehicles that can adapt to irregular operating areas and achieve safe and efficient parking based on intelligent decision-making, in order to solve the problems of low efficiency and high labor intensity caused by sanitation workers repeatedly going back and forth to dump garbage. Summary of the Invention

[0005] This application provides an automatic following control method and system for sanitation vehicles, which solves the problem that in the prior art, the actual working environment of sanitation workers is complex, and the stopping point is often far away from the core working area or located in a dangerous area. Based on intelligent decision-making, the sanitation vehicle can automatically follow and stop safely and efficiently, solving the problems of low efficiency and high labor intensity caused by sanitation workers repeatedly going back and forth to dump garbage.

[0006] In a first aspect, the present invention provides an automatic following control method for sanitation vehicles, comprising: S1. Construct an electronic fence for sanitation workers' operations, divide the area where the electronic fence is located into a three-dimensional work grid, obtain environmental data within the three-dimensional work grid, the environmental data includes a set of fixed obstacles, a set of safe areas, and a set of work heat, and label the three-dimensional work grid according to the environmental data; S2. Obtain the first work coordinates of the sanitation worker within the first work grid, and the first position coordinates of the vehicle within the first work grid; S3. Set a time window, obtain the second work coordinates of the sanitation worker, and generate the second position coordinates of the vehicle based on the second work coordinates. The second work coordinates are the coordinates within the second work grid, and the second position coordinates are the target parking position of the vehicle within the second work grid determined based on the environmental data. S4. Plan the following path of the car according to the second position coordinates, and adjust the steering angle and driving speed of the car according to the following path so that the car travels along the following path to the second position coordinates.

[0007] Furthermore, the construction of the electronic fence for sanitation workers' operations includes: S11. Obtain the set of boundary coordinate points of the work area, and construct an irregular electronic fence based on the set of boundary coordinate points. The boundary of the electronic fence is formed by connecting adjacent boundary points in sequence to form a closed area. S12. Based on the preset horizontal grid side length, vertical grid side length, and altitude level interval, perform three-dimensional grid filling within the irregular electronic fence. The coordinate range of each three-dimensional working grid satisfies: , , ,in, This represents the minimum coordinate value of the electronic fence in the longitude direction. This represents the minimum coordinate value of the electronic fence in the latitudinal direction. Let i, j, and k be the minimum coordinates of the electronic fence in the elevation direction, where i, j, and k are non-negative integers. The horizontal grid side length The length of the vertical grid side. Altitude level intervals; S13. Remove grids that are completely outside the irregular electronic fence, and retain grids that intersect with the electronic fence and are completely inside the fence as valid three-dimensional work grids.

[0008] Furthermore, the step of annotating the three-dimensional work grid based on the environmental data includes: S14. Obstacle distances within each effective 3D work grid are detected using an ultrasonic rangefinder. Locations with detected distances less than a preset obstacle distance threshold are classified as fixed obstacles, and the expression for the fixed obstacle set is constructed as follows: ,in, The obstacle distance is detected in real time by the ultrasonic rangefinder. To preset the obstacle distance threshold, A three-dimensional task grid; S15. Using photoelectric tubes, select areas within each effective 3D work grid that are outside the fixed obstacle set and have a slope less than or equal to a preset gentle slope threshold to construct a safe area set, expressed as: ,in, This is the real-time slope value of the road surface detected by the photoelectric tube. To preset the threshold for gentle slope; S16. Integrate the areas with slopes greater than the preset dangerous slope threshold, the preset road core area, and the preset high-traffic sections within each effective 3D work grid into dangerous areas, and mark them within the corresponding 3D work grid. The expression for the dangerous area is: ,in, To preset a dangerous slope threshold, To pre-set the coordinate set of the core area of ​​the road, This is a preset coordinate set for densely trafficked sections.

[0009] Furthermore, the acquisition of the job popularity set includes: S17. Obtain historical operation data for each location within the safety zone set in each effective three-dimensional operation grid, wherein the historical operation data includes historical cumulative dwell time and historical waste density; S18. Construct a task popularity weight based on the historical task data. The expression for the task popularity weight is: ,in, The cumulative duration of stay in history, The historical cumulative dwell time at other safe locations within the same grid. λ represents the real-time garbage density within the current grid, k is the preset garbage density correction coefficient, λ is the preset time decay coefficient, and t is the time interval since the most recent operation. For safe zone collection; S19. The work heat weights of each safe location are used to form the work heat set, and the expression of the heat set is: And mark it in the corresponding 3D task grid.

[0010] Further, obtaining the first working coordinates of the sanitation worker within the first working grid, and the first position coordinates of the vehicle within the first working grid, includes: S21. Obtain the original position coordinates of the vehicle through the positioning plate, and obtain the original working coordinates of the sanitation workers through the positioning tags worn by the sanitation workers; S22. Optimize the original work coordinates and the original position coordinates using the Kalman filter algorithm; S23. The optimized sanitation worker coordinates are used as the first operation coordinates, the optimized vehicle coordinates are used as the first position coordinates, and the first operation coordinates and the first position coordinates are verified to be within the electronic fence by the electronic fence boundary coordinates.

[0011] Furthermore, the target parking location of the vehicle determined based on the environmental data includes: S31. Obtain the real-time coordinate sequence of sanitation workers within the time window, and obtain the final coordinates of the coordinate sequence as the second operation coordinates; S32. Determine the work grid to which the second work coordinates belong, and determine the effective three-dimensional work grid containing the second work coordinates as the second work grid by matching the grid coordinate range; S33. Verify that the safe area set of the second work grid is not empty and that the proportion of dangerous areas is less than the preset dangerous area proportion threshold; S34. If the verification is successful, a preliminary set of candidate target parking locations is selected based on the safe area set and the operation heat set of the second operation grid.

[0012] Furthermore, the preliminary screening of the candidate set of target parking locations based on the safety zone set and operation heat set of the second operation grid includes: S341. For each candidate location in the target docking location candidate set, a comprehensive fit score is constructed, wherein the comprehensive fit score expression is: ,in, , , These are the weighting coefficients. This represents the straight-line distance between the candidate position and the coordinates of the second operation. To preset the maximum adaptation distance, For distance attenuation factor, These are the road surface smoothness parameters for the candidate locations. To preset the maximum acceptable flatness threshold, The job popularity weight for candidate positions; S342. Calculate the overall fitness degree of each position in the candidate set, and determine the candidate position with the highest overall fitness degree as the second position coordinate; S343. Detect the distance to surrounding obstacles using an ultrasonic rangefinder. If the detected distance is greater than or equal to a preset safe distance threshold, the second position coordinates are valid; otherwise, candidate positions are filled sequentially according to the overall fit.

[0013] Furthermore, the preliminary screening of the candidate set of target parking locations based on the safety zone set and operation heat set of the second operation grid includes: S344. If the number of round trips between the first work grid and the second work grid by sanitation workers within the time window is not less than a preset number of times, then it is determined to be a boundary scene; S345. Retrieve the intersection area of ​​the first work grid and the second work grid, filter the safe area within the intersection area as the boundary safe area, and exclude the positions occupied by temporary obstacles to obtain the boundary candidate set; S346. Construct the boundary fitness, wherein the expression for the boundary fitness is: ,in, The job popularity weight of the candidate position in the first job grid. The job popularity weight of the candidate position in the second job grid. The distance from the candidate location to the center of the first job grid. Let k be the distance from the candidate location to the center of the second grid, and k be the distance balance correction factor. This refers to the number of trips made by sanitation workers between the first and second work grids. This is the round-trip frequency correction factor; S347. The candidate position with the highest boundary fit is determined as the second position coordinate.

[0014] Furthermore, adjusting the steering angle and speed of the vehicle according to the following path includes: S41. Based on the DWA algorithm, plan the optimal following path for the car. The path planning constraints are that the entire path is within the irregular electronic fence, the distance between the car and the obstacle is greater than the preset obstacle avoidance threshold, and the path length is the shortest. S42. Detect temporary obstacles on the following path. If a temporary obstacle exists, construct an obstacle avoidance linear velocity, the expression of which is: ,in, To avoid linear velocity, The initial planned linear velocity, The preset start distance for obstacle avoidance is... The actual distance between the car and the obstacle. To preset the emergency stopping distance, To allow for a pre-set parking distance, For obstacle risk coefficient, For barrier density, Set a preset obstacle density threshold; S43. The steering angle of the trolley is adjusted based on a PID control strategy. The angular velocity control expression is: ,in, The target direction angle, This is the actual direction angle. , , To preset the angular velocity PID parameters, This is the preset integral attenuation coefficient.

[0015] Secondly, an automatic following control system for sanitation vehicles includes: The work area construction module is configured to construct an electronic fence for sanitation workers' work, divide the area where the electronic fence is located into a three-dimensional work grid, obtain environmental data within the three-dimensional work grid, the environmental data including a set of fixed obstacles, a set of safe areas, and a set of work heat, and label the three-dimensional work grid according to the environmental data; The coordinate acquisition module is configured to acquire the first working coordinates of the sanitation worker within the first working grid, and the first position coordinates of the vehicle within the first working grid. The parking location decision module is configured as follows: S3. Set a time window, obtain the second work coordinates of the sanitation worker, and generate the second position coordinates of the vehicle based on the second work coordinates. The second work coordinates are coordinates within the second work grid, and the second position coordinates are the target parking location of the vehicle within the second work grid determined based on the environmental data. The follow control module is configured to plan the following path of the vehicle according to the second position coordinates, and adjust the steering angle and driving speed of the vehicle according to the following path, so that the vehicle travels along the following path to the second position coordinates.

[0016] Thirdly, the present invention provides a computer-readable storage medium storing a plurality of instructions adapted to be loaded and executed by a processor of a terminal device as described in the automatic following control method for sanitation vehicles.

[0017] Fourthly, the present invention provides a terminal device, including a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, the instructions being adapted to be loaded and executed by the processor to provide the aforementioned automatic following control method for sanitation vehicles.

[0018] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. This invention constructs an irregular electronic fence by acquiring a set of boundary coordinate points of the work area, and then performs a three-dimensional grid division with preset grid parameters and removes invalid external grids. This achieves the adaptation of the electronic fence to the irregular work area. At the same time, the three-dimensional grid division incorporates the elevation dimension and combines it with slope detection to achieve accurate adaptation of terrain features. This ensures that the grid division not only fits the actual shape of the work area, but also reflects the undulation characteristics of the road surface. This provides a regional basis for subsequent follow-up triggering and stopping decisions, and avoids misjudgment of the follow-up logic due to improper regional adaptation.

[0019] 2. This invention constructs fixed obstacle sets, safe zone sets, and hazardous zones using an ultrasonic rangefinder and phototubes, respectively, clearly defining the safe operation boundaries within the grid. Simultaneously, the operation heat set calculates weights by integrating historical cumulative dwell time, real-time garbage density, and time decay characteristics, achieving a precise characterization of sanitation workers' work habits. Based on this, in conventional scenarios, a comprehensive fit formula is used to integrate heat weights, distance decay factors, and road surface smoothness parameters; in boundary scenarios, a boundary fit formula is used to balance the operation needs and travel frequency of the two grids, ensuring that the target parking location is both within a safe zone and aligned with the core operation area and personnel travel habits. This avoids the problem of parking points being far from the work area or located in hazardous areas, reducing the distance sanitation workers travel to and from dumping garbage.

[0020] 3. This invention uses grid switching as the following trigger condition, and the vehicle only follows when sanitation workers move from the first work grid to the second work grid. It does not require following the vehicle for the entire time, which greatly reduces the power consumption caused by ineffective driving. At the same time, the following path planned based on the DWA algorithm is constrained within the electronic fence, and the driving speed is dynamically adjusted by combining the obstacle avoidance linear velocity formula with obstacle distance and density. This avoids frequent changes of direction and interference in dense crowds and complex obstacle scenarios, and improves the environmental compatibility and safety of the operation. Attached Figure Description

[0021] example: Figure 1 This is a flowchart of the method in Embodiment 1 of this application; Figure 2 This is a structural diagram of the vehicle according to Embodiment 1 of this application; Figure 3 This is a block diagram of Embodiment 2 of this application; Among them, 1. Ultrasonic rangefinder; 2. Phototube; 3. Positioning plate. Detailed Implementation

[0022] This application aims to address the core technical problems of existing automated guided vehicles (AGVs) used in sanitation operations, including poor regional adaptability, inaccurate stopping positions, susceptibility to positioning interference, insufficient stability in dynamic obstacle avoidance and steering control, and inability to adapt to the cross-grid work scenarios of sanitation workers, resulting in low operational efficiency, high energy consumption, and significant safety hazards. To solve these problems, the technical solution adopted in this application mainly includes: constructing an irregular electronic fence for sanitation workers' work and dividing it into a three-dimensional work grid adapted to the actual work units; pre-collecting and labeling fixed obstacle sets, safety area sets, and work heat sets within the grid using a remote-controlled vehicle; and obtaining the original coordinates of sanitation workers and the vehicle in real time and processing them via Kalman osmosis. Filtering optimization involves setting a time window to monitor the grid switching behavior of sanitation workers. Based on the different scenarios of regular or boundary scenarios, a suitability filter is constructed using a set of safe areas and a set of work heat to select the target parking position for the vehicle. Then, the optimal following path is planned through the DWA algorithm. Combined with dynamic obstacle avoidance linear speed adjustment and PID steering control, the vehicle can follow accurately, safely, and efficiently. Through the above technical solutions, the work area can be accurately adapted, the parking position can be aligned with the sanitation work habits, the positioning accuracy can be improved, and the dynamic obstacle avoidance and steering can be smooth. This effectively reduces the vehicle's energy consumption and work interference, significantly improves the intelligence level and work efficiency of sanitation operations, and ensures the safety and continuity of the work process.

[0023] The technical solution described in this application achieves several significant technical benefits: First, by using irregular electronic fences and adapting them to the actual work units through 3D mesh division, the poor adaptability of existing regular fences is solved, ensuring accurate definition of the work area and providing a reliable basis for subsequent follow-up decisions. Second, by optimizing coordinates through Kalman filtering, environmental interference is effectively filtered out, improving positioning accuracy and avoiding follow-up errors caused by coordinate deviations. Third, by using work heat sets and adaptability calculations to select parking locations, combined with boundary scene adaptation strategies, precise matching between parking points and work habits and scenarios is achieved, reducing the distance sanitation workers travel to and from dumping garbage. Fourth, through the synergistic effect of DWA path planning, dynamic obstacle avoidance speed adjustment, and PID steering control, the vehicle is ensured to travel smoothly along the optimal path, effectively avoiding fixed and temporary obstacles, preventing steering overshoot or deviation, and reducing energy consumption and collision risks. In summary, this solution enables precise, safe, and energy-efficient collaboration between sanitation vehicles and workers, improving the intelligence level and efficiency of sanitation operations.

[0024] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0025] Example 1 Reference Figure 1 An automatic following control method for sanitation vehicles according to this embodiment includes: S1. Construct an electronic fence for sanitation workers' operations, divide the area where the electronic fence is located into a three-dimensional work grid, obtain environmental data within the three-dimensional work grid, the environmental data includes a set of fixed obstacles, a set of safe areas, and a set of work heat, and label the three-dimensional work grid according to the environmental data; The process of constructing electronic fences for sanitation workers' operations, dividing three-dimensional work grids, and labeling environmental data needs to be completed through a pre-collection phase, referring to... Figure 2 Relying on a sanitation vehicle equipped with an ultrasonic rangefinder 1, a photoelectric tube 2, and a positioning plate 3, the system collects data by traversing the work area through remote control. This data is then used to form standardized grids and environmental attribute labels that are adapted to the actual work units, such as single streets, green belts, and independent areas, providing basic data support for subsequent automatic following.

[0026] Specifically, the construction of the electronic fence for sanitation operations is based on the work area defined in the sanitation work order. The accuracy of the three-dimensional work grid is matched with the actual size of the work unit, where the side length of the horizontal grid is... Vertical grid side length The value ranges from 5m to 20m, with altitude level intervals. The value range is 0.5m to 2m; for example, in the operation scenario of a single lane and sidewalks on both sides of an urban main road, The value is taken as 20m, along the length of the road. The value is 15m, covering the width of the driveway and sidewalk. The value is set to 0.5m to accommodate slight road surface undulations.

[0027] The pre-collection and annotation process for environmental data specifically includes: acquisition of a fixed obstacle set: the remote-controlled vehicle traverses the work area along a preset path, and the ultrasonic rangefinder on the vehicle scans the surrounding environment in real time, with preset obstacle distance thresholds. The value is 1.5m; when the ultrasonic rangefinder detects an object less than 1.5m away, the current coordinates of the vehicle are simultaneously collected by the positioning plate. Incorporate the object's coordinates into the fixed obstacle set. The obstacle types, such as trees, streetlights, landscape structures, and fixed facilities, are labeled through the vehicle's storage module to ensure that the location and type of fixed obstacles within each grid are clearly defined. For obtaining the safe zone set: during the remote-controlled vehicle's traversal, phototubes detect the current road surface slope in real time and preset a gentle slope threshold. The value is set to 10°. Based on obstacle data collected by the ultrasonic rangefinder, continuous areas that do not belong to the fixed obstacle set, have a slope less than 10°, are easily accessible to people, and do not obstruct pedestrian traffic are selected, such as the edges of sidewalks on both sides of streets and the outer buffer zone of green belts. Their coordinates are then included in the safe area set. Each grid should be marked with at least 1-2 safe zones to ensure the vehicle has stable parking alternatives; For obtaining the operation heatmap: during the pre-collection phase, the remote control driving trajectory and stopping points of the vehicle are recorded synchronously. Combined with historical operation data from the sanitation operation management system, the historical cumulative dwell time within the safe zone of each grid is extracted. This refers to the total working time of sanitation workers in the area, as well as the historical garbage density. This refers to the average amount of waste generated in that grid; in the subsequent automated operation phase, the vehicle uses an onboard infrared waste density sensor to collect the current waste density of the grid in real time. According to the formula Calculate the task heat weight, where the preset waste density correction coefficient k=0.8, the preset time decay coefficient λ=0.05 / d, and t is the time interval (in days) from the most recent pre-collection or task. Summarize the task heat weights for each safe location to form a task heat set. Together with the fixed obstacle set and the safe zone set, they are labeled in the form of metadata tags on the corresponding three-dimensional operation grid. The labeling format is "grid number-fixed obstacle coordinates and type-safe zone-operation heat weight distribution", and stored in the vehicle's local database and cloud server.

[0028] The construction of the electronic fence for sanitation workers' operations includes: S11. Obtain the set of boundary coordinate points of the work area, and construct an irregular electronic fence based on the set of boundary coordinate points. The boundary of the electronic fence is formed by connecting adjacent boundary points in sequence to form a closed area. The boundary coordinates of the work area are collected using a remote-controlled vehicle. The specific process is as follows: the operator uses a remote control to control the vehicle to slowly move along the physical boundary defined by the sanitation work order. The vehicle is equipped with a positioning plate, which uses both GPS and BeiDou dual-mode positioning, and collects boundary coordinates at preset intervals. This forms a set of boundary coordinate points: .

[0029] During the data collection process, for areas with clear physical boundaries, such as road guardrails, green belt edges, and walls, the vehicle continuously travels along the boundary lines to collect data. For areas without clear physical boundaries, such as open plazas, operators control the vehicle to travel along a virtual boundary trajectory according to the work order instructions. After data collection, the vehicle preprocesses the coordinate point set: by removing outliers that deviate from the trajectory, the preprocessed coordinate points are connected sequentially according to the travel order to form a closed, irregular electronic fence, ensuring that the fence boundary is completely consistent with the actual work area, with no self-intersections or omissions.

[0030] S12. Based on the preset horizontal grid side length, vertical grid side length, and altitude level interval, perform three-dimensional grid filling within the irregular electronic fence. The coordinate range of each three-dimensional working grid satisfies: , , ,in, This represents the minimum coordinate value of the electronic fence in the longitude direction. This represents the minimum coordinate value of the electronic fence in the latitudinal direction. Let i, j, and k be the minimum coordinates of the electronic fence in the elevation direction, where i, j, and k are non-negative integers. The horizontal grid side length The length of the vertical grid side. Altitude level intervals; The 3D mesh-filling splitting method is based on the set of boundary coordinate points of an irregular electronic fence. First, the minimum longitude value is extracted from all boundary coordinate points. minimum latitude Minimum altitude Using this as the starting point for splitting, then following the positive directions of longitude, latitude, and altitude, according to the preset... , , Generate 3D task mesh sequentially This ensures that each grid corresponds to a macroscopic work unit.

[0031] During the splitting process, priority is given to splitting along the natural boundaries of the actual work units, such as the centerline of a road or the edge of a green belt, in the horizontal plane (xy plane). This ensures that each horizontal plane grid completely covers an independent work unit, such as a single street segment or a green belt, avoiding logical confusion caused by grids spanning multiple work units. Then, the grid is split along the elevation direction (z-axis) according to... The interval layering ensures that the elevation differences within the same work unit are included in the same grid or adjacent elevation level grids, thus ensuring that the division of elevation dimensions does not affect the integrity of the work unit.

[0032] After the grid is divided, the remote-controlled car traverses each grid sequentially according to the grid number, and associates and stores the collected fixed obstacle set and safe area set with the corresponding grid number to ensure that the environmental data corresponds one-to-one with the grid.

[0033] S13. Remove grids that are completely outside the irregular electronic fence, and retain grids that intersect with the electronic fence and are completely inside the fence as valid three-dimensional work grids.

[0034] The validity of the 3D work grid is determined using the ray casting method and work cell adaptability verification. The specific process is as follows: calculate the geometric center coordinates of each 3D work grid. ,in , Starting from the center coordinates, a horizontal ray is emitted in the positive longitude direction. The number of intersections between the ray and the irregular electronic fence boundary line is counted: if the number of intersections is odd, the grid center is determined to be inside the fence; if the number is even, the grid center is determined to be outside the fence. For grids centered inside the fence, further verify whether they completely or mostly cover an actual work unit: if the overlap area between the grid and an actual work unit is more than 80% of the total area of ​​the grid, it is determined to be a valid grid; if the overlap area is less than 80%, adjust the i, j index or boundary coordinates of the grid to make the grid fit the actual work unit. For a grid whose center is located outside the fence, if it has no area intersecting with the electronic fence, it is directly eliminated. If there is a partial area intersecting with the electronic fence, that is, crossing the fence boundary, the grid is split into two sub-grids, and the i and j numbers are reassigned so that the split sub-grids are either completely inside the fence or completely outside the fence and are eliminated.

[0035] The step of annotating the three-dimensional work grid based on the environmental data includes: S14. Obstacle distances within each effective 3D work grid are detected using an ultrasonic rangefinder. Locations with detected distances less than a preset obstacle distance threshold are classified as fixed obstacles, and the expression for the fixed obstacle set is constructed as follows: ,in, The obstacle distance is detected in real time by the ultrasonic rangefinder. To preset the obstacle distance threshold, A three-dimensional task grid; The construction of the fixed obstacle set is based on the data collection of the remote control vehicle in the pre-collection stage. The core purpose is to accurately identify immovable obstacles in each effective three-dimensional work grid, so as to provide obstacle avoidance basis for subsequent safe area selection and parking position decision.

[0036] The remote operator controls the vehicle to travel at a constant speed along a preset traversal path, such as an S-shaped path within a grid, with the speed set to 0.8 m / s to 1.2 m / s. Simultaneously, the ultrasonic rangefinder on the vehicle starts operating, with its detection frequency set to 8 Hz to 12 Hz, a detection distance range of 0.3 m to 15 m, and a detection angle covering 180°, facing the front and sides of the vehicle to ensure no blind spots. A preset obstacle distance threshold is also set. The value range is 1.0m to 2.0m, depending on the specific work scenario: In street work scenarios, The value is set to 1.5m to avoid common fixed obstacles such as trees and streetlights; in green belt operation scenarios, The value is set to 1.0m to avoid small fixed obstacles such as landscape sculptures and irrigation facilities.

[0037] When an ultrasonic rangefinder detects the distance to an obstacle at a certain location At the same time, the positioning plate mounted on the vehicle synchronously collects the three-dimensional coordinates of the current detection point. And incorporate the coordinates into the corresponding effective 3D work grid. Fixed obstacle set Simultaneously, the vehicle's built-in image recognition module identifies the type of fixed obstacles, such as trees, streetlights, structures, and fixed seats, and stores the obstacle type labels along with coordinate information. After data collection, a set of fixed obstacles is generated for each effective 3D work grid. The list of obstacles is stored in the vehicle's local database in the form of coordinate-type key-value pairs, forming a structured list that facilitates quick retrieval and exclusion during subsequent safe area screening.

[0038] S15. Using photoelectric tubes, select areas within each effective 3D work grid that are outside the fixed obstacle set and have a slope less than or equal to a preset gentle slope threshold to construct a safe area set, expressed as: ,in, This is the real-time slope value of the road surface detected by the photoelectric tube. To preset the threshold for gentle slope; The construction of the safe zone set is based on the fixed obstacle set and combined with the road slope detection results. The core purpose is to screen out the safe zones suitable for car parking within each effective three-dimensional operation grid, so as to ensure that there is no risk of collision after the car is parked, and that it is convenient for sanitation workers to approach and dump garbage.

[0039] While collecting data on fixed obstacles, the remote-controlled car simultaneously performs road slope detection using its onboard phototubes. The sampling interval of the phototubes is set to 0.5m~1.0m, and a preset gentle slope threshold is set along the driving path. The value range is 8°~12°, with 10° being the preferred default value. This threshold has been verified through a large number of sanitation operation scenarios, which can adapt to slightly undulating road surfaces and avoid the risk of cars rolling away due to excessive slope after parking.

[0040] The selection of safe zones follows a triple constraint principle: the first constraint is that the coordinates do not belong to a fixed set of obstacles. The first constraint is to avoid identified fixed obstacles; the second constraint is the slope. The first constraint is to ensure a smooth road surface; the second constraint is the practicality of the area, which means that the selected area must meet the requirements of being easy for people to approach the core area of ​​the work unit within ≤5m, not affecting pedestrian passage and far away from the main passage of the sidewalk, such as the edge of the sidewalk in the street work grid, the range of 0.8m~1.2m from the curb, and the outer buffer zone in the green belt work grid.

[0041] Each valid 3D work grid should have at least 1-2 safe zones selected. Each safe zone should have an area of ​​no less than 2m × 1.5m, suitable for the parking size of the vehicle, and must ensure zone continuity. After selection, the safe zone set will be... The coordinates are stored in the form of three-dimensional polygons, with the vertex coordinates arranged in clockwise order. For example, the coordinate set of a certain safe area is: By connecting the vertices to form a closed region, the boundary range of safe parking is clearly defined.

[0042] S16. Integrate the areas with slopes greater than the preset dangerous slope threshold, the preset road core area, and the preset high-traffic sections within each effective 3D work grid into dangerous areas, and mark them within the corresponding 3D work grid. The expression for the dangerous area is: ,in, To preset a dangerous slope threshold, To pre-set the coordinate set of the core area of ​​the road, This is a preset coordinate set for densely trafficked sections.

[0043] The core purpose of marking dangerous areas is to further define the no-parking zones within each effective three-dimensional work grid, preventing vehicles from entering high-risk areas.

[0044] The danger zone consists of three parts, and the methods for defining and collecting data for each part are as follows: Slope-related hazardous areas: Based on road slope data detected by photoelectric tubes, preset hazardous slope thresholds are established. The value range is 15°~20°, with 15° as the default; when the slope of a certain area is detected... When the slope is steep, the area is considered a dangerous area. Its coordinate set is generated by associating slope detection data with positioning coordinates. Because of the steep slope, cars are prone to rolling away after parking in such areas, so parking is prohibited.

[0045] Preset road core area The coordinate set of the core area of ​​the road is imported into the vehicle system through pre-storage. Specifically, it is the middle area of ​​each lane of the road in the operation area. For example, the core area of ​​a two-way four-lane road is a range of 2m on both sides of the center line of the lane. The coordinate set is generated based on the boundary coordinates of the electronic fence and the road planning data to ensure accurate coverage of the high traffic flow area in the middle of the road and avoid traffic interference or collision when the vehicle stops.

[0046] Preset traffic congestion section The coordinate set of dense traffic sections is determined in two ways. First, the coordinates of peak traffic sections in the operation area are pre-stored, such as specific sections of roads around schools or commercial areas. Second, the coordinates of road sections with a traffic density of ≥3 vehicles / 10m are dynamically obtained through the real-time data interface of the urban traffic management system. The marking priority of dense traffic sections is higher than that of slope-type dangerous areas. Even if the slope of the area is gentle, it is still judged as a dangerous area.

[0047] Hazardous areas are labeled using a layered labeling method, with slope-type hazardous areas, road core areas, and high-traffic sections labeled with different hazard levels. High-traffic sections are classified as Level 1 hazard, road core areas as Level 2 hazard, and slope-type hazardous areas as Level 3 hazard, and are linked to the corresponding effective 3D work grid. Associative storage. After labeling, when the car makes subsequent parking decisions, it will prioritize avoiding high-risk areas to ensure safe parking. At the same time, the coordinates of the dangerous areas will be compared and verified with the coordinates of the safe areas to ensure that they do not overlap.

[0048] The acquisition of the job popularity set includes: S17. Obtain historical operation data for each location within the safety zone set in each effective three-dimensional operation grid, wherein the historical operation data includes historical cumulative dwell time and historical waste density; The purpose of acquiring historical operation data is to explore the working habits and garbage distribution patterns of sanitation workers within the safe areas of each effective three-dimensional operation grid, provide basic data support for the calculation of operation heat weight, and ensure that subsequent parking location decisions are in line with actual operation needs.

[0049] Obtaining historical cumulative stay duration: Historical cumulative stay duration The data is derived from the fusion of two parts: first, the trajectory recording data of the remote-controlled vehicle during the pre-collection phase, where the positioning plate on the vehicle collects the coordinates of the driving trajectory at 0.2-second intervals, and the dwell time at each safe location is calculated and accumulated by analyzing the trajectory dwell points; second, the historical operation records stored in the sanitation operation management system, from which the operation dwell data of the corresponding grid safe area within the past 3 months is extracted, and after being merged with the pre-collected data, it is calculated according to the formula. Calculation, where This refers to the cumulative dwell time during the pre-collection phase. This represents the cumulative historical dwell time of the system.

[0050] Historical waste density is obtained by extracting historical waste collection records for the corresponding grid safety area through the sanitation operation management system and calculating the total weight of waste over the past three months. Combined with the actual area of ​​the safe zone According to the formula calculate, The statistical period is the time period.

[0051] Real-time garbage density acquisition: Real-time garbage density within the current grid. The data is collected by an infrared garbage density sensor mounted on the vehicle. During the data collection, the vehicle stays in the center of the grid area to ensure that the detection covers the entire safe area.

[0052] S18. Construct a task popularity weight based on the historical task data. The expression for the task popularity weight is: ,in, The cumulative duration of stay in history, The historical cumulative dwell time at other safe locations within the same grid. λ represents the real-time garbage density within the current grid, k is the preset garbage density correction coefficient, λ is the preset time decay coefficient, and t is the time interval since the most recent operation. For safe zone collection; The purpose of constructing the operation heat weight is to quantify the adaptability of each safe location to sanitation operations. By integrating historical operation habits, time decay characteristics and real-time garbage distribution, a priority-distinguished parking location evaluation index is formed to provide a quantitative basis for the selection of the optimal parking point.

[0053] Preset garbage density correction coefficient k: The value range is 0.6~1.0, and the default value is 0.8. This coefficient is used to strengthen the influence of real-time garbage density on the weight. The higher the garbage density, the greater the weight ratio, ensuring that the vehicle prioritizes parking in the current garbage concentration area and reduces the distance for personnel to dump garbage. The preset time decay coefficient λ ranges from 0.03 / d to 0.07 / d, with a default value of 0.05 / d. This is used to weaken the weight of historical data from a long period of time and avoid weight distortion caused by changes in work habits.

[0054] Time interval t: Calculated in calendar days, the value is the difference between the current operation time and the most recent operation time, in days. If it is the first operation, then t=0. Time decay term. =1, the weight is calculated based solely on real-time waste density and pre-collection dwell time.

[0055] The specific implementation process for weight calculation is as follows: After the vehicle enters the target grid, it first retrieves the safe area set of that grid from the local database. In each position , Data is collected via infrared sensors. Substitute into the above formula to calculate the safety position. The weight value ranges from [0,1]. The larger the value, the more suitable the location is as a docking point. It is ranked higher among all safe locations and given priority as a docking candidate.

[0056] S19. The work heat weights of each safe location are used to form the work heat set, and the expression of the heat set is: And mark it in the corresponding 3D task grid.

[0057] The purpose of constructing and labeling the task heat set is to structure and visualize the dispersed weight data, and to associate it with the fixed obstacle set, safe area set, and dangerous area set of the grid. The specific implementation process is as follows: Structured storage of job popularity sets: Job popularity sets The system is constructed using coordinate-weighted key-value pairs, where each element corresponds to the 3D coordinates of a specific location within the safe area and its corresponding coordinates. The values ​​are stored in descending order of weight value to facilitate quick filtering of high-priority docking locations. At the same time, they are associated with auxiliary information such as obstacle avoidance markers and slope parameters of each location to form a complete docking evaluation dataset.

[0058] The grid annotation process is implemented through the vehicle's built-in grid metadata management module, which sets the activity heatmap. Corresponding effective 3D work grid The numbering and binding are standardized, and the labeling format is grid number-safe location coordinates-operation heat weight-auxiliary parameters. The auxiliary parameters include the calculation basis such as historical garbage density, real-time garbage density, and time decay coefficient. The labeled data is stored in the vehicle's local database and also synchronized to the cloud server through the wireless communication module to achieve data backup and sharing among multiple devices.

[0059] The labeling of the task heatmap is not completed all at once. After each task is completed, the robot will automatically update the labels of each location within the safe area of ​​that grid. Data, combined with newly collected Data, recalculated and It also overwrites the original labeled data, enabling dynamic iterative optimization of the operation heat set and ensuring that the weight calculation always aligns with the latest operating habits of sanitation workers and the distribution patterns of garbage.

[0060] S2. Obtain the first work coordinates of the sanitation worker within the first work grid, and the first position coordinates of the vehicle within the first work grid; The step of obtaining the first work coordinates of the sanitation worker within the first work grid, and the first position coordinates of the vehicle within the first work grid, includes: S21. Obtain the original position coordinates of the vehicle through the positioning plate, and obtain the original working coordinates of the sanitation workers through the positioning tags worn by the sanitation workers; The acquisition of raw coordinates is crucial for ensuring data synchronization, real-time performance, and basic accuracy. This provides high-quality raw data for subsequent filtering and optimization, preventing optimization failures caused by asynchronous or insufficient data acquisition.

[0061] S22. The original working coordinates and the original position coordinates are optimized using the Kalman filter algorithm. The purpose of the Kalman filter algorithm is to filter out environmental interference noise in the original coordinates, such as tree obstruction and positioning jitter caused by electromagnetic interference, thereby improving the stability and accuracy of the coordinate data and providing a reliable location basis for grid assignment determination and path planning. The filtering iteration formula in the Kalman filter algorithm includes: Prediction equation: Kalman gain calculation: State correction equation: Covariance matrix update equation: ,in, The optimal estimated coordinates at time t. The optimal estimated coordinates at time t−1 For external control input, The original collected coordinate data, For Kalman gain, Let A be the state covariance matrix, B be the state transition matrix, H be the control input matrix, I be the observation matrix, and R be the preset observation noise variance. S23. The optimized sanitation worker coordinates are used as the first operation coordinates, the optimized vehicle coordinates are used as the first position coordinates, and the first operation coordinates and the first position coordinates are verified to be within the electronic fence by the electronic fence boundary coordinates. The ray casting method is used to verify the electronic fence boundary of the optimized sanitation worker coordinates and vehicle coordinates. The verification process is the same as the ray casting method for valid grid determination in S13. If the candidate first operation coordinates or candidate first position coordinates are determined to be outside the electronic fence, the vehicle immediately sends a reminder to the sanitation worker terminal that the coordinates are outside the operation range. At the same time, the subsequent follow-up process is suspended until the personnel or vehicle move into the electronic fence, and the coordinates are re-collected, optimized and verified again.

[0062] After successful verification, the optimized coordinates of sanitation workers will be officially designated as the primary operational coordinates. The optimized car coordinates were officially determined as the first position coordinates. At the same time, by matching the grid coordinate range, it was confirmed and All belong to the same valid three-dimensional work grid, namely the first work grid, and the first work coordinates, the first position coordinates and the first work grid number are bound and stored to provide an initial grid reference for grid switching determination in S3.

[0063] S3. Set a time window, obtain the second work coordinates of the sanitation worker, and generate the second position coordinates of the vehicle based on the second work coordinates. The second work coordinates are the coordinates within the second work grid, and the second position coordinates are the target parking position of the vehicle within the second work grid determined based on the environmental data. By monitoring changes in the work positions of sanitation workers through time windows, grid switching events are determined. Then, based on the environmental data of the second work grid, the target parking position of the vehicle is intelligently decided, realizing the collaborative logic of personnel switching grids and the vehicle accurately following and parking. This avoids energy waste and environmental interference caused by following the entire process and ensures that the parking position meets the work requirements.

[0064] In a specific implementation scenario, after sanitation workers complete cleaning a portion of the area in the first work grid, they move to the adjacent second work grid to continue their work. The vehicle captures this grid switching behavior through coordinate monitoring within a time window. After validity verification, it selects the optimal stopping point from the safe area of ​​the second work grid to provide nearby support for personnel to subsequently dispose of garbage.

[0065] The target parking location of the vehicle determined based on the environmental data includes: S31. Obtain the real-time coordinate sequence of sanitation workers within the time window, and obtain the final coordinates of the coordinate sequence as the second operation coordinates; The setting of the time window and the collection of real-time coordinate sequences are intended to capture the grid switching intentions of sanitation workers, avoid misjudging grid switching due to slight personnel movement or positioning jitter, and ensure that the second work coordinates can truly reflect the personnel's target work grid.

[0066] The duration of the time window ranges from 1 second to 3 seconds. Within the time window, the positioning tags worn by sanitation workers continuously collect real-time coordinates, forming a real-time coordinate sequence. ,in When the window starts, The window ends at time n, which is the number of sampling points, expected to be 20-40. During the data collection process, the positioning tag and the vehicle positioning plate are synchronized to ensure the consistency of the timestamps in the coordinate sequence.

[0067] S32. Determine the work grid to which the second work coordinates belong, and determine the effective three-dimensional work grid containing the second work coordinates as the second work grid by matching the grid coordinate range; The purpose of determining the second work grid is to clarify the target work units for sanitation workers and establish the correlation between the second work coordinates and the grid. The vehicle retrieves the coordinate range of all valid three-dimensional work grids from the local database and sets the second work coordinates accordingly. Compare the coordinates with the coordinate range of each grid one by one, if If the x-coordinate belongs to the x-axis interval of a certain grid, the y-coordinate belongs to the y-axis interval of that grid, and the z-coordinate belongs to the z-axis interval of that grid, then that grid is determined to be a valid 3D working grid containing the second working coordinates, i.e., the second working grid. .

[0068] S33. Verify that the safe area set of the second work grid is not empty and that the proportion of dangerous areas is less than the preset dangerous area proportion threshold; The vehicle retrieves the safety area set of the second work grid. If the set contains at least one complete safe area, the safe area set is determined to be non-empty. If the safe area set is empty or only contains scattered and incomplete areas, the verification is determined to fail, and the vehicle remains parked in the first working grid until the personnel move to other valid grids.

[0069] Percentage of dangerous areas According to the formula Calculation, where The total area of ​​the hazardous zone within the second work grid. This represents the total area of ​​the second work grid. A preset threshold for the percentage of hazardous areas is also included. The value range is 20%~30%, if If the proportion of dangerous areas meets the requirements, then it is determined that the proportion of dangerous areas meets the requirements. If the verification fails, the vehicle will be retried after the personnel move to a grid with a acceptable danger percentage.

[0070] S34. If the verification is successful, a preliminary set of candidate target parking locations is selected based on the safe area set and the operation heat set of the second operation grid.

[0071] The preliminary screening of candidate target parking locations based on the safety zone set and operation heat set of the second operation grid includes: S341. For each candidate location in the target docking location candidate set, a comprehensive fit score is constructed, wherein the comprehensive fit score expression is: ,in, , , These are the weighting coefficients. This represents the straight-line distance between the candidate position and the coordinates of the second operation. To preset the maximum adaptation distance, For distance attenuation factor, These are the road surface smoothness parameters for the candidate locations. To preset the maximum acceptable flatness threshold, The job popularity weight for candidate positions; To prioritize candidate locations and ensure that the selected stops are both compatible with staff work habits and offer safety and convenience, the first step is to revise the overall suitability criteria. Its value is determined based on the characteristics of sanitation operation scenarios: The range of values ​​is Prioritize ensuring compliance with historical work practices; The range of values ​​is It takes into account both proximity and convenience; The range of values ​​is This supplements and ensures the stability of vehicles parked on the road.

[0072] Distance-related parameters: Candidate positions With the second operation coordinates The three-dimensional straight-line distance (unit: m) is calculated using the formula. Calculation, where The center coordinates of the candidate positions; preset maximum adaptation distance. Value (default Distance decay factor The range of values ​​is The closer the distance, the larger the value, thus quantifying the distance adaptability.

[0073] Road surface smoothness parameters: Candidate positions The road surface smoothness parameters (unit: m) are obtained from the photoelectric tube detection data during the pre-collection stage of the trolley, which characterize the degree of road surface undulation. To preset the maximum acceptable flatness threshold, the value is set to... ,when hour, Ensure that the road surface is flat enough to meet parking requirements.

[0074] S342. Calculate the overall fitness degree of each position in the candidate set, and determine the candidate position with the highest overall fitness degree as the second position coordinate; Candidate positions are sorted from highest to lowest based on overall fit. The first candidate position is then used as the coordinate of the second position. If there are two or more candidate positions with a comprehensive fit difference of ≤0.01, they are considered to have the same fit. In this case, the candidate position that is closer to the second working coordinate is selected first. If the distance is also the same, the candidate position with a smaller road surface smoothness parameter is selected to ensure the uniqueness and optimality of the second position coordinate.

[0075] S343. Detect the distance to surrounding obstacles using an ultrasonic rangefinder. If the detected distance is greater than or equal to a preset safe distance threshold, the second position coordinates are valid; otherwise, candidate positions are filled sequentially according to the overall fit.

[0076] Before the vehicle moves to the second coordinate, it uses its onboard ultrasonic rangefinder to... The surrounding area is being scanned in real time, with a scanning range of [missing information]. A circular area with a radius of 1.5m is centered, the scanning frequency is 10Hz, and the detection distance range is 0.3m to 5m. A preset safe distance threshold is set. The value is between 1.0m and 1.5m. If the scan results show all surrounding obstacles and The distances are all greater than or equal to If so, the second position coordinates are determined to be valid.

[0077] If detected There are obstacles nearby that are less than If the optimal stopping point is temporarily occupied, the next candidate position is selected as the new second position coordinates according to the overall suitability. Real-time obstacle detection is re-executed. If three consecutive candidate positions are occupied, an emergency replacement strategy is triggered. The position farthest from the temporary obstacle among the remaining positions in the candidate set is selected as the second position coordinates to ensure stopping feasibility. After the second position coordinates are valid, the vehicle associates and stores them with the second work grid number and the second work coordinates as the target endpoint for subsequent path planning.

[0078] The preliminary screening of candidate target parking locations based on the safety zone set and operation heat set of the second operation grid includes: S344. If the number of round trips between the first work grid and the second work grid by sanitation workers within the time window is not less than a preset number of times, then it is determined to be a boundary scene; The purpose of determining the boundary scene is to identify special situations where sanitation workers repeatedly work between adjacent work units, so as to avoid the frequent switching of vehicles to single parking points due to frequent movement of personnel across the network, which would cause energy waste and work interference, and ensure that the parking position can not only meet the work needs of the two grids, but also reduce unnecessary movement.

[0079] Number of round trips Calculated based on the real-time coordinate sequence of sanitation workers within a time window, with grid switching as the statistical unit, when the coordinates at a certain moment in the coordinate sequence change from the first work grid... Switch to the second job grid One forward switch is recorded as one forward switch. If the subsequent coordinates switch from the second work grid back to the first work grid, it is recorded as one reverse switch. One forward switch plus one reverse switch constitutes one round trip.

[0080] Preset number of times The value range is 1 to 2 times, with a default value of 1 time. This threshold has been verified through operational scenarios, specifically when personnel travel back and forth between two grids. This indicates that the operation is being conducted in the boundary area for an extended period, requiring an adaptation to boundary-based parking strategies. The number of round trips... If so, the docking decision will be executed according to the normal scenario.

[0081] S345. Retrieve the intersection area of ​​the first work grid and the second work grid, filter the safe area within the intersection area as the boundary safe area, and exclude the positions occupied by temporary obstacles to obtain the boundary candidate set; The purpose of screening the boundary safety zone and constructing the boundary candidate set is to extract suitable safe parking locations from the intersection area of ​​the two grids, ensuring that the parking points can take into account both the convenience of operation in the two grids and meet the basic conditions for safe parking, and provide high-quality candidate objects for boundary adaptability calculation.

[0082] The intersection area of ​​the first task network and the second task network It is determined by the overlapping portion of the coordinate ranges of the two grids. of The axis interval is two grids The intersection of the axis intervals The axis interval is two grids The intersection of the axis intervals The axis interval is two grids The intersection of the axis intervals, i.e. This ensures that the overlapping area belongs to both work networks simultaneously, adapting to the needs of boundary operations.

[0083] From the intersection area The selection criteria for safe areas are as follows: first, they must be common safe areas of the first and second work networks; second, their area must meet the parking size requirements for vehicles; and third, the minimum distance from the fixed obstacle sets of the two grids must be ≥0.5m, and the minimum distance from the dangerous areas must be ≥1m, to ensure parking safety.

[0084] The vehicle uses an ultrasonic rangefinder to scan the selected safe boundary areas in real time, eliminating areas occupied by temporary obstacles; the remaining valid areas are then combined into a candidate boundary set. If the number of candidate sets is ≥2, and if it is less than 2, the selection criteria for the intersection region should be relaxed, for example, by expanding the range of candidate sets. The tolerance of the axis interval ensures that there is room for replacement.

[0085] S346. Construct the boundary fitness, wherein the expression for the boundary fitness is: ,in, The job popularity weight of the candidate position in the first job grid. The job popularity weight of the candidate position in the second job grid. The distance from the candidate location to the center of the first job grid. Let k be the distance from the candidate location to the center of the second grid, and k be the distance balance correction factor. This refers to the number of trips made by sanitation workers between the first and second work grids. This is the round-trip frequency correction factor; The purpose of constructing the cross-fitness is to quantify the comprehensive adaptability of the boundary candidate location to the two grid operations. By balancing the operation heat weight and distance distribution of the two grids, it ensures that the stopping point can not only fit the working habits of personnel in the two grids, but also minimize the tilting distance of personnel traveling back and forth between the two grids.

[0086] and The job heat weights for the second job grid are all derived from the job heat sets pre-collected and dynamically updated from both grids, and their values ​​range from [value range missing]. Each of the two gives The fixed weights ensure that the operational needs of both grids are given equal attention, avoiding favoritism towards a single grid. , The coordinates of the grid center are the distance balance correction factor. The range of values ​​is This is used to weaken the weight of candidate positions with excessively large distance differences, ensuring that the distance from the docking point to the center of the two grids is balanced.

[0087] Round trip frequency correction factor The range of values ​​is , This represents the maximum number of round trips within the time window, typically less than 3. The more round trips, the better. The larger the grid, the stronger the penalty for distance differences, ensuring more frequent round trips and that the stopping point is closer to the midpoint of the line connecting the centers of the two grids.

[0088] S347. The candidate position with the highest boundary fit is determined as the second position coordinate.

[0089] The purpose of determining the second location coordinates is to select the docking point with the best overall adaptability from the boundary candidate set, so as to ensure that the point can balance the convenience and learning adaptability of the two grid operations, and also ensure the safety of real-time parking, and avoid docking failure due to the complex environment of the boundary area.

[0090] The car calculates the boundary candidate set one by one according to the above formula. Boundary fit at each position The calculation precision is rounded to three decimal places. The results are sorted from largest to smallest fit, and the first candidate position is selected as the second candidate position coordinate. .

[0091] If there are two or more candidates, the boundary fit difference is... If the fit is considered the same, then the road smoothness parameter should be selected first. For smaller locations, if the flatness is the same, choose a location that is farther away from the two fixed obstacle sets in the grid to ensure the safety and stability of the docking point.

[0092] For candidate objects Real-time obstacle detection is performed by scanning a 1.5m radius around the obstacle using an ultrasonic rangefinder. If all obstacles are more than a preset safe distance threshold, the obstacle will be detected. Then it is officially determined as the second position coordinate. If a temporary obstacle is detected, the next candidate position is filled by sorting the fit, and the process is repeated until a valid stopping point is determined. After the coordinates of the second position are determined, the vehicle associates and stores them with the first work grid, the second work grid number, and the number of round trips.

[0093] S4. Plan the following path of the car according to the second position coordinates, and adjust the steering angle and driving speed of the car according to the following path so that the car travels along the following path to the second position coordinates.

[0094] To ensure the safe and efficient following of the vehicle from the first position coordinate to the second position coordinate, the path planning algorithm and dynamic control strategy work together to ensure that the vehicle travels smoothly along the optimal path, avoiding various obstacles and meeting the dynamic needs of sanitation operations.

[0095] The step of adjusting the steering angle and speed of the vehicle according to the following path includes: S41. Based on the DWA algorithm, plan the optimal following path for the car. The path planning constraints are that the entire path is within the irregular electronic fence, the distance between the car and the obstacle is greater than the preset obstacle avoidance threshold, and the path length is the shortest. The purpose of the DWA (Dynamic Window Approach) is to plan the shortest and most efficient following path while meeting safety constraints, adapting to the complex obstacle distribution and irregular operation range in circular work scenarios, and avoiding path redundancy or collision risks.

[0096] The linear velocity window of the vehicle ranges from 0.2 m / s to 1.5 m / s, and the angular velocity window ranges from -1.5 rad / s to 1.5 rad / s, dynamically adjusted according to the work scenario. A low-speed window is used in densely populated areas, while a high-speed window is used in open areas. The prediction time ranges from 0.5 s to 1 s, used to predict the future trajectory of the vehicle under different combinations of speed and angular velocity. A three-dimensional evaluation function is constructed for path length, obstacle avoidance safety, and trajectory smoothness, with weights of 0.4, 0.4, and 0.2, respectively, to ensure that the path is short, safe, and the driving is stable.

[0097] During path planning, the coordinates of each sampling point on the trajectory are checked in real time to ensure that all sampling points are within the irregular electronic fence. If a sampling point exceeds the fence range, the trajectory is immediately removed and re-sampling and planning are performed. An obstacle avoidance threshold is preset. The value range is 1.0m to 1.5m. When planning the path, ensure that all points on the trajectory are parallel to fixed obstacles. minimum distance Meanwhile, a safety redundancy of 0.3m is reserved; under the premise of satisfying the above two constraints, the path with the shortest trajectory length is selected as the optimal following path to shorten the following time and reduce energy consumption.

[0098] The vehicle first retrieves fixed obstacle set and danger zone data from the second work grid. Combining this with the first and second position coordinates, it samples the velocity and angular velocity windows using the DWA algorithm to generate multiple candidate trajectories. Each candidate trajectory undergoes constraint verification and evaluation function scoring. The trajectory with the highest score that satisfies all constraints is selected as the optimal following path. The path sampling interval is 0.1m to ensure a smooth and continuous trajectory. For example, in a street work scenario, the optimal path can be planned along the edge of the sidewalk, avoiding fixed obstacles such as trees and streetlights, while simultaneously shortening the distance to the second position coordinates to ensure efficient following.

[0099] S42. Detect temporary obstacles on the following path. If a temporary obstacle exists, construct an obstacle avoidance linear velocity, the expression of which is: ,in, To avoid linear velocity, The initial planned linear velocity, The preset start distance for obstacle avoidance is... The actual distance between the car and the obstacle. To preset the emergency stopping distance, To allow for a pre-set parking distance, For obstacle risk coefficient, For barrier density, Set a preset obstacle density threshold; The purpose of constructing the obstacle avoidance linear speed is to cope with temporary obstacles on the following path. By dynamically adjusting the travel speed, it achieves early deceleration and safe obstacle avoidance, preventing collisions caused by temporary obstacles, while ensuring following efficiency and avoiding excessive deceleration that could disrupt the work rhythm. Initial planned linear speed Based on the length of the optimal following path and road conditions, the value range is: The upper limit is used when the path is flat and unobstructed, and the lower limit is used when the path is complex and has many obstacles; the preset start obstacle avoidance distance is used. The range of values ​​is When the actual distance between the car and the temporary obstacle At that time, the obstacle avoidance speed adjustment is activated, and the preset emergency stopping distance is set. The range of values ​​is Preset parking distance The range of values ​​is The sum of these two values ​​represents the minimum safe stopping distance for the car, ensuring safe stopping in emergency situations; the actual distance... The ultrasonic rangefinder mounted on the vehicle detects and provides real-time feedback on the changes in distance between the vehicle and temporary obstacles.

[0100] Barrier density According to the formula Calculation, where This represents the number of temporary obstacles detected by the ultrasonic rangefinder. The detection area is a circular region with a radius of 4m centered on the vehicle, and the unit is units / m. Preset obstruction density threshold The value range is 0.05 pieces / m pcs / m The greater the obstacle density The smaller the value, the stronger the attenuation effect on speed.

[0101] S43. The steering angle of the trolley is adjusted based on a PID control strategy. The angular velocity control expression is: ,in, The target direction angle, This is the actual direction angle. , , To preset the angular velocity PID parameters, This is the preset integral attenuation coefficient.

[0102] The PID control strategy is used to adjust the steering angle of the trolley to ensure accurate tracking of the optimal following path, reduce steering deviation, achieve smooth driving, and avoid problems such as trajectory deviation and collisions with obstacles caused by oversteering or understeering. This adapts to the continuously changing path requirements in sanitation operation scenarios. (Proportional coefficient) The value ranges from 5 to 10, and it is used for rapid response to steering deviation. The larger the deviation, the stronger the steering adjustment force; integral coefficient The value ranges from 0.5 to 2, and is used to eliminate static deviations and avoid long-term steering offset; the differential coefficient The value ranges from 1 to 3, used to suppress steering overshoot, ensure smooth steering adjustment, and avoid frequent shaking. A preset integral attenuation coefficient is also provided. The value ranges from 0.1 to 0.3, and is used to attenuate the influence of long-term integral errors, avoiding integral saturation and resulting loss of steering control.

[0103] Target direction angle Determined by the optimal following path, it is the direction angle from the current position of the vehicle to the next sampling point on the path, and is updated in real time. (Actual direction angle) The gyroscope mounted on the vehicle detects and provides real-time feedback on the vehicle's actual driving direction. During the vehicle's movement, the directional angle deviation is calculated in real time. ,like This indicates that the car has deviated from the right side of the path and needs to turn left; if This indicates that the car has deviated from the left side of the path and needs to turn right; Substituting the values ​​into the angle and velocity control formula, the PWM control signal is calculated. The steering motor speed and direction of the trolley are adjusted to achieve precise control of the steering angle. This control signal adjusts the steering motor, causing the trolley to turn left, correcting deviations and ensuring accurate tracking of the optimal path. If the steering angle deviates... Then temporarily increase Up to 10, accelerate the deviation correction speed; if Then decrease To avoid oversteering, the PID parameters are dynamically adjusted according to the vehicle's speed. The integral coefficient is increased at low speeds and the derivative coefficient is increased at high speeds to ensure the stability and accuracy of steering adjustment at different speeds.

[0104] Example 2 Reference Figure 3 This embodiment provides an automatic following control system for sanitation vehicles, including: The work area construction module is configured to construct an electronic fence for sanitation workers' work, divide the area where the electronic fence is located into a three-dimensional work grid, obtain environmental data within the three-dimensional work grid, the environmental data including a set of fixed obstacles, a set of safe areas, and a set of work heat, and label the three-dimensional work grid according to the environmental data; The coordinate acquisition module is configured to acquire the first working coordinates of the sanitation worker within the first working grid, and the first position coordinates of the vehicle within the first working grid. The parking location decision module is configured as follows: S3. Set a time window, obtain the second work coordinates of the sanitation worker, and generate the second position coordinates of the vehicle based on the second work coordinates. The second work coordinates are coordinates within the second work grid, and the second position coordinates are the target parking location of the vehicle within the second work grid determined based on the environmental data. The follow control module is configured to plan the following path of the vehicle according to the second position coordinates, and adjust the steering angle and driving speed of the vehicle according to the following path, so that the vehicle travels along the following path to the second position coordinates.

[0105] A computer-readable storage medium storing a plurality of instructions adapted for loading and execution by a processor of a terminal device of the aforementioned automatic following control method for sanitation vehicles.

[0106] A terminal device includes a processor and a computer-readable storage medium, the processor being used to implement various instructions; the computer-readable storage medium being used to store multiple instructions, the instructions being adapted to be loaded and executed by the processor to provide an automatic following control method for sanitation vehicles.

[0107] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0108] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0110] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0111] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.

[0112] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from the scope of the invention. The spirit and scope of the invention are as follows: Thus, if these modifications and variations of the invention fall within the scope of the claims of the invention and their equivalents, the invention is also intended to include these modifications and variations.

Claims

1. A method for automatic following control of sanitation vehicles, characterized in that, include: An electronic fence is constructed for sanitation workers' operations. The area where the electronic fence is located is divided into a three-dimensional work grid. Environmental data within the three-dimensional work grid is obtained. The environmental data includes a set of fixed obstacles, a set of safe areas, and a set of work heat. The three-dimensional work grid is labeled according to the environmental data. Obtain the first work coordinates of the sanitation worker within the first work grid, and the first position coordinates of the vehicle within the first work grid; Set a time window, obtain the second work coordinates of sanitation workers, and generate the second position coordinates of the vehicle based on the second work coordinates. The second work coordinates are the coordinates within the second work grid, and the second position coordinates are the target parking position of the vehicle within the second work grid determined based on the environmental data. The following path of the car is planned according to the second position coordinates, and the steering angle and driving speed of the car are adjusted according to the following path so that the car travels along the following path to the second position coordinates.

2. The automatic following control method for sanitation vehicles according to claim 1, characterized in that, The construction of the electronic fence for sanitation workers' operations includes: Obtain the set of boundary coordinate points of the work area, and construct an irregular electronic fence based on the set of boundary coordinate points. The boundary of the electronic fence is formed by connecting adjacent boundary points in sequence to form a closed area. Based on the preset horizontal grid side length, vertical grid side length and altitude level interval, a three-dimensional grid filling method is performed within the irregular electronic fence. Grids completely outside the irregular electronic fence are removed, and grids that intersect with the electronic fence and are completely inside the fence are retained as valid three-dimensional working grids.

3. The automatic following control method for sanitation vehicles according to claim 1, characterized in that, The step of annotating the three-dimensional work grid based on the environmental data includes: The distance to obstacles within each effective three-dimensional work grid is detected by an ultrasonic rangefinder, and locations where the detected distance is less than a preset obstacle distance threshold are classified as fixed obstacles. By using phototubes to filter areas outside the fixed obstacle set within each effective 3D work grid and whose slope is less than or equal to a preset gentle slope threshold, a safe area set is constructed. Areas with slopes greater than the preset dangerous slope threshold, preset road core areas, and preset traffic-intensive sections within each effective 3D work grid are integrated into dangerous areas and marked on the corresponding 3D work grid.

4. The automatic following control method for sanitation vehicles according to claim 1, characterized in that, The acquisition of the job popularity set includes: Acquire historical operation data for each location within the safety zone set in each effective three-dimensional operation grid. The historical operation data includes historical cumulative dwell time and historical waste density. Based on the historical task data, a task popularity weight is constructed, and the expression for the task popularity weight is: ,in, The cumulative duration of stay in history, The historical cumulative dwell time at other safe locations within the same grid. λ represents the real-time garbage density within the current grid, k is the preset garbage density correction coefficient, λ is the preset time decay coefficient, and t is the time interval since the most recent operation. For safe zone collection; The operation heat weights of each safe location are combined to form the operation heat set, and then marked in the corresponding three-dimensional operation grid.

5. The automatic following control method for sanitation vehicles according to claim 1, characterized in that, The step of obtaining the first work coordinates of the sanitation worker within the first work grid, and the first position coordinates of the vehicle within the first work grid, includes: The original position coordinates of the vehicle are obtained through the positioning plate, and the original working coordinates of the sanitation workers are obtained through the positioning tags worn by the sanitation workers. The original job coordinates and the original position coordinates are optimized using the Kalman filter algorithm; The optimized coordinates of the sanitation worker are used as the first operation coordinates, and the optimized coordinates of the vehicle are used as the first position coordinates. The first operation coordinates and the first position coordinates are verified to be within the electronic fence by the electronic fence boundary coordinates.

6. The automatic following control method for sanitation vehicles according to claim 1, characterized in that, The target parking location of the vehicle determined based on the environmental data includes: Obtain the real-time coordinate sequence of sanitation workers within the time window, and use the final coordinates of the coordinate sequence as the second operation coordinates; Determine the work grid to which the second work coordinates belong, and determine the effective three-dimensional work grid containing the second work coordinates as the second work grid by matching the grid coordinate range; Verify that the safe area set of the second work grid is not empty, and that the proportion of dangerous areas is less than the preset dangerous area proportion threshold; If the verification is successful, a preliminary set of candidate target parking locations will be selected based on the safe zone set and the operation heat set of the second operation grid.

7. The automatic following control method for sanitation vehicles according to claim 6, characterized in that, The preliminary screening of candidate target parking locations based on the safety zone set and operation heat set of the second operation grid includes: Based on the straight-line distance between the candidate location and the second operation coordinates, the road surface smoothness parameter of the candidate location, and the operation popularity weight of the candidate location, a comprehensive fit is constructed for each candidate location in the target parking location candidate set. Calculate the overall fit of each position in the candidate set, and determine the candidate position with the highest overall fit as the second position coordinate; The distance to surrounding obstacles is detected by an ultrasonic rangefinder. If the detected distance is greater than or equal to a preset safe distance threshold, the second position coordinates are valid; otherwise, candidate positions are filled in order of comprehensive fit.

8. The automatic following control method for sanitation vehicles according to claim 7, characterized in that, The preliminary screening of candidate target parking locations based on the safety zone set and operation heat set of the second operation grid also includes: If, within the time window, the number of round trips between the first and second work grids by sanitation workers is not less than a preset number, then it is determined to be a boundary scene. Retrieve the intersection area of ​​the first and second work grids, filter the safe areas within the intersection area as the boundary safe areas, and exclude the positions occupied by temporary obstacles to obtain the boundary candidate set; The boundary fit is constructed based on the number of round trips between the first and second work grids by sanitation workers, the work heat weight of candidate locations in the first and second work grids, and the distance of candidate locations from the center of the first and second grids. The candidate position with the highest boundary fit is determined as the second position coordinate.

9. The automatic following control method for sanitation vehicles according to claim 1, characterized in that, The step of adjusting the steering angle and speed of the vehicle according to the following path includes: The optimal following path for the vehicle is planned based on the DWA algorithm. The path planning constraints are that the entire path is within the irregular electronic fence, the distance between the vehicle and the obstacle is greater than the preset obstacle avoidance threshold, and the path length is the shortest. Detect temporary obstacles on the following path. If temporary obstacles exist, adjust the obstacle avoidance speed according to the actual distance between the vehicle and the obstacle and the obstacle density. The steering angle of the trolley is adjusted based on the PID control strategy.

10. An automatic following control system for sanitation vehicles, characterized in that, include: The work area construction module is configured to construct an electronic fence for sanitation workers' work, divide the area where the electronic fence is located into a three-dimensional work grid, obtain environmental data within the three-dimensional work grid, the environmental data including a set of fixed obstacles, a set of safe areas, and a set of work heat, and label the three-dimensional work grid according to the environmental data; The coordinate acquisition module is configured to acquire the first working coordinates of the sanitation worker within the first working grid, and the first position coordinates of the vehicle within the first working grid. The parking location decision module is configured as follows: S3. Set a time window, obtain the second work coordinates of the sanitation worker, and generate the second position coordinates of the vehicle based on the second work coordinates. The second work coordinates are coordinates within the second work grid, and the second position coordinates are the target parking location of the vehicle within the second work grid determined based on the environmental data. The follow control module is configured to plan the following path of the vehicle according to the second position coordinates, and adjust the steering angle and driving speed of the vehicle according to the following path, so that the vehicle travels along the following path to the second position coordinates.