Obstacle detection method, device, readable storage medium and mobile robot
By acquiring the multi-angle collision signal of the mobile robot collision sensor group and combining the position information to determine the collision point of the obstacle, the problem of low detection accuracy in the prior art is solved, and a higher accuracy obstacle detection is achieved.
Patent Information
- Application Number
- CN202210908161.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-29
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2042-07-29
AI Technical Summary
When the prior art detects obstacles through collision sensors, the detection accuracy is low, and it is especially impossible to accurately detect low obstacles.
During the travel of the mobile robot, the first and second collision signals generated by the preset collision sensor group are obtained, and the obstacle collision point is determined in combination with the position of the mobile robot. This method obtains collision signals at multiple angles through the combination of rotation and travel, thereby improving detection accuracy.
Through the comprehensive consideration of multi-angle collision signals, the collision points of obstacles can be accurately determined, which significantly improves the accuracy of obstacle detection.
Smart Images

Figure CN115167449B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of mobile robots, and in particular, relates to an obstacle detection method, device, computer-readable storage medium and mobile robot. Background Art
[0002] In the prior art, mobile robots can generally use laser radar to detect obstacles, but laser radar can only scan information on a two-dimensional plane, while a mobile robot is a three-dimensional object. The laser radar is generally placed at a certain height of the mobile robot, and thus cannot scan certain low obstacles.
[0003] Usually, collision sensors are installed on mobile robots, which can mark the points where collisions occur as obstacles during the movement. However, since the collision sensor has a large contact range, it is difficult to determine the specific place that triggered the collision. It can only roughly mark a position, and the detection accuracy is low. Summary of the invention
[0004] In view of this, the embodiments of the present application provide an obstacle detection method, device, computer-readable storage medium and mobile robot to solve the problem of low detection accuracy when performing obstacle detection through collision sensors in the prior art.
[0005] A first aspect of an embodiment of the present application provides an obstacle detection method, which may include:
[0006] During the movement of the mobile robot, a first collision signal generated by a preset collision sensor group is obtained;
[0007] Acquire a first posture of the mobile robot when the first collision signal is generated;
[0008] Controlling the mobile robot to rotate according to a preset rotation angle;
[0009] Controlling the mobile robot to continue moving, and acquiring a second collision signal generated by the collision sensor group;
[0010] An obstacle collision point is determined according to the first collision signal, the second collision signal and the first posture.
[0011] In a specific implementation of the first aspect, determining the obstacle collision point according to the first collision signal, the second collision signal, and the first posture may include:
[0012] determining a collision angle of the mobile robot according to the first collision signal and the second collision signal;
[0013] The obstacle collision point is calculated according to the first posture and the collision angle.
[0014] In a specific implementation of the first aspect, calculating the obstacle collision point according to the first posture and the collision angle may include:
[0015] Calculating an offset angle of the obstacle collision point according to the posture angle in the first posture and the collision angle;
[0016] Calculating the relative position of the obstacle collision point and the mobile robot according to the offset angle and a preset robot radius;
[0017] The position of the obstacle collision point in a preset grid map is calculated according to the relative position and the position in the first posture.
[0018] In a specific implementation of the first aspect, after determining the obstacle collision point according to the first collision signal, the second collision signal, and the first posture, the obstacle detection method may further include:
[0019] Obtaining a grid occupancy value of a target grid; the target grid is the grid where the obstacle collision point is located; wherein the grid occupancy value is used to indicate the surmountability of the grid, a grid whose grid occupancy value is a preset first threshold is an obstacle-free grid, a grid whose grid occupancy value is greater than the first threshold and less than a preset second threshold is a surmountable obstacle grid, and a grid whose grid occupancy value is greater than or equal to the second threshold is an insurmountable obstacle grid;
[0020] If the grid occupancy value of the target grid is empty or less than the second threshold, setting the grid occupancy value of the target grid to the second threshold;
[0021] If the grid occupancy value of the target grid is greater than or equal to the second threshold, the grid occupancy value of the target grid is increased by one counting unit.
[0022] In a specific implementation of the first aspect, the obstacle detection method may further include:
[0023] When the mobile robot passes through the insurmountable obstacle grid without collision, obtaining a first acceleration signal generated by a preset acceleration sensor;
[0024] If the first acceleration signal is greater than a preset acceleration threshold, the grid occupancy value of the insurmountable obstacle grid is set to a preset starting value; wherein the starting value is greater than the first threshold and less than the second threshold;
[0025] If the first acceleration signal is less than or equal to the acceleration threshold, the grid occupancy value of the insurmountable obstacle grid is set to the first threshold.
[0026] In a specific implementation of the first aspect, the obstacle detection method may further include:
[0027] When the mobile robot passes through the passable grid without collision, a second acceleration signal generated by a preset acceleration sensor is obtained; wherein the passable grid includes the obstacle-free grid and the surmountable obstacle grid;
[0028] If the second acceleration signal is greater than a preset acceleration threshold, the grid occupancy value of the passable grid is increased by one counting unit;
[0029] If the second acceleration signal is less than or equal to the acceleration threshold, the grid occupancy value of the passable grid is set to the first threshold.
[0030] In a specific implementation of the first aspect, the obstacle detection method may further include:
[0031] When performing path planning for the mobile robot, the sum of grid occupancy values on each candidate path is calculated respectively;
[0032] A candidate path with the smallest sum of grid occupancy values is selected as the planned path of the mobile robot.
[0033] A second aspect of an embodiment of the present application provides an obstacle detection device, which may include:
[0034] A first collision signal acquisition module, used to acquire a first collision signal generated by a preset collision sensor group during the movement of the mobile robot;
[0035] A first posture acquisition module, used to acquire the first posture of the mobile robot when the first collision signal is generated;
[0036] A rotation control module, used to control the mobile robot to rotate according to a preset rotation angle;
[0037] a second collision signal acquisition module, used for controlling the mobile robot to continue moving and acquiring a second collision signal generated by the collision sensor group;
[0038] An obstacle collision point determination module is used to determine an obstacle collision point according to the first collision signal, the second collision signal and the first posture.
[0039] In a specific implementation of the second aspect, the obstacle collision point determination module may include:
[0040] a collision angle determination submodule, configured to determine a collision angle of the mobile robot according to the first collision signal and the second collision signal;
[0041] The obstacle collision point calculation submodule is used to calculate the obstacle collision point according to the first posture and the collision angle.
[0042] In a specific implementation of the second aspect, the obstacle collision point calculation submodule may include:
[0043] an offset angle calculation unit, configured to calculate an offset angle of the obstacle collision point according to the posture angle in the first posture and the collision angle;
[0044] A relative position calculation unit, used to calculate the relative position of the obstacle collision point and the mobile robot according to the offset angle and a preset robot radius;
[0045] An obstacle collision point calculation unit is used to calculate the position of the obstacle collision point in a preset grid map according to the relative position and the position in the first posture.
[0046] In a specific implementation of the second aspect, the obstacle detection device may further include:
[0047] A grid occupancy value acquisition module, used to acquire the grid occupancy value of the target grid; the target grid is the grid where the obstacle collision point is located; wherein the grid occupancy value is used to indicate the surmountability of the grid, a grid whose grid occupancy value is a preset first threshold is an obstacle-free grid, a grid whose grid occupancy value is greater than the first threshold and less than a preset second threshold is a surmountable obstacle grid, and a grid whose grid occupancy value is greater than or equal to the second threshold is an insurmountable obstacle grid;
[0048] A first grid setting module, configured to set the grid occupancy value of the target grid to the second threshold value if the grid occupancy value of the target grid is empty or less than the second threshold value;
[0049] The second grid setting module is used to increase the grid occupancy value of the target grid by one counting unit if the grid occupancy value of the target grid is greater than or equal to the second threshold.
[0050] In a specific implementation of the second aspect, the obstacle detection device may further include:
[0051] A first acceleration signal acquisition module, used to acquire a first acceleration signal generated by a preset acceleration sensor when the mobile robot passes through the insurmountable obstacle grid without collision;
[0052] a third grid setting module, configured to set the grid occupancy value of the insurmountable obstacle grid to a preset starting value if the first acceleration signal is greater than a preset acceleration threshold; wherein the starting value is greater than the first threshold and less than the second threshold;
[0053] The fourth grid setting module is used to set the grid occupancy value of the insurmountable obstacle grid to the first threshold if the first acceleration signal is less than or equal to the acceleration threshold.
[0054] In a specific implementation of the second aspect, the obstacle detection device may further include:
[0055] A second acceleration signal acquisition module, used for acquiring a second acceleration signal generated by a preset acceleration sensor when the mobile robot passes through a passable grid without collision; wherein the passable grid includes the obstacle-free grid and the surmountable obstacle grid;
[0056] a fifth grid setting module, configured to increase the grid occupancy value of the passable grid by one counting unit if the second acceleration signal is greater than a preset acceleration threshold;
[0057] The sixth grid setting module is used to set the grid occupancy value of the passable grid to the first threshold if the second acceleration signal is less than or equal to the acceleration threshold.
[0058] In a specific implementation of the second aspect, the obstacle detection device may further include:
[0059] A candidate path calculation module, used to calculate the sum of grid occupancy values on each candidate path when performing path planning for the mobile robot;
[0060] The planning path selection module is used to select a candidate path with the smallest sum of grid occupancy values as the planning path of the mobile robot.
[0061] A third aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above obstacle detection methods are implemented.
[0062] A fourth aspect of an embodiment of the present application provides a mobile robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above-mentioned obstacle detection methods when executing the computer program.
[0063] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a mobile robot, the mobile robot executes the steps of any one of the above-mentioned obstacle detection methods.
[0064] Compared with the prior art, the embodiments of the present application have the following beneficial effects: during the movement of the mobile robot, the embodiments of the present application obtain a first collision signal generated by a preset collision sensor group; obtain the first position of the mobile robot when the first collision signal is generated; control the mobile robot to rotate according to a preset rotation angle; control the mobile robot to continue moving, and obtain a second collision signal generated by the collision sensor group; determine the obstacle collision point according to the first collision signal, the second collision signal and the first position. Through the embodiments of the present application, the mobile robot can collide with an obstacle at different angles, thereby obtaining different collision signals, which can be comprehensively considered with the position of the mobile robot to determine a more accurate obstacle collision point, effectively improving the accuracy of obstacle detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0066] Figure 1 This is a schematic diagram of the structure of a mobile robot in an embodiment of the present application;
[0067] Figure 2 A schematic diagram of each partition that a mobile robot may collide with before collision;
[0068] Figure 3 This is a flow chart of an embodiment of an obstacle detection method in an embodiment of the present application;
[0069] Figure 4 A schematic flow chart of determining an obstacle collision point according to a first collision signal, a second collision signal and a first posture;
[0070] Figure 5 A schematic flow chart for calculating the obstacle collision point based on the first pose and the collision angle;
[0071] Figure 6 A schematic diagram of an example of obstacle detection for a mobile robot;
[0072] Figure 7 A schematic diagram of an example of calculating the collision point of an obstacle;
[0073] Figure 8 Schematic diagram of path planning for a mobile robot;
[0074] Fig. 9 This is a structural diagram of an embodiment of an obstacle detection device in an embodiment of the present application;
[0075] Fig.10 This is a schematic block diagram of a mobile robot in an embodiment of the present application. DETAILED DESCRIPTION
[0076] In order to make the purpose, features, and advantages of the invention of this application more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described below are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0077] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of 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 groups thereof.
[0078] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0079] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0080] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may 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.
[0081] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0082] The executor of the embodiment of the present application may be a mobile robot, including but not limited to any one of a sweeping robot, a mopping robot, a window cleaning robot or a vacuuming robot, etc. The embodiment of the present application does not specifically limit the type of mobile robot.
[0083] Figure 1 The figure is a possible structural diagram of the mobile robot. As shown in the figure, a semicircular collision bumper can be set in front of the mobile robot, and a collision sensor group consisting of two collision sensors can be set on the inner side of the collision bumper, wherein one collision sensor is located on the left side of the mobile robot, which is recorded as the left collision sensor, and the other collision sensor is located on the right side of the mobile robot, which is recorded as the right collision sensor.
[0084] When the mobile robot collides with an obstacle, the collision signal generated by the collision sensor group can be used to roughly detect the collision location. Figure 1 As shown, the front collision can be equally divided into three partitions: left, middle, and right, and each partition corresponds to an angle area of 60 degrees. When the left partition collides with an obstacle, only the left collision sensor is triggered to generate a collision signal, which is recorded as a left collision signal; when the right partition collides with an obstacle, only the right collision sensor is triggered to generate a collision signal, which is recorded as a right collision signal; when the middle partition collides with an obstacle, both the left collision sensor and the right collision sensor are triggered to generate a collision signal, which is recorded as a middle collision signal.
[0085] In a specific implementation of the embodiment of the present application, in order to improve the accuracy of obstacle detection, the left area, the middle area and the right area can be further divided, such as Figure 2 As shown in the figure, the left area can be further divided into left 1 area and left 2 area, the middle area can be further divided into middle 1 area and middle 2 area, and the right area can be further divided into right 1 area and right 2 area. After further division, each area corresponds to an angle area of 30 degrees. Based on this angle partition setting, the mobile robot can collide with obstacles at different angles, thereby obtaining different collision signals. By comprehensively considering the collision signals with the position and posture of the mobile robot, a more accurate obstacle collision point can be determined, which effectively improves the accuracy of obstacle detection.
[0086] See also Figure 3 , an embodiment of an obstacle detection method in the embodiment of the present application may include:
[0087] Step S301: During the movement of the mobile robot, a first collision signal generated by a preset collision sensor group is obtained.
[0088] If the first collision signal is a left collision signal, it can be determined that the left section collides with the obstacle; if the first collision signal is a middle collision signal, it can be determined that the middle section collides with the obstacle; if the first collision signal is a right collision signal, it can be determined that the right section collides with the obstacle.
[0089] Step S302: Acquire the first posture of the mobile robot when the first collision signal is generated.
[0090] In the embodiment of the present application, the first posture can be recorded as (x0, y0, th0), where (x0, y0) are the coordinates of the position of the mobile robot in the preset grid map. Since the mobile robot generally occupies a larger range, the center position of the mobile robot is used as the standard here. Taking the mobile robot as a circle as an example, (x0, y0) is the coordinates of the center of the mobile robot in the grid map, and th0 is the posture angle of the mobile robot in the grid map.
[0091] Step S303: Control the mobile robot to rotate according to a preset rotation angle.
[0092] The rotation angle is consistent with the angle corresponding to each minimum partition. Figure 2 The division method in , the rotation angle is 30 degrees.
[0093] The specific rotation direction can be set according to the actual situation, so that the collision information can be triggered again after the rotation. In a specific implementation of the embodiment of the present application, if the first collision signal is a left collision signal, the mobile robot can be controlled to rotate left, if the first collision signal is a right collision signal, the mobile robot can be controlled to rotate right, and if the first collision signal is a middle collision signal, the mobile robot can be controlled to rotate left or right.
[0094] Step S304: Control the mobile robot to continue moving, and obtain a second collision signal generated by the collision sensor group.
[0095] That is, the mobile robot is controlled to collide with the obstacle again at a different angle, triggering a new collision signal, namely the second collision signal. Similar to the first collision signal, if the second collision signal is a left collision signal, it can be determined that the left part of the area collides with the obstacle; if the second collision signal is a middle collision signal, it can be determined that the middle part of the area collides with the obstacle; if the second collision signal is a right collision signal, it can be determined that the right part of the area collides with the obstacle.
[0096] Step S305: determine the obstacle collision point according to the first collision signal, the second collision signal and the first posture.
[0097] like Figure 4 As shown, step S305 may specifically include the following process:
[0098] Step S3051: determine the collision angle of the mobile robot according to the first collision signal and the second collision signal.
[0099] The collision angle here refers to the angle corresponding to the collision partition when the mobile robot collides with the obstacle in the first posture. In a specific implementation of the embodiment of the present application, the collision angle corresponding to the middle partition 1 can be set to 15 degrees, the collision angle corresponding to the left partition 2 can be set to 45 degrees, the collision angle corresponding to the left partition 1 can be set to 75 degrees, the collision angle corresponding to the middle partition 2 can be set to -15 degrees, the collision angle corresponding to the right partition 1 can be set to -45 degrees, and the collision angle corresponding to the right partition 2 can be set to -75 degrees.
[0100] Taking the rotation direction of left rotation as an example, if the first collision signal is a left collision signal and the second collision signal is also a left collision signal, it can be determined that the first collision occurred in the left 1 partition, and the collision angle is 75 degrees; if the first collision signal is a left collision signal and the second collision signal is a middle collision signal, it can be determined that the first collision occurred in the left 2 partitions, and the collision angle is 45 degrees; if the first collision signal is a middle collision signal and the second collision signal is also a middle collision signal, it can be determined that the first collision occurred in the middle 1 partition, and the collision angle is 15 degrees; if the first collision signal is a middle collision signal and the second collision signal is a right collision signal, it can be determined that the first collision occurred in the middle 2 partitions, and the collision angle is -15 degrees.
[0101] Taking the rotation direction of right rotation as an example, if the first collision signal is a right collision signal and the second collision signal is also a right collision signal, it can be determined that the first collision occurred in the right 2 partitions, and the collision angle is -75 degrees; if the first collision signal is a right collision signal and the second collision signal is a middle collision signal, it can be determined that the first collision occurred in the right 1 partition, and the collision angle is -45 degrees; if the first collision signal is a middle collision signal and the second collision signal is also a middle collision signal, it can be determined that the first collision occurred in the middle 2 partitions, and the collision angle is -15 degrees; if the first collision signal is a middle collision signal and the second collision signal is a left collision signal, it can be determined that the first collision occurred in the middle 1 partition, and the collision angle is 15 degrees.
[0102] Step S3052: Calculate the obstacle collision point according to the first pose and the collision angle.
[0103] like Figure 5 As shown, step S3052 may specifically include the following process:
[0104] Step S30521: Calculate the offset angle of the obstacle collision point according to the posture angle and the collision angle in the first posture.
[0105] Specifically, the sum of the posture angle and the collision angle in the first posture can be used as the offset angle of the obstacle collision point, that is:
[0106] Δth=th0+th1
[0107] Among them, th1 is the collision angle, and Δth is the offset angle of the obstacle collision point.
[0108] Step S30522: Calculate the relative position of the obstacle collision point and the mobile robot according to the offset angle and the preset robot radius.
[0109] Specifically, the relative position of the obstacle collision point and the mobile robot can be calculated according to the following formula:
[0110] Δx=R×cosΔth
[0111] Δy=R×sinΔth
[0112] Among them, R is the radius of the robot, and (Δx, Δy) is the relative position between the obstacle collision point and the mobile robot.
[0113] Step S30523: Calculate the position of the obstacle collision point in the preset grid map according to the relative position and the position in the first pose.
[0114] Specifically, the position of the obstacle collision point in the grid map can be calculated according to the following formula:
[0115] x=x0+Δx
[0116] y=y0+Δy
[0117] Among them, (x, y) is the position of the obstacle collision point in the grid map.
[0118] In summary, the calculation formula of the obstacle collision point can be expressed as:
[0119] x=x0+R×cos(th0+th1)
[0120] y=y0+R×sin(th0+th1)
[0121] Figure 6The figure shows an example of obstacle detection by a mobile robot. As shown in the figure, assuming that the mobile robot is moving straight, a collision occurs in the left partition 1 of the mobile robot because the laser radar cannot scan low obstacles. At this time, the mobile robot records the current posture (i.e., the first posture), then turns left 30 degrees and continues to move forward. A collision occurs again in the left partition 2 of the mobile robot. The two collision signals are both left collision signals, so it can be determined that the first collision occurred in the left partition 1, and the collision angle is 75 degrees.
[0122] like Figure 7 As shown in the figure, assuming that the first pose of the mobile robot is (0,0,-45), the robot radius is 15 cm, and when the grid length is 5 cm, it is equivalent to occupying 3 grids. Substituting it into the calculation formula of the obstacle collision point, we can get:
[0123] x=0+3×cos(-45+75)≈2.6
[0124] y=0+3×sin(-45+75)≈1.5
[0125] Since the grid should be an integer, the result is rounded up, and the coordinates of the obstacle collision point in the grid map are (3,2).
[0126] Through the embodiments of the present application, the mobile robot can collide with obstacles at different angles, thereby obtaining different collision signals. By comprehensively considering them with the posture of the mobile robot, a more accurate obstacle collision point can be determined, effectively improving the accuracy of obstacle detection.
[0127] In a specific implementation of an embodiment of the present application, after determining the obstacle collision point, the grid occupancy value of the target grid can also be updated. Among them, the target grid is the grid where the obstacle collision point is located, and the grid occupancy value is used to indicate the surmountability of the grid. The value range can be set to [0,100]. The larger the grid occupancy value, the more difficult it is to surmount the grid. A grid whose grid occupancy value is a preset first threshold is an obstacle-free grid, a grid whose grid occupancy value is greater than the first threshold and less than the preset second threshold is a surmountable obstacle grid, and a grid whose grid occupancy value is greater than or equal to the second threshold is an insurmountable obstacle grid. The specific values of the first threshold and the second threshold can be set according to actual conditions. For example, the first threshold can be set to 0 or other values, and the second threshold can be set to 50 or other values. The embodiment of the present application does not make specific limitations on this.
[0128] When updating the grid occupancy value of the target grid, the grid occupancy value of the target grid may be first obtained. If the grid occupancy value of the target grid is empty or less than the second threshold, the grid occupancy value of the target grid is set to the second threshold; if the grid occupancy value of the target grid is greater than or equal to the second threshold, the grid occupancy value of the target grid is increased by one counting unit, for example, if the grid occupancy value of the target grid is 51, it is increased by one counting unit and updated to 52. In particular, if the grid occupancy value of the target grid is already the upper limit value of 100, it is no longer increased.
[0129] In order to prevent the mobile robot from repeatedly colliding with the same obstacle collision point during the spinning process, thereby causing the grid occupancy value of the corresponding target grid to increase continuously, a distance threshold can also be pre-set. When the mobile robot leaves the target grid for more than the distance threshold and approaches the target grid again, if a collision occurs at the target grid again, the grid occupancy value of the target grid is increased by one counting unit. Conversely, when the mobile robot leaves the target grid less than or equal to the distance threshold and approaches the target grid again, if a collision occurs at the target grid again, the grid occupancy value of the target grid remains unchanged. The specific value of the distance threshold can be set according to actual conditions, and the embodiments of the present application do not make specific restrictions on this. For example, it can be set to 2 to 3 robot radii. When the robot radius is 15 cm, the distance threshold is preferably 30 to 45 cm.
[0130] When there are other grids that can be passed, the mobile robot generally does not attempt to pass through the insurmountable obstacle grid, but when there are no other grids that can be passed, the mobile robot can try to pass through the insurmountable obstacle grid whose grid occupancy value is less than the preset third threshold. The specific value of the third threshold can be set according to actual conditions, for example, it can be set to 55 or other values, and the embodiments of the present application do not specifically limit this.
[0131] When the mobile robot passes through the insurmountable obstacle grid without collision, the acceleration signal generated by the preset acceleration sensor can be obtained and recorded as the first acceleration signal. If the first acceleration signal is greater than the preset acceleration threshold, it means that the bumps are large when passing through, then the grid occupancy value of the insurmountable obstacle grid can be set to the preset starting value, and the grid is changed from an insurmountable obstacle grid to a surmountable obstacle grid. Among them, the starting value is greater than the first threshold and less than the second threshold, and its specific value can be set according to the actual situation. For example, it can be set to 1 or other values, and the embodiments of the present application do not make specific restrictions on this. If the first acceleration signal is less than or equal to the acceleration threshold, it means that it is relatively stable when passing through, then the grid occupancy value of the insurmountable obstacle grid can be set to the first threshold, and the grid is changed from an insurmountable obstacle grid to an obstacle-free grid. It should be noted that the acceleration signal in the embodiment of the present application refers to the acceleration signal in the vertical direction (ie, the Z axis). The specific value of the acceleration threshold can be set according to actual conditions. For example, it can be set to 0.3g (ie, 0.3 gravitational acceleration) or other values. The embodiment of the present application does not make any specific limitations on this.
[0132] When the mobile robot passes through the passable grid without collision, the acceleration signal generated by the acceleration sensor can be obtained and recorded as the second acceleration signal. The passable grid includes an obstacle-free grid and a surmountable obstacle grid. If the second acceleration signal is greater than the acceleration threshold, it means that the bumps are large when passing through, then the grid occupancy value of the passable grid is increased by one counting unit, but the updated grid occupancy value should be limited to less than the second threshold. If the second acceleration signal is less than or equal to the acceleration threshold, it means that the passage is relatively smooth, then the grid occupancy value of the passable grid can be set to the first threshold, that is, the grid is marked as an obstacle-free grid.
[0133] Through the above method, a corresponding grid occupancy value can be set for each grid in the grid map, and it can be continuously updated during the movement of the mobile robot, so as to facilitate the selection of a planned path that can be passed more smoothly when the mobile robot is subsequently planning the path.
[0134] like Figure 8 As shown in the figure, when planning the path for the mobile robot, if there are obstacles in the direction of travel, after avoiding the insurmountable obstacle grid, each passable path can be selected from the obstacle-free grid and the surmountable obstacle grid as a candidate path. After selecting the candidate path, the sum of the grid occupancy values on each candidate path can be calculated respectively, and the candidate path with the smallest sum of grid occupancy values can be selected as the planned path of the mobile robot.
[0135] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0136] Corresponding to the obstacle detection method described in the above embodiment, Fig. 9 A structural diagram of an embodiment of an obstacle detection device provided in an embodiment of the present application is shown.
[0137] In this embodiment, an obstacle detection device may include:
[0138] A first collision signal acquisition module 901 is used to acquire a first collision signal generated by a preset collision sensor group during the movement of the mobile robot;
[0139] A first posture acquisition module 902, used to acquire the first posture of the mobile robot when the first collision signal is generated;
[0140] A rotation control module 903 is used to control the mobile robot to rotate according to a preset rotation angle;
[0141] A second collision signal acquisition module 904, used to control the mobile robot to continue moving and acquire a second collision signal generated by the collision sensor group;
[0142] The obstacle collision point determination module 905 is used to determine the obstacle collision point according to the first collision signal, the second collision signal and the first posture.
[0143] In a specific implementation of the embodiment of the present application, the obstacle collision point determination module may include:
[0144] a collision angle determination submodule, configured to determine a collision angle of the mobile robot according to the first collision signal and the second collision signal;
[0145] The obstacle collision point calculation submodule is used to calculate the obstacle collision point according to the first posture and the collision angle.
[0146] In a specific implementation of the embodiment of the present application, the obstacle collision point calculation submodule may include:
[0147] an offset angle calculation unit, configured to calculate an offset angle of the obstacle collision point according to the posture angle in the first posture and the collision angle;
[0148] A relative position calculation unit, used to calculate the relative position of the obstacle collision point and the mobile robot according to the offset angle and a preset robot radius;
[0149] An obstacle collision point calculation unit is used to calculate the position of the obstacle collision point in a preset grid map according to the relative position and the position in the first posture.
[0150] In a specific implementation of the embodiment of the present application, the obstacle detection device may further include:
[0151] A grid occupancy value acquisition module, used to acquire the grid occupancy value of the target grid; the target grid is the grid where the obstacle collision point is located; wherein the grid occupancy value is used to indicate the surmountability of the grid, a grid whose grid occupancy value is a preset first threshold is an obstacle-free grid, a grid whose grid occupancy value is greater than the first threshold and less than a preset second threshold is a surmountable obstacle grid, and a grid whose grid occupancy value is greater than or equal to the second threshold is an insurmountable obstacle grid;
[0152] A first grid setting module, configured to set the grid occupancy value of the target grid to the second threshold value if the grid occupancy value of the target grid is empty or less than the second threshold value;
[0153] The second grid setting module is used to increase the grid occupancy value of the target grid by one counting unit if the grid occupancy value of the target grid is greater than or equal to the second threshold.
[0154] In a specific implementation of the embodiment of the present application, the obstacle detection device may further include:
[0155] A first acceleration signal acquisition module, used to acquire a first acceleration signal generated by a preset acceleration sensor when the mobile robot passes through the insurmountable obstacle grid without collision;
[0156] a third grid setting module, configured to set the grid occupancy value of the insurmountable obstacle grid to a preset starting value if the first acceleration signal is greater than a preset acceleration threshold; wherein the starting value is greater than the first threshold and less than the second threshold;
[0157] The fourth grid setting module is used to set the grid occupancy value of the insurmountable obstacle grid to the first threshold if the first acceleration signal is less than or equal to the acceleration threshold.
[0158] In a specific implementation of the embodiment of the present application, the obstacle detection device may further include:
[0159] A second acceleration signal acquisition module, used for acquiring a second acceleration signal generated by a preset acceleration sensor when the mobile robot passes through a passable grid without collision; wherein the passable grid includes the obstacle-free grid and the surmountable obstacle grid;
[0160] a fifth grid setting module, configured to increase the grid occupancy value of the passable grid by one counting unit if the second acceleration signal is greater than a preset acceleration threshold;
[0161] The sixth grid setting module is used to set the grid occupancy value of the passable grid to the first threshold if the second acceleration signal is less than or equal to the acceleration threshold.
[0162] In a specific implementation of the embodiment of the present application, the obstacle detection device may further include:
[0163] A candidate path calculation module, used to calculate the sum of grid occupancy values on each candidate path when performing path planning for the mobile robot;
[0164] The planning path selection module is used to select a candidate path with the smallest sum of grid occupancy values as the planning path of the mobile robot.
[0165] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0166] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0167] Fig.10 A schematic block diagram of a mobile robot provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0168] like Fig.10 As shown, the mobile robot 10 of this embodiment includes: a processor 100, a memory 101, and a computer program 102 stored in the memory 101 and executable on the processor 100. When the processor 100 executes the computer program 102, the steps in the above-mentioned obstacle detection method embodiments are implemented, for example Figure 3 Alternatively, when the processor 100 executes the computer program 102, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Fig. 9 The functions of modules 901 to 905 are shown.
[0169] Exemplarily, the computer program 102 may be divided into one or more modules / units, which are stored in the memory 101 and executed by the processor 100 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 102 in the mobile robot 10.
[0170] Those skilled in the art will understand that Fig.10 It is only an example of the mobile robot 10 and does not constitute a limitation of the mobile robot 10. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the mobile robot 10 may also include input and output devices, network access devices, buses, etc.
[0171] The processor 100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0172] The memory 101 may be an internal storage unit of the mobile robot 10, such as a hard disk or memory of the mobile robot 10. The memory 101 may also be an external storage device of the mobile robot 10, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the mobile robot 10. Further, the memory 101 may also include both an internal storage unit of the mobile robot 10 and an external storage device. The memory 101 is used to store the computer program and other programs and data required by the mobile robot 10. The memory 101 may also be used to temporarily store data that has been output or is to be output.
[0173] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0174] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0175] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0176] In the embodiments provided in the present application, it should be understood that the disclosed device / mobile robot and method can be implemented in other ways. For example, the device / mobile robot embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0177] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0178] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0179] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electric carrier signals and telecommunication signals.
[0180] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An obstacle detection method, characterized in that: include: During the movement of the mobile robot, a first collision signal generated by a preset collision sensor group is obtained; Acquire a first posture of the mobile robot when the first collision signal is generated; Controlling the mobile robot to rotate according to a preset rotation angle; Controlling the mobile robot to continue moving, and acquiring a second collision signal generated by the collision sensor group; Determine the collision angle of the mobile robot according to the first collision signal and the second collision signal; calculate the offset angle of the obstacle collision point according to the posture angle in the first posture and the collision angle; calculate the relative position of the obstacle collision point and the mobile robot according to the offset angle and a preset robot radius; calculate the position of the obstacle collision point in a preset grid map according to the relative position and the position in the first posture.
2. The obstacle detection method according to claim 1, characterized in that: After calculating the position of the obstacle collision point in a preset grid map according to the relative position and the position in the first posture, the method further includes: Obtaining a grid occupancy value of a target grid; the target grid is the grid where the obstacle collision point is located; wherein the grid occupancy value is used to indicate the surmountability of the grid, a grid whose grid occupancy value is a preset first threshold is an obstacle-free grid, a grid whose grid occupancy value is greater than the first threshold and less than a preset second threshold is a surmountable obstacle grid, and a grid whose grid occupancy value is greater than or equal to the second threshold is an insurmountable obstacle grid; If the grid occupancy value of the target grid is empty or less than the second threshold, setting the grid occupancy value of the target grid to the second threshold; If the grid occupancy value of the target grid is greater than or equal to the second threshold, the grid occupancy value of the target grid is increased by one counting unit.
3. The obstacle detection method according to claim 2, characterized in that: Also includes: When the mobile robot passes through the insurmountable obstacle grid without collision, obtaining a first acceleration signal generated by a preset acceleration sensor; If the first acceleration signal is greater than a preset acceleration threshold, the grid occupancy value of the insurmountable obstacle grid is set to a preset starting value; wherein the starting value is greater than the first threshold and less than the second threshold; If the first acceleration signal is less than or equal to the acceleration threshold, the grid occupancy value of the insurmountable obstacle grid is set to the first threshold.
4. The obstacle detection method according to claim 2, characterized in that: Also includes: When the mobile robot passes through the passable grid without collision, a second acceleration signal generated by a preset acceleration sensor is obtained; wherein the passable grid includes the obstacle-free grid and the surmountable obstacle grid; If the second acceleration signal is greater than a preset acceleration threshold, the grid occupancy value of the passable grid is increased by one counting unit; If the second acceleration signal is less than or equal to the acceleration threshold, the grid occupancy value of the passable grid is set to the first threshold.
5. The obstacle detection method according to any one of claims 2 to 4, characterized in that: Also includes: When performing path planning for the mobile robot, the sum of grid occupancy values on each candidate path is calculated respectively; A candidate path with the smallest sum of grid occupancy values is selected as the planned path of the mobile robot.
6. An obstacle detection device, characterized in that: include: A first collision signal acquisition module, used to acquire a first collision signal generated by a preset collision sensor group during the movement of the mobile robot; A first posture acquisition module, used to acquire the first posture of the mobile robot when the first collision signal is generated; A rotation control module, used to control the mobile robot to rotate according to a preset rotation angle; a second collision signal acquisition module, used for controlling the mobile robot to continue moving and acquiring a second collision signal generated by the collision sensor group; An obstacle collision point determination module is used to determine the collision angle of the mobile robot according to the first collision signal and the second collision signal; calculate the offset angle of the obstacle collision point according to the posture angle in the first posture and the collision angle; calculate the relative position of the obstacle collision point and the mobile robot according to the offset angle and a preset robot radius; calculate the position of the obstacle collision point in a preset grid map according to the relative position and the position in the first posture.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the obstacle detection method according to any one of claims 1 to 5 are implemented.
8. A mobile robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the obstacle detection method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Self-moving device, obstacle information acquisition method and storage medium
CN113961007A