Human-machine collaborative inter-building path planning method, computer device and program product
By constructing a three-dimensional grid map and generating two-dimensional grid maps for pedestrians and robots, combined with A* and DWA algorithms, the safety problem of multi-floor navigation in a human-machine integrated environment is solved, cross-floor navigation is realized and improved Intelligent navigation.
Patent Information
- Application Number
- CN202210098967.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-01-25
AI Technical Summary
The existing technology is difficult to realize safe navigation of robots between multiple floors in a human-machine fusion environment, and inaccurate pedestrian prediction results in poor obstacle avoidance effect of the robot. Moreover, the existing technology is limited to single-floor navigation and lacks cross-floor navigation solutions. .
By constructing a three-dimensional grid map, a two-dimensional grid map for pedestrians and a two-dimensional grid map for robots are generated based on the difference in motion characteristics of pedestrians and robots. The A* algorithm that introduces time information is used to generate the global path, combined with DWA local The planning algorithm performs dynamic obstacle avoidance, and the elevator scheduling module is used to achieve cross-floor navigation.
It improves the human-machine safety of robots in multi-floor environments, enables safe navigation of pedestrians and robots between multiple floors, reduces labor costs, and improves the intelligence of navigation.
Smart Images

Figure CN114527753B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of path planning within a building, and in particular to a method, a computer device and a program product for human-machine collaborative path planning between buildings. Background Art
[0002] Path planning in a human-machine co-existence environment in a building is one of the important contents in the field of indoor robot navigation planning. By establishing a three-dimensional grid map and performing two-dimensional projection based on the difference in the motion characteristics of pedestrians and robots, two-dimensional grid maps for pedestrians and robots are generated respectively. The A* algorithm that introduces time information on the two-dimensional grid map for pedestrians can realize the navigation technology of pedestrians crossing obstacles indoors, which plays a good navigation guidance role for pedestrians who are unfamiliar with large indoor environments. At present, indoor robots have broad application prospects. Considering the human-machine safety during the driving process of indoor robots, an A* algorithm suitable for human-machine co-existence environment is used for the two-dimensional grid map for robots to generate a global path based on pedestrian prediction and spatiotemporal consistency constraints, which ensures that the robot can predict the driving trajectory of pedestrians within a period of time in advance and avoid them in advance during driving. However, considering that the time predicted by pedestrians in the process of implementing the A* algorithm is an estimated value, there is a certain difference between it and the actual pedestrian travel time. Therefore, it is necessary to adopt the background cancellation and DWA local planning algorithm to realize the dynamic pedestrian trajectory prediction and obstacle avoidance function; wherein the background cancellation method can identify static obstacles and pedestrians in the environment through a series of coordinate transformations based on the laser radar point cloud data between two adjacent frames, and perform trajectory prediction for pedestrians, and then combine the DWA local planning algorithm to avoid obstacles for pedestrians in advance, so as not to affect the pedestrian's travel speed, direction, etc., and improve the safety during driving. The cross-floor navigation described in the present invention can realize the autonomous transport robot from the starting floor to the target floor without human interference by combining the A* algorithm and the elevator dispatching module, and has a higher degree of intelligence. However, in actual scenarios, there are still the following problems that restrict the application of robots in building scenarios.
[0003] (1) To address the problem that pedestrians are unfamiliar with large indoor scenes, it is necessary to design a global path that can be used as a reference for pedestrians. Considering the differences between pedestrian motion characteristics and those of robots, such as pedestrians can cross low obstacles and pass through gates in environments such as airports, it is necessary to generate a two-dimensional grid map for pedestrians based on their motion characteristics and use a global planning algorithm based on this map to generate a global path for pedestrians. Pedestrians can use this path as a reference to cross low obstacles and pass through gates.
[0004] (2) In order for indoor robots to navigate between different floors, they need to travel across floors. How to generate a global path between buildings that can cross floors based on pedestrian prediction and spatiotemporal consistency constraints is a major difficulty at present. The present invention generates a two-dimensional grid map for the robot by establishing a three-dimensional point cloud map and performing two-dimensional projection of the robot's motion characteristics. The two-dimensional grid map uses an A* algorithm suitable for a human-machine co-existence environment to achieve collision-free travel of the robot between single floors. When the robot travels to the elevator, a fully intelligent elevator transportation technology is implemented by combining the robot with the elevator dispatching module. The robot can be transported from the starting floor to the target floor, and then navigated to the target point on the target floor. The multi-layer two-dimensional grid map has high scalability, occupies less program running resources and has a faster running time.
[0005] (3) Aiming at the obstacle avoidance problem of indoor robots during navigation, the present invention proposes a pedestrian trajectory prediction and dynamic obstacle avoidance method based on background cancellation and DWA local planning algorithm. This method can distinguish static obstacles from pedestrians through the lidar point cloud data between two adjacent frames, predict the trajectory of pedestrians, and then avoid pedestrians in advance in combination with the DWA local planning algorithm, which greatly improves the safety of people during driving.
[0006] The invention patent application "An omnidirectional mobile robot autonomous navigation system based on VFH* local path planning method" (application number: 202010043476.9) discloses an omnidirectional mobile robot autonomous navigation system based on VFH* local path planning method. This method constructs a grid map through laser radar, and introduces the idea of A* algorithm into the VFH* obstacle avoidance method for improvement, so that the mobile robot can choose the best possible obstacle avoidance direction. However, this invention is limited to the autonomous navigation of robots in a two-dimensional plane without considering pedestrian prediction, and there are great hidden dangers in driving in a human-machine co-integration environment; at the same time, the local trajectory generated by this invention is discontinuous, which makes it unsuitable for robots to track and drive.
[0007] The invention patent application "A human-machine collaborative navigation device and method for an indoor mobile robot" (application number: 201910588551.7) discloses a human-machine collaborative navigation device and method for an indoor mobile robot. This method only realizes navigation on a single floor indoors, and the method only performs a simple trajectory prediction for pedestrians.
[0008] The master's thesis "Research on Human-Robot Collaborative Navigation Technology for Mobile Robots Based on Multi-layer Cost Maps" proposed a human-aware navigation method that can improve the performance of path planning, increase human comfort and comply with certain social rules. At the same time, although this method establishes a multi-layer cost map, the multi-layer cost map is only used for single-floor navigation and pedestrian prediction. Summary of the invention
[0009] The technical problem to be solved by the present invention is to provide a human-machine collaborative inter-building path planning method, a computer device and a program product to improve the human-machine safety when the robot is driving in a human-machine collaborative environment in view of the shortcomings of the existing technology.
[0010] In order to solve the above technical problems, the technical solution adopted by the present invention is: a human-machine collaborative inter-building path planning method, comprising the following steps:
[0011] S1. When a robot equipped with a laser radar is driving between buildings, it collects laser radar environment information during driving, constructs a three-dimensional grid map, and performs two-dimensional projection based on the difference in motion characteristics between pedestrians and robots to generate a two-dimensional grid map for pedestrians and a two-dimensional grid map for robots;
[0012] S2, using the A* algorithm with time information to generate a global path for pedestrians with time and space information for the two-dimensional grid map for pedestrians;
[0013] S3, obtaining the global position of the robot, applying the A* algorithm to the two-dimensional grid map facing the robot according to the global path facing the pedestrian, and generating a global path facing the robot based on pedestrian prediction and spatiotemporal consistency constraints;
[0014] S4. According to the environmental information collected by the lidar, dynamic pedestrian trajectory prediction is performed based on the background cancellation method, and according to the predicted trajectory and the global path facing the robot, the DWA local planning algorithm is used for dynamic obstacle avoidance.
[0015] The present invention discloses a human-machine collaborative inter-building path planning method, a computer device and a program product. The present invention performs two-dimensional projection based on the difference in motion characteristics of pedestrians and robots through step S1 to generate a two-dimensional grid map for pedestrians and a two-dimensional grid map for robots; wherein the two-dimensional grid map for pedestrians sets low obstacles that can be crossed by pedestrians as idle grids, and the global path for pedestrians with time-space information generated in the subsequent step S2 may pass through these low obstacles, but all belong to the pedestrian passable area; for the robot, even low obstacles cannot be crossed, so this part is an obstacle grid in the two-dimensional grid map for the robot, and the robot needs to avoid this area. At the same time, step S3 requires not only the robot's global position information and target position information, but also the global path information with time-space information and facing pedestrians generated in step S2, and uses the A* algorithm to generate a global path facing the robot based on pedestrian prediction and time-space consistency constraints. This path achieves the function of early avoidance by predicting the pedestrian's driving trajectory; however, considering the uncertainty of the pedestrian's driving speed, the credibility of the global path generated in step S3 is insufficient. In order to ensure the human-machine safety during driving, the present invention performs dynamic pedestrian trajectory prediction based on the background cancellation method, and uses the DWA local planning algorithm for dynamic obstacle avoidance, thereby improving the human-machine safety during robot driving.
[0016] The specific implementation process of step S1 includes:
[0017] S1.1. For the point cloud data detected by the laser radar, a point cloud registration algorithm is used to obtain a three-dimensional point cloud map;
[0018] S1.2, filtering the three-dimensional point cloud map, and converting the filtered three-dimensional point cloud map into a three-dimensional grid map with a resolution of resolution;
[0019] S1.3, set the height range h pedestrianmin ≤z gridoctree , where h pedestrianmin is the maximum height of the obstacle that pedestrians can climb over. The three-dimensional grid map is projected on the Z axis to the xoy plane to obtain a two-dimensional grid map facing pedestrians. If the horizontal and vertical coordinates in the three-dimensional grid map are (x gridoctree ,y gridoctree ), the Z axis satisfies h pedestrianmin ≤z gridoctree If there is no three-dimensional grid within the range, then the two-dimensional grid (x gridoctree ,y gridoctree ) is an idle grid; if there is a three-dimensional grid, the two-dimensional grid is an obstacle grid, where (x gridoctree ,y gridoctree ,z gridoctree ) are the coordinates of the center point of the three-dimensional grid;
[0020] S1.4, set the height range z gridrobot ≤h robotmax , where h robotmax is the maximum height of the robot. The three-dimensional grid map is projected on the Z axis to the xoy plane to obtain a two-dimensional grid map facing the robot. If the horizontal and vertical coordinates in the three-dimensional grid map are (x gridrobot ,y gridrobot ), the Z axis satisfies 0≤z gridrobot ≤h robotmax If there is no three-dimensional grid within the range, then the two-dimensional grid (x gridrobot ,y gridrobot ) is an idle grid; if there is a three-dimensional grid, the two-dimensional grid is an obstacle grid, where (x gridrobot ,y gridrobot ,z gridrobot ) are the coordinates of the center point of the three-dimensional grid;
[0021] S1.5. Return to step S1.1, construct three-dimensional grid maps of other floors, and perform two-dimensional projection based on the difference in motion characteristics between pedestrians and robots to generate a two-dimensional grid map for pedestrians and a two-dimensional grid map for robots.
[0022] Taking into account the differences in driving characteristics between pedestrians and robots, it is impossible to generate a two-dimensional grid map that is suitable for both pedestrian and robot navigation through a two-dimensional grid map. The present invention establishes a three-dimensional grid map based on environmental data collected by a lidar, performs two-dimensional projection based on the differences in driving characteristics between pedestrians and robots, and generates two-dimensional grid maps for pedestrians and robots. The generated two-dimensional grid maps have the same size, so the global path generated for the two-dimensional grid map for pedestrians can also be used in the two-dimensional grid map for robots, which is convenient for subsequent global path generation of the robot and realizes human-machine collaboration.
[0023] The specific implementation process of step S2 includes:
[0024] S2.1. Input target point goal pedestrian (x pedestriangoal ,y pedestriangoal ,level pedestriangoal ), the pedestrian's current location start pedestrian (x pedestrianstart ,y pedestrianstart ,level pedestrianstart ), where x pedestriangoal and pedestriangoal is the two-dimensional coordinate of the target point in the xoy plane, level pedestriangoal is the floor where the target is located, x pedestrianstart and pedestrianstartis the two-dimensional coordinate of the pedestrian in the xoy plane, level pedestrianstart The current floor of the pedestrian;
[0025] S2.2. Determine whether the level is met pedestriangoal =level pedestrianstart ; If satisfied, it means that the target point and the pedestrian are currently on the same floor, and go to step S2.3; if not satisfied, it means that the target point and the pedestrian are currently on different floors, and go to step S2.4;
[0026] S2.3, if the target point and the pedestrian are currently on the same floor, the A* algorithm with time information is used to generate a global path for the pedestrian with time and space information, starting from (x pedestrianstart ,y pedestrianstart ), the target point is (x pedestriangoal ,y pedestriangoal );
[0027] S2.4, if the target point and the pedestrian are currently on different floors, the A* global path planning algorithm with time information is used to first generate the level pedestrianstart The global path of the layer, where the starting point is (x pedestrianstart ,y pedestrianstart ), the target point is level pedestrianstart The elevator position of the floor elevator (x elevator ,y elevator ); When the pedestrian takes the elevator to the target floor level goal When the two-dimensional grid map is updated to level goal Generates a two-dimensional grid map of the level pedestriangoal The global path of the floor, starting from level pedestriangoal Floor elevator location Position elevator (x elevator ,y elevator ), the target point is (x pedestriangoal ,y pedestriangoal ).
[0028] The present invention generates a global path that conforms to the movement characteristics of pedestrians by using the A* global path planning method that introduces time information on a two-dimensional grid map for pedestrians. Pedestrians may encounter obstacles when driving according to the guidance of the path, but they are all low obstacles that pedestrians can cross, and can be regarded as drivable areas for flexible pedestrians.
[0029] The specific implementation process of using the A* algorithm with time information to generate a global path for pedestrians with time and space information includes:
[0030] 1) Receive the starting point start(x start ,y start ), target point goal(x goal ,y goal ) information, define two empty sets Open and Close;
[0031] 2) Calculate the starting point start(x start ,y start ) start And its arrival at the starting point start(x start ,y start ) at the time t start , stored in the set Open = {(x start ,y start ,F start ,t start ,0,0)}; heuristic value F start The calculation formula is:
[0032] 3) Determine whether the set Open is an empty set. If not, go to step 4); if so, the global planning ends, and no drivable path with time-space information and facing pedestrians from the starting point to the target point is found;
[0033] 4) Select the grid point with the smallest heuristic value from the set Open as the next grid point grid n (x n ,y n ), obtain its time information t n , grid points n Move from the set Open to the set Close;
[0034] 5) Determine the grid points n Is it the target point? If so, it is based on the grid point grid n The parent nodes of are traced back in sequence to find a drivable path from the starting point to the target point with time-space information and facing pedestrians; if not, go to step 6);
[0035] 6) Find the grid points n The non-obstruction grids in the eight-neighborhood orientation that are not in the set Close are recorded as the nearby reachable grids grid nc (x nc ,y nc ), calculate the nearby reachable grid nc (x nc ,y nc ) nc and the time t at which the nearest reachable grid is reached nc =tn +t f , set the parent node of the adjacent reachable grid to grid n , stored in the set Open = {(x start ,y start ,F start ,t start ,0,0)、…、(x nc ,y nc ,F nc ,t nc ,x n ,y n )}; where t f From the grid point grid n to grid nc The estimated time of nc The calculation formula is:
[0036]
[0037] Among them I N is the expansion cost, if it is close to the reachable grid grid nc is an idle grid, I N =0; if the grid is close to the reachable grid nc To expand the grid, Where p1 and p2 are given parameters, distance_obstacle is the distance between the expanded grid and the nearest obstacle grid; the non-obstacle grid includes an idle grid and an expanded grid; the determination process of the idle grid and the expanded grid includes: according to the generated pedestrian-oriented two-dimensional grid map, the location of the elevator on each floor is marked in the two-dimensional grid map, recorded as Position elevator (x elevator ,y elevator ), mark the elevator door obstacle grid as an idle grid in the two-dimensional grid map; perform obstacle expansion operation on the two-dimensional grid map, that is, take the obstacle grid as the expansion center and the expansion radius is radius pedestrianinflation , if the expansion area of a certain obstacle grid is less than half of the area of the obstacle grid, then the obstacle grid is an idle grid, otherwise it is an expansion grid;
[0038] 7) Jump to step 3) until the global planning is completed.
[0039] The global path generated by the global planning algorithm of the present invention includes the estimated travel time of pedestrians, which facilitates the subsequent implementation of the A* algorithm applicable to human-machine collaborative environments.
[0040] The specific implementation process of step S3 includes:
[0041] S3.1. The robot is positioned through AMCL to obtain the position of the robot in the xoy plane (x robotstart ,y robotstart ), the robot's current floor is level robotstart ;
[0042] S3.2. Input the robot navigation target point goal robot (x robotgoal ,y robotgoal ,level robotgoal ), where x robotgoal and robotgoal is the two-dimensional coordinate of the target point in the xoy plane, level robotgoal The floor where the target is located;
[0043] S3.3, determine whether the level is met robotgoal =level robotstart ; If satisfied, it means that the target point and the robot are currently on the same floor, go to step S3.4; if not satisfied, it means that the target point and the robot are currently on different floors, go to step S3.5;
[0044] S3.4. If the target point and the robot are currently on the same floor, use the A* algorithm to generate a global path for the robot based on pedestrian prediction and spatiotemporal consistency constraints, starting at (x robotstart ,y robotstart ), the target point is (x robotgoal ,y robotgoal );
[0045] S3.5. If the target point and the robot are currently on different floors, the A* algorithm is used in combination with the elevator dispatching module to perform navigation across floors. The specific steps are as follows:
[0046] 1) Use the A* algorithm to first generate the level robotstart The global path of the layer, where the starting point is (x robotstart ,y robotstart ), the target point is level robotstart The elevator position of the floor elevator (x elevator ,y elevator );
[0047] 2) Calculate the time t taken for the robot to reach the target point according to the global path generated in step 1) rs , where s robotglobal is the global path length from the robot’s current position to the elevator’s location, v robotassign is a given speed;
[0048] 3) The robot obtains the current level of the elevator elecurrent , calculate the elevator floor level elecurrent Arrive at the robot's level robotstart Time t es , where s elevatorstart The level of the elevator elecurrent Distance to the robot's floor level robotstart The height, v elevator The elevator running speed can be calculated in advance and is a fixed value;
[0049] 4), determine whether s is satisfied robotglobal ≤s thresold , where s thresold is a given distance threshold; if yes, go to step 5); if no, the robot continues to drive and updates the time t taken by the robot to reach the target point rs , return to step 3);
[0050] 5), determine whether |t is satisfied rs -t es |≤t thresold , where t thresold is a given time threshold; if so, it means that after the robot reaches the target point, the elevator will also reach the robot's level robotstart , issue the elevator call command to the elevator dispatch module; if not, it means that the robot is delayed due to obstacles during driving, then send the elevator call command after reaching the target point;
[0051] 6) After the elevator reaches the floor where the robot is located, the elevator door opens; at the same time, the robot determines whether there are pedestrians entering or exiting the elevator. If so, the robot retreats a certain distance and waits for the pedestrians to enter or exit the elevator before entering the elevator; if there are no pedestrians entering or exiting the elevator, the robot enters the elevator directly;
[0052] 7) After the robot enters the elevator, it issues a command to the elevator dispatch module to indicate that it has successfully entered the elevator. After the elevator dispatch module receives the command issued by the robot to successfully enter the elevator, it issues a command to close the elevator door, and the elevator goes to the target floor level. robotgoal , and at the same time, issue instructions to the robot to switch the two-dimensional grid map;
[0053] 8) After the elevator reaches the target floor, the elevator dispatch module issues a command to open the elevator door and at the same time issues a command to the robot to start navigation to the target floor;
[0054] 9) After receiving the target floor arrival instruction from the elevator dispatch module, the robot starts navigating to the target floor and uses the A* algorithm to generate the first level robotgoal The global path of the layer, where the starting point is level robotgoal Floor elevator location Position elevator (x elevator ,y elevator ), the target point is (x robotgoal ,y robotgoal ).
[0055] The present invention adopts an A* algorithm applicable to a human-machine co-existence environment for a two-dimensional grid map facing the robot to generate a global path based on pedestrian prediction and space-time consistency constraints. The path can predict the driving trajectory of pedestrians in a certain period of time in advance and avoid pedestrians in advance without affecting the driving speed, direction, etc. of the pedestrians. At the same time, in order to realize the cross-floor navigation of the robot, the present invention combines the elevator scheduling module with the A* algorithm, which can realize the autonomous transport robot from the starting floor to the target floor without human interference, and has a higher degree of intelligence.
[0056] The specific implementation process of using the A* algorithm to generate a global path for the robot based on pedestrian prediction and spatiotemporal consistency constraints includes:
[0057] A) Receive the target point goal robot (x robotgoal ,y robotgoal ) Two-dimensional information, global path reference points generated for pedestrians, define two empty sets Open r and Close r ;
[0058] B) Calculate the robot's starting point robot (x robotstart ,y robotstart ) robotstart and its arrival point start robot The time t robotstart , stored in the collection Open r ={(x robotstart ,y robotstart ,F robotstart ,t robotstart ,0,0)}; where the heuristic value F start The calculation formula is as follows:
[0059] C) Judge the set Open rIs it an empty set? If not, go to step D); if so, the global planning ends, and no robot-oriented global path based on pedestrian prediction and spatiotemporal consistency constraints from the starting point to the target point is found;
[0060] D) From the set Open r Select the grid point with the smallest heuristic value as the next grid point grid rn (x rn ,y rn ), get the grid rn (x rn ,y rn ) time information t rn , grid points rn From the collectionOpen r Move into collectionClose r middle;
[0061] E) Determine the grid points rn Is it the target point? robot ; If so, then according to the grid point grid rn The parent nodes of are traced back in turn to find a global path from the starting point to the target point based on pedestrian prediction and spatiotemporal consistency constraints and oriented to the robot; if not, go to step F);
[0062] F) Based on grid points rn Time information t rn , get from t rn Time t after the start sim The two-dimensional information of the pedestrian's global path reference point within seconds, recorded as Point pedestrian (x pedestrian ,y pedestrian ), where t sim is a given time in advance, and the grid occupied by the pedestrian's global path reference point is marked as an obstacle grid, and the obstacle is expanded at the same time, with the expansion center being the obstacle grid and the expansion radius being radius pedestrian ;
[0063] G) Find the grid points rn Eight neighborhood directions and not in the set Close r The non-obstruction grid in is recorded as the adjacent reachable grid grid rnc (x rnc ,y rnc ), calculate the heuristic value F of the nearby reachable grid rnc and the time t at which the nearest reachable grid is reached rnc =t rn +t rf , set the parent node of the adjacent reachable grid to gridrn , stored in the collection Open r ={(x robotstart ,y robotstart ,F robotstart ,t robotstart ,0,0)、…、(x rnc ,y rnc ,F rnc ,t rnc ,x rn ,y rn )}; where t rf From the grid point grid rn to grid rnc The estimated time consumption; the heuristic value F rnc The calculation formula is as follows: Among them I rN is the expansion cost, if it is close to the reachable grid grid rnc is an idle grid, I rN =0; if the grid is close to the reachable grid rnc To expand the grid, where p r1 、p r2 is a given parameter, distance_obstacle_r is the distance between the expanded grid and the nearest obstacle grid; the non-obstacle grid includes an idle grid and an expanded grid; the process of determining the idle grid and the expanded grid includes: marking the location of the elevator on each floor in the two-dimensional grid map facing the robot, recorded as Position elevator (x elevator ,y elevator ), convert the elevator door obstacle grid into an idle grid in the two-dimensional grid map; perform obstacle expansion on the two-dimensional grid map, that is, take the obstacle grid as the expansion center and the expansion radius is radius robotinflation , if the expansion area of a certain obstacle grid is less than half of the area of the obstacle grid, then the obstacle grid is an idle grid, otherwise it is an expansion grid;
[0064] H) Jump to step C) until the global planning is completed.
[0065] Since the robot needs to predict the driving trajectory of pedestrians and avoid them in advance, it needs to know the pedestrians' driving path and time information in advance and make corresponding processing, predict the driving trajectory of pedestrians in a certain period of time and avoid them as obstacles.
[0066] The specific implementation process of step S4 includes:
[0067] i) Define the robot's local cost map as centered on the robot's current position, with a length and width of length respectivelyrobotlocal 、width robotlocal ;
[0068] ii) According to the two-dimensional coordinates (x rpc,t ,y rpc,t ) and its travel speed v do , heading angle θ do Predicting dynamic pedestrian trajectories: Among them, t predict =1,2,…,t dopredict , t dopredict is the trajectory prediction duration; dynamic pedestrian speed v do and heading angle θ do The calculation formula is: (x rpc,t ,y rpc,t ) is the cluster point Pointcloud rt The coordinates of (x rkmeanstranspc,t-1 ,y rkmeanstranspc,t-1 ) is the cluster point Pointcloud rkmeanstrans,t-1 Coordinates of Pointcloud rt (x rpc,t ,y rpc,t ) is the cluster point Pointcloud t (x pc,t ,y pc,t ) Cluster points in the local cost map; Pointcloud t (x pc,t ,y pc,t ) is the two-dimensional coordinate of the point cloud data of the current frame; Pointcloud rkmeanstrans,t-1 (x rkmeanstranspc,t-1 ,y rkmeanstranspc,t-1 ) is the cluster point Pointcloud kmeanstrans,t-1 (x kmeanstranspc,t-1 ,y kmeanstranspc,t-1 ) Cluster points in the local cost map, Pointcloud kmeanstrans,t-1 (x kmeanstranspc,t-1 ,y kmeanstranspc,t-1 ) is the cluster point cloud kmeans,t-1 (x kmeanspc,t-1 ,y kmeanspc,t-1 ) Cluster points obtained after coordinate transformation; Pointcloud kmeans,t-1 (x kmeanspc,t-1 ,y kmeanspc,t-1 ) is the two-dimensional coordinate Pointcloud of the previous frame of point cloud data t-1 (x pc,t-1 ,y pc,t-1 ) The clustering points obtained by K-means clustering;
[0069] iii) Using the predicted pedestrian trajectory (x pedestrianpredict ,y pedestrianpredict ) is the center of the circle and the radius is radius pedestrianpredict Perform obstacle expansion; traverse all obstacles in the local cost map and calculate the trajectory traj robot The distance between the last trajectory point and the nearest obstacle in the local cost map localtoobstacle As the collision cost; and determine whether the distance localtoobstacle ≥2×radius robotinflation , if satisfied, then distance localtoobstacle =2×radius robotinflation ; where radius robotinflation is the expansion radius of the obstacle expansion of the two-dimensional grid map, (x robot ,y robot ) is the current position information of the robot;
[0070] iv) Select the trajectory traj robot The absolute speed of the last trajectory point in the distance is used as the speed cost vel ;traj robot To traverse each speed v of the robot robot , angular velocity ω robot The combined line is in t robotsim The sequence of trajectory points within seconds;
[0071] v) Order collection where num trajrobot is the total number of all sampled trajectories, distance localtoglobal,1 is the global path tracking cost of the first trajectory, distance localtoobstacle,1 is the collision cost of the first trajectory, distance vel,1 is the speed cost of the first trajectory; distance localtoglobal,1 =D-distance mintoglobal,1 ;distance mintoglobal,1 is the minimum distance between the last track point in the first track and the global path; D is a given value; distance vel,1 is the absolute speed of the last track point in the first track, and the absolute speed value is used as the speed cost;
[0072] vi) Normalize each type of data in the Evaluate set:
[0073]
[0074] vii) Calculate the total cost of each sampled trajectory. The specific calculation formula is as follows: traj,k =α·normal_distance localtoglobal,k +β·normal_distance localtoobstacle,k +γ·normal_distance vel,k ; Among them, α, β, γ are given weight values;
[0075] viii) Select the trajectory with the largest total cost value as the local obstacle avoidance trajectory.
[0076] The global path generated by the A* algorithm applicable to the human-machine collaborative environment of the present invention can estimate the time for pedestrians to travel. However, due to the uncertainty of the pedestrian's travel speed, the estimation of the pedestrian's travel time cannot be very accurate. Therefore, it is necessary to perform dynamic obstacle avoidance based on the environmental information detected by the lidar. The background cancellation method can well identify static obstacles and dynamic obstacles in the environment through two frames of lidar point cloud data, and estimate the travel trajectory of dynamic obstacles, thereby achieving an effect of trajectory prediction and dynamic obstacle avoidance.
[0077] Calculate the dynamic pedestrian speed v do and heading angle θ do Previously, the following judgment was made: cluster point cloud rt (x rpc,t ,y rpc,t ) and clustered points Pointcloud rkmeanstrans,t-1 (x rkmeanstranspc,t-1 ,y rkmeanstranspc,t-1 ) to perform difference processing, if it satisfies Then the coordinates are (x rpc,t ,y rpc,t ) is a static obstacle, where range thresold is a given threshold; if it does not meet Then the coordinates are (x rpc,t ,y rpc,t ) is a dynamic pedestrian, and the speed v of the dynamic pedestrian is calculated. do and heading angle θ do .
[0078] The dynamic pedestrian trajectory prediction based on the background cancellation method described in the present invention only requires two adjacent frames of laser radar point cloud data to distinguish dynamic and static obstacles, and simultaneously calculates the driving speed and heading angle of the dynamic pedestrian trajectory, which occupies less computing resources and is easier to implement.
[0079] The present invention also provides a computer device, comprising a memory, a processor and a computer program stored in the memory; the processor executes the computer program to implement the steps of the method of the present invention.
[0080] The present invention also provides a computer program product, comprising a computer program / instruction; when the computer program / instruction is executed by a processor, the steps of the method of the present invention are implemented.
[0081] Compared with the prior art, the present invention has the following beneficial effects:
[0082] 1) The present invention first establishes a three-dimensional grid map based on the environmental information collected by the laser radar during the robot's driving process, and performs two-dimensional projection based on the difference in the motion characteristics of pedestrians and robots to generate a two-dimensional grid map for pedestrians and robots. Different two-dimensional grid maps are used for different path requirements to generate a global path that conforms to the motion characteristics of pedestrians / robots. For the two-dimensional grid map for pedestrians, the A* global path planning algorithm that introduces time information is used to generate a global path that can cross low obstacles. Based on this path, pedestrians can quickly reach the target location in unfamiliar large indoor scenes while avoiding obstacles on the way. For the two-dimensional grid map for robots, an A* algorithm that can be applied to human-machine co-integration environments is used to generate a global path based on pedestrian prediction and spatiotemporal consistency constraints, ensuring that the robot can predict the driving trajectory of pedestrians in a certain period of time in advance and avoid them in advance when driving indoors.
[0083] 2) In order to solve the problem of prediction time deviation caused by the uncertainty of pedestrian speed, a method based on background cancellation and DWA local trajectory planning algorithm is proposed to realize pedestrian prediction and dynamic obstacle avoidance, which ensures the human-machine safety during the robot's driving process. In order to solve the problem of robot navigation between multiple floors, a fully intelligent elevator transportation technology is realized by combining the robot with the elevator dispatching module. Multi-layer two-dimensional grid maps can be used for navigation between multiple floors in the building, and pedestrian prediction can be performed without the need to establish multi-layer cost maps. It takes up less resources and can realize more powerful functions. The robot can be transported from the starting floor to the target floor without human interference, which greatly reduces the labor cost.
[0084] 3) The present invention establishes a three-dimensional grid map and realizes two-dimensional projection based on the difference in motion characteristics between pedestrians and robots. The generated two-dimensional grid map for pedestrians and robots can provide navigation guidance for pedestrians who are unfamiliar with large indoor scenes. At the same time, since the sizes of the two-dimensional grid maps for pedestrians and robots are the same, the generated global path for pedestrians can be combined with the two-dimensional grid map for robots. Figure 1It is also used in the global path generation of the robot, combining the spatiotemporal information to generate a global path based on pedestrian prediction and spatiotemporal consistency constraints, which improves the human-machine safety of the robot when driving in a human-machine collaborative environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] Figure 1 A flow chart for inter-building path planning for human-machine integration;
[0086] Figure 2 It is a two-dimensional grid map for pedestrians;
[0087] Figure 3 A two-dimensional grid map for robots;
[0088] Figure 4 A global path for pedestrians that can cross low obstacles;
[0089] Figure 5 The global path of the robot without considering pedestrian prediction;
[0090] Figure 6 The robot's global path is based on pedestrian prediction and spatiotemporal consistency constraints;
[0091] Figure 7(a) shows the clustering points of the lidar point cloud data of two adjacent frames; Figure 7(b) shows the clustering points of the two frames after transformation;
[0092] Figure 8 Dynamic obstacle avoidance based on DWA local planning algorithm. DETAILED DESCRIPTION
[0093] The embodiments of the present invention provide a human-machine collaborative inter-building path planning method, a computer device, and a program product, such as Figure 1 As shown, the following steps are included:
[0094] Step 1: When the robot equipped with a laser radar drives between buildings, it collects laser radar environment information during driving, constructs a three-dimensional grid map, and performs two-dimensional projection based on the difference in motion characteristics between pedestrians and robots to generate a two-dimensional grid map for pedestrians and robots:
[0095] Step 1: When the robot equipped with a laser radar is driving on a single floor between buildings, the laser radar is used to collect environmental information during the driving process;
[0096] Step 2: Build a three-dimensional grid map. The specific steps are as follows:
[0097] Step 2.1, using the point cloud registration algorithm to obtain a three-dimensional point cloud map based on the perception information obtained from the upper layer;
[0098] Step 2.2, filter the three-dimensional point cloud, and convert the filtered three-dimensional point cloud map into a three-dimensional grid map with a resolution of resolution, where resolution = 0.05;
[0099] Step 3: Set a height range h pedestrianmin ≤z gridoctree , where h pedestrianmin = 0.8 meters is the maximum height of the obstacle that pedestrians can climb over. The three-dimensional grid map is projected on the Z axis to the xoy plane to obtain a two-dimensional grid map facing pedestrians. If the horizontal and vertical coordinates in the three-dimensional grid map are (x gridoctree ,y gridoctree ), the Z axis satisfies h pedestrianmin ≤z gridoctree If there is no three-dimensional grid within the range, then its projection on the two-dimensional grid (x gridoctree ,y gridoctree ) is an idle grid; if there is a three-dimensional grid, the two-dimensional grid projected on the xoy plane is the obstacle grid, where (x gridoctree ,y gridoctree ,z gridoctree ) are the coordinates of the center point of the three-dimensional grid;
[0100] Step 4, set a height range z gridrobot ≤h robotmax , where h robotmax = 0.5 meters is the maximum height of the robot. The three-dimensional grid map is projected on the Z axis to the xoy plane to obtain a two-dimensional grid map facing the robot. If the horizontal and vertical coordinates in the three-dimensional grid map are (x gridrobot ,y gridrobot ), the Z axis satisfies 0≤z gridrobot ≤h robotmax If there is no three-dimensional grid within the range, then its projection on the two-dimensional grid (x gridrobot ,y gridrobot ) is an idle grid; if there is a three-dimensional grid, the two-dimensional grid projected on the xoy plane is the obstacle grid, where (x gridrobot ,y gridrobot ,z gridrobot ) are the coordinates of the center point of the three-dimensional grid;
[0101] Step 5, return to step 1, construct a three-dimensional grid map of other floors and perform two-dimensional projection based on the difference in motion characteristics between pedestrians and robots to generate a two-dimensional grid map for pedestrians and robots.
[0102] like Figure 2 , 3 As shown, Figure 2 is the generated two-dimensional grid map for pedestrians. Figure 3 It is a two-dimensional grid map for robots, in which the dotted boxes are low obstacles that pedestrians can cross, but for robots, this obstacle area is impassable.
[0103] Step 2: Use the A* global path planning algorithm to generate a global path that can cross low obstacles on the two-dimensional grid map facing pedestrians:
[0104] Step 1: Based on the generated pedestrian-oriented two-dimensional grid map, mark the location of the elevator on each floor on the map, denoted as Position elevator (x elevator ,y elevator ), converting the elevator door obstacle grid into an idle grid in the two-dimensional grid map;
[0105] Step 2: Dilate the two-dimensional grid map with the obstacle grid as the expansion center and the expansion radius as radius. pedestrianinflation If the expansion area of a grid is less than half of the grid area, the grid is an idle grid, otherwise it is an expansion grid, where radius pedestrianinflation =0.2 m;
[0106] Step 3: The pedestrian enters the target point goal pedestrian (x pedestriangoal ,y pedestriangoal ,level pedestriangoal ), the pedestrian's current location start pedestrian (x pedestrianstart ,y pedestrianstart ,level pedestrianstart ), where x pedestriangoal and pedestriangoal is the two-dimensional coordinate of the target point in the xoy plane, level pedestriangoal is the floor where the target is located, x pedestrianstart and pedestrianstart is the two-dimensional coordinate of the pedestrian in the xoy plane, level pedestrianstart The current floor of the pedestrian;
[0107] Step 4: Determine whether the level is met pedestriangoal =level pedestrianstart ; If satisfied, it means that the target point and the pedestrian are currently on the same floor, go to step 4.1; if not satisfied, it means that the target point and the pedestrian are currently on different floors, go to step 4.2;
[0108] Step 4.1: If the target point and the pedestrian are currently on the same floor, the A* algorithm with time information is used to generate a global path with time-space information that can cross low obstacles. The starting point is (x pedestrianstart ,ypedestrianstart ), the target point is (x pedestriangoal ,y pedestriangoal );
[0109] Step 4.2: If the target point and the pedestrian are currently on different floors, the A* global path planning algorithm with time information is used to first generate the level pedestrianstart The global path of the layer, where the starting point is (x pedestrianstart ,y pedestrianstart ), the target point is level pedestrianstart The elevator position of the floor elevator (x elevator ,y elevator ); Then, the pedestrian takes the elevator to the target floor level goal , and update the two-dimensional grid map to level goal Finally, generate the two-dimensional grid map of level pedestriangoal The global path of the floor, starting from level pedestriangoal Floor elevator location Position elevator (x elevator ,y elevator ), the target point is (x pedestriangoal ,y pedestriangoal ).
[0110] The specific implementation of the A* global path planning algorithm that introduces time information is as follows:
[0111] 1), receive the starting point start(x start ,y start ), target point goal(x goal ,y goal ) information, define two empty sets Open and Close;
[0112] 2), calculate the starting point start(x start ,y start ) start And its arrival at the starting point start(x start ,y start ) at the time t start = 0, save to set Open = {(x start ,y start ,F start ,t start ,0,0)}; where the heuristic value F start The calculation formula is as follows:
[0113]
[0114] 3) Determine whether the set Open is an empty set. If not, go to 4); if so, the global planning ends and no drivable path from the starting point to the target point is found;
[0115] 4) Select the grid point with the smallest heuristic value from the set Open as the next grid point grid n (x n ,y n ), obtain its time information t n , grid points n Move from the set Open to the set Close;
[0116] 5) Determine the grid point grid n Is it the target point? If so, it is based on the grid point grid n The parent nodes of are traced back in sequence to find a drivable path from the starting point to the target point; if not, go to step 6);
[0117] 6) Find the grid points n The non-obstruction grids in the eight-neighborhood orientation that are not in the set Close are recorded as the nearby reachable grids grid nc (x nc ,y nc ), calculate the heuristic value F of these grids nc and the time t at which these grids are reached nc =t n +t f , set the parent node of these grids to grid n , stored in the set Open = {(x start ,y start ,F start ,t start ,0,0)、…、(x nc ,y nc ,F nc ,t nc ,x n ,y n )}; where t f = 1 second from grid point grid n to grid nc The estimated time consumption; the heuristic value F nc The calculation formula is as follows:
[0118]
[0119] Among them I N is the expansion cost, if it is close to the reachable grid grid nc When it is an idle grid, I N=0; if the grid is close to the reachable grid nc For expansion grid, Where p1 and p2 are given parameters, which are 20 and 5 respectively, and distance_obstacle is the distance between the expanded grid and the nearest obstacle grid;
[0120] 7), go to 3) until the global planning is completed.
[0121] like Figure 4 As shown in the figure, the dotted line is the global path of the pedestrian. It can be seen from the figure that the generated path can avoid obstacles and reach the target position well.
[0122] Step 3: Use an A* algorithm that can be applied to the robot's two-dimensional grid map to generate a global path based on pedestrian prediction and spatiotemporal consistency constraints. The specific steps are as follows:
[0123] Step 1: The robot is positioned by AMCL to obtain the position of the robot in the xoy plane (x robotstart ,y robotstart ), the robot's current floor is level robotstart ;
[0124] Step 2: Based on the generated two-dimensional grid map for the robot, mark the location of the elevator on each floor in the map, denoted as Position elevator (x elevator ,y elevator ), converting the elevator door obstacle grid into an idle grid in the two-dimensional grid map;
[0125] Step 3: Dilate the obstacle on the two-dimensional grid map, with the obstacle grid as the expansion center and the expansion radius as radius robotinflation If the expansion area of a grid is less than half of the grid area, the grid is an idle grid, otherwise it is an expansion grid, where radius robotinflation =0.5 m;
[0126] Step 4: Enter the robot navigation target point goal robot (x robotgoal ,y robotgoal ,level robotgoal ), where x robotgoal and robotgoal is the two-dimensional coordinate of the target point in the xoy plane, level robotgoal The floor where the target is located;
[0127] Step 5: Determine whether the level is met robotgoal =level robotstart; If satisfied, it means that the target point and the robot are currently on the same floor, go to step 5.1; if not satisfied, it means that the target point and the robot are currently on different floors, go to step 5.2;
[0128] Step 5.1: If the target point and the robot are currently on the same floor, use the A* algorithm to generate a global path based on pedestrian prediction and spatiotemporal consistency constraints, starting from (x robotstart ,y robotstart ), the target point is (x robotgoal ,y robotgoal );
[0129] Step 5.2: If the target point and the robot are currently on different floors, use the A* algorithm combined with the elevator dispatch module to navigate across floors. The specific steps are as follows:
[0130] 1) Use the A* algorithm to first generate the level robotstart The global path of the layer, where the starting point is (x robotstart ,y robotstart ), the target point is level robotstart The elevator position of the floor elevator (x elevator ,y elevator );
[0131] 2) Calculate the time t taken for the robot to reach the target point according to the global path generated in step 1) rs , where s robotglobal is the global path length from the robot’s current position to the elevator’s location, v robotassign is a given speed;
[0132] 3) The robot obtains the current level of the elevator elecurrent , calculate the elevator floor level elecurrent Arrive at the robot's level robotstart Time t es , where s elevatorstart The level of the elevator elecurrent Distance to the robot's floor level robotstart The height, v elevator The elevator running speed can be calculated in advance and is a fixed value;
[0133] 4), determine whether s is satisfied robotglobal ≤s thresold , where s thresoldis a given distance threshold; if yes, go to step 5); if no, the robot continues to drive and updates the time t taken by the robot to reach the target point rs , return to step 3);
[0134] 5), determine whether |t is satisfied rs -t es |≤t thresold , where t thresold is a given time threshold; if so, it means that after the robot reaches the target point, the elevator will also reach the robot's level robotstart , issue the elevator call command to the elevator dispatch module; if not, it means that the robot is delayed due to obstacles during driving, then send the elevator call command after reaching the target point;
[0135] 6) After the elevator reaches the floor where the robot is located, the elevator door opens; at the same time, the robot determines whether there are pedestrians entering or exiting the elevator. If so, the robot retreats a certain distance and waits for the pedestrians to enter or exit the elevator before entering the elevator; if there are no pedestrians entering or exiting the elevator, the robot enters the elevator directly;
[0136] 7) After the robot enters the elevator, it issues a command to the elevator dispatch module to indicate that it has successfully entered the elevator. After the elevator dispatch module receives the command issued by the robot to successfully enter the elevator, it issues a command to close the elevator door, and the elevator goes to the target floor level. robotgoal , and at the same time, issue instructions to the robot to switch the two-dimensional grid map;
[0137] 8) After the elevator reaches the target floor, the elevator dispatch module issues a command to open the elevator door and at the same time issues a command to the robot to start navigation to the target floor;
[0138] 9) After receiving the target floor arrival instruction from the elevator dispatch module, the robot starts navigating to the target floor and uses the A* algorithm to generate the first level robotgoal The global path of the layer, where the starting point is level robotgoal Floor elevator location Position elevator (x elevator ,y elevator ), the target point is (x robotgoal ,y robotgoal ).
[0139] The specific implementation of the A* algorithm applicable to the human-machine collaborative environment is as follows:
[0140] 1) Receive the target point goal robot (x robotgoal ,y robotgoal) Two-dimensional information, global path reference points generated for pedestrians, define two empty sets Open r and Close r ;
[0141] 2) Calculate the robot's starting point robot (x robotstart ,y robotstart ) robotstart and its arrival point start robot The time t robotstart =0, save to set Open r ={(x robotstart ,y robotstart ,F robotstart ,t robotstart ,0,0)}; where the heuristic value F start The calculation formula is as follows:
[0142]
[0143] 3) Judge the set Open r Is it an empty set? If not, go to 4); if so, the global planning ends, and no drivable path from the starting point to the target point is found;
[0144] 4) From the set Open r Select the grid point with the smallest heuristic value as the next grid point grid rn (x rn ,y rn ), obtain its time information t rn , grid points rn From the collectionOpen r Move into collectionClose r middle;
[0145] 5) Determine the grid point grid rn Is it the target point? robot ; If so, then according to the grid point grid rn The parent nodes of are traced back in sequence to find a drivable path from the starting point to the target point; if not, go to step 6);
[0146] 6) According to the grid point grid rn Time information t rn , get from t rn Time t after the start sim The two-dimensional information of the pedestrian's global path reference point within seconds, recorded as Point pedestrian (x pedestrian ,y pedestrian ), where tsim = 3 is the time given in advance, and the grids occupied by these reference points are marked as obstacle grids, and obstacle expansion is performed at the same time, with the expansion center being the obstacle grid and the expansion radius being radius pedestrian =0.5 m;
[0147] 7) Find the grid points rn Eight neighborhood directions and not in the set Close r The non-obstruction grid in is recorded as the adjacent reachable grid grid rnc (x rnc ,y rnc ), calculate the heuristic value F of these grids rnc and the time t at which these grids are reached rnc =t rn +t rf , set the parent node of these grids to grid rn , stored in the collection Open r ={(x robotstart ,y robotstart ,F robotstart ,t robotstart ,0,0)、…、(x rnc ,y rnc ,F rnc ,t rnc ,x rn ,y rn )}; where t rf = 1 second from grid point grid rn to grid rnc The estimated time consumption; the heuristic value F rnc The calculation formula is as follows:
[0148]
[0149] Among them I rN is the expansion cost, if it is close to the reachable grid grid rnc When it is an idle grid, I rN =0; if the grid is close to the reachable grid rnc For expansion grid, where p r1 、p r2 are given parameters, which are 20 and 5 respectively, and distance_obstacle_r is the distance between the expanded grid and the nearest obstacle grid;
[0150] 8), go to 3) until the global planning is completed.
[0151] like Figure 5 , 6 As shown, Figure 5, 6 The reason for the different robot trajectories is that Figure 6 It is a global path based on pedestrian prediction and spatiotemporal consistency constraints generated by a global path planning algorithm that is applicable to human-machine co-environment. Figure 5 Pedestrian trajectory prediction is not considered. Since the pedestrian speed is set faster than the robot, Figure 6 The pedestrian in the middle was driving from behind the robot. In order to make way for the pedestrian, the robot deviated from its original trajectory.
[0152] Step 4: Dynamic pedestrian trajectory prediction and obstacle avoidance based on background cancellation and DWA local planning algorithm. The specific steps are as follows:
[0153] Step 1: Define the robot's local cost map as centered on the robot's current position, with a length and width of length robotlocal =12, width robotlocal =12;
[0154] Step 2: The steps of dynamic pedestrian trajectory prediction based on background cancellation method are as follows:
[0155] Step 2.1: When the robot equipped with a laser radar is driving autonomously, the laser radar is used to obtain the point cloud data of adjacent frames and obtain their two-dimensional coordinates. The time difference is recorded as Δt, and the two-dimensional coordinates of the point cloud data of two frames are recorded as Pointcloud t-1 (x pc,t-1 ,y pc,t-1 ), Pointcloud t (x pc,t ,y pc,t ), where the current frame point cloud data is recorded at time t, and the previous frame point cloud data is recorded at time t-1;
[0156] Step 2.2: Use K-means clustering method to obtain cluster points for the two frames of point cloud data, which are respectively denoted as Pointcloud kmeans,t-1 (x kmeanspc,t-1 ,y kmeanspc,t-1 ), Pointcloud kmeans,t (x kmeanspc,t ,y kmeanspc,t );
[0157] Step 2.3, obtain the driving speed v of the robot based on the chassis data robot and heading angle increment Δθ robot , where Δθ robot is the increment of the robot's heading angle from time t-1 to time t;
[0158] Step 2.4, calculate the distance traveled by the robot in the x and y directions within the time Δt. The specific calculation formula is as follows:
[0159]
[0160] Among them, (x t-1 ,y t-1 ) is the two-dimensional coordinate information of the robot in the global coordinate system at time t-1;
[0161] Step 2.5: Clustering Pointcloud kmeans,t-1 (x kmeanspc,t-1 ,y kmeanspc,t-1 ) Use the formula in step 2.4 to perform coordinate transformation and obtain the transformed cluster point cloud kmeanstrans,t-1 (x kmeanstranspc,t-1 ,y kmeanstranspc,t-1 );
[0162] Step 2.6, cluster point cloud t (x pc,t ,y pc,t ), Pointcloud kmeanstrans,t-1 (x kmeanstranspc,t-1 ,y kmeanstranspc,t-1 ) are respectively restricted to obtain the cluster points in the local cost map, which are recorded as Pointcloud rt (x rpc,t ,y rpc,t ), Pointcloud rkmeanstrans,t-1 (x rkmeanstranspc,t-1 ,y rkmeanstranspc,t-1 );
[0163] Step 2.7, cluster the pointclouds rt (x rpc,t ,y rpc,t ) and clustered points Pointcloud rkmeanstrans,t-1 (x rkmeanstranspc,t-1 ,y rkmeanstranspc,t-1 ) to perform difference processing, if it satisfies Then the coordinates are (x rpc,t ,y rpc,t ) is a static obstacle, where range thresold =0.05 is the given threshold; if it does not meet Then the coordinates are (x rpc,t ,y rpc,t ) is a dynamic pedestrian, and go to step 2.8;
[0164] Step 2.8, calculate the dynamic pedestrian speed v do and heading angle θ do , the specific calculation formula is as follows:
[0165]
[0166] Step 2.9, according to the two-dimensional coordinates (x rpc,t ,y rpc,t ) and its travel speed v do , heading angle θ do Predict its driving trajectory. The specific calculation formula is as follows:
[0167]
[0168] Among them, t predict =1,2,…,t dopredict , t dopredict Predict duration for the trajectory;
[0169] Step 3: Dynamic obstacle avoidance is performed based on the DWA local planning algorithm combined with the pedestrian prediction trajectory. The specific steps are as follows:
[0170] Step 3.1, limiting the robot speed and angular velocity sampling space according to the robot state information;
[0171] Step 3.2: dilate each obstacle in the local cost map, with the center of the circle being the obstacle center and the dilation radius being radius robotinflation =0.5;
[0172] Step 3.3, traverse each speed v of the robot robot , angular velocity ω robot Combine to generate a line in t robotsim = Trajectory point sequence traj within 3 seconds robot , the specific calculation formula is as follows:
[0173]
[0174] Among them, (x robot ,y robot ) is the current position information of the robot;
[0175] Step 3.4, evaluate the trajectory traj robot Tracking global path cost, collision cost, and speed cost, the specific steps are as follows:
[0176] 1), calculate the trajectory traj robot The minimum distance between the last trajectory point and the global path mintoglobal , and then calculate the distance localtoglobal =D-distance mintoglobal As the tracking global path cost, where D = 20 is a value given in advance;
[0177] 2), to predict the pedestrian trajectory (x pedestrianpredict ,y pedestrianpredict ) is the center of the circle and the radius is radius pedestrianpredict Perform obstacle expansion, where radius pedestrianpredict The calculation formula is as follows:
[0178]
[0179] Then traverse all obstacles in the local cost map and calculate the trajectory traj robot The distance between the last trajectory point and the nearest obstacle in the local cost map localtoobstacle As the collision cost; and determine whether the distance localtoobstacle ≥2×radius robotinflation , if satisfied, then distance localtoobstacle =2×radius robotinflation ;
[0180] 3) Select the trajectory traj robot The absolute speed of the last trajectory point in the distance is used as the speed cost vel ;
[0181] 4) Store the above three cost values into the set Evaluate = {(distance localtoglobal ,distance localtoobstacle ,distance vel ),…}middle;
[0182] 5) Normalize each type of data in the set Evaluate. The specific calculation formula is as follows:
[0183]
[0184] Among them, num trajrobot For all sampled traj robot ;
[0185] 6) Calculate the total cost value of each sampled trajectory. The specific calculation formula is as follows:
[0186] evaluate traj,k =α·normal_distance localtoglobal,k +β·normal_distance localtoobstacle,k +γ·normal_distance vel,k
[0187] Among them, α, β, and γ are pre-given weight values, which are 0.1, 0.1, and 0.05 respectively;
[0188] 7), select the trajectory with the largest total cost value as the local obstacle avoidance trajectory.
[0189] Figure 7(a) shows the clustering points of the lidar point cloud data of two adjacent frames, where the hollow circles are the clustering points of the previous frame, and the solid circles are the clustering points of the current frame. Since there is a time difference between the acquisition of the two frames of point cloud data, the clustering points of the two frames do not overlap; Figure 7(b) shows the clustering points of the two frames after transformation. It can be found that 24 of the 25 clustering points basically overlap, but they do not completely overlap due to the presence of noise. In addition, it can be seen from the boxed part in the figure that its position deviation is large, indicating that the obstacle corresponding to this clustering point is a dynamic obstacle, that is, a pedestrian. The trajectory of the pedestrian can be predicted based on the clustering points of these two frames.
[0190] Figure 8 This is a simulation diagram of dynamic obstacle avoidance using the DWA local planning algorithm, in which there are both dynamic and static obstacles. The results show that the robot can predict pedestrian trajectories and avoid them in advance.
Claims
1. A human-machine collaborative inter-building path planning method, characterized in that: The following steps are involved: S1. When a robot equipped with a laser radar is driving between buildings, it collects laser radar environment information during driving, constructs a three-dimensional grid map, and performs two-dimensional projection based on the difference in motion characteristics between pedestrians and robots to generate a two-dimensional grid map for pedestrians and a two-dimensional grid map for robots; S2, using the A* algorithm with time information to generate a global path for pedestrians with time and space information for the two-dimensional grid map for pedestrians; S3, obtaining the global position of the robot, applying the A* algorithm to the two-dimensional grid map facing the robot according to the global path facing the pedestrian, and generating a global path facing the robot based on pedestrian prediction and spatiotemporal consistency constraints; S4. Based on the environmental information collected by the LiDAR, dynamic pedestrian trajectory prediction is performed based on the background cancellation method, and the DWA local planning algorithm is used to perform dynamic obstacle avoidance based on the predicted trajectory and the global path facing the robot; The specific implementation process of step S4 includes: i) Define the robot's local cost map as centered on the robot's current position, with a length and width of length respectively robotlocal 、width robotlocal ; ii) According to the two-dimensional coordinates (x rpc,t ,y rpc,t ) and its travel speed v do , heading angle θ do Predicting dynamic pedestrian trajectories: Among them, t predict =1,2,…,t dopredict , t dopredict is the trajectory prediction duration; dynamic pedestrian speed v do and heading angle θ do The calculation formula is: (x rpc,t ,y rpc,t ) is the cluster point Pointcloud rt The coordinates of (x rkmeanstranspc,t-1 ,y rkmeanstranspc,t-1 ) is the cluster point Pointcloud rkmeanstrans,t-1 Coordinates of Pointcloud rt (x rpc,t ,y rpc,t ) is the cluster point Pointcloud t (x pc,t ,y pc,t ) Cluster points in the local cost map; Pointcloud t (x pc,t ,y pc,t ) is the two-dimensional coordinate of the point cloud data of the current frame; Pointcloud rkmeanstrans,t-1 (x rkmeanstranspc,t-1 ,y rkmeanstranspc,t-1 ) is the cluster point Pointcloud kmeanstrans,t-1 (x kmeanstranspc,t-1 ,y kmeanstranspc,t-1 ) Cluster points in the local cost map, Pointcloud kmeanstrans,t-1 (x kmeanstranspc,t-1 ,y kmeanstranspc,t-1 ) is the cluster point cloud kmeans,t-1 (x kmeanspc,t-1 ,y kmeanspc,t-1 ) Cluster points obtained after coordinate transformation; Pointcloud kmeans,t-1 (x kmeanspc,t-1 ,y kmeanspc,t-1 ) is the two-dimensional coordinate Pointcloud of the previous frame of point cloud data t-1 (x pc,t-1 ,y pc,t-1 ) The clustering points obtained by K-means clustering; iii) Using the predicted pedestrian trajectory (x pedestrianpredict ,y pedestrianpredict ) is the center of the circle and the radius is radius pedestrianpredict Perform obstacle expansion; traverse all obstacles in the local cost map and calculate the trajectory traj robot The distance between the last trajectory point and the nearest obstacle in the local cost map localtoobstacle As the collision cost; and determine whether the distance localtoobstacle ≥2×radius robotinflation , if satisfied, then distance localtoobstacle =2×radius robotinflation ; where radius robotinflation is the expansion radius of the obstacle expansion for the two-dimensional grid map, (x robot ,y robot ) is the current position information of the robot; iv) Select the trajectory traj robot The absolute speed of the last trajectory point in the distance is used as the speed cost vel ;traj robot To traverse each speed v of the robot within the speed and angular velocity threshold robot , angular velocity ω robot The combined line is in t robotsim The sequence of trajectory points within seconds; v) Order collection where num trajrobot is the total number of all sampled trajectories, distance localtoglobal,1 is the global path tracking cost of the first trajectory, distance localtoobstacle,1 is the collision cost of the first trajectory, distance vel,1 is the speed cost of the first trajectory; distance localtoglobal,1 =D-distance mintoglobal,1 ;distance mintoglobal,1 is the minimum distance between the last track point in the first track and the global path; D is a given value; distance vel,1 is the absolute speed of the last track point in the first track, and the absolute speed value is used as the speed cost; vi) Normalize each type of data in the Evaluate set: vii) Calculate the total cost value of each sampled trajectory. The specific calculation formula is as follows: evaluate traj,k =α·normal_distance localtoglobal,k +b·normal _ distance localtoobstacle,k +γ·normal_distance vel,k ; Among them, α, β, and γ are given weight values; viii) Select the trajectory with the largest total cost value as the local obstacle avoidance trajectory.
2. The method for inter-building path planning for human-machine collaboration according to claim 1, characterized in that: The specific implementation process of step S1 includes: S1.
1. For the point cloud data detected by the laser radar, a point cloud registration algorithm is used to obtain a three-dimensional point cloud map; S1.2, filtering the three-dimensional point cloud map, and converting the filtered three-dimensional point cloud map into a three-dimensional grid map with a resolution of resolution; S1.3, set the height range h pedestrianmin ≤z gridoctree , where h pedestrianmin is the maximum height of the obstacle that pedestrians can climb over. The three-dimensional grid map is projected on the Z axis to the xoy plane to obtain a two-dimensional grid map facing pedestrians. If the horizontal and vertical coordinates in the three-dimensional grid map are (x gridoctree ,y gridoctree ), the Z axis satisfies h pedestrianmin ≤z gridoctree If there is no three-dimensional grid within the range, then the two-dimensional grid (x gridoctree ,y gridoctree ) is an idle grid; if there is a three-dimensional grid, the two-dimensional grid is an obstacle grid, where (x gridoctree ,y gridoctree ,z gridoctree ) are the coordinates of the center point of the three-dimensional grid; S1.4, set the height range z gridrobot ≤h robotmax , where h robotmax is the maximum height of the robot. The three-dimensional grid map is projected on the Z axis to the xoy plane to obtain a two-dimensional grid map facing the robot. If the horizontal and vertical coordinates in the three-dimensional grid map are (x gridrobot ,y gridrobot ), the Z axis satisfies 0≤z gridrobot ≤h robotmax If there is no three-dimensional grid within the range, then the two-dimensional grid (x gridrobot ,y gridrobot ) is an idle grid; if there is a three-dimensional grid, the two-dimensional grid is an obstacle grid, where (x gridrobot ,y gridrobot ,z gridrobot ) are the coordinates of the center point of the three-dimensional grid; S1.
5. Return to step S1.1, construct three-dimensional grid maps of other floors, and perform two-dimensional projection based on the difference in motion characteristics between pedestrians and robots to generate a two-dimensional grid map for pedestrians and a two-dimensional grid map for robots.
3. The human-machine collaborative inter-building path planning method according to claim 1, characterized in that: The specific implementation process of step S2 includes: S2.
1. Input target point goal pedestrian (x pedestriangoal ,y pedestriangoal ,level pedestriangoal ), the pedestrian's current location start pedestrian (x pedestrianstart ,y pedestrianstart ,level pedestrianstart ), where x pedestriangoal and pedestriangoal is the two-dimensional coordinate of the target point in the xoy plane, level pedestriangoal is the target floor, x pedestrianstart and pedestrianstart is the two-dimensional coordinate of the pedestrian in the xoy plane, level pedestrianstart The current floor of the pedestrian; S2.
2. Determine whether the level is met pedestriangoal =level pedestrianstart ; If satisfied, it means that the target point and the pedestrian are currently on the same floor, and go to step S2.3; if not satisfied, it means that the target point and the pedestrian are currently on different floors, and go to step S2.4; S2.3, if the target point and the pedestrian are currently on the same floor, the A* algorithm with time information is used to generate a global path for the pedestrian with time and space information, starting from (x pedestrianstart ,y pedestrianstart ), the target point is (x pedestriangoal ,y pedestriangoal ); S2.4, if the target point and the pedestrian are currently on different floors, the A* global path planning algorithm with time information is used to first generate the level pedestrianstart The global path of the layer, where the starting point is (x pedestrianstart ,y pedestrianstart ), the target point is level pedestrianstart The elevator position of the floor elevator (x elevator ,y elevator ); When the pedestrian takes the elevator to the target floor level goal When the two-dimensional grid map is updated to level goal Generates a two-dimensional grid map of the level pedestriangoal The global path of the floor, starting from level pedestriangoal Floor elevator location Position elevator (x elevator ,y elevator ), the target point is (x pedestriangoal ,y pedestriangoal ).
4. The method for inter-building path planning for human-machine collaboration according to claim 3 is characterized in that: The specific implementation process of using the A* algorithm with time information to generate a global path for pedestrians with time and space information includes: 1) Receive the starting point start(x start ,y start ), target point goal(x goal ,y goal ) information, define two empty sets Open and Close; 2) Calculate the starting point start(x start ,y start ) start And its arrival at the starting point start(x start ,y start ) at the time t start , stored in the set Open = {(x start ,y start ,F start ,t start ,0,0)}; heuristic value F start The calculation formula is: 3) Determine whether the set Open is an empty set. If not, go to step 4); if so, the global planning ends, and no drivable path with time-space information and facing pedestrians from the starting point to the target point is found; 4) Select the grid point with the smallest heuristic value from the set Open as the next grid point grid n (x n ,y n ), obtain its time information t n , grid points n Move from the set Open to the set Close; 5) Determine the grid points n Is it the target point? If so, it is based on the grid point grid n The parent nodes of are traced back in sequence to find a drivable path from the starting point to the target point with time-space information and facing pedestrians; if not, go to step 6); 6) Find the grid points n The non-obstruction grids in the eight-neighborhood orientation that are not in the set Close are recorded as the nearby reachable grids grid nc (x nc ,y nc ), calculate the nearby reachable grid nc (x nc ,y nc ) nc and the time t at which the nearest reachable grid is reached nc =t n +t f , set the parent node of the adjacent reachable grid to grid n , stored in the set Open = {(x start ,y start ,F start ,t start ,0,0)、…、(x nc ,y nc ,F nc ,t nc ,x n ,y n )}; where t f From the grid point grid n to grid nc The estimated time of nc The calculation formula is: Among them I N is the expansion cost, if it is close to the reachable grid grid nc is an idle grid, I N =0; if the grid is close to the reachable grid nc To expand the grid, Where p1 and p2 are given parameters, distance_obstacle is the distance between the expanded grid and the nearest obstacle grid; the non-obstacle grid includes an idle grid and an expanded grid; the determination process of the idle grid and the expanded grid includes: according to the generated pedestrian-oriented two-dimensional grid map, the location of the elevator on each floor is marked in the two-dimensional grid map, recorded as Position elevator (x elevator ,y elevator ), mark the elevator door obstacle grid as an idle grid in the two-dimensional grid map; perform obstacle expansion operation on the two-dimensional grid map, that is, take the obstacle grid as the expansion center and the expansion radius is radius pedestrianinflation , if the expansion area of a certain obstacle grid is less than half of the area of the obstacle grid, then the obstacle grid is an idle grid, otherwise it is an expansion grid; 7) Jump to step 3) until the global planning is completed.
5. The method for inter-building path planning for human-machine collaboration according to claim 1, characterized in that: The specific implementation process of step S3 includes: S3.
1. The robot is positioned through AMCL to obtain the position of the robot in the xoy plane (x robotstart ,y robotstart ), the robot's current floor is level robotstart ; S3.
2. Input the robot navigation target point goal robot (x robotgoal ,y robotgoal ,level robotgoal ), where x robotgoal and robotgoal is the two-dimensional coordinate of the target point in the xoy plane, level robotgoal The floor where the target is located; S3.3, determine whether the level is met robotgoal =level robotstart ; If satisfied, it means that the target point and the robot are currently on the same floor, go to step S3.4; if not satisfied, it means that the target point and the robot are currently on different floors, go to step S3.5; S3.
4. If the target point and the robot are currently on the same floor, use the A* algorithm to generate a global path for the robot based on pedestrian prediction and spatiotemporal consistency constraints, starting at (x robotstart ,y robotstart ), the target point is (x robotgoal ,y robotgoal ); S3.
5. If the target point and the robot are currently on different floors, the A* algorithm is used in combination with the elevator dispatching module to perform cross-floor navigation.
6. The method for inter-building path planning for human-machine collaboration according to claim 5, characterized in that: The specific implementation process of step S3.5 includes: 1a) Use the A* algorithm to first generate the level robotstart The global path of the layer, where the starting point is (x robotstart ,y robotstart ), the target point is level robotstart The elevator position of the floor elevator (x elevator ,y elevator ); 2a) Calculate the time t it takes for the robot to reach the target point according to the global path generated in step 1a) rs , where s robotglobal is the global path length from the robot’s current position to the elevator’s location, v robotassign is a given speed; 3a) The robot obtains the current level of the elevator elecurrent , calculate the elevator floor level elecurrent Arrive at the robot's level robotstart Time t es , where s elevatorstart The level of the elevator elecurrent Distance to the robot's floor level robotstart The height, v elevator The speed of the elevator to be tested is a fixed value; 4a) Determine whether s is satisfied robotglobal ≤s thresold , where s thresold is a given distance threshold; if yes, go to step 5a); if no, the robot continues to drive and updates the time t taken by the robot to reach the target point rs , return to step 3a); 5a) Determine whether |t is satisfied rs -t es |≤t thresold , where t thresold is a given time threshold; if so, it means that after the robot reaches the target point, the elevator will also reach the robot's level robotstart , issue the elevator call command to the elevator dispatch module; if not, send the elevator call command after reaching the target point; 6a) After the elevator reaches the floor where the robot is located, the robot sends an elevator door opening command to the elevator dispatch module; at the same time, the robot determines whether there are pedestrians entering or exiting the elevator. If so, the robot retreats and enters the elevator after the pedestrians have finished entering or exiting the elevator; if there are no pedestrians entering or exiting the elevator, the robot enters the elevator directly; 7a) After the robot enters the elevator, it issues a command to the elevator dispatch module indicating that it has successfully entered the elevator. After the elevator dispatch module receives the command issued by the robot, it issues a command to close the elevator door and control the elevator to go to the target floor level. robotgoal , and at the same time, issue instructions to the robot to switch the two-dimensional grid map; 8a) After the elevator reaches the target floor, the elevator dispatching module issues an elevator door opening command and a target floor navigation command to the robot; 9a) After receiving the target floor arrival instruction from the elevator dispatch module, the robot starts navigating to the target floor and uses the A* algorithm to generate the level robotgoal The global path of the layer, where the starting point is level robotgoal Floor elevator location Position elevator (x elevator ,y elevator ), the target point is (x robotgoal ,y robotgoal ).
7. The method for inter-building path planning for human-machine collaboration according to claim 5, characterized in that: The specific implementation process of using the A* algorithm to generate a global path for the robot based on pedestrian prediction and spatiotemporal consistency constraints includes: A) Receive the target point goal robot (x robotgoal ,y robotgoal ) Two-dimensional information, global path reference points generated for pedestrians, define two empty sets Open r and Close r ; B) Calculate the robot's starting point robot (x robotstart ,y robotstart ) robotstart and its arrival point start robot The time t robotstart , stored in the collection Open r ={(x robotstart ,y robotstart ,F robotstart ,t robotstart ,0,0)}; where the heuristic value F start The calculation formula is as follows: C) Judge the set Open r Is it an empty set? If not, go to step D); if so, the global planning ends, and no robot-oriented global path based on pedestrian prediction and spatiotemporal consistency constraints from the starting point to the target point is found; D) From the set Open r Select the grid point with the smallest heuristic value as the next grid point grid rn (x rn ,y rn ), get the grid rn (x rn ,y rn ) time information t rn , grid points rn From the collectionOpen r Move into collectionClose r middle; E) Determine the grid points rn Is it the target point? robot ; If so, then according to the grid point grid rn The parent nodes of are traced back in turn to find a global path from the starting point to the target point based on pedestrian prediction and spatiotemporal consistency constraints and oriented to the robot; if not, go to step F); F) Based on grid points rn Time information t rn , get from t rn Time t after the start sim The two-dimensional information of the pedestrian's global path reference point within seconds, recorded as Point pedestrian (x pedestrian ,y pedestrian ), where t sim is a given time in advance, and the grid occupied by the pedestrian's global path reference point is marked as an obstacle grid, and the obstacle is expanded at the same time, with the expansion center being the obstacle grid and the expansion radius being radius pedestrian ; G) Find the grid points rn Eight neighborhood directions and not in the set Close r The non-obstruction grid in is recorded as the adjacent reachable grid grid rnc (x rnc ,y rnc ), calculate the heuristic value F of the nearby reachable grid rnc and the time t at which the nearest reachable grid is reached rnc =t rn +t rf , set the parent node of the adjacent reachable grid to grid rn , stored in the collection Open r ={(x robotstart ,y robotstart ,F robotstart ,t robotstart ,0,0)、…、(x rnc ,y rnc ,F rnc ,t rnc ,x rn ,y rn )}; where t rf From the grid point grid rn to grid rnc The estimated time consumption; the heuristic value F rnc The calculation formula is as follows: Among them I rN is the expansion cost, if it is close to the reachable grid grid rnc is an idle grid, I rN =0; if the grid is nearby rnc To expand the grid, where p r1 、p r2 is a given parameter, distance_obstacle_r is the distance between the expanded grid and the nearest obstacle grid; the non-obstacle grid includes an idle grid and an expanded grid; the process of determining the idle grid and the expanded grid includes: marking the location of the elevator on each floor in the two-dimensional grid map facing the robot, recorded as Position elevator (x elevator ,y elevator ), convert the elevator door obstacle grid into an idle grid in the two-dimensional grid map; perform obstacle expansion on the two-dimensional grid map, that is, take the obstacle grid as the expansion center and the expansion radius is radius robotinflation , if the expansion area of a certain obstacle grid is less than half of the area of the obstacle grid, then the obstacle grid is an idle grid, otherwise it is an expansion grid; H) Jump to step C) until the global planning is completed.
8. The human-machine collaborative inter-building path planning method according to claim 1, characterized in that: Calculate the dynamic pedestrian speed v do and heading angle θ do Previously, the following judgment was made: Clustering Pointcloud rt (x rpc,t ,y rpc,t ) and clustered points Pointcloud rkmeanstrans,t-1 (x rkmeanstranspc,t-1 ,y rkmeanstranspc,t-1 ) to perform difference processing, if it satisfies Then the coordinates are (x rpc,t ,y rpc,t ) is a static obstacle, where range thresold is a given threshold; if it does not meet Then the coordinates are (x rpc,t ,y rpc,t ) is a dynamic pedestrian, and the speed v of the dynamic pedestrian is calculated. do and heading angle θ do .
9. A computer device comprising a memory, a processor and a computer program stored in the memory; characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 8.
10. A computer program product comprising a computer program / instructions; characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
