A real-time detection method, device, terminal and storage medium for passable areas

By collecting and processing point cloud data, combining single-line lidar and rectangular area division technology, the problem of low detection efficiency and inaccurate results when entering the elevator is solved, and more efficient and safe passage detection is achieved.

CN114200472BActive Publication Date: 2025-06-24GUANGDONG INFORE INTELLIGENT SANITATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111346188.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-12
Publication Date
2025-06-24
Estimated Expiration
2041-11-12

AI Technical Summary

Technical Problem

In the prior art, it is difficult for robots to accurately judge the elevator space size and door switch status when entering the elevator, resulting in low detection efficiency and inaccurate results, affecting the safety of robot passage.

Method used

By collecting point cloud data, the corner coordinates formed by the single-line lidar scanning plane and the elevator are calculated, the point set is generated, and the elevator door switch status is judged based on the number of points in the point set. At the same time, divide multiple rectangular areas, count the number of points in each area, and determine whether the robot enters the elevator.

Benefits of technology

It improves detection efficiency and accuracy of detection results, ensures the safety of robot passage, and reduces the use of system resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114200472B_ABST
    Figure CN114200472B_ABST
Patent Text Reader

Abstract

The present invention discloses a real-time detection method, device, terminal and storage medium for a passable area. Laser rays are emitted by a single-line lidar to collect point cloud data, and the point cloud data is processed to generate a point set. The elevator door switch state is judged by comparing the number of points in the point set that meet specific conditions with a preset first threshold. According to the obtained corner coordinates of a first preset number, line segments of a second preset number are generated, and the line segments are moved so that the line segments form a plurality of rectangular areas. According to the point set, the plurality of rectangular areas are traversed, and the number of points falling in a single rectangular area is compared with a preset second threshold to judge whether the robot can enter the elevator. Compared with the prior art, the present invention detects the passable area of the elevator car from two aspects of the state of the elevator door and whether the robot can enter the elevator by collecting point cloud data, processing the point cloud data, improving the detection efficiency and the accuracy of the detection result, and ensuring the safety of the robot's passage.
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 detection, and in particular to a real-time detection method, device, terminal and storage medium for a passable area. Background Art

[0002] The progress of technology has promoted the rapid development of robot technology. In addition to the extensive application of robot technology in scenarios such as industrial manufacturing, the demand for service robots in public places such as hospitals, hotels, restaurants, airports, and stations has also increased exponentially. When a robot needs to perform cross-floor tasks, it needs to take the elevator autonomously. Without knowing the size of the space inside the elevator car and without judging the surrounding environment of the robot, entering the elevator rashly is likely to cause the robot to stop at the elevator entrance or only enter part of its body, affecting efficiency and the experience.

[0003] In the prior art, multi-line lidar is generally used to detect the three-dimensional space, which is costly, requires high computing power, occupies a large amount of system resources, and has a complex algorithm. A mobile robot uses a laser ranging sensor to detect the information of the feature points from itself to the surrounding environment; calculates the area of the overall space of the elevator; counts whether the number of laser rays with a length greater than 2m is less than a specified threshold T. If so, it can be affirmed that the elevator is closed. If the number of laser rays with a length greater than 2m is greater than a threshold T, the elevator door is opening or in the open state, and the area value of the elevator space within the field of view that the laser rays can see is counted; if the area value of the elevator space within the field of view that the laser rays can see is greater than a preset value, the mobile robot enters the elevator. In the prior art, by calculating the area value of the elevator space within the field of view that the laser rays can see to judge whether the robot enters the elevator, this method has a complex calculation, and the final area includes invalid areas, resulting in low detection efficiency and low accuracy of the detection result, and is easily affected by the external environment. Summary of the Invention

[0004] The technical problem to be solved by the present invention is: to provide a real-time detection method, device, terminal and storage medium for a passable area, which improves the detection efficiency and the accuracy of the detection result by collecting point cloud data and statistically analyzing the point cloud data in a specific area, and ensures the safety of the robot's passage.

[0005] To solve the above technical problem, the present invention provides a real-time detection method for a passable area, including:

[0006] Obtain the coordinates of the waiting point for the elevator, so that the robot navigates to the waiting point, and calculate the coordinates of the first preset number of corner points formed by the scanning plane of the single-line lidar and the elevator through system parameters;

[0007] Collect point cloud data by emitting laser rays through the single-line lidar, and process the point cloud data to generate a point set;

[0008] Obtain the abscissas corresponding to each point in the point set, compare the number of points whose abscissa values are greater than the abscissa value of the preset corner point with a preset first threshold, and judge the opening and closing status of the elevator door;

[0009] According to the obtained coordinates of the first preset number of corner points, generate a second preset number of line segments, and move the line segments so that the line segments form a plurality of rectangular areas of a preset size;

[0010] Traverse the point set, count the number of points falling in each rectangular area, compare the number of points in each rectangular area with a preset second threshold, and judge whether the robot enters the elevator.

[0011] Further, laser rays are emitted by a single-line lidar to collect point cloud data, and the point cloud data is processed to generate a point set, specifically:

[0012] By emitting multiple laser rays, obtain the distance values detected by the multiple laser rays, screen the distance values, and obtain the original point cloud data corresponding to the screened distance values;

[0013] Perform coordinate transformation on the original point cloud data, and perform voxel downsampling and Euclidean clustering processing on the original point cloud data after coordinate transformation;

[0014] At the same time, according to the transformation relationship of the coordinate system, generate a point set corresponding to the processed original point cloud data.

[0015] Further, generating a second preset number of line segments and moving the line segments so that the line segments form a plurality of rectangular areas of a preset size, specifically:

[0016] Fictitiously draw a straight line in the elevator so that the distance from the straight line to the elevator door is a preset first preset distance, where the first preset distance is greater than the diameter of the robot;

[0017] Divide the straight line into a second preset number of line segments, and move the line segments back and forth to form a plurality of rectangular areas of a preset size.

[0018] Further, the system parameters include the length and width of the elevator, the radius of the robot, and the distance from the waiting point to the elevator.

[0019] Further, the present invention also provides a real-time detection device for a passable area, including: an acquisition module, a data processing module, a first judgment module, a region division module, and a second judgment module, specifically:

[0020] The acquisition module is used to acquire the coordinates of the elevator waiting point, so that the robot can navigate to the elevator waiting point, and calculate the coordinates of the first preset number of corner points formed by the scanning plane of the single-line lidar and the elevator through system parameters;

[0021] The data processing module is used to collect point cloud data by emitting laser rays with a single-line lidar, and process the point cloud data to generate a point set;

[0022] The first judgment module is used to obtain the abscissa corresponding to each point in the point set, compare the number of points whose abscissa values are greater than the abscissa of the preset corner point with a preset first threshold, and judge the opening and closing status of the elevator door;

[0023] The area division module is used to generate a second preset number of line segments according to the obtained coordinates of the first preset number of corner points, and move the line segments so that the line segments form a plurality of rectangular areas of a preset size;

[0024] The second judgment module is used to traverse the point set, count the number of points falling in each rectangular area, compare the number of points in each rectangular area with a preset second threshold, and judge whether the robot enters the elevator.

[0025] Further, the data processing module is used to collect point cloud data by emitting laser rays with a single-line lidar, and process the point cloud data to generate a point set, specifically:

[0026] By emitting multiple laser rays, obtain the distance values detected by the multiple laser rays, screen the distance values, and obtain the original point cloud data corresponding to the screened distance values;

[0027] Perform coordinate transformation on the original point cloud data, and perform voxel downsampling and Euclidean clustering processing on the original point cloud data after coordinate transformation;

[0028] At the same time, according to the transformation relationship of the coordinate system, generate a point set corresponding to the processed original point cloud data.

[0029] Further, the area division module is used to generate a second preset number of line segments, and move the line segments so that the line segments form a plurality of rectangular areas of a preset size, specifically:

[0030] Fictitiously create a straight line inside the elevator so that the distance from the straight line to the elevator door is a preset first preset distance, where the first preset distance is greater than the diameter of the robot;

[0031] Divide the straight line into a second preset number of line segments, and move the line segments forward and backward to form a plurality of rectangular areas of a preset size.

[0032] Further, the system parameters in the obtaining module include the length and width of the elevator, the radius of the robot, and the distance from the waiting point to the elevator.

[0033] Further, the present invention also provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the real-time detection method of the passable area as described in any one of the above.

[0034] Further, the present invention also provides a computer-readable storage medium. The computer-readable storage medium includes a stored computer program. Wherein, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the real-time detection method of the passable area as described in any one of the above.

[0035] The real-time detection method, device, terminal, and storage medium for a passable area according to the embodiments of the present invention have the following beneficial effects compared with the prior art:

[0036] Based on the characteristics of high stability, high precision, small data volume, little influence from the environment, and simple algorithm of point cloud data, after the robot reaches the designated waiting point through the autonomous navigation system, the present invention obtains the point cloud data in the elevator through laser detection, processes the point cloud data to generate a point set, and then determines the state of the elevator door by detecting the number of points in the point set that meet specific conditions. This method requires less computation, does not need to occupy a large amount of system resources, and improves the detection efficiency. After determining the opening and closing state of the elevator door, in order to ensure the safety of the robot's passage, the area inside the elevator is further divided into multiple rectangles, and the point cloud data inside the rectangles is further statistically analyzed to determine whether the robot enters the elevator. Compared with the prior art, the present invention detects the passable area of the elevator car from two aspects: the state of the elevator door and whether the robot can enter the elevator by collecting point cloud data and processing the point cloud data, improving the detection efficiency and the accuracy of the detection result, and ensuring the safety of the robot's passage. Description of the Drawings

[0037] Figure 1 is a flowchart of an embodiment of a real-time detection method for a passable area provided by the present invention;

[0038] Figure 2 is a structural diagram of an embodiment of a real-time detection device for a passable area provided by the present invention;

[0039] Figure 3 is a schematic diagram of four corner points inside the elevator in an embodiment of a real-time detection method for a passable area provided by the present invention;

[0040] Figure 4 It is a schematic diagram of a rectangular area of an embodiment of a real-time detection method for a passable area provided by the present invention. Detailed implementation manners

[0041] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.

[0042] Embodiment 1

[0043] See Figure 1 , Figure 1 It is a schematic flowchart of an embodiment of a real-time detection method for a passable area provided by the present invention. As shown in Figure 1 , this method includes steps 101 - 105, specifically as follows:

[0044] Step 101: Obtain the coordinates of the elevator waiting point to enable the robot to navigate to the elevator waiting point, and calculate the coordinates of the first preset number of corner points formed by the single-line lidar scanning plane and the elevator through system parameters;

[0045] In this embodiment, a 2D map is scanned and established by using a two-dimensional laser SLAM mapping algorithm with a single-line lidar to facilitate generating a unified map coordinate system, so as to accurately obtain the positions of the robot and the elevator. The robot navigates to the elevator waiting point P(x, y, z) in front of the elevator based on its own positioning and navigation system according to the obtained coordinates of the elevator waiting point, and adjusts its posture so that the position of the robot at the waiting point is directly opposite the elevator door. In this embodiment, the robot uses a right-hand coordinate system. After the robot navigates to the elevator waiting point, it is assumed that the direction of the right-hand coordinate system of the robot is consistent with the direction of the map coordinate system. If the direction of the middle coordinate system in the robot's right hand is inconsistent with the direction of the map coordinate system, the direction of the robot can be adjusted according to the self-posture adjustment system. As a preferred solution in this embodiment, the first preset number is set to 4. Similarly, this first preset number can be adjusted according to the actual situation. In this embodiment, as shown in Figure 3 , the system parameters include the length L of the elevator, the width W of the elevator, the radius r of the robot, and the distance d from the waiting point to the elevator; according to the system parameters, the coordinates of the four corner points of the elevator in the single-line lidar scanning plane relative to the map are respectively A(x + d, y + W / 2, z), B(x + d + L, y + W / 2, z), C(x + d, y - W / 2, z), D(x + d + L, y - W / 2, z).

[0046] Step 102: Emit laser rays through a single-line lidar to collect point cloud data, and process the point cloud data to generate a point set.

[0047] In this embodiment, the robot emits a number of laser rays through a single-line lidar within a perspective with a certain angular deviation from the left and right symmetry of the elevator, obtains the distance values reflected from the object when the laser rays reach the object, screens the distance values, and retains the distance values obtained from the laser rays emitted within the perspective from 90 degrees to the left to 90 degrees to the right of the robot facing the elevator door directly, and obtains the original point cloud data corresponding to the retained distance values after screening. The original point cloud data is mainly composed of the polar coordinates of multiple point clouds. In this embodiment, the method of emitting laser by using a single-line lidar is less affected by the environment, the detection result is more stable and efficient, and the single-line lidar has a low price, which can further reduce the detection cost.

[0048] In this embodiment, the obtained point cloud data has the characteristics of high stability and high precision, and has a small amount of point cloud data, is less affected by the environment, has a simple algorithm, is easy to process, can adjust the installation position of the single-line lidar, and is used to detect elevator carriages at different heights, with a wide range of applications.

[0049] In this embodiment, according to the coordinate conversion formula, the polar coordinates (ρ, θ) of the point cloud corresponding to the original point cloud data are converted into rectangular coordinates (x, y), where the coordinate conversion formula is as follows:

[0050]

[0051] In this implementation, the point clouds after coordinate conversion are respectively subjected to voxel downsampling and Euclidean clustering processing to achieve the purpose of removing noise points and retaining effective detected objects; at the same time, by obtaining the tf tree of the robot, the transformation relationship from the radar coordinate system to the map coordinate system is obtained, and the point clouds after voxel downsampling and Euclidean clustering processing are converted into a point set Q in the map coordinate system according to the transformation relationship.

[0052] Step 103: Obtain the abscissa corresponding to each point in the point set, compare the number of points whose abscissa value is greater than the preset abscissa of the corner point with the preset first threshold, and judge the opening and closing status of the elevator door.

[0053] In this embodiment, traverse the point set to obtain the value i of the abscissa corresponding to each point in the point set. At the same time, based on the positioning deviation and the thickness of the elevator door, preset the allowable error K, and compare the value i of the abscissa of the current point with the value of the abscissa of the preset corner point. Among them, the preset corner point is point A, and the value of the abscissa of point A is x + r + d + k. If the value i of the abscissa of the current point is greater than the value of the abscissa of point A, it is considered that the current point is a point that has fallen into the elevator. Count the number of points in the point set whose abscissa value i is greater than the abscissa value of point A. If the number of points in the counted point set whose abscissa value i is greater than the abscissa value of point A is less than the preset first threshold, it is determined that the elevator door is not fully opened. If the number of points in the counted point set whose abscissa value i is greater than the abscissa value of point A is greater than or equal to the preset first threshold, it is determined that the elevator door has been opened.

[0054] In this embodiment, directly obtaining the abscissa of the point set for judgment reduces the amount of distance calculation from point to point and improves the operation speed. The values of the preset allowable error K and the preset first threshold can be selected according to the actual situation.

[0055] In this embodiment, based on the prior art, the mobile robot calculates the distances from itself to the elevator and the wall through the wall features of the surrounding environment to confirm its current position. After moving to the waiting point and judging the distance from itself to the elevator, it counts the number of laser rays greater than 2m to determine whether the elevator door is open. It is necessary to fit the straight line where the elevator is located and the straight line where the wall is located, and the fitting operation will consume a large amount of computing resources. Moreover, once the elevator or the wall is blocked, the subsequent steps cannot be carried out, and it has a high dependence on the environment and weak anti-interference ability. This embodiment solves the situation where the robot cannot correctly obtain its own position when there is occlusion in the prior art. By establishing a map so that all objects in the map are in a unified coordinate system, the mobile robot can quickly locate its own position and the position of the elevator. Convert the laser ray scan data into a point set in the coordinate system, and judge the position relationship between each point in the point set and the elevator door to quickly obtain the opening and closing state of the elevator door. It has a low dependence on the environment, strong anti-interference ability, simple calculation method, and good robustness.

[0056] Step 104: Generate a second preset number of line segments according to the obtained coordinates of the first preset number of corner points, and move the line segments so that the line segments form a plurality of rectangular regions of a preset size.

[0057] In this embodiment, according to the coordinates of the four corner points in the elevator obtained in step 101, a straight line is fictitiously drawn in the elevator, and this straight line is made parallel to the straight line where the elevator door is located, that is, the straight line connecting point A and point C. And the first preset distance from this straight line to the straight line connecting point A and point C is h, and the value of the first preset distance h should be greater than the sum of the diameter 2r of the robot, the thickness of the elevator door, and the positioning allowable error K. The steps to fictitiously implement this straight line are to select a point E and a point F on the straight lines where the left and right walls of the elevator car are located, that is, AB and CD, respectively, such that the lengths of AE and CF are h, 2r < h < L, and EF / / AC. Then, the coordinates of points E and F can be obtained from the coordinates of points A and C as E(x + d + h, y + W / 2, z) and F(x + d + h, y - W / 2, z). In this embodiment, multiple points are selected on the straight line EF so that the straight line EF is divided into a second preset number of line segments. Correspondingly, an equal number of symmetric points are selected on the straight line where the elevator door is located, that is, the straight line AC. Two points form a line segment, and four points form a rectangular area.

[0058] As an example in this embodiment, the number of multiple points selected on the straight line EF is W / h + 1, where W is the width of the elevator and h is the distance from the straight line EF to the straight line AC. Then, the number of line segments of the second preset number is W / h segments. The steps to select points and divide line segments in this embodiment are to select point E as the starting point, and then select a point G on the straight line EF such that the length of EG is h. Then, the coordinates of point G can be obtained from the coordinates of point E as G(x + d + h, y + W / 2 - h, z). The coordinates of the subsequent selected points are (x + d + h, y + W / 2 - n * h, z), where n represents the serial number of the selected point, n ∈ [0, W / h]. Each continuous two points form a line segment, and each intercepted line segment is moved downward by a distance of h, that is, the corresponding line segment is found on the straight line AC. Taking point A as the starting point, the coordinates of the corresponding point H of point G are (x + d, y + W / 2 - h, z), and the coordinates of the subsequent corresponding points are (x + d, y + W / 2 - n * h, z). The points selected on the straight line EF and the straight line AC are stored in sets a and b respectively. Traverse sets a and b, and respectively take out a n (x + d + h, y + W / 2 - n * h, z), a n+1 (x + d + h, y + W / 2 - (n + 1) * h, z), b n (x + d, y + W / 2 - n * h, z), b n+1 (x + d, y - W / 2 - (n + 1) * h, z) these four points. A rectangular area of a preset size is formed by these four points and put into set c, where the preset size is h * h. The first rectangular area in this embodiment is AEGH, where the first and second points in set a are E and G, and the first and second points in set b are A and H, as Figure 4As shown in the figure, the coordinates of the vertices of the rectangular area AEGH in the map coordinate system are A(x + d, y + W / 2, z), E(x + d + h, y + W / 2, z), G(x + d + h, y + W / 2 - h, z), and H(x + d, y - W / 2 - h, z).

[0059] In this embodiment, based on the prior art, the total area detected by the laser rays is obtained by calculating and accumulating the areas formed by adjacent two laser rays within a preset angle range, and then subtracting the area of the triangle formed by the mobile robot and the elevator door to obtain the area inside the elevator. The operation of calculating and summing the areas of adjacent rays is very cumbersome, and as the mobile robot moves forward, the space detected by the laser rays within the same range becomes smaller, and it is impossible to accurately judge in real time whether the inside of the elevator can be entered. In this embodiment, by unifying the coordinate system, each rectangular area can be quickly and conveniently obtained, and these areas are invariant relative to the map, so that even if the mobile robot moves forward, the space within the area can be accurately judged in real time.

[0060] Step 105: Traverse the point set, count the number of points falling in each rectangular area, compare the number of points in each rectangular area with a preset second threshold, and judge whether the robot enters the elevator.

[0061] In this embodiment, traverse the point set to obtain the current point coordinates (X, Y, Z). There are W / h rectangular areas in the set c generated according to step 104. Judge whether the current point of the point set satisfies the condition that the abscissa is in the interval [x + d, x + d + h] and the ordinate is in the interval [y + W / 2 - n*h, y + W / 2 - (n + 1)*h]. If the condition is satisfied, it is considered that the point falls into the (Y - y - W / 2) / h-th rectangular area, and the number of points satisfying the condition in this rectangular area is incremented by 1. Finally, the number of scattered points in each rectangular area can be obtained and stored in the set d. Traverse the set d. If the number of points falling into the rectangular area is less than the preset second threshold, record the area serial number value k. When there are multiple areas meeting the requirements, it is judged that the robot can enter the area near the middle of the elevator, that is, the minimum value of k - (n / 2); if the number of points falling into the rectangular area is greater than or equal to the preset second threshold, then enter the next rectangular area for judgment. After traversing the set c, if all rectangular areas do not meet the conditions, it is judged that the robot needs to wait for the next elevator. Among them, the parameter of the preset second threshold can be set according to the actual situation.

[0062] In this embodiment, only by traversing the point set once can the falling situation of the points in all rectangular areas be obtained, eliminating the time-consuming step of traversing the point set for each rectangular area, and following the principle of proximity to ensure that the mobile robot moves forward along the established route when meeting the entry conditions.

[0063] In this embodiment, if the number of points falling within the first rectangular area GHIJ is greater than or equal to a preset second threshold, then enter the second rectangular area for judgment. Traverse the multiple rectangular areas with side length h generated in step 104. If all rectangular areas do not satisfy that the number of points falling within the rectangular area is less than the preset second threshold, then it is determined that the robot needs to wait for the next elevator.

[0064] See Figure 2 , Figure 2 is a schematic structural diagram of an embodiment of a real-time detection device for a passable area provided by the present invention. As Figure 2 shown, the device includes an acquisition module 201, a data processing module 202, a first judgment module 203, a region division module 204, and a second judgment module 205, which are specifically as follows:

[0065] The acquisition module 201 is used to acquire the coordinates of the elevator waiting point, so that the robot can navigate to the elevator waiting point, and calculate the coordinates of the first preset number of corner points formed by the single-line lidar scanning plane and the elevator through system parameters.

[0066] In this embodiment, a map is established to facilitate the generation of a unified map coordinate system, and accurately obtain the positions of the robot and the elevator. Based on its own positioning and navigation system, the robot navigates to the elevator waiting point P(x, y, z) in front of the elevator according to the acquired coordinates of the elevator waiting point, and adjusts its posture so that the robot is facing the elevator door at the waiting point. In this embodiment, the robot adopts a right-hand coordinate system. After the robot navigates to the elevator waiting point, it is assumed that the direction of the right-hand coordinate system of the robot is consistent with the direction of the map coordinate system. If the direction of the coordinate system in the right hand of the robot is inconsistent with the direction of the map coordinate system, the direction of the robot can be adjusted according to its own posture adjustment system.

[0067] As a preferred solution in this embodiment, the first preset number is set to 4. Similarly, the first preset number can be adjusted according to actual situations. In this embodiment, as Figure 3 shown, the system parameters include the length L of the elevator, the width W of the elevator, the radius r of the robot, and the distance d from the elevator waiting point to the elevator; according to the system parameters, the coordinates of the four corner points of the elevator in the single-line lidar scanning plane relative to the map are respectively A(x + d, y + W / 2, z), B(x + d + L, y + W / 2, z), C(x + d, y - W / 2, z), D(x + d + L, y - W / 2, z).

[0068] The data processing module 202 is used to collect point cloud data by emitting laser rays through a single-line lidar, and process the point cloud data to generate a point set.

[0069] In this embodiment, the robot emits a number of laser rays through a single-line lidar within a perspective with a certain angular deviation from the left-right symmetry of the elevator, obtains the distance values of the laser rays reflected from the objects, screens the distance values, and retains the distance values obtained from the laser rays emitted within the perspective from 90 degrees to the left to 90 degrees to the right of the robot facing the elevator door directly. Then, the original point cloud data corresponding to the retained distance values after screening is obtained, where the original point cloud data mainly consists of the polar coordinates of multiple point clouds. In this embodiment, the method of emitting lasers by a single-line lidar is adopted, which is less affected by the environment, the detection result is more stable and efficient, and the price of the single-line lidar is low, which can further reduce the detection cost.

[0070] In this embodiment, the obtained point cloud data has the characteristics of high stability and high precision, and the amount of point cloud data is small, less affected by the environment, the algorithm is simple, easy to process, and the installation position of the single-line lidar can be adjusted to detect elevator carriages at different heights, with a wide range of applications.

[0071] In this embodiment, according to the coordinate conversion formula, the polar coordinates (ρ, θ) of the point cloud corresponding to the original point cloud data are converted into rectangular coordinates (x, y), where the coordinate conversion formula is as follows:

[0072]

[0073] In this implementation, the point clouds after coordinate conversion are respectively subjected to voxel downsampling and Euclidean clustering processing to achieve the purpose of removing noise and retaining the effective detected objects; at the same time, by obtaining the tf tree of the robot, the transformation relationship from the radar coordinate system to the map coordinate system is obtained, and the point clouds after voxel downsampling and Euclidean clustering processing are converted into a point set Q in the map coordinate system according to the transformation relationship.

[0074] The first judgment module 203 is used to obtain the abscissas corresponding to the points in the point set, compare the number of points with the abscissa values greater than the abscissa value of the preset corner point with a preset first threshold, and judge the opening and closing status of the elevator door.

[0075] In this embodiment, the point set is traversed to obtain the value i of the abscissa within the point set. At the same time, based on the positioning deviation and the thickness of the elevator door, a preset allowable error K is set. The value i of the abscissa of the current point is compared with the value of the abscissa of the preset corner point. Among them, the preset corner point is point A, and the value of the abscissa of point A is x + r + d + k. If the value i of the abscissa of the current point is greater than the value of the abscissa of point A, it is considered that the current point is a point that has fallen into the elevator. The number of values i of the abscissa within the point set that are greater than the value of the abscissa of point A is counted. If the number of points in the counted point set whose value i of the abscissa is greater than the value of the abscissa of point A is less than the preset first threshold, it is determined that the elevator door is in an incompletely opened state. If the number of points in the counted point set whose value i of the abscissa is greater than the value of the abscissa of point A is greater than or equal to the preset first threshold, it is determined that the elevator door has been opened.

[0076] In the prior art, a mobile robot calculates the distance from itself to the elevator and the wall through the wall features of the surrounding environment to confirm its current position. When it moves to the waiting point, that is, when it judges that the distance from itself to the elevator is equal to the distance from itself to the wall, it counts the number of laser rays greater than 2m to determine whether the elevator door is open. It is necessary to fit the straight line where the elevator is located and the straight line where the wall is located. The fitting operation will consume a large amount of computing resources, and once the elevator or the wall is blocked, the subsequent steps cannot be carried out. It has a high degree of dependence on the environment and weak anti-interference ability. The present invention solves the situation that the robot in the prior art cannot correctly obtain its own position when there is occlusion. By establishing a map, all objects in the map are in a unified coordinate system. The mobile robot can quickly locate its own position and the position of the elevator, convert the laser ray scan data into a point set in the coordinate system, and judge the position relationship between each point in the point set and the elevator door to quickly obtain the opening and closing state of the elevator door. It has a low degree of dependence on the environment, strong anti-interference ability, simple calculation method, and good robustness.

[0077] In this embodiment, directly obtaining the abscissa of the point set for judgment reduces the amount of distance calculation from point to point and improves the operation speed. The values of the preset allowable error K and the preset first threshold can be selected according to the actual situation.

[0078] The area division module 204 is used to generate a second preset number of line segments according to the obtained coordinates of the first preset number of corner points, and move the line segments so that the line segments form a plurality of rectangular areas of a preset size.

[0079] In this embodiment, according to the coordinates of the four corner points obtained by the acquisition module 201 in the elevator, a straight line is fictitiously created in the elevator so that the straight line is parallel to the straight line where the elevator door is located, that is, the straight line formed by connecting point A and point C, and the first preset distance from this straight line to the straight line formed by connecting point A and point C is h, and the value of the first preset distance h should be greater than the sum of the diameter 2r of the robot, the thickness of the elevator door, and the positioning allowable error K. The steps for fictitiously creating this straight line are to select a point E and a point F on the straight lines where the left and right walls of the elevator car are located, that is, AB and CD, respectively, such that the lengths of AE and CF are h, 2r < h < L, and EF / / AC. Then, the coordinates of points E and F can be obtained from the coordinates of points A and C as E(x + d + h, y + W / 2, z) and F(x + d + h, y - W / 2, z).

[0080] In this embodiment, multiple points are selected on the straight line EF so that the straight line EF is divided into line segments of a second preset number. Correspondingly, an equal number of symmetric points are selected on the straight line where the elevator door is located, that is, the straight line AC. Two points form a line segment, and four points form a rectangular area. As an example in this embodiment, the number of multiple points selected on the straight line EF is W / h + 1, where W is the width of the elevator and h is the distance from the straight line EF to the straight line AC. Then, the number of line segments of the second preset number is W / h. The steps for selecting points and dividing line segments in this embodiment are to select point E as the starting point, and then select a point G on the straight line EF such that the length of EG is h. Then, the coordinates of point G can be obtained from the coordinates of point E as G(x + d + h, y + W / 2 - h, z). The coordinates of the subsequent selected points are (x + d + h, y + W / 2 - n * h, z), where n represents the serial number of the selected point, n ∈ [0, W / h]. Each continuous two points form a line segment, and each intercepted line segment is moved downward by a distance of h, that is, the corresponding line segment is found on the straight line AC. Taking point A as the starting point, the coordinates of the corresponding point H of point G are (x + d, y + W / 2 - h, z), and the coordinates of the subsequent corresponding points are (x + d, y + W / 2 - n * h, z). The points selected on the straight lines EF and AC are stored in sets a and b respectively. Traverse sets a and b, and respectively take out a n (x + d + h, y + W / 2 - n * h, z), a n+1 (x + d + h, y + W / 2 - (n + 1) * h, z), b n (x + d, y + W / 2 - n * h, z), b n+1 (x + d, y - W / 2 - (n + 1) * h, z) these four points. A rectangular area of a preset size is formed by these four points and placed in set c, where the preset size is h * h. The first rectangular area in this embodiment is AEGH, where the first and second points in set a are E and G, and the first and second points in set b are A and H, as Figure 4As shown in the figure, the coordinates of each vertex of the rectangular area AEGH in the map coordinate system are A(x + d, y + W / 2, z), E(x + d + h, y + W / 2, z), G(x + d + h, y + W / 2 - h, z), and H(x + d, y - W / 2 - h, z).

[0081] In the prior art, the total area detected by the laser rays is obtained by calculating and accumulating the areas formed by adjacent two laser rays within a preset angle range, and then subtracting the area of the triangle formed by the mobile robot and the elevator door to obtain the area inside the elevator. The operation of calculating and summing the areas of adjacent rays in this technology is very cumbersome, and as the mobile robot moves forward, the space detected by the laser rays within the same range becomes smaller, and it is impossible to accurately judge in real time whether it is possible to enter the elevator. Through unifying the coordinate system, the present invention can quickly and conveniently find out each rectangular area, and these areas are invariant relative to the map, and even if the mobile robot moves forward, it can accurately judge the space within the area in real time.

[0082] The second judgment module 205 is used to traverse the point set, count the number of points falling in each rectangular area, compare the number of points in each rectangular area with a preset second threshold, and judge whether the robot enters the elevator.

[0083] In this embodiment, traverse the point set to obtain the current point coordinates (X, Y, Z). According to the set c generated by the area division module 204, there are W / h rectangular areas. Judge whether the current point of the point set simultaneously satisfies that the abscissa is in the interval [x + d, x + d + h] and the ordinate is in the interval [y + W / 2 - n*h, y + W / 2 - (n + 1)*h]. If the condition is satisfied, it is considered that the point falls into the (Y - y - W / 2) / h-th rectangular area, and the number of points satisfying the condition in this rectangular area is incremented by one. Finally, the number of scattered points in each rectangular area can be obtained and stored in the set d. Traverse the set d. If the number of points falling into the rectangular area is less than the preset second threshold, record the area serial number value k. When there are multiple areas meeting the requirements, it is judged that the robot can enter the area near the middle of the elevator, that is, the minimum value of k - (n / 2); if the number of points falling into the rectangular area is greater than or equal to the preset second threshold, enter the next rectangular area for judgment. After traversing the set c, if all rectangular areas do not meet the conditions, it is judged that the robot needs to wait for the next elevator. Among them, the parameter of the preset second threshold can be set according to the actual situation. In the present invention, only by traversing the point set once, the falling situation of the points in all rectangular areas can be obtained, eliminating the time-consuming step of traversing the point set for judgment for each rectangular area, and following the principle of proximity to ensure that the mobile robot moves forward along the established route when meeting the entry conditions.

[0084] In this embodiment, if the number of points falling within the first rectangular area GHIJ is greater than or equal to a preset second threshold, then enter the second rectangular area for judgment. Traverse the multiple rectangular areas with side length h generated by the area division module 204. If all the rectangular areas do not satisfy that the number of points falling within the rectangular area is less than the preset second threshold, then it is determined that the robot needs to wait for the next elevator.

[0085] In this embodiment, a terminal device is further provided, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the real-time detection method of the passable area as described in the above embodiment.

[0086] In this embodiment, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored computer program. Wherein, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the real-time detection method of the passable area as described in the above embodiment.

[0087] In summary, for a real-time detection method, device, terminal, and storage medium of a passable area according to the present invention, by obtaining the coordinates of the elevator waiting point, the robot is navigated to the elevator waiting point, and through system parameters, the coordinates of the first preset number of corner points formed by the scanning plane of the single-line lidar and the elevator are calculated; by emitting laser rays to collect point cloud data and processing the point cloud data to generate a point set; obtaining the abscissa corresponding to each point in the point set, comparing the number of points whose abscissa value is greater than the abscissa value of the preset corner point with the preset first threshold to judge the opening and closing status of the elevator door; according to the obtained coordinates of the first preset number of corner points, generating a second preset number of line segments, moving the line segments so that the line segments form multiple rectangular areas of a preset size; traversing the point set, counting the number of points falling in each rectangular area, and comparing the number of points in each rectangular area with the preset second threshold to judge whether the robot can enter the elevator. Compared with the prior art, the present invention detects the passable area of the elevator car from two aspects: the state of the elevator door and whether the robot can enter the elevator by collecting point cloud data and processing the point cloud data, improves the detection efficiency and the accuracy of the detection result, and ensures the safety of the robot's passage.

[0088] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and substitutions can be made, and these improvements and substitutions should also be regarded as the protection scope of the present invention.

Claims

1. A real-time detection method for passable areas, characterized in that, including: Obtain the coordinates of the elevator waiting point to enable the robot to navigate to the elevator waiting point, and calculate the coordinates of the first preset number of corner points formed by the scanning plane of the single-line lidar and the elevator through system parameters; Emit multiple laser rays through the single-line lidar, obtain the distance values detected by the multiple laser rays, screen the distance values, and obtain the original point cloud data corresponding to the screened distance values; Perform coordinate transformation on the original point cloud data, and perform voxel downsampling and Euclidean clustering processing on the original point cloud data after coordinate transformation; Meanwhile, generate a point set corresponding to the processed original point cloud data according to the transformation relationship of the coordinate system; Obtain the abscissa corresponding to each point in the point set, compare the number of points whose abscissa value is greater than the abscissa value of the preset corner point with a preset first threshold, and judge the opening and closing status of the elevator door; According to the obtained coordinates of the first preset number of corner points, fictitiously draw a straight line in the elevator so that the distance from the straight line to the elevator door is a first preset distance, where the first preset distance is greater than the diameter of the robot; Divide the straight line into a second preset number of line segments, and move the line segments forward and backward so that the line segments form multiple rectangular areas of a preset size; Traverse the point set, count the number of points falling in each rectangular area, compare the number of points in each rectangular area with a preset second threshold, and judge whether the robot enters the elevator.

2. The real-time detection method for a passable area according to claim 1, characterized in that The system parameters include the length and width of the elevator, the radius of the robot, and the distance from the elevator waiting point to the elevator.

3. A real-time detection device for a passable area, characterized in that, including: An acquisition module, a data processing module, a first judgment module, a region division module, and a second judgment module, specifically: The acquisition module is used to obtain the coordinates of the elevator waiting point to enable the robot to navigate to the elevator waiting point, and calculate the coordinates of the first preset number of corner points formed by the scanning plane of the single-line lidar and the elevator through system parameters; The data processing module is used to emit multiple laser rays through the single-line lidar, obtain the distance values detected by the multiple laser rays, screen the distance values, obtain the original point cloud data corresponding to the screened distance values, perform coordinate transformation on the original point cloud data, and perform voxel downsampling and Euclidean clustering processing on the original point cloud data after coordinate transformation. Meanwhile, generate a point set corresponding to the processed original point cloud data according to the transformation relationship of the coordinate system; The first judgment module is used to obtain the abscissa corresponding to each point in the point set, compare the number of points whose abscissa value is greater than the abscissa value of the preset corner point with a preset first threshold, and judge the opening and closing status of the elevator door; The region division module is used to fictitiously draw a straight line in the elevator according to the obtained coordinates of the first preset number of corner points so that the distance from the straight line to the elevator door is a first preset distance, where the first preset distance is greater than the diameter of the robot. Divide the straight line into a second preset number of line segments, and move the line segments forward and backward so that the line segments form multiple rectangular areas of a preset size; The second judgment module is configured to traverse the point set, count the number of points falling in each rectangular area, compare the number of points in each rectangular area with a preset second threshold, and determine whether the robot enters the elevator.

4. The real-time detection device for a passable area according to claim 3, characterized in that, The system parameters in the acquisition module include the length and width of the elevator, the radius of the robot, and the distance from the waiting point to the elevator.

5. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the real-time detection method for the passable area according to any one of claims 1 to 2.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the real-time detection method for the passable area according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Robot positioning method and device, robot and storage medium

    CN110542421A

  • Elevator door state detection method and device

    CN110713087A