Robot obstacle-bypassing control method based on map probability information
Through a method based on map probability information, laser sensors and curve fitting technology are used to solve the jitter error and resolution problems of the sweeping robot when navigating and avoiding obstacles, achieving a more accurate and smooth path around obstacles, and reducing collisions. risk.
Patent Information
- Application Number
- PCT/CN2024/082186
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-23
- Filing Date
- 2024-03-18
- Publication Date
- 2024-09-26
AI Technical Summary
When existing sweeping robots navigate and avoid obstacles, due to the jitter error of the laser sensor and the resolution of the grid map, the obstacle outline points are marked or lost multiple times, resulting in frequent collisions and restricted movement.
Using a robot obstacle avoidance control method based on map probability information, the obstacle contour points are obtained through rotation scanning of the laser sensor, multiple line segments are set to select effective obstacle grids, and curve fitting is performed to generate an obstacle avoidance fitting curve to achieve smoothing and accuracy. Avoid obstacles.
It overcomes the positioning error caused by laser data jitter error and grid resolution, improves the accurate identification of obstacle contours and the smoothness of the obstacle path, and reduces the frequency of collisions between the robot and obstacles.
Smart Images

Figure CN2024082186_26092024_PF_FP
Abstract
Description
Robot obstacle avoidance control method based on map probability information Technical Field
[0001] The present invention relates to the technical field of laser radar mapping and navigation, and in particular to a robot obstacle avoidance control method based on map probability information. Background Art
[0002] Currently, most sweeping robots, when performing navigation and obstacle avoidance operations, typically use the obstacle grids marked in the grid map and the obstacle information physically contacted by the collision sensor to plan the obstacle avoidance path, where the obstacle outline is represented by the grid in the grid map.
[0003] The detection distance of a fixed obstacle (object to be measured) by the laser sensor is inconsistent. When scanning an obstacle at a fixed distance at two adjacent moments, the detection distance involved in the collected laser point cloud may be different, that is, there is a jitter error in the laser data, and the jitter error basically conforms to the normal distribution. Therefore, a position point actually occupied by the aforementioned fixed obstacle may be marked as consisting of multiple obstacle grids in the grid map, causing the robot to be configured to not be allowed to walk into the passable area in the actual environment, and it is not easy to walk around the outline of the obstacle.
[0004] On the other hand, due to the resolution of cells in the grid map, when a single grid is used to represent a position point actually occupied by an obstacle, there is a distance error consistent with the size corresponding to the resolution (for example, if the grid resolution is 10mm, a 10mm error will be generated when it is directly used to locate the obstacle). Therefore, planning the path directly based on the grid map will cause grid errors, and some obstacle contour points that should have been collected will often be lost, resulting in the robot being configured to allow walking into the area occupied by obstacles, which makes it easy to collide with obstacles frequently.
[0005] Summary of the Invention
[0006] This application discloses a robot obstacle avoidance control method based on map probability information. The specific technical solution is as follows:
[0007] The robot obstacle avoidance control method based on map probability information includes: step S1, the robot controls the laser sensor to rotate and scan, and collects obstacle contour points, and then obtains the grid where the obstacle contour points are located and the corresponding occupancy probability value in the grid map; step S2, a plurality of line segments are set on the side of the robot close to the obstacle, so that the set line segments pass through the grid where the obstacle contour points are located; step S3, among the grids where the obstacle contour points are located that each line segment passes through, the grid where the obstacle contour points are located is selected based on the occupancy probability value corresponding to the grid where the obstacle contour points are located. In step S4, the robot performs a curve fitting operation using the effective obstacle grid described in step S3 to generate an obstacle avoidance fitting curve equation. In step S5, the robot converts the obstacle avoidance target point from the obstacle avoidance fitting curve equation based on the adjacent position points of the current position point in the target planning direction, and then the robot walks from the current position point to the obstacle avoidance target point. In step S6, whenever the robot walks to an obstacle avoidance target point, the obstacle avoidance target point is updated to the current position point, and steps S5 to S6 are repeated until the robot walks to the preset obstacle avoidance end point.
[0008] The technical effect of the aforementioned steps S1 to S6 is that: multiple line segments are set on the side of the robot close to the obstacle, and then based on the occupancy probability values of the grids where the obstacle contour points are located, valid obstacle grids are selected from the grids where the multiple obstacle contour points are located that the same line segment passes through in the grid map. This is used to filter the laser data of the laser sensor's laser probe rotating scan, overcome the jitter error in the laser data, and obtain valid occupied positions in the grid map that can represent the obstacle contour. Therefore, the aforementioned steps S1 to S3 select valid obstacle grids (belonging to obstacle grids) based on the occupancy probability values corresponding to the grids where the obstacle contour points are located. While consuming less grid search time, representative obstacle grids can be selected from each line segment within the limited grid area, overcoming the impact of the aforementioned laser data jitter, reducing the degree of robot movement restriction, and increasing the probability of the robot approaching the obstacle contour position. On this basis, a curve fitting operation is performed using the effective obstacle grid to obtain the obstacle avoidance fitting curve equation for the robot's obstacle avoidance walking. The obstacle avoidance fitting curve is then fitted accordingly, thereby achieving smoothing of the obstacle grid. Compared with the prior art that directly uses grid or point cloud data to splice the trajectory, the curve fitting operation of this embodiment can improve the accuracy and smoothness of the fitted trajectory. It overcomes the positioning error caused by grid resolution and compensates for the grid error caused by the obstacle contour points that should have been collected. In addition, the robot walks on the obstacle avoidance fitting curve at each obstacle avoidance target point, and sequentially tracks the position points in front of the robot along the obstacle avoidance fitting curve. The robot performs curve fitting and node tracking based on the historical marks of the obstacle contour points, achieving non-contact obstacle avoidance or avoidance during the tracking process. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] FIG1 is a flow chart of a robot obstacle avoidance control method based on map probability information disclosed in an embodiment.
[0010] FIG2 is a schematic diagram of a grid marking linear obstacles when a laser sensor mounted on a robot performs rotational scanning, according to an embodiment.
[0011] FIG3 is a schematic diagram of a plurality of line segments set by a robot passing through a grid where marked obstacle contour points are located, according to an embodiment.
[0012] FIG4 is a schematic diagram of an embodiment of a robot planning obstacle avoidance target points in sequence along the positive direction of the coordinate axis Yr. DETAILED DESCRIPTION
[0013] In order to more clearly illustrate the present invention, specific embodiments are provided below for further explanation. In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are provided to provide a thorough understanding of the embodiments of the present application. However, it will be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0014] It should be understood that when used in this application, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their collections. It should also be understood that the term "and / or" used in this application refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations.
[0015] As used in this application, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0016] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance. References to "one embodiment" or "some embodiments" etc. described in the specification of the present application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0017] As an embodiment, a robot obstacle avoidance control method based on map probability information is disclosed. The robot obstacle avoidance control method is performed by a device to be avoided, such as a robot. The robot may include a sweeping robot, a guide robot, a patrol robot, a lawnmower robot, etc. The robot body may be a relatively large disc-shaped body located to the left of obstacle L1 in FIG2 . The center of the body is represented by position point R1, which is the center of the robot's body projection on a plane. The robot body is equipped with a laser sensor, such as a lidar. The laser sensor may be a relatively small circular structure located to the left of obstacle L1 in FIG2 . The center of the lidar may be represented by position point R2. The laser sensor is used to detect obstacles in an effective detection area (the area framed by the dashed circle S in FIG2 ) using a rotational scanning method. The robot also supports the construction of a grid map of the scanned environment and the positioning of the robot and surrounding obstacles based on the grid map.
[0018] As shown in FIG1 , the robot obstacle avoidance control method includes:
[0019] Step S1, the robot controls the laser sensor to rotate and scan. The laser probe inside the laser sensor emits a laser beam and rotates 360 degrees around the center of the laser sensor, and collects obstacle contour points. Since it is the result of the laser probe's rotation scanning, the robot can collect multiple obstacle contour points at one time; then the robot obtains the grid where the obstacle contour point is located and its corresponding occupancy probability value in the grid map. Then execute step S2. In step S1, each time the laser probe rotates one circle, it provides the robot with 360 point cloud points, which is recorded as a frame of point cloud collected by the robot. Each point cloud point can correspond to an obstacle contour point at an angle. Therefore, the robot can collect obstacle contour points according to the point cloud frame, and use the technical means of coordinate system conversion to convert the position coordinates of the obstacle contour point into the grid map (a map composed of multiple unit grids with a certain resolution) in real time, and obtain the grid where the obstacle contour point is located, that is, the grid where the obstacle contour point hits in the grid map. At the same time, the corresponding grid coordinates and the hit probability value of the obstacle contour point in the grid are also obtained. The obstacle contour point in the grid The hit probability value in the grid is used to represent the probability that the grid is occupied by an obstacle. The accumulated value of the hit probability value is updated to the occupation probability value, so that the hit probability value assigned to the grid where the obstacle contour point is located is updated to the occupation probability value. In fact, the occupation probability value of the grid where the obstacle contour point is located represents the probability that the grid is occupied by an obstacle. The position coordinates of the obstacle contour point can be determined by the robot coordinate system (rectangular coordinate system) with the robot body center as the origin. They are obtained by converting the point cloud points output by the laser sensor from the laser coordinate system. The laser coordinate system is a polar coordinate system centered on the center of the laser sensor (also regarded as the rotation center of the laser probe). It is calculated based on the rigid connection relationship between the center of the laser sensor and the center of the robot body.
[0020] The trigonometric transformation relationship that can be mastered by those skilled in the art establishes a rigid connection relationship between the center of the laser sensor and the center of the robot body. Specifically, the transformation equations between the robot coordinate system and the laser coordinate system include: R_x=dist*cos(theta)+laser_dist*cos(laser_theta); R_y=dist*sin(theta)+laser_dist*sin(laser_theta); R_dist=sqrt(R_x 2 +R_y 2 ); R_theta=atan(R_y / R_x);
[0021] Among them, the polar coordinates (coordinates in the laser coordinate system) of the point cloud point output by the laser sensor are (theta, dist); the polar coordinate data of the obstacle contour point is (R_theta, R_dist), and the polar coordinates are based on the robot's body center as the polar coordinate system; the polar coordinates formed by the robot's body center relative to the center of the laser sensor are (laser_theta, laser_dist); the position coordinates of the obstacle contour point are (R_x, R_y).
[0022] It should be noted that the obstacle contour point is the reflection point formed by the laser beam emitted by the laser sensor reflecting on the surface of the obstacle near the side of the robot. The two-dimensional coordinate information and angle information of the detected (or scanned) obstacle can be obtained through the reflection point.
[0023] Step S2: Set multiple line segments on the side of the robot closest to the obstacle so that the set line segments pass through the grids where the obstacle contour points are located, and then execute step S3. The line segments set in step S2 can pass through at least one grid where the obstacle contour points are located, that is, pass through at least one obstacle grid. The grids where the obstacle contour points are located can be marked as obstacle grids. As shown by the multiple arrowed line segments (excluding coordinate axis Xr) set to the right of the robot's body center R1 in Figure 3, the multiple arrowed line segments pass through the grids where the obstacle contour points in obstacle L1 are located. The grids where the obstacle contour points passed by the multiple arrowed line segments are shown as black cells in Figure 3. On the side of the robot close to the obstacle, multiple line segments passing through the grid where the obstacle contour points are located are set up, which can frame a certain grid area within the grid map; although there are gaps between different line segments, the length of each line segment is limited, forming a search window with line segments as traversal units; and multiple line segments are given a certain extension direction, which can be regarded as rays in a certain range of grid areas, thereby searching for the grid where the obstacle contour points are located in a clear direction.
[0024] Moreover, the multiple line segments set on the side of the robot close to the obstacle will move as the robot walks, so as to capture the latest obstacle contour points traversed on the outside of the robot's side in real time and in an orderly manner. Since there are gaps between the multiple line segments set by the robot, they do not completely cover the entire area occupied by the obstacle contour. Therefore, compared with the obstacle grid traversed by the rectangular window in the prior art, the number of obstacle contour points passed by the multiple line segments is reduced.
[0025] Step S3: Select valid obstacle grids from the grids containing the obstacle contour points that each line segment passes through based on the corresponding occupancy probability values of the grids containing the obstacle contour points. This ensures that the valid obstacle grids selected within a defined grid area (corresponding to the grid area consisting of the grids that each line segment passes through within the same grid map) become the effective contours of the obstacle in the grid map, representing the actual physical location occupied by the obstacle. Then, proceed to Step S4.
[0026] In the implementation scenario of step S3, since the obstacle contour points collected by the robot may have coordinate offset errors or angle deflection errors in the grid map, an obstacle contour point obtained by rotating the laser probe one or more times may hit multiple grids. In particular, when the straight obstacle L1 in Figure 3 is perpendicular to the line segment and the size of the straight obstacle L1 in the direction perpendicular to it only occupies one grid size, the obstacle contour points collected by scanning the straight obstacle L1 will actually occupy at least two grids in the vertical direction of the straight obstacle L1 (corresponding to the grids where the obstacle contour points are located, represented by the black unit cells filled in Figure 3), that is, the same obstacle contour point will hit multiple grids. During the rotational scanning process of the laser probe, it is repeatedly captured and offset to one side of the linear obstacle L1 to hit at least one additional grid. As a result, a position point actually occupied by a fixed obstacle may be marked as consisting of multiple obstacle grids in the grid map, resulting in laser data jitter. This causes each line segment (each arrowed line segment passing through obstacle L1 shown in FIG3 ) to pass through at least two obstacle grids in the grid map. Moreover, the probability value of each collected obstacle contour point hitting one of the grids follows a normal distribution. Regardless of whether the grid occupancy probability value changes, the robot can be reduced to a point, represented as position point R1 shown in FIG2 to FIG4 . Of course, multiple obstacle contour points acquired by rotating the laser probe one or more times may hit the same grid. The hit probability values of different obstacle contour points actually acquired at the same grid location in the grid map are then used to continuously update the probability information for the grid location hit by the obstacle contour point in the grid map. This generates the occupancy probability value for the corresponding grid location. The grid map is then updated, with the accumulated hit probability values being updated to the occupancy probability value. This updates the hit probability value assigned to the grid location where the obstacle contour point resides, allowing the updated grid map to more accurately reflect the actual location occupied by the obstacle. As the number of laser probe rotations increases, the accuracy of the reflected location improves. Therefore, compared to the prior art, this embodiment selects valid obstacle grids (belonging to the obstacle grid) based on the occupancy probability values corresponding to the grid location where the obstacle contour point resides. This allows the selection of representative obstacle grids within each line segment within a defined grid area while consuming less grid search time, thus overcoming the effects of laser data jitter.
[0027] It is worth noting that a grid map with a certain resolution allows a certain number of point clouds to hit, and is composed of a certain number of grids corresponding to the hits of the point clouds. In some embodiments, it is constructed from a probability grid [Pmin, Pmax] of 5cm*5cm size. Whether it is a two-dimensional grid map or a three-dimensional grid map, when the map is created, the occupancy probability value of the grid is less than Pmin, indicating that there is no obstacle at the grid position, between Pmin and Pmax, indicating unknown, and greater than Pmax, indicating that there is an obstacle at the grid position. Each frame of the laser point cloud will generate a batch of grids. In this batch of grids, each grid is assigned a probability value. If the grid already has a probability value, the probability value of the grid needs to be updated. The above-mentioned occupancy probability value can be used to indicate the possibility of the grid being occupied / hit by an obstacle. This embodiment can use the method in the relevant technology to determine the probability of each grid being hit by an obstacle at the current moment, which will not be described in detail here.
[0028] Step S4: The robot performs a curve fitting operation using the effective obstacle grid described in step S3 to generate an obstacle avoidance fitting curve equation; then executes step S5.
[0029] In step S4, to curve fit a pseudo-obstacle avoidance trajectory for direct robot use, the effective obstacle grid selected in step S3 can be expanded or translated to bring the effective outline of the obstacle currently detected by the laser sensor in the grid map closer to the robot's side. A curve fitting operation is then performed on the expanded or translated effective obstacle grid. This curve fitting operation is performed using the effective obstacle grid described in step S3 to generate an obstacle avoidance fitting curve equation. This obstacle avoidance fitting curve also forms an obstacle avoidance pseudo-trajectory (which can be viewed as a pseudo-obstacle avoidance trajectory composed of multiple discrete points). The robot then follows this obstacle avoidance fitting curve to avoid obstacles. To prevent the robot from colliding with obstacles, the coordinate offset generated by the expansion or translation is set based on the robot's radius and obstacle avoidance distance.
[0030] Generally, since the obstacle contour points are pre-represented using a grid map, and the robot will introduce grid errors when it directly avoids obstacles based on the grid map (determined by the resolution of the grid map, where the grid resolution is 10 mm, and there will be a 10 mm positioning coordinate error when it is directly used to avoid obstacles), the laser point cloud data detected during the movement of differential robots such as sweeping robots will continue to jitter. Therefore, this embodiment performs a curve fitting operation on the effective obstacle grid described in step S3 through step S4, which is equivalent to smoothing the effective obstacle grid. The smoothness of the fitted curve is less than the grid resolution, thereby leveling the error and filling the obstacle contour points lost due to the grid resolution, making the connected obstacle contour smoother, which is suitable for the robot walking direction along the edge planned to be parallel to it.
[0031] Furthermore, in order to track the robot's obstacle avoidance position in real time, the obstacle avoidance fitting curve equation will be used to calculate each subsequent position point of the robot on the obstacle avoidance fitting curve in sequence, so that the robot can plan the path of walking along the obstacle avoidance fitting curve from the current position point.
[0032] In step S5, the robot calculates the obstacle avoidance target point from the obstacle avoidance fitting curve equation based on the adjacent position points of the current position point in the target planning direction. Then, the robot walks from the current position point to the obstacle avoidance target point. The walking method here is generally to walk in a straight line along a predetermined direction within the passable area, and can be to navigate toward the front of the robot. Then, step S6 is executed.
[0033] If the target planning direction is set to the positive direction of the ordinate axis of the robot coordinate system, then based on the adjacent position points of the current position point in the target planning direction, the obstacle avoidance target point with the same ordinate as the adjacent position point is calculated from the obstacle avoidance fitting curve equation. This is equivalent to substituting the ordinate of the adjacent position point into the obstacle avoidance fitting curve equation to obtain the abscissa of the obstacle avoidance target point with the same ordinate as the adjacent position point, thereby determining the coordinate position information of an obstacle avoidance target point in the robot coordinate system.
[0034] As shown in Figure 4 , the robot's body center moves from position R1 (considered as the robot's current position) to position A to enter the obstacle avoidance fitting curve. Position A is the first obstacle avoidance target point calculated by executing step S5. Starting from this first obstacle avoidance target point, the robot moves in the target planning direction to each obstacle avoidance target point converted in real time, thereby achieving movement along the extension direction of the obstacle avoidance fitting curve (which can be a direction of increasing coordinate values) without colliding with obstacles. This corresponds to walking in the direction from point A to point B in Figure 4 , which can also be considered walking in the positive direction of coordinate axis Yr. Furthermore, the robot walks along the extension direction of the obstacle avoidance fitting curve, assuming that the coordinate distance between the current position and the adjacent position point in the target planning direction represents the distance between the two adjacent obstacle avoidance target points.
[0035] Step S6: Whenever the robot reaches an obstacle avoidance target point, the obstacle avoidance target point is updated as the current position point, and steps S5 and S6 are repeated until the robot reaches the preset obstacle avoidance endpoint. Whenever the robot reaches an obstacle avoidance target point, the robot's current position point is first updated as the obstacle avoidance target point, and steps S5 and S6 are repeated. The obstacle avoidance fitting curve equation generated in step S4 is used to continuously track the next obstacle avoidance target point, thereby traversing the obstacle avoidance fitting curve one obstacle avoidance target point at a time along the extension direction of the obstacle avoidance fitting curve until the robot reaches the preset obstacle avoidance endpoint.
[0036] After executing step S6, if necessary, after completing the obstacle avoidance curve fitted in step S4 and reaching the predetermined obstacle avoidance endpoint, a new obstacle avoidance curve (with a different extension direction and curvature) is fitted using step S4, and the vehicle then travels along the extension direction of the new obstacle avoidance curve. This allows the vehicle to continuously track side obstacles and effectively bypass them.
[0037] The technical effects of the above steps S1 to S6 are:
[0038] Multiple line segments are set on the side of the robot close to the obstacle. Based on the occupancy probability values of the grids where the obstacle contour points are located, valid obstacle grids are selected from the grids where the multiple obstacle contour points are located that the same line segment passes through in the grid map. This is used to filter the laser data of the laser sensor's laser probe rotating scan, overcome the jitter error in the laser data, and obtain valid occupied positions in the grid map that can represent the obstacle contour. Therefore, the aforementioned steps S1 to S3 select valid obstacle grids (belonging to obstacle grids) based on the occupancy probability values corresponding to the grids where the obstacle contour points are located. While consuming less grid search time, a representative obstacle grid can be selected from each line segment within the limited grid area, overcoming the impact of the aforementioned laser data jitter, reducing the degree of robot movement restriction, and increasing the probability of the robot approaching the obstacle contour position, thereby enabling the robot to approach the obstacle contour without obstacles and stably walk along the obstacle contour.
[0039] On this basis, a curve fitting operation is performed using the effective obstacle grid to obtain the obstacle avoidance fitting curve equation for the robot's obstacle avoidance. The corresponding obstacle avoidance fitting curve is then fitted, thereby achieving smoothing of the obstacle grid. Compared with directly using grid or point cloud data to splice the trajectory, the curve fitting operation of this embodiment can improve the accuracy and smoothness of the fitted trajectory. This overcomes the positioning error caused by grid resolution and compensates for the grid error caused by the obstacle contour points that should have been collected.
[0040] The robot walks on the obstacle avoidance fitting curve one by one, and tracks the position points in front of the robot along the obstacle avoidance fitting curve in sequence, so that the robot can perform curve fitting and node tracking based on the historical marks of the obstacle contour points, and achieve non-contact obstacle avoidance or obstacle avoidance during the tracking process.
[0041] Based on the above embodiment, the preset obstacle avoidance endpoint is a fitting endpoint required for generating the obstacle avoidance fitting curve equation. A preset obstacle avoidance endpoint corresponds to the obstacle avoidance fitting curve equation generated in step S4. When the curve fitting operation used in step S4 is a Bezier curve, the fitting endpoint required for generating the obstacle avoidance fitting curve equation is the end point of the Bezier curve.
[0042] Whenever the robot reaches a preset obstacle avoidance endpoint, the preset obstacle avoidance endpoint is updated as the current position point, and steps S1 to S6 are repeated. New obstacle contour points can be collected in the newly executed step S1. After the robot reaches the preset obstacle avoidance endpoint in the previously executed step S6, the multiple line segments set by the robot in step S2 will cover a new ground area. Then, in the newly executed step S3, new valid obstacle grids are collected. Then, by executing step S4, a curve fitting operation is performed on the valid obstacle grids passed by the line segments in the new ground area to obtain a new obstacle avoidance fitting curve. Then, in the newly executed step S5, new obstacle avoidance target points are continuously obtained. Then, by executing step S6, the robot updates the obstacle avoidance fitting curve to be traveled while walking, thereby continuously tracking the next obstacle avoidance target point using the obstacle avoidance fitting curve equation (Bezier curve equation) fitted in the most recently executed step S4. Until the robot reaches the target navigation endpoint, thereby bypassing the currently scanned fixed obstacle, the robot obstacle avoidance control method is terminated, so as to continuously track and obtain the latest obstacle avoidance fitting curve. The robot can completely avoid obstacles by presetting the obstacle avoidance endpoint and the target navigation endpoint. Continuously updating the corresponding detour trajectory based on the position characteristics of different obstacles can effectively improve the obstacle avoidance problem of the laser navigation robot.
[0043] The obstacle avoidance target point, the preset obstacle avoidance end point, and the target navigation end point can all be located on the side of the line segment set in step S2 that is away from the obstacle contour point. Among them, the target navigation end point can be set according to the navigation task that the robot needs to perform, and is the target position for obstacle-free navigation in the working environment, such as the charging seat position, the robot recovery base station, etc.
[0044] As an embodiment, in step S2, a plurality of mutually parallel line segments are set along the target planning direction on the side of the robot close to the obstacle, and each line segment is configured to extend toward the grid where the obstacle contour point is located, and the direction of extension from one endpoint to the other endpoint can be regarded as from the grid where the center of the robot's body is located toward the grid where the obstacle contour point is located, wherein the grid where the obstacle contour point is located belongs to the obstacle grid and is configured with an occupancy probability value for indicating the possibility of being occupied by the obstacle; however, the line segment set in step S2 is not necessarily perpendicular to the target planning direction; if the preset detection direction is parallel to the wheel axle of the robot, and the preset detection direction is perpendicular to the target planning direction, then the line segment set in step S2 is not necessarily parallel to the wheel axle of the robot, but will be parallel to the robot's travel plane, that is, parallel to the projection surface of the robot's body on its travel plane. Preferably, in FIG3 , the line segments set in step S2 (the arrowed line segments passing through obstacle L1, excluding coordinate axis Xr) can be considered parallel to the illustrated coordinate axis Xr. Each line segment is configured to extend toward the grid where the obstacle contour points are located. In FIG3 , this is represented as extending along the positive direction of coordinate axis Xr so as to pass through the grid where the obstacle contour points are located, i.e., the arrows of each line segment point in the direction of the preset detection direction. Preferably, the preset detection direction is the positive direction of coordinate axis Xr, and the side of the robot closest to the obstacle is also the side of the preset detection direction of the robot body center R1. Corresponding to FIG2 to FIG4 , the preset detection direction is the positive direction of coordinate axis Xr, and the target planning direction can be selected as the positive direction of coordinate axis Yr. Accordingly, coordinate axis Xr can be set as the horizontal axis of a coordinate system with the robot body center R1 as the origin, and coordinate axis Yr can be set as the vertical axis of a coordinate system with the robot body center R1 as the origin. In summary, this embodiment makes the direction of the grid where the obstacle contour points are located obtained from the obstacle grid clearer based on the target planning direction and the extension direction of the parallel line segments, avoiding step S3 from selecting a valid obstacle grid in an arbitrary direction; therefore, a more accurate valid obstacle grid that can represent the obstacle contour can be quickly obtained, so that the robot can approach the obstacle more smoothly and walk stably along the obstacle contour.
[0045] In this embodiment, the distance between the extension starting point of each line segment and the body center of the robot in the preset detection direction is less than the body radius of the robot, corresponding to the distance between the left endpoint of the line segment with an arrow (excluding the coordinate axis Xr) passing through the obstacle L1 in Figure 3 and the body center R1 of the robot in the positive direction of the coordinate axis Xr is less than the body radius of the robot; among the line segments set in step S2, the maximum distance between the left endpoint of the line segment and the right edge of the robot in the positive direction of the coordinate axis Xr is preferably 20 mm; so that the line segments set in step S2 cover a small area of the body on the side close to the obstacle.
[0046] It should be noted that the side of the robot closest to the obstacle is the side of the obstacle closest to the obstacle contour point while the robot is walking along the edge of the obstacle. Corresponding to Figure 3, the obstacle along which the robot is walking is obstacle L1 in Figure 3. The left endpoint of a line segment set in step S2 is the starting point of its extension, and the right endpoint of the same line segment is the end point of its extension. Directional information is assigned to the line segment set in step S2. On this basis, the line segment set in step S2 is equivalent to a vector line segment set within a raster map.
[0047] In step S2, if the distance between the end point of each line segment and the center of the robot body in the preset detection direction is greater than the robot's body radius, the line segment is extended toward the outside of the robot body so that the line segment passes through the grid where the obstacle contour point is located; the robot's body radius represents half of the robot's body width. The distance between the starting point of each line segment and the edge of the robot on the side closest to the obstacle is smaller than the distance between the end point of the same line segment and the edge of the robot on the side closest to the obstacle, that is, the distance between the starting point of each line segment and the edge of the robot body through which it passes is smaller than the distance between the end point of the same line segment and the edge of the robot body through which it passes; this ensures that the line segment set in step S2 covers a larger area on the outside of the robot body than on the inside of the robot body.
[0048] Corresponding to Figure 3, among the line segments set in step S2, the minimum distance between the right endpoint of the line segment and the right edge of the robot in the positive direction of the coordinate axis Xr is preferably 150 mm, so that the line segment set in step S2 reserves a movable area between the body and the adjacent obstacles, and the distance between the extension starting point (left endpoint) of the same line segment and the edge of the robot close to the obstacle (the right edge position point passed by the same line segment) is less than the distance between the extension end point (right endpoint) of the same line segment and the edge of the robot close to the obstacle (the right edge position point passed by the same line segment).
[0049] Therefore, step S2 provides specific direction and margin information for the robot to detect the outline of the obstacle along. Since the set line segment will pass through the edge of the robot and the outline of the obstacle along which it is detected, each line segment in the map area defined by the set multiple line segments can obtain the grid where each obstacle outline point is located in an orderly manner along the preset detection direction. It is also suitable for the robot to adjust its posture in the area between the edge of the robot and the outline of the obstacle along which it is detected based on the speed difference between the left and right wheel groups.
[0050] As an embodiment, among the multiple parallel line segments set by the robot, the vertical distance from the robot's body center to the line segment farthest from the robot's body center is equal to the robot's body radius; and the vertical distance from the robot's body center to the line segment closest to the robot's body center is equal to 0. Among the line segments set in step S2, i.e., the arrowed line segments passing through obstacle L1 (excluding coordinate axis Xr) shown in the figure, the uppermost arrowed line segment passing through obstacle L1 is the line segment farthest from the robot's body center R1, and the vertical distance from the robot's body center R1 to the line segment farthest from the robot's body center R1 is equal to the body radius, i.e., the radius of the circle centered at point R1 shown in the figure; the lowermost arrowed line segment passing through obstacle L1 is located on coordinate axis Xr and is the line segment closest to the robot's body center R1, and the vertical distance from the robot's body center R1 to the line segment closest to the robot's body center R1 is equal to 0. Among the multiple parallel line segments set up, the robot configures the spacing between two adjacent line segments to be equal to the resolution of a single grid. Preferably, the length of each line segment is equal, and the resolution of a single grid is equal to 10 mm. Then, the two adjacent line segments can be regarded as framing a regular area composed of multiple cells arranged along the preset detection direction. Since the preset detection direction is perpendicular to the target planning direction, step S2 is equivalent to starting from the center of the body and sequentially setting multiple equally spaced line segments along the target planning direction. Each line segment can be regarded as extending along the preset detection direction in order to pass through the obstacle grid, thereby using multiple equally spaced line segments to represent a rectangular grid area, and they are distributed in the grid map in sequence according to the resolution of the grid. In the process of obtaining the grid where the obstacle contour point is located along the line segment, the influence of the offset error caused by the resolution of the grid is taken into account.
[0051] As an embodiment, after the robot collects the obstacle contour point in step S1, the position coordinates of the obstacle contour point are set to the local coordinates formed by the obstacle contour point relative to the current position point of the robot, wherein the local coordinates are located in the robot coordinate system, the current position point of the robot is the origin of the robot coordinate system, the current position point of the robot is represented by the body center of the robot, and the local coordinates corresponding to the obstacle contour point are the coordinates of the obstacle contour point in the robot coordinate system.
[0052] In order to obtain the grid where the obstacle contour point is located, the robot converts the local coordinates into the global map coordinate system used to construct the grid map, wherein the local coordinates corresponding to the obstacle contour point are transformed into the global map coordinate system through rotation transformation and translation transformation to obtain the grid coordinates of the obstacle contour point, which are represented by the black-filled unit grids in Figures 3 to 4 and distributed along the outline of the obstacle L1. At this time, it is determined that the robot obtains the grid where the obstacle contour point is located in the grid map by executing step S1, and completes the obstacle contour point hitting the corresponding grid in the grid map. Generally, a collected obstacle contour point (which can be understood as a laser point) hits at least one corresponding grid in the grid map or hits the neighborhood grid centered on a grid, so that multiple grid coordinates can be obtained for one obstacle contour point.
[0053] It should be noted that the rotation angle required for the local coordinate rotation transformation is equal to the angle between the coordinate axes of the same orientation (the same attribute coordinate axes) between the global map coordinate system and the robot coordinate system; the coordinate translation amount required for the local coordinate translation transformation is equal to the coordinate value of the robot's current position in the global map coordinate system, which is also used as the coordinate translation amount between the origin of the global map coordinate system and the origin of the robot coordinate system. The coordinate translation amount required for the local coordinate translation transformation in the horizontal coordinate axis direction of the robot coordinate system is equal to the horizontal coordinate value of the robot's current position in the global map coordinate system; the coordinate translation amount required for the local coordinate translation transformation in the vertical coordinate axis direction of the robot coordinate system is equal to the vertical coordinate value of the robot's current position in the global map coordinate system; the coordinate value of the robot's current position in the global map coordinate system includes the horizontal and vertical coordinate values of the robot's current position in the global map coordinate system.
[0054] The trigonometric function transformation relationship mastered by those skilled in the art can be used to construct a coordinate system transformation equation using the rotation angle required for the local coordinate rotation transformation and the coordinate translation required for the local coordinate translation transformation; then the position coordinates of the obstacle contour point are substituted into the coordinate system transformation equation to obtain the grid coordinates of the obstacle contour point, thereby marking the obstacle contour point in the grid of the grid map.
[0055] Specifically, the coordinate system transformation equation is: m =x p cosθ-y p sinθ+x0; y m =x p sinθ+y p cosθ+y0;
[0056] Among them, the position coordinates of the obstacle contour point (coordinates in the robot coordinate system) are (x p ,y p), the coordinates of the robot's current position in the global map coordinate system are (x0, y0); the rotation angle required for the local coordinate rotation transformation is θ, which is the angle required for the obstacle contour point to rotate in the coordinate system transformation; the grid coordinates of the obstacle contour point are (x m ,y m ). The horizontal axis of the global map coordinate system is the coordinate axis Xs, and the vertical axis of the global map coordinate system is the coordinate axis Ys.
[0057] Preferably, the preset detection direction is parallel to the robot's wheel axle, and the line segment set in step S2 is parallel to the preset detection direction; the positive direction of the robot coordinate system's ordinate axis is the same as the target planning direction, and the positive direction of the robot coordinate system's abscissa axis is the same as the preset detection direction. Corresponding to FIG3 , the preset detection direction is the positive direction of the illustrated coordinate axis Xr (the positive direction of the abscissa axis of the robot coordinate system), the preset detection direction is parallel to the robot's wheel axle, and the line segment set in step S2 is parallel to the preset detection direction. That is, the arrowed line segment (excluding coordinate axis Xr) passing through obstacle L1 in FIG3 is parallel to coordinate axis Xr, thereby forming a line segment scanning area parallel to the wheel axle within the grid map. In addition, the target planning direction is the positive direction of coordinate axis Yr of the robot coordinate system (the positive direction of the ordinate axis of the robot coordinate system). When the line segment set in step S2 is parallel to the horizontal axis of the robot coordinate system, a standard scanning direction is provided for the grid where the obstacle contour points through which the line segment passes are located. When obtaining the grid coordinates, the coordinate axis direction can be used as reference angle information to reduce the amount of rotation calculation on the angle.
[0058] As an embodiment, the robot may have a circular body, such as a sweeping robot; the robot includes a semicircular head, a semicircular body, and two symmetrically arranged wheels, the two symmetrically arranged wheels being connected by a wheel axle, the wheel axle being arranged at the boundary between the head and the body, as shown in the setting position of the coordinate axis Xr in Figures 2 to 4, with the center of the wheel axle being position point R1; the semicircular head and the semicircular body forming a circular body; the body diameter is equal to the body width. The longest distance from the body center R1 of the robot to the edge of the robot is expressed as the body radius of the robot, and the body radius is equal to half the body width or half the head width. The center of the wheel axle is the body center of the robot; the target planning direction is arranged perpendicular to the wheel axle, and the target planning direction is shown as the positive direction of the coordinate axis Yr in Figures 2 to 4 (the arrow direction of the coordinate axis Yr). The robot coordinate system is constructed based on the robot's body shape and its internal wheel axles. Multiple parallel line segments can also be set to select the grid where the obstacle contour points are located, providing an appropriate direction for subsequent curve fitting operations.
[0059] The preset detection direction is a direction toward the robot's side obstacles and parallel to the wheel axle. The side obstacles are located outside the side of the robot's body, and the multiple parallel line segments set in step S2 pass through the grids occupied by the side obstacles in the grid map. A side obstacle is an obstacle located outside the side of the robot's body, and the robot's body side includes the left side or the right side of the body; a side obstacle is an obstacle located on the left or right side of the robot and does not contact the robot. Preferably, the robot's walking direction is pointing forward of the robot, and the robot's walking direction is parallel to the target planning direction, which is perpendicular to the wheel axle.
[0060] In one embodiment, in step S3, the method of selecting a valid obstacle grid based on the occupancy probability values corresponding to the grids where the obstacle contour points are located, from the grids where the obstacle contour points are located, along the same line segment, includes: selecting the grid with the largest occupancy probability value from among the grids where the obstacle contour points are located, preferably traversing the grids where the obstacle contour points are located sequentially along the preset detection direction, and after traversing all the grids where the obstacle contour points are located along the same line segment, obtaining the grid with the largest occupancy probability value from among all the grids where the obstacle contour points are located along the same line segment through comparison; after obtaining the grid where the obstacle contour point with the largest occupancy probability value is located for a line segment in step S3, the robot marks the grid with the largest occupancy probability value as the valid obstacle grid passed by the line segment, thereby forming a precise positioning result for a contour point of the obstacle passed by the line segment at the current moment.
[0061] In some embodiments, grids with occupancy probability values greater than a preset occupancy probability threshold can also be selected along the same line segment or the preset detection direction, and then the grid with an occupancy probability value greater than the preset occupancy probability threshold selected for the first time is taken as the grid with the largest occupancy probability value and marked as a valid obstacle grid passed by the corresponding line segment.
[0062] As shown in Figures 3 and 4, the arrowed line segments of obstacle L1 that pass through mostly pass through two black-filled unit cells, that is, pass through the grids where two obstacle contour points are located. Then, the grid with the largest occupancy probability value can be extracted from the grids where the obstacle contour points passed by the same line segment are located as the effective obstacle grid passed by the line segment (not shown in the figure). The coordinates of the effective obstacle grid represent the grid coordinates of the obstacle in the grid map, which are also the grid coordinates in the global map coordinate system. Then, the valid obstacle grids corresponding to all the set line segments form the effective outline of the obstacle in the grid map; specifically, in the same step S3, the robot sequentially connects the valid obstacle grids corresponding to the line segments set in the most recently executed step S2 to form the effective outline of the obstacle in the grid map, which is equivalent to the obstacle contour line formed by connecting at equal intervals along the target planning direction, thereby causing the probability information of entering the grid to save the marking amount, and also overcomes the error problem of the same obstacle contour point being marked / hit on multiple grids at the same time. The robot can ensure the stability of the robot walking along the edge by walking along the contour area composed of the valid obstacle grids. When the valid obstacle grid represents the wall contour, multiple valid obstacle grids may be on the same straight line, which can ensure the stability of the robot walking along the wall.
[0063] Specifically, the laser sensor is mounted on the robot's body, with the center of the laser sensor positioned at position R2 in FIG. 2 . Preferably, the center of the robot's body is positioned at position R1 in FIG. 2 . The laser probe is rotatably mounted within the laser sensor to enable the robot to collect obstacle contour points. It should be noted that the laser probe of the laser sensor rotates at a constant speed to detect the surrounding environment. The laser sensor uses a laser beam to scan, at angles, part or all of the area passed by the multiple line segments set in step S2. Each angle corresponds to a laser point, and the laser points generated by the 360-degree rotation scan are summed to form a point cloud frame.
[0064] In the detected obstacle contour, each angle corresponds to an obstacle contour point; the obstacle contour points collected by the robot are point clouds formed when the laser beam emitted by the laser probe is reflected in the obstacle contour when the laser probe rotates at least one circle; there are laser points reflected from the surface of the obstacle in the point cloud, which are obstacle contour points in this embodiment; after an obstacle contour point hits at least one grid in the grid map, the hit grid is marked as the grid where the obstacle contour point is located, and the grid where the obstacle contour point is located is assigned a hit probability value. The first assigned hit probability value is the initial occupancy probability value. This embodiment can use the method in the relevant technology to determine the first assigned hit probability value of each grid at the current moment, which will not be described in detail here.
[0065] It should be noted that the grid map includes probability information indicating the existence of obstacles in specific locations or areas. The robot's laser sensor can be used to scan the object to be measured to obtain the corresponding position information of the object to be measured, and on this basis, the probability information of the object to be measured falling into / hitting the corresponding grid position of the map is calculated. This information serves as the hit probability value of the corresponding grid, which can be used to indicate the possibility that the grid where the obstacle contour point is located is occupied by an obstacle.
[0066] In some implementation scenarios, the robot may have inconsistent detection distances of a fixed obstacle (object to be measured) through a laser sensor at different times in the same posture. A frame of laser point cloud collected at one moment may involve a detection distance of 5m, while a frame of laser point cloud collected at another moment may involve a detection distance of 5.1m, thereby obtaining obstacle contour points at different positions. In order to avoid marking both the 5m and 5.1m obstacle contour points as the same obstacle contour point, it is necessary to use an occupied grid map construction algorithm to calculate the probability information of the aforementioned fixed obstacle falling into (hitting) the corresponding grid position of the map, and then determine the precise position of the aforementioned fixed obstacle in the map based on the size of the probability value.
[0067] As an embodiment, whenever an obstacle contour point hits a corresponding grid, the hit probability value previously assigned to the corresponding grid is accumulated to obtain the occupancy probability value of the corresponding grid. This can be achieved by accumulating the hit probability value of the same grid at the previous moment to obtain the occupancy probability value of the grid, so that the occupancy probability value of the same grid is updated when the number of hits of the obstacle contour point changes; wherein the accumulated value of the hit probability value is updated to the occupancy probability value, so that the hit probability value assigned to the grid where the obstacle contour point is located is updated to the occupancy probability value. If multiple obstacle contour points hit the same grid when the laser probe rotates one circle, the hit probability values corresponding to the hits of the grid are accumulated in turn. If necessary, the accumulated result can be updated to the occupancy probability value each time the accumulation is performed, and finally the latest occupancy probability value of the hit grid when the laser probe scans one circle is obtained. If only one obstacle contour point hits the same grid during one rotation of the laser probe, the hit probability value corresponding to that grid is directly updated to the occupancy probability value, which serves as the occupancy probability value of the hit grid during one rotation of the laser probe. If multiple obstacle contour points hit the same grid during at least two rotations of the laser probe (not limited to whether they hit in one or multiple rotations), the hit probability values corresponding to each hit of the grid are accumulated sequentially. If necessary, the accumulated result can be updated as the occupancy probability value each time, ultimately obtaining the latest occupancy probability value of the hit grid during at least two rotations of the laser probe. If an obstacle contour point hits a grid, and the hit probability values corresponding to the same grid are accumulated once, the occupancy probability value of the same grid is updated once, and then counted as a hit; thus, the occupancy probability value of the same grid is updated when the number of hits of the obstacle contour point changes. Overcome the error problem of the same obstacle contour point being marked / hit on multiple grids at the same time, and improve the grid marking accuracy of the obstacle contour.
[0068] Preferably, at the robot's current position, the more revolutions the robot controls the laser probe to rotate, the more obstacle contour points hitting the same grid are collected by the robot, and the occupancy probability value of the same grid hit increases, so that the occupancy probability value of the same grid is updated as the number of revolutions of the laser probe increases. When the laser sensor rotates to scan the environment, the surrounding environment can be updated in real time, so that the occupancy probability value of the grid more accurately reflects the status of surrounding obstacles.
[0069] Generally, since the obstacle contour points are represented by a grid map during the process of laser sensor scanning obstacles, and the robot directly avoids obstacles based on the grid map, it will bring grid resolution error (determined by the resolution of the grid map. Here, the grid resolution is 10mm, and there will be a 10mm positioning coordinate error when it is directly used for obstacle avoidance) and laser data jitter (for example, the same contour point of the wall may be marked by multiple grids in the grid map), causing differential robots such as sweeping robots to continue to jitter. Therefore, fitting is required (equivalent to smoothing the effective obstacle grid selected in step S3, and the smoothness of the fitted curve is less than the grid resolution) to eliminate errors and compensate for the sampling points lost due to the grid resolution. Specifically, the grid coordinates of the effective obstacle grid in step S3 are first converted back to the robot coordinate system, and then the curve fitting operation is restored to the coordinate system with the center of the robot body as the origin.
[0070] Therefore, before the robot performs the curve fitting operation in step S4, it first converts the grid coordinates of the effective obstacle grid selected in step S3 from the global map coordinate system back to the robot coordinate system to obtain the position coordinates of the effective contour points; it should be noted that, between the global map coordinate system and the robot coordinate system, the rotation transformation of the grid coordinates of the effective obstacle grid is the inverse transformation of the rotation transformation required for the local coordinates, and the translation transformation of the grid coordinates of the effective obstacle grid is the inverse transformation of the translation transformation of the local coordinates.
[0071] Between the global map coordinate system and the robot coordinate system, the rotation transformation of the grid coordinates of the effective obstacle grid is the inverse transformation of the rotation transformation of the local coordinates, and the translation transformation of the grid coordinates of the effective obstacle grid is the inverse transformation of the translation transformation of the local coordinates; specifically, the coordinate system inverse transformation equation is: p =(x m -x0)cosθ+(y m -y0)sinθ; y p =(y m -y0)cosθ-(x m -x0)sinθ;
[0072] Among them, the position coordinates of the effective contour point (coordinates in the robot coordinate system) are (x p ,y p ), the coordinates of the robot's current position in the global map coordinate system are (x0, y0); the rotation angle required for the grid coordinate rotation transformation of the effective obstacle grid is θ, which is the angle required for the obstacle contour point to rotate in the coordinate system transformation; the grid coordinates of the effective obstacle grid are (x m ,y m ), the grid coordinates of the grid where the obstacle contour point is located.
[0073] As an embodiment, before the robot performs the curve fitting operation in step S4, if the position coordinates of the valid contour point are obtained, the valid contour point is controlled to translate along the opposite direction of the preset detection direction by the preset obstacle avoidance margin to obtain the fitting target point, and is recorded as completing the coordinate system conversion of the effective obstacle grid and the translation operation in the opposite direction of the preset detection direction; wherein the preset obstacle avoidance margin is set to be equal to the sum of the body radius and the preset obstacle avoidance distance. The valid contour point is a representative obstacle contour point in the robot coordinate system after the effective obstacle grid has been converted to the coordinate system. The influence of the aforementioned laser data jitter has been overcome, but the positioning error caused by the grid resolution still needs to be overcome. The valid contour point is located on the side of the preset detection direction of the body center relative to the robot, and the preset obstacle avoidance distance is preferably 15 mm. The opposite direction of the preset detection direction is configured as the target translation direction. By translating the preset obstacle avoidance margin along the target translation direction for each valid contour point, a discrete point that can simulate the obstacle contour, namely the aforementioned fitting target point, is obtained, thereby shortening the distance between the discrete point that can simulate the obstacle contour and the robot. The robot can then walk closely along the curved trajectory fitted corresponding to the fitting target point, and maintain a certain distance from the obstacle on one side of the preset detection direction.
[0074] As an embodiment of step S4, when the curve fitting operation is Bezier curve fitting, the starting point and the end point of the Bezier curve are determined from the fitting target point along the target planning direction; the Bezier curve to be fitted extends from the starting point of the Bezier curve to the end point of the Bezier curve. Corresponding to FIG4 , the starting point of the Bezier curve is point A, the end point of the Bezier curve is point B, and the target planning direction is the positive direction of the coordinate axis Yr shown in the figure.
[0075] Among the translated fitting target points, each fitting target point distributed along the target planning direction is marked as the control point required to fit the Bezier curve. Between the starting point and the end point of the Bezier curve, each fitting target point distributed along the target planning direction is marked as the intermediate point required to fit the Bezier curve. The number of control points is equal to the sum of the order of the Bezier curve and the value 1, which is also equal to the sum of the number of the starting point, end point, and intermediate points of the Bezier curve; the order of the Bezier curve is represented by n. The end point of the Bezier curve is the preset obstacle avoidance end point disclosed in step S6.
[0076] The obstacle avoidance fitting curve equation is generated according to the starting point, end point, and intermediate point of the Bezier curve. Specifically, the obstacle avoidance fitting curve based on the n-order Bezier curve is generated on the robot coordinate plane. Accordingly, the obstacle avoidance fitting curve equation based on the n-order Bezier curve is generated, that is, the n-order Bezier curve equation is obtained; so that relatively discrete fitting target points can be connected into a contour line composed of relatively continuous points, and the effective contour points or effective obstacle grids are smoothed, overcoming the grid error caused by directly avoiding obstacles based on the grid map.
[0077] Specifically, the obstacle avoidance fitting curve equation is:
[0078] Among them, the obstacle avoidance fitting curve equation represents the trajectory equation corresponding to the obstacle avoidance fitting curve; B x (t) is the horizontal coordinate of the point in the obstacle avoidance fitting curve, B y (t) is the ordinate of the point in the obstacle avoidance fitting curve; i represents the sorting number of the control points required for the obstacle avoidance fitting curve, and the difference between the ordinate of the point with sorting number i and the ordinate of the point with sorting number (i+1) can be fixed; t is equal to the ratio between i and (n+1), which is used to represent the ratio of the sorting number of the most recently fitted point along the target planning direction to the total number of points that need to be fitted in the current execution of step S4. The sorting number i represents the sorting of the control points required for the obstacle avoidance fitting curve along the target planning direction, which is regarded as the arrangement order along the positive direction of the coordinate axis Yr shown in Figure 4, and is configured to start from the value 0 and increase along the target planning direction.
[0079] The starting point, end point and middle point of the Bezier curve are all control points required for Bezier curve fitting. The starting point of the Bezier curve is the starting point of the obstacle avoidance fitting curve, and the end point of the Bezier curve is the end point of the obstacle avoidance fitting curve. ix Represented as the control point P i The horizontal coordinate of the fitting target point, P iy Represented as the control point P i The vertical coordinate of the fitting target point; P 0x The horizontal coordinate of the starting point of the Bezier curve, P 0y represents the vertical coordinate of the starting point of the Bezier curve; nx The abscissa of the end point of the Bezier curve, P ny The ordinate of the end point of the Bezier curve. Indicates (P ix , P iy ) The number of combinations at a specific value of t is similar to the binomial coefficient (number of combinations) in the binomial expansion and follows the Pascal's triangular distribution.
[0080] It should be noted that the obstacle avoidance fitting curve equation is a Bezier curve formula. A Bezier curve is a mathematical curve used in two-dimensional graphics applications. The curve is defined by a starting point (also called the initiation point), an end point (also called the termination point), and control points. By adjusting the control points, the shape of the Bezier curve changes.
[0081] In the process of Bezier curve fitting, the number of values of t is equal to the number of points interpolated by fitting the Bezier curve, so that the points with low continuity are interpolated into relatively continuous points. In the target planning direction, when the relative positions of two adjacent control points change, the curvature (degree of curvature) of the Bezier curve changes. i and P i+1 Indicates that, where i∈[0,n-1], the starting point of the Bezier curve is represented by P0, and the end point of the Bezier curve is represented by P n It indicates that i will gradually increase from the starting point until it reaches the end point during the Bezier curve fitting process, at which time t is equal to 1; so that the relatively discrete target fitting points are fitted into a contour line composed of relatively continuous points. Compared with the error of the grid marker contour points, the Bezier curve fitting can use the fitting points to fill the contour points lost during the acquisition process and fit a curve that is closer to the direction of the obstacle contour, thereby realizing the smoothing of the grid where the obstacle contour points are located using the Bezier curve.
[0082] It is known to those skilled in the art that when the start and end points of a Bezier curve are locked, t will be changed by moving the middle point on the line connecting two adjacent control points. The Bezier curve does not pass through all the middle points, but it is guaranteed to pass through the start and end points.
[0083] In one embodiment, the method for determining the starting point and the end point of a Bezier curve from the fitted target points includes: the starting point of the Bezier curve is the fitted target point with the smallest coordinate value in the target planning direction among the fitted target points obtained by coordinate system transformation and translation of all valid obstacle grids selected in the same step S3, so as to form the fitted target point closest to the robot's body center. This corresponds to the fitted target point with the smallest coordinate value on the coordinate axis Yr, represented by position A in FIG4 , serving as the navigation point closest to the robot. The end point of the Bezier curve is the fitted target point with the largest coordinate value in the target planning direction among the fitted target points obtained by coordinate system transformation and translation of all valid obstacle grids selected in the same step S3, so as to form the fitted target point farthest from the robot's body center. This corresponds to the fitted target point with the largest coordinate value on the coordinate axis Yr, represented by position B in FIG4 , serving as the navigation point farthest from the robot in the obstacle avoidance fitting curve obtained by the current curve fitting operation. Therefore, the robot is subsequently controlled to walk around obstacles in the direction from the starting point of the Bezier curve to the end point of the Bezier curve. This can avoid obstacles belonging to all valid obstacle grids selected in the same step S3, or it can walk along the contour points belonging to all valid obstacle grids selected in the same step S3 without touching the corresponding obstacles.
[0084] As an embodiment, in step S5, the method in which the robot converts the obstacle avoidance target point from the obstacle avoidance fitting curve equation based on the adjacent position points of the current position point in the target planning direction includes: the robot calculates the coordinate values of the adjacent position points of the current position point in the target planning direction, if the target planning direction is configured as the positive direction of the vertical coordinate axis of the robot coordinate system, then the coordinate values of the adjacent position points of the current position point in the target planning direction are the adjacent vertical coordinate values of the current position point in the target planning direction, wherein the difference between the adjacent vertical coordinate value of each position point and the vertical coordinate of the position point is equal to the fixed coordinate value; and the coordinate value of the adjacent position point is set as the forward vertical coordinate value. The forward ordinate value is then substituted into the obstacle avoidance fitting curve equation, and the abscissa value of the point in the obstacle avoidance fitting curve that is equal to the forward ordinate value is calculated to obtain the position coordinate value (including the abscissa value and the ordinate value) of the point in the obstacle avoidance fitting curve whose ordinate value is equal to the forward ordinate value. The point in the obstacle avoidance fitting curve that is equal to the forward ordinate value is marked as an obstacle avoidance target point, and an obstacle avoidance target point converted from the obstacle avoidance fitting curve equation is obtained. The converted obstacle avoidance target point is determined. In this way, the obstacle avoidance curve equation is used to convert each position point one by one in a determined direction, thereby reducing the cost of curve fitting calculation as a whole and improving the efficiency of the robot's obstacle avoidance walking.
[0085] Based on the above embodiment, in step S6, the method of repeatedly executing steps S5 to S6 each time the robot reaches an obstacle avoidance target point until the robot reaches a preset obstacle avoidance endpoint includes: each time the robot reaches an obstacle avoidance target point, the robot enters the obstacle avoidance fitting curve, the robot updates the current obstacle avoidance target point as the current position point, and then executes step S5 to obtain the next obstacle avoidance target point, and then the robot moves to the next obstacle avoidance target point; the next obstacle avoidance target point is then updated as the current position point of the robot, and steps S5 to S6 are then executed, and this process is repeated. Corresponding to FIG4 , the robot sequentially walks in the positive direction of the coordinate axis Yr among the black discrete dots arranged between point A (the first obstacle avoidance target point obtained by conversion) and point B (the thirteenth obstacle avoidance target point obtained by conversion, i.e., the preset obstacle avoidance endpoint) until the robot reaches the preset obstacle avoidance endpoint. Therefore, the robot walks according to the obstacle avoidance fitting curve and can maintain a certain distance from the positions of the obstacle contours represented by all valid obstacle grids selected in the same step S3. The robot can continuously walk along the outline of the obstacle on the side, and track the obstacle on the side of the robot without collision by relying on the fitting curve.
[0086] As the robot repeatedly executes steps S5 to S6, it continuously updates the calculated obstacle avoidance target point to its current position and continues to calculate new obstacle avoidance target points along the planned target direction. Corresponding to Figure 4, the obstacle avoidance target points can be point A, point B, and the black discrete dots arranged between point A and point B in the positive direction of coordinate axis Yr. Further connecting point A, the black discrete dots, and point B in sequence yields an obstacle avoidance trajectory for the robot along the right side of obstacle L1. This can be used as an obstacle avoidance fitting curve extending along the planned target direction, corresponding to Figure 4, starting from the robot center R1 and extending upward from bottom to top. Compared to the motion trajectory formed using grid splicing in the prior art, the obstacle avoidance fitting curve formed by connecting the calculated obstacle avoidance target points in this embodiment can improve the accuracy and smoothness of the obstacle avoidance fitting curve.
[0087] Preferably, the difference between the coordinates of the adjacent position points of the current position point in the target planning direction and the coordinate values of the current position point in the target planning direction is equal to a preset parameter, so that the coordinate values of the obstacle avoidance target points successively obtained in step S6 in the target planning direction change unidirectionally along the extension direction of the obstacle avoidance fitting curve. For example, when the preset parameter is a value of 1, the unidirectional change is an increasing change; for another example, when the preset parameter is a value of -1, the unidirectional change is a decreasing change.
[0088] The iterative action of repeatedly executing steps S5 and S6 mentioned in the aforementioned embodiment sequentially calculates the coordinates of each obstacle avoidance target point along the extension direction of the obstacle avoidance fitting curve or the target planning direction, and the coordinate difference between two consecutive obstacle avoidance target points in the target planning direction is fixed. The coordinate values of the obstacle avoidance target points in the target planning direction are preferably the vertical coordinate values of the robot coordinate system. Based on the rule that the coordinates change unidirectionally along the extension direction of the obstacle avoidance fitting curve, the robot continuously calculates the next obstacle avoidance target point located in front of the robot until the end point of a segment of the obstacle avoidance fitting curve (i.e., the preset obstacle avoidance end point) is reached.
[0089] In some embodiments, the coordinate values of the successively obtained obstacle avoidance target points in the target planning direction vary unidirectionally along the extension direction of the obstacle avoidance fitting curve. Specifically, starting from the first calculated forward ordinate value, the coordinate translation amount of the ordinate of the currently determined obstacle avoidance target point relative to the ordinate of the previously determined obstacle avoidance target point is equal to a value of 1, wherein the currently determined obstacle avoidance target point is an adjacent position point of the previously determined obstacle avoidance target point in the target planning direction. The extension direction of the obstacle avoidance fitting curve is the direction in which the ordinates of the successively obtained obstacle avoidance target points increase in the process of repeatedly executing steps S5 and S6.
[0090] The vertical coordinate of the obstacle avoidance target point converted when step S5 is executed for the first time is the vertical coordinate of the current position point of the robot when executing step S4 in the same coordinate system, and the coordinate translation generated in the target planning direction is equal to the value 1; the obstacle avoidance target point converted when the robot executes step S5 for the first time is the adjacent position point of the current position point of the robot when executing step S4 for the first time in the target planning direction.
[0091] In the embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. On the other hand, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0092] It will be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the references to memory, storage, database or other media used in the various embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory ROM, programmable memory PROM, electrically programmable memory DPROM, electrically erasable programmable memory DDPROM or flash memory. Volatile memory may include random access memory RAM or external cache memory.
[0093] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0094] The above embodiments merely represent several embodiments of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the concept of the present application, and these modifications and improvements are all within the scope of protection of the present application.
Claims
1. A robot obstacle avoidance control method based on map probability information, characterized in that: The robot obstacle avoidance control method comprises: Step S1, the robot controls the laser sensor to rotate and scan, and collects obstacle contour points, and then obtains the grid where the obstacle contour points are located and the corresponding occupancy probability value in the grid map; Step S2, setting a plurality of line segments on the side of the robot close to the obstacle, so that the set line segments pass through the grid where the obstacle contour points are located; Step S3, among the grids where the obstacle contour points are located and through which each line segment passes, a valid obstacle grid is selected based on the occupancy probability value corresponding to the grid where the obstacle contour points are located; Step S4: The robot performs a curve fitting operation using the effective obstacle grid described in step S3 to generate an obstacle avoidance fitting curve equation; Step S5: the robot converts the obstacle avoidance target point from the obstacle avoidance fitting curve equation based on the adjacent position points of the current position point in the target planning direction, and then the robot walks from the current position point to the obstacle avoidance target point; Step S6: Whenever the robot reaches an obstacle avoidance target point, the obstacle avoidance target point is updated to the current position point, and steps S5 to S6 are repeatedly executed until the robot reaches the preset obstacle avoidance end point.
2. The robot obstacle avoidance control method according to claim 1, characterized in that: The robot obstacle avoidance control method also includes: Whenever the robot walks to a preset obstacle avoidance end point, the preset obstacle avoidance end point is updated as the current position point, and steps S1 to S6 are repeatedly executed until the robot walks to the target navigation end point, and the robot obstacle avoidance control method is terminated; The preset obstacle avoidance endpoint is a fitting endpoint required for generating the obstacle avoidance fitting curve equation. A preset obstacle avoidance endpoint corresponds to the obstacle avoidance fitting curve equation generated in step S4.
3. The robot obstacle avoidance control method according to claim 1, characterized in that: In the step S2, a plurality of mutually parallel line segments are arranged along the target planning direction on the side of the robot close to the obstacle, and each line segment is configured to extend toward the grid where the obstacle contour point is located; The distance between the extension start point of each line segment and the body center of the robot in the preset detection direction is smaller than the body radius of the robot, and the distance between the extension end point of each line segment and the body center of the robot in the preset detection direction is larger than the body radius of the robot; The distance between the extension start point of each line segment and the edge of the robot close to the obstacle is smaller than the distance between the extension end point of the same line segment and the edge of the robot close to the obstacle. The side of the robot close to the obstacle is the robot walking along the edge of the obstacle where the obstacle contour point is located. During the process, the aircraft body is closest to the side of the obstacle where the obstacle contour point is located; The preset detection direction is perpendicular to the target planning direction; the body radius of the robot represents half of the body width of the robot.
4. The robot obstacle avoidance control method according to claim 3, characterized in that: Among the multiple parallel line segments set, the vertical distance from the robot's body center to the line segment farthest from the robot's body center is equal to the robot's body radius; the vertical distance from the robot's body center to the line segment closest to the robot's body center is equal to 0; Among the multiple parallel line segments that are set up, the robot configures the distance between two adjacent line segments to be equal to the resolution of a single grid.
5. The robot obstacle avoidance control method according to claim 3, characterized in that: After the robot collects the obstacle contour point in step S1, the position coordinates of the obstacle contour point are set as the local coordinates formed by the obstacle contour point relative to the current position point of the robot, wherein the local coordinates are located in the robot coordinate system, the current position point of the robot is the origin of the robot coordinate system, and the current position point of the robot is represented by the body center of the robot; When the robot transforms the local coordinates into the global map coordinate system used to construct the grid map, the local coordinates are transformed into the global map coordinate system through rotation transformation and translation transformation to obtain the grid coordinates of the obstacle contour point, and determine the grid where the obstacle contour point is located in the grid map, and complete the obstacle contour point hitting the corresponding grid in the grid map; Among them, the rotation angle required for the local coordinate rotation transformation is equal to the angle between the coordinate axes of the same direction between the global map coordinate system and the robot coordinate system; the coordinate translation amount required for the local coordinate translation transformation is equal to the coordinate value of the robot's current position in the global map coordinate system.
6. The robot obstacle avoidance control method according to claim 5, characterized in that: The preset detection direction is parallel to the wheel axle of the robot, and the line segment set in step S2 is parallel to the preset detection direction; The positive direction of the ordinate axis of the robot coordinate system is the same as the target planning direction, and the positive direction of the abscissa axis of the robot coordinate system is the same as the preset detection direction.
7. The robot obstacle avoidance control method according to claim 5, characterized in that: In step S3, the method of selecting a valid obstacle grid among the grids where the obstacle contour points are located and each line segment passes through based on the occupancy probability value corresponding to the grid where the obstacle contour points are located comprises: Among the grids where the obstacle contour points of each line segment pass through are located, the grid with the largest occupancy probability value is selected along the same line segment, and then the grid with the largest occupancy probability value is marked as the valid obstacle grid passed by the corresponding line segment; Then, the valid obstacle grids corresponding to all the set line segments form a valid outline of the obstacle in the grid map; wherein the coordinates of the valid obstacle grids represent the grid coordinates of the obstacle in the grid map.
8. The robot obstacle avoidance control method according to claim 7, characterized in that: After an obstacle contour point hits at least one grid in the grid map, the hit grid is marked as the grid where the obstacle contour point is located, and the grid where the obstacle contour point is located is assigned a hit probability value; Whenever an obstacle contour point hits the corresponding grid, the hit probability value assigned to the corresponding grid in advance is controlled to be accumulated to obtain the occupation probability value of the corresponding grid, so that the occupation probability value of the same grid is updated when the hit times of the obstacle contour point change; The accumulated value of the hit probability value is updated to the occupation probability value, so that the hit probability value assigned to the grid where the obstacle contour point is located is updated to the occupation probability value.
9. The robot obstacle avoidance control method according to claim 7, characterized in that: Before the robot performs the curve fitting operation in step S4, the grid coordinates of the effective obstacle grid selected in step S3 are first converted from the global map coordinate system back to the robot coordinate system to obtain the position coordinates of the effective contour points; Between the global map coordinate system and the robot coordinate system, the rotation transformation of the grid coordinates of the effective obstacle grid is the inverse transformation of the rotation transformation required for the local coordinates, and the translation transformation of the grid coordinates of the effective obstacle grid is the inverse transformation of the translation transformation of the local coordinates.
10. The robot obstacle avoidance control method according to claim 9, characterized in that: Before the robot performs the curve fitting operation in step S4, if the position coordinates of the effective contour points are obtained, the effective contour points are controlled to translate along the reverse direction of the preset detection direction by the preset obstacle avoidance margin to obtain the fitting target point; The preset obstacle avoidance margin is set to be equal to the sum of the body radius and the preset obstacle avoidance distance.
11. The robot obstacle avoidance control method according to claim 10, characterized in that: When the curve fitting operation is a Bezier curve fitting, a starting point and an end point of the Bezier curve are determined from the fitting target points along the target planning direction; The robot marks each fitting target point distributed along the target planning direction between the starting point and the end point of the Bezier curve as the intermediate point required to fit the Bezier curve; Generate an obstacle avoidance fitting curve equation according to the starting point, the end point, and the middle point of the Bezier curve; The sum of the starting point, the end point and the intermediate point of the Bezier curve is equal to the sum of the order of the Bezier curve and the value 1; the order of the Bezier curve is represented by n; and the end point of the Bezier curve is the preset obstacle avoidance end point disclosed in step S6.
12. The robot obstacle avoidance control method according to claim 11, characterized in that: The obstacle fitting curve equation is: Among them, the obstacle avoidance fitting curve equation represents the trajectory equation corresponding to the obstacle avoidance fitting curve; B x (t) is the horizontal coordinate of the point in the obstacle avoidance fitting curve, B y (t) is the ordinate of a point in the obstacle avoidance fitting curve, i represents the sequence number of the control points required for the obstacle avoidance fitting curve, and t is equal to the ratio between i and (n+1); Among them, the starting point, end point and middle point of the Bezier curve are all control points required for Bezier curve fitting; Among them, P ix It is represented as the control point P. i The horizontal coordinate of the fitting target point, P iy It is represented as the control point P. i The ordinate of the fitting target point; P 0x represents the abscissa of the starting point of the Bezier curve, P 0y represents the ordinate of the starting point of the Bezier curve; nx represents the abscissa of the end point of the Bezier curve, P ny The ordinate of the end point of the Bezier curve.
13. The robot obstacle avoidance control method according to claim 12, characterized in that: The method for determining the starting point and the end point of the Bezier curve from the fitting target point includes: The starting point of the Bezier curve is the fitting target point with the smallest coordinate value in the target planning direction among the fitting target points obtained by coordinate system conversion and translation of all valid obstacle grids selected in the same step S3, so as to form a fitting target point closest to the body center of the robot; The end point of the Bezier curve is the fitting target point with the largest coordinate value in the target planning direction among the fitting target points obtained by coordinate system transformation and translation of all valid obstacle grids selected in the same step S3, so as to form the fitting target point farthest from the body center of the robot.
14. The robot obstacle avoidance control method according to claim 13, characterized in that: In step S5, the method for converting the obstacle avoidance target point from the obstacle avoidance fitting curve equation based on the adjacent position points of the current position point in the target planning direction includes: Calculate the coordinate value of the adjacent position point of the current position point in the target planning direction, and set the coordinate value of the adjacent position point as the forward vertical coordinate value; Then, the forward-looking ordinate value is substituted into the obstacle avoidance fitting curve equation, the abscissa value of the point in the obstacle avoidance fitting curve whose ordinate value is equal to the forward-looking ordinate value is calculated, and the point in the obstacle avoidance fitting curve whose ordinate value is equal to the forward-looking ordinate value is marked as the obstacle avoidance target point; The difference between the coordinates of the adjacent position points of the current position point in the target planning direction and the coordinates of the current position point in the target planning direction is equal to a preset parameter.
15. The robot obstacle avoidance control method according to claim 14, characterized in that: In step S6, whenever the robot walks to an obstacle avoidance target point, the method of repeatedly executing steps S5 to S6 until the robot walks to a preset obstacle avoidance end point includes: Whenever the robot walks to an obstacle avoidance target point, the robot updates the current obstacle avoidance target point as the current position point, and then executes step S5 to obtain the next obstacle avoidance target point, and then the robot walks to the next obstacle avoidance target point; then the next obstacle avoidance target point is updated as the current position point of the robot, and then steps S5 to S6 are executed, and this is repeated until the robot walks to the preset obstacle avoidance end point, so that the robot walks according to the obstacle avoidance fitting curve.
Citation Information
Patent Citations
Obstacle avoiding path planning method and system in specific path
CN109116858A
Map processing method, mobile robot and computer readable storage medium
CN111104933A
Mobile equipment obstacle avoiding method and device, mobile equipment and storage medium
CN113433936A
Path planning method and device, vehicle and storage medium
CN114894206A
Grid map generation method and device, moving tool and storage medium
CN115114387A
Cited By
Body-equipped robot, obstacle avoidance control method and device thereof, and program product
CN119826836A
Map updating method, path planning method, related device, equipment and medium
CN121346771A
Traffic infrastructure intelligent observation planning method and system based on multi-machine cooperation
CN122088961A
Photovoltaic array internal obstacle bypassing path decision-making method based on high-precision spatial positioning and structural model
CN122674353A
