Method and system for indoor robot pedestrian obstacle avoidance

By generating cost value areas in the robot map layer, using laser data to extract pedestrian positions and speeds, and setting cost values ​​to guide path planning, the unknown problem of indoor robots when avoiding pedestrian obstacles is solved, and safe path planning with pedestrians is achieved.

CN114993311BInactive Publication Date: 2024-09-27HANGZHOU JINGWU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210535881.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-17
Publication Date
2024-09-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing indoor robots have unknown features when avoiding pedestrian obstacles, especially in long and narrow corridors. It is difficult for robots to make reasonable avoidance when approaching pedestrians, which may threaten pedestrians' safety.

Method used

By generating cost value areas in the robot map layer, using laser point data to extract pedestrian positions and speeds, generating elliptical or circular areas, setting cost values ​​to guide path planning, distinguishing hall and corridor areas, using different strategies to ensure the safety of robots and pedestrians distance.

Benefits of technology

Accurately determine the position of human legs under 2D laser conditions to achieve reasonable robot behavior. Add map layers without limiting the planner, and use different strategies to distinguish areas to ensure pedestrian safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114993311B
    Figure CN114993311B
Patent Text Reader

Abstract

The present invention provides a method and system for indoor robot pedestrian obstacle avoidance, comprising the following steps: a cost value setting step: generating an area in a map layer and setting a cost value in the generated area; a path planning step: performing path planning according to the set cost value. The method determines a human leg when only a 2D laser is present, and then enables the robot to perform reasonable behavior.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot pedestrian obstacle avoidance, and in particular to a method and system for indoor robot pedestrian obstacle avoidance. Background Art

[0002] The main working environment of indoor robots is buildings, hotels, etc., where there are many pedestrians. The most mature navigation solution currently is to use the grid map generated in advance by SLAM for positioning and navigation. These solutions can work very well in static environments. SLAM is the full name of Simultaneous Localization and Mapping, which is translated into Chinese as Simultaneous Localization and Mapping.

[0003] Reference: Layered Costmaps for Context-Sensitive Navigation, the Chinese translation is layered cost map for navigation related to upper and lower layers.

[0004] The Chinese invention patent document with publication number CN114296455A discloses a mobile robot obstacle avoidance method based on pedestrian prediction. The method refers to the idea that when people face moving obstacles, they will analyze their movement trends and then avoid them in advance. According to the different scenarios in which the mobile robot is running, it is divided into narrow corridor sections and wide hall sections: when the robot encounters a pedestrian in front of it, it uses the social force model to predict its walking trajectory for a period of time. In the narrow corridor section, it adopts a passive avoidance method and adjusts its speed according to the predicted position of the pedestrian; when it is in the hall section, it adopts an active avoidance strategy, improves the dynamic window method (DWA), and adds an evaluation item for predicting the direction of pedestrians in the original evaluation function, so that the improved algorithm can avoid the position where the pedestrian will walk next in advance. This document adopts the method of modifying the local planner to enable the robot to make avoidance actions.

[0005] In view of the above-mentioned related technologies, the inventor believes that people are obstacles to movement and have a lot of uncertainty. At the same time, when the robot walks normally, it is no problem to be only a few centimeters away from the wall. If it is so close to people, it will definitely pose a serious threat to people. Therefore, a solution that can both plan normally and ensure the safety of pedestrians is needed. Summary of the invention

[0006] In view of the defects in the prior art, an object of the present invention is to provide a method and system for indoor robot pedestrian obstacle avoidance.

[0007] According to the present invention, a method for indoor robot pedestrian obstacle avoidance includes the following steps:

[0008] Cost value setting steps: Generate areas in the map layer according to pedestrians, and set cost values ​​in the generated areas;

[0009] Path planning steps: Path planning is performed based on the set cost value.

[0010] Preferably, the cost value setting step includes the following steps:

[0011] A first area generating step: generating a first area in a pedestrian cost map layer of a map layer;

[0012] First cost value setting step: setting a first cost value in the first area;

[0013] and / or,

[0014] Second area generation step: generate the second area in the walking layer on one side of the map layer;

[0015] Second cost value setting step: setting a second cost value in the second area;

[0016] In the path planning step, path planning is performed according to the set first cost value and / or second cost value.

[0017] Preferably, the first region generating step comprises the following steps:

[0018] The first position acquisition step of the pedestrian: receiving the first laser and extracting the first position of the pedestrian;

[0019] The second position acquisition step of the pedestrian: receiving the second laser and extracting the second position of the pedestrian;

[0020] Speed ​​and direction acquisition step: processing the first position and the second position to obtain the speed and direction of the pedestrian;

[0021] The first area acquisition step: generating the first area according to the pedestrian's first position, second position, travel speed and travel direction.

[0022] Preferably, the step of obtaining the first position of the pedestrian comprises the following steps:

[0023] First laser receiving step: receiving a first laser;

[0024] Cluster segmentation step: traverse the first laser, let the laser point be i, then the previous laser point is i-1, and the next laser point is i+1; if it is the same continuous data, then

[0025]

[0026]

[0027] Among them, (xi ,y i ) represents the position of the current laser point index i in the map coordinate system, x i Indicates the horizontal coordinate of the current laser point index i in the map coordinate system, y i Indicates the ordinate of the current laser point index i in the map coordinate system; (x i-1 ,y i-1 ) represents the position of the previous laser point i-1 in the map coordinate system, x i-1 Indicates the horizontal coordinate of the previous laser point i-1 in the map coordinate system, y i-1 Indicates the ordinate of the previous laser point i-1 in the map coordinate system; (x i+1 ,y i+1 ) represents the position of the next laser point i+1 in the map coordinate system, x i+1 Indicates the horizontal coordinate of the next laser point i+1 in the map coordinate system, y i+1 It indicates the vertical coordinate of the next laser point i+1 in the map coordinate system; threshold indicates the spacing threshold;

[0028] The absolute errors among rang(i-1), range(i) and range(i+1) are also within the threshold range, and i-1, i, i+1 are considered to be in the same line segment, and several line segments are obtained; among them, rang(i-1) represents the distance measurement value of the laser point with index i-1, range(i) represents the distance measurement value of the laser point with index i, and range(i+1) represents the distance measurement value of the laser point with index i+1;

[0029] Conditional elimination steps: Eliminate line segments that are not human legs according to the conditions; the diameter of a single human leg is within the set distance range, and calculate the distance between the first two points of each cluster of line segments; if the distance between the first two points is greater than or less than the set distance range, eliminate the corresponding line segment;

[0030] Remaining line segment judgment step: perform cubic spline difference fitting on the remaining line segments to obtain curve segments, calculate the radius, curvature and center point of each curve segment, perform threshold judgment on the obtained data, and if the conditions are met, the curve segment is considered to be a suspected human leg;

[0031] The steps for calculating the first position of a pedestrian are as follows: the distance between the two legs of a person is within the specified distance range. If the center distance between the centers of the suspected legs is within the specified distance range, it is considered that a person exists. The midpoint of the line connecting the center points of the suspected legs within the specified distance range is calculated as the actual coordinates of the pedestrian, which is the first position of the pedestrian.

[0032] Preferably, the step of acquiring the second position of the pedestrian repeats the step of acquiring the first position of the pedestrian, and changes the first laser into the second laser, and changes the first position into the second position.

[0033] Preferably, in the first area acquisition step, if the position difference between the first position and the second position of the pedestrian is less than a predetermined threshold, it is considered that the person has not moved;

[0034] The speed of the pedestrian in the x-axis direction is v_x, and the speed of the pedestrian in the y-axis direction is v_y. Then calculate the total speed V:

[0035]

[0036] If V is equal to 0, the first region is a circular region;

[0037] The circular area is

[0038] (x-cx) 2 +(y-cy) 2 =R;

[0039] Where cx represents the current horizontal coordinate of the pedestrian in the map coordinate system; cy represents the current vertical coordinate of the pedestrian in the map coordinate system; R represents the radius of the area where the cost value needs to be changed;

[0040] If V is not equal to 0, the first area is a first elliptical area;

[0041] The first ellipse area is

[0042]

[0043] Wherein, a represents the length of the major semi-axis of the first elliptical region, and b represents the length of the minor semi-axis of the first elliptical region.

[0044] Preferably, in the first cost value setting step, the position difference between the first position and the second position of the pedestrian is set to h, the component of h on the x-axis is mx, the component of h on the y-axis is my, the variance of h on x is varx, and the variance of h on the y-axis is vary;

[0045] The first area is the grid area that needs to be updated. After obtaining the grid area, get the index and update the first cost value cost1 of the index:

[0046]

[0047] Wherein, A represents the proportionality coefficient.

[0048] Preferably, in the second region generating step, the second region is a second elliptical region;

[0049] When the pedestrian and the robot are close, the current position of the pedestrian and the position of one side of the pedestrian are obtained, and the current position of the pedestrian and the position of one side of the pedestrian are respectively used as the vertices of the second elliptical area, and the major semi-axis c of the second elliptical area is obtained;

[0050]

[0051] Wherein, d represents the minor semi-axis of the second elliptical area.

[0052] According to the present invention, a system for avoiding obstacles for indoor robots includes the following modules:

[0053] Cost value setting module: generates areas in the map layer according to pedestrians, and sets cost values ​​in the generated areas;

[0054] Path planning module: performs path planning based on the set cost value.

[0055] Preferably, the cost value setting module includes the following modules:

[0056] A first area generation module: generates a first area in a pedestrian cost map layer of a map layer;

[0057] A first cost value setting module: sets a first cost value in the first area;

[0058] and / or,

[0059] Second area generation module: generates the second area in the walking layer on one side of the map layer;

[0060] A second cost value setting module: sets a second cost value in the second area;

[0061] In the path planning module, path planning is performed according to the set first cost value and / or second cost value.

[0062] Compared with the prior art, the present invention has the following beneficial effects:

[0063] 1. This method determines the human legs when there is only 2D laser, and then makes the robot perform reasonable behavior;

[0064] 2. The present invention can increase the map layer without limiting the planner;

[0065] 3. The present invention distinguishes between the lobby and corridor areas, mainly by marking semantic points, marking the lobby area and corridor area in the map, and using different strategies to enter different areas. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0067] Figure 1 It is a flow chart of the present invention;

[0068] Figure 2Extracting a human body map for the robot of the present invention;

[0069] Figure 3 Selecting a laser spot diagram for the present invention;

[0070] Figure 4 It is the point drawing of the inventor's leg arc;

[0071] Figure 5 It is a circular area diagram of the present invention;

[0072] Figure 6 It is an elliptical area diagram of the present invention;

[0073] Figure 7 Get a map for the inventor's location;

[0074] Figure 8 Add a cost graph to the ring of the present invention;

[0075] Fig. 9 Add a cost map to the elliptical area of ​​the present invention;

[0076] Fig.10 A cost graph is added for the pull-over behavior of the present invention. DETAILED DESCRIPTION

[0077] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0078] The embodiment of the present invention discloses a method for indoor robot behavior obstacle avoidance, such as Figure 1 As shown, the following steps are included: cost value setting step: generating areas in the map layer according to pedestrians, and setting cost values ​​in the generated areas.

[0079] The cost value setting step includes the following steps: a first area generating step: generating a first area in a pedestrian cost map layer of a map layer; a first cost value setting step: setting a first cost value in the first area; and / or, a second area generating step: generating a second area in a walking layer on one side of the map layer; a second cost value setting step: setting a second cost value in the second area.

[0080] The first area generating step includes the following steps: a pedestrian first position acquiring step: receiving a first laser and extracting a pedestrian first position.

[0081] The step of obtaining the first position of the pedestrian includes the following steps: a first laser receiving step: receiving the first laser.

[0082] Cluster segmentation step: traverse the first laser, let the laser point be i, then the previous laser point is i-1, and the next laser point is i+1; if it is the same continuous data, then

[0083]

[0084]

[0085] Among them, (x i ,y i ) represents the position of the current laser point index i in the map coordinate system, x i Indicates the horizontal coordinate of the current laser point index i in the map coordinate system, y i Indicates the ordinate of the current laser point index i in the map coordinate system; (x i-1 ,y i-1 ) represents the position of the previous laser point i-1 in the map coordinate system, x i-1 Indicates the horizontal coordinate of the previous laser point i-1 in the map coordinate system, y i-1 Indicates the ordinate of the previous laser point i-1 in the map coordinate system; (x i+1 ,y i+1 ) represents the position of the next laser point i+1 in the map coordinate system, x i+1 Indicates the horizontal coordinate of the next laser point i+1 in the map coordinate system, y i+1 It represents the ordinate of the next laser point i+1 in the map coordinate system; threshold represents the spacing threshold (obtained based on experience).

[0086] The absolute errors among rang(i-1), range(i) and range(i+1) are also within the threshold range, and i-1, i, i+1 are considered to be in the same line segment, and then several line segments are obtained; among them, rang(i-1) represents the ranging value of the laser point with index i-1, range(i) represents the ranging value of the laser point with index i, and range(i+1) represents the ranging value of the laser point with index i+1.

[0087] Conditional elimination steps: Eliminate line segments that are not human legs according to the conditions; the diameter of a single human leg is within the set distance range, and calculate the distance between the first two points of each cluster of line segments; if the distance between the first two points is greater than or less than the set distance range, eliminate the corresponding line segment.

[0088] The remaining line segment judgment step: perform cubic spline difference fitting on the remaining line segments to obtain curve segments, calculate the radius, curvature and center point of each curve segment, perform threshold judgment on the obtained data, and if the conditions are met, the curve segment is considered to be a suspected human leg.

[0089] The steps for calculating the first position of a pedestrian are as follows: the distance between the two legs of a person is within the specified distance range. If the center distance between the centers of the suspected legs is within the specified distance range, it is considered that a person exists. The midpoint of the line connecting the center points of the suspected legs within the specified distance range is calculated as the actual coordinates of the pedestrian, which is the first position of the pedestrian.

[0090] The second position acquisition step of the pedestrian: receiving the second laser and extracting the second position of the pedestrian. The second position acquisition step of the pedestrian repeats the first position acquisition step of the pedestrian, and changes the first laser to the second laser and the first position to the second position.

[0091] Speed ​​and direction acquisition step: Process the first position and the second position to obtain the pedestrian's speed and direction.

[0092] The first area acquisition step: generating the first area according to the pedestrian's first position, second position, travel speed and travel direction.

[0093] If the position difference between the first position and the second position of the pedestrian is less than a predetermined threshold (eg, within 10 centimeters), it is considered that the person has not moved.

[0094] The speed of the pedestrian in the x-axis direction is v_x, and the speed of the pedestrian in the y-axis direction is v_y. Then calculate the total speed V:

[0095]

[0096] If V is equal to 0, the first area is a circular area.

[0097] The circular area is

[0098] (x-cx) 2 +(y-cy) 2 =R;

[0099] Among them, cx represents the horizontal coordinate of the pedestrian in the current map coordinate system; cy represents the vertical coordinate of the pedestrian in the current map coordinate system; R represents the radius of the area where the cost value needs to be changed.

[0100] If V is not equal to 0, the first area is a first elliptical area.

[0101] The first ellipse area is

[0102]

[0103] Wherein, a represents the length of the major semi-axis of the first elliptical region, and b represents the length of the minor semi-axis of the first elliptical region.

[0104] Path planning step: Path planning is performed according to the set cost value. Path planning is performed according to the set first cost value and / or second cost value.

[0105] In the first cost value setting step, let the position difference between the first position and the second position of the pedestrian be h, the component of h on the x-axis be mx, the component of h on the y-axis be my, the variance of h on x be varx, and the variance of h on the y-axis be vary.

[0106] The first area is the grid area that needs to be updated. After obtaining the grid area, get the index and update the first cost value cost1 of the index:

[0107]

[0108] Wherein, A represents the proportionality coefficient.

[0109] In the second region generating step, the second region is a second elliptical region.

[0110] When the pedestrian and the robot are close, the current position of the pedestrian and the position of one side of the pedestrian are obtained, and the current position of the pedestrian and the position of one side of the pedestrian are respectively used as the vertices of the second elliptical area, and the major semi-axis c of the second elliptical area is obtained.

[0111]

[0112] Wherein, d represents the minor semi-axis of the second elliptical area.

[0113] The embodiment of the present invention also discloses a system for indoor robot pedestrian obstacle avoidance, comprising the following modules: a cost value setting module: generating an area in a map layer according to pedestrians, and setting a cost value in the generated area.

[0114] The cost value setting module includes the following modules: a first area generation module: generating a first area in a pedestrian cost map layer of a map layer, a first cost value setting module: setting a first cost value in the first area; and / or, a second area generation module: generating a second area in a walking layer on one side of the map layer; a second cost value setting module: setting a second cost value in the second area.

[0115] Path planning module: Path planning is performed according to the set cost value. Path planning is performed according to the set first cost value and / or second cost value.

[0116] This solution is based on the cost map implemented by the ROS plug-in. Custom layers, people_layer and robot_right_side_layer, are added to the map layer. ROS is the full name of Robot Operating System in English, and its Chinese translation is Robot Operating System. Cost map means cost map; people_layer means pedestrian cost map layer; robot_right_side_layer means right-side walking layer.

[0117] People_layer updates the recognized people to this layer, and generates an elliptical area based on the direction of the person's movement (if the person is moving, an ellipse is generated, if the person is stationary, a circular area is generated), and finally sets the cost value for this area. Cost means cost.

[0118] The main function of robot_right_side_layer is to increase the cost value of the right side of the pedestrian when the robot encounters a person, so that the robot can plan to the right like a person. This function is very practical in corridors. People often walk on the right, and the robot's path planning is often in the middle of the corridor. This results in the robot walking to the right or left of the person when encountering a pedestrian. The randomness of this situation is not very friendly to pedestrians. You can set it to walk on the right by simply changing the side with the increased cost. Walking in the same direction does not affect the generation of the elliptical area and the addition of the cost value.

[0119] The embodiment of the present invention also discloses a method for indoor robot pedestrian obstacle avoidance, such as Figure 1 As shown, the following steps are included: Step 1: Receive a frame of laser light and extract the features of human legs. Get the location of the person. If it is one person, return the location of one person and modify only one cost value; if it is multiple people, return the locations of multiple people and modify multiple cost values.

[0120] like Figure 2 As shown in the figure, laser radar is a laser that emits a laser pulse, and the time of emission is recorded by a timer. The return light is received by a receiver, and the timer records the return time. Subtracting the two times gives the "flight time" of light, and the speed of light is constant, so it is easy to calculate the distance after knowing the speed and time.

[0121] ① Cluster segmentation. Figure 3 As shown, traverse the laser, let the laser point i, then the previous laser point is i-1, and the next laser point is i+1; then if it is the same continuous data, then

[0122]

[0123]

[0124] Among them, (x i ,y i ) is the position of the current laser point index i in the map coordinate system, x i Indicates the horizontal coordinate of the current laser point index i in the map coordinate system, y i is the ordinate of the current laser point index i in the map coordinate system; (x i-1 ,yi-1 ) is the position of the previous laser point i-1 in the map coordinate system, x i-1 is the horizontal coordinate of the previous laser point i-1 in the map coordinate system, y i-1 is the ordinate of the previous laser point i-1 in the map coordinate system; (x i+1 ,y i+1 ) is the position of the next laser point i+1 in the map coordinate system, threshold is the distance threshold between the two points, x i+1 is the horizontal coordinate of the next laser point i+1 in the map coordinate system, y i+1 It is the ordinate of the next laser point i+1 in the map coordinate system.

[0125] If the absolute errors between rang(i-1), range(i) and range(i+1) are also within the threshold range, it can be considered that i-1, i, i+1 are in the same line segment. In this way, several segments are obtained. Among them, rang(i-1), range(i) and range(i+1) are the laser point ranging values ​​indexed as i-1, i and i+1 respectively.

[0126] ② Eliminate line segments that are definitely not human legs based on the conditions. The diameter of a human leg is generally between 10cm and 30cm. Calculate the distance between the first two points of each cluster. If the distance is greater or less than this distance, remove it. This can eliminate a large number of furniture and walls.

[0127] ③ Perform cubic spline interpolation fitting on the remaining line segments to obtain a smooth curve segment. Calculate the radius, curvature, and center point of each curve segment, and perform threshold judgment on the obtained data. If the conditions are met, it is considered that the location is a suspected human leg.

[0128] ④ Calculate the position of the person. People's legs appear in pairs, and the distance between the two legs is generally between 10 and 50 cm. Therefore, if the center distance between two suspected human legs is within this range, it can be considered that there is a person. Calculate the midpoint of the line connecting the two midpoints as the actual coordinates of the person. (For example, Figure 4 As shown, the middle point of the arc is taken, and then the distance between the two points is calculated). When there are more than two people walking together, the detected legs are combined in pairs (the legs are not combined repeatedly) to obtain the positions of the multiple people.

[0129] Step 2: Get the speed and direction of the person's legs. Get the person's speed and direction.

[0130] ① Obtain the second frame of laser data, calculate the position of the person again according to step 1, and calculate the second human body position and the first human body position. The time interval between the two frames of data is known, so the difference between the two positions is also known, so the speed and direction can be obtained.

[0131] ② If the difference between the two positions is less than the threshold, it is considered that the human body is not moving.

[0132] Step 3: Generate regions and set cost values. If the person is stationary, a circle with the person at the center will be generated. If the person is walking, an ellipse-like shape will be generated, with the major axis being the direction the person is moving.

[0133] First, find the pedestrian's velocities v_x and v_y in the x and y directions, and then find the combined velocity:

[0134]

[0135] Assume that the person is regarded as a rigid body, where v_x is the estimated velocity of the person in the x-axis direction, v_y is the estimated velocity of the person in the y-axis direction, and V is the total velocity.

[0136] If V = 0;

[0137] Then, if Figure 5 As shown, the circular area is

[0138] (x-cx) 2 +(y-cy) 2 =R

[0139] Where cx and cy are the current positions of the person in the map coordinate system, and R is the radius of the area where the cost value needs to be changed.

[0140] If V is not equal to 0;

[0141] Then, if Figure 6 As shown, the elliptical area is

[0142]

[0143] Where a is the length of the major semi-axis, and b is the length of the minor semi-axis. p1 and p2 are the two positions of the pedestrian, and p3 and p4 are the endpoints of the major axis and minor axis of the ellipse, respectively.

[0144] p3=V*t+p2;

[0145] Among them, V is the speed calculated above, t is the forward prediction time, and if p3 is known, the major semi-axis a can be calculated. The minor semi-axis b is a parameter variable that controls the length of the minor axis.

[0146] Through the above steps, we get the circular or elliptical area that needs to change the cost1 value. First, initialize the people_layer map layer, the size is the same as the static map, and the initial cost1 is all set to 0. Then calculate the grid index in the circular or elliptical area, and update the grid cost1 value of these indexes. The cost1 value is calculated in the following way.

[0147] Suppose the difference between the pedestrian's two positions is h, the angle between the line connecting the two points and the x-axis is angle, the components on the x-axis and y-axis are mx and my, and the variances on the x-axis and y-axis are varx and vary; the circular or elliptical area is used to determine the grid area that needs to be updated. After obtaining the area, the index is obtained to update the cost1 value of this index. The formula is a way to calculate the cost1 value, and sometimes the maximum value of 255 or 250 is directly assigned.

[0148]

[0149] Among them, A is the proportional coefficient, which controls the final value between 0 and 255, and the exponential part obtains the value according to the relationship between the distance traveled on the x-axis and y-axis and the variance of this distance.

[0150] Set the cost1 value.

[0151] Step 4: When the robot's right-side behavior is enabled, the cost value on the pedestrian side needs to be updated in robot_right_side_layer to change the path planning to achieve the purpose of walking on one side. This function is generally used in narrow scenes such as corridors. Taking the corridor scene as an example, it is divided into the following 6 movement situations: person is stationary + facing the robot (stationary), person is stationary + back to the robot (stationary), person and machine move in the same direction + facing the robot (person walks back, ignored), person and machine move in the same direction + back to the robot (moving away or approaching), person and machine move towards each other + facing the robot (approaching), person and machine move towards each other + back to the robot (person walks back, ignored).

[0152] First, the pedestrian position is obtained through the leg detection module, and then the first and second positions of the observed pedestrian in the map are obtained. If the position remains unchanged or the displacement is very small, the person is considered to be stationary.

[0153] Then determine the direction of the person, and according to the curvature characteristics of the person's legs, take the first, last and middle points of the curve segment of the person's leg. When facing the machine, the middle point is closest to the robot, the first and last points are relatively far away, and the distance between the first and last points is almost the same; when facing away from the robot, the middle point is farthest from the machine, the first and last points are relatively close, and the distance between the first and last points is almost the same.

[0154] Finally, determine the direction of movement of the pedestrian. First, calculate the Euclidean distance d1 between the person's first position and the robot's first observation, and then calculate the Euclidean distance d2 between the person's second position and the robot's second observation position. If d1>d2, the person and the robot are approaching, otherwise they are moving away.

[0155] When the person is facing the same direction as the robot, but facing away from the robot, do not perform any operation.

[0156] When the person is stationary or approaching, the following operations need to be performed on the layer: obtain the coordinates of the pedestrian and the coordinates of the wall on the left side of the map. The two coordinates are used as the two vertices of the ellipse. The two points are connected to know the value of the major axis c, and the minor axis d is a fixed variable value. Thus, an elliptical area is obtained, which is constantly translated as the pedestrian moves.

[0157]

[0158] After obtaining the area, first initialize the robot_right_side_layer layer and set the cost2 values ​​of all grids to 0. Calculate the grid indexes of the ellipse area, update the cost2 values ​​of these indexes, and set the cost2 value directly to 250.

[0159] Step 5. Update the above two layers of cost values ​​to the master (the final merged cost map). When the path planning receives the costmap (this cost map), it will affect the path selection and thus reach the destination.

[0160] This solution is based on another idea, which is to modify the path cost value in the map to achieve the avoidance effect, and the modification of the map is more universal. Figure 7 As shown in the figure, if a stationary person is identified, the circled part is the person's position, and the shadow part is the obstacle layer. If a person is identified, the cost value is further increased to make the machine farther away from the person. Figure 8 As shown in , the cost of removing the obstacle layer in the ring is increased. Fig. 9 As shown in , if it is a moving person, calculate the position twice within a certain period of time, set an elliptical area in the direction of the person's movement, and increase the cost value in this area so that the path planning can avoid this area. Fig.10 As shown, if the robot side-pull behavior is turned on, the lateral cost value on the pedestrian side will be increased, so that the robot can always go to the side with a smaller cost value (the right side in the figure). Therefore, it is divided into two layers, robot_right_side_layer is the robot side-pull behavior layer, and people_layer is another layer for adding cost to pedestrians. The present invention is a very reliable way to mark semantic points. Semantic annotation has been mature and reliable in scenes such as slope points, falling areas, and stair sections.

[0161] Those skilled in the art know that, in addition to realizing the system and its various devices, modules, and units provided by the present invention in a purely computer-readable program code, it is entirely possible to realize the same functions in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a hardware component, and the devices, modules, and units included therein for realizing various functions can also be regarded as structures within the hardware component; the devices, modules, and units for realizing various functions can also be regarded as both software modules for realizing the method and structures within the hardware component.

[0162] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A method for indoor robot pedestrian obstacle avoidance, characterized in that: The steps include: Cost value setting steps: Generate areas in the map layer according to pedestrians, and set cost values ​​in the generated areas; Path planning steps: Path planning is performed according to the set cost value; The cost value setting step comprises the following steps: A first area generating step: generating a first area in a pedestrian cost map layer of a map layer; First cost value setting step: setting a first cost value in the first area; and / or, Second area generation step: generate the second area in the walking layer on one side of the map layer; Second cost value setting step: setting a second cost value in the second area; In the path planning step, path planning is performed according to the set first cost value and / or second cost value; The first region generation step comprises the following steps: The first position acquisition step of the pedestrian: receiving the first laser and extracting the first position of the pedestrian; The second position acquisition step of the pedestrian: receiving the second laser and extracting the second position of the pedestrian; Speed ​​and direction acquisition step: processing the first position and the second position to obtain the speed and direction of the pedestrian; First region acquisition step: generating a first region according to the pedestrian's first position, second position, travel speed and travel direction; The step of obtaining the first position of the pedestrian comprises the following steps: First laser receiving step: receiving a first laser; Cluster segmentation step: traverse the first laser, let the laser point be i, then the previous laser point is i-1, and the next laser point is i+1; If it is the same continuous data, then Among them, (x i ,y i ) represents the position of the current laser point index i in the map coordinate system, x i Indicates the horizontal coordinate of the current laser point index i in the map coordinate system, y i Indicates the ordinate of the current laser point index i in the map coordinate system; (x i-1 ,y i-1 ) represents the position of the previous laser point i-1 in the map coordinate system, x i-1 Indicates the horizontal coordinate of the previous laser point i-1 in the map coordinate system, y i-1 Indicates the ordinate of the previous laser point i-1 in the map coordinate system; (x i+1 ,y i+1 ) represents the position of the next laser point i+1 in the map coordinate system, x i+1 Indicates the horizontal coordinate of the next laser point i+1 in the map coordinate system, y i+1 Indicates the ordinate of the next laser point i+1 in the map coordinate system; threshold indicates the spacing threshold; The absolute errors among rang(i-1), range(i) and range(i+1) are also within the threshold range, and i-1, i, i+1 are considered to be in the same line segment, and several line segments are obtained; among them, rang(i-1) represents the distance measurement value of the laser point with index i-1, range(i) represents the distance measurement value of the laser point with index i, and range(i+1) represents the distance measurement value of the laser point with index i+1; Conditional elimination steps: Eliminate line segments that are not human legs according to the conditions; the diameter of a single human leg is within the set distance range, and calculate the distance between the first two points of each cluster of line segments; if the distance between the first two points is greater than or less than the set distance range, eliminate the corresponding line segment; Remaining line segment judgment step: perform cubic spline difference fitting on the remaining line segments to obtain curve segments, calculate the radius, curvature and center point of each curve segment, perform threshold judgment on the obtained data, and if the conditions are met, the curve segment is considered to be a suspected human leg; The steps for calculating the first position of a pedestrian are as follows: the distance between the two legs of a person is within the specified distance range. If the center distance between the centers of the suspected legs is within the specified distance range, it is considered that a person exists. The midpoint of the line connecting the center points of the suspected legs within the specified distance range is calculated as the actual coordinates of the pedestrian, which is the first position of the pedestrian.

2. The method for indoor robot pedestrian obstacle avoidance according to claim 1, characterized in that: The pedestrian second position acquisition step repeats the pedestrian first position acquisition step, and changes the first laser to the second laser, and changes the first position to the second position.

3. The method for indoor robot pedestrian obstacle avoidance according to claim 2, characterized in that: In the first area acquisition step, if the position difference between the first position and the second position of the pedestrian is less than a predetermined threshold, it is considered that the person has not moved; The speed of the pedestrian in the x-axis direction is v_x, and the speed of the pedestrian in the y-axis direction is v_y. Then calculate the total speed V: If V is equal to 0, the first region is a circular region; The circular area is (x-cx) 2 +(y-cy) 2 =R; Where cx represents the current horizontal coordinate of the pedestrian in the map coordinate system; cy represents the current vertical coordinate of the pedestrian in the map coordinate system; R represents the radius of the area where the cost value needs to be changed; If V is not equal to 0, the first area is a first elliptical area; The first ellipse area is Wherein, a represents the length of the major semi-axis of the first elliptical region, and b represents the length of the minor semi-axis of the first elliptical region.

4. The method for indoor robot pedestrian obstacle avoidance according to claim 2, characterized in that: In the first cost value setting step, the position difference between the first position and the second position of the pedestrian is set to h, the component of h on the x-axis is mx, the component of h on the y-axis is my, the variance of h on x is varx, and the variance of h on the y-axis is vary; The first area is the grid area that needs to be updated. After obtaining the grid area, get the index and update the first cost value cost1 of the index: Wherein, A represents the proportionality coefficient.

5. The method for indoor robot pedestrian obstacle avoidance according to claim 1, characterized in that: In the second region generating step, the second region is a second elliptical region; When the pedestrian and the robot are close, the current position of the pedestrian and the position of one side of the pedestrian are obtained, and the current position of the pedestrian and the position of one side of the pedestrian are respectively used as the vertices of the second elliptical area, and the major semi-axis c of the second elliptical area is obtained; Wherein, d represents the minor semi-axis of the second elliptical area.

6. A system for indoor robot pedestrian avoidance, characterized in that: The method for indoor robot pedestrian obstacle avoidance according to any one of claims 1 to 5 comprises the following modules: Cost value setting module: generates areas in the map layer according to pedestrians, and sets cost values ​​in the generated areas; Path planning module: performs path planning based on the set cost value.

7. The indoor robot pedestrian obstacle avoidance system according to claim 6, characterized in that: The cost value setting module includes the following modules: A first area generation module: generates a first area in a pedestrian cost map layer of a map layer; A first cost value setting module: sets a first cost value in the first area; and / or, Second area generation module: generates the second area in the walking layer on one side of the map layer; A second cost value setting module: sets a second cost value in the second area; In the path planning module, path planning is performed according to the set first cost value and / or second cost value.