A robot avoidance control method, device, equipment and storage medium
By detecting obstacles and generating evasion control strategies, robots can effectively avoid human bodies, solving the problem that robots in the prior art are difficult to avoid human bodies, and improving safety and reliability.
Patent Information
- Application Number
- CN202210637558.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-06-07
AI Technical Summary
Existing robots are difficult to effectively avoid the human body during movement, resulting in low safety and reliability.
By detecting the obstacle in front, obtaining its external rectangular area, and generating an evasion control strategy based on the comparison results of the front distance and the preset distance parameters, adjusting the movement direction and speed of the robot to avoid obstacles.
It realizes that the robot effectively avoids the human body during movement, and improves safety and reliability.
Smart Images

Figure CN115016478B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot control technology, and in particular to a robot avoidance control method, device, equipment and computer-readable storage medium. Background Art
[0002] With the development of computer technology, sensor technology and artificial intelligence, various robots are used in factories, warehouses, hotels, shopping malls and restaurants, which makes the reliability of robot avoidance function more and more demanding. Existing robots are difficult to effectively avoid human bodies during movement, so there is an urgent need for a robot avoidance control method that can improve the effectiveness of robot avoidance of human bodies. Summary of the invention
[0003] The present invention provides a robot avoidance control method, device, equipment and storage medium to solve the problem that existing robots are difficult to effectively avoid human bodies during movement. When an obstacle is detected in front, the circumscribed rectangular area of the obstacle is obtained, and based on the comparison result between the front distance and the preset distance parameter, an avoidance control strategy for controlling the robot is generated according to the position information of the side of the circumscribed rectangular area, which can effectively avoid the obstacle in front.
[0004] In order to solve the above technical problems, a first aspect of an embodiment of the present invention provides a robot avoidance control method, comprising the following steps:
[0005] When an obstacle is detected within the preset detection range, a circumscribed rectangular area of the obstacle is obtained according to a real-time image containing the obstacle;
[0006] Based on a preset coordinate system in the real-time image, obtaining position information of a side of the circumscribed rectangular area;
[0007] Based on the comparison result between the front distance and the preset distance parameter, an avoidance control strategy is generated according to the position information, and the robot is controlled according to the avoidance control strategy; wherein the front distance is the distance between the robot and the obstacle in the moving direction.
[0008] As a preferred embodiment, the position information includes at least a side distance between a side of the circumscribed rectangular area and the robot and a side angle of the side, and the preset distance parameters include at least a preset safety distance value and a preset emergency braking distance value;
[0009] Then, the comparison result based on the front distance and the preset distance parameter, generating an avoidance control strategy according to the position information, and controlling the robot according to the avoidance control strategy specifically includes the following steps:
[0010] When s0 > s1, according to the side distance and the side angle, calculate the direction adjustment parameter of the robot, and adjust the moving direction of the robot according to the direction adjustment parameter;
[0011] When s2 ≤ s0 ≤ s1, calculate the direction adjustment parameter of the robot according to the side distance and the side mark angle, adjust the moving direction of the robot according to the direction adjustment parameter, and control the robot to decelerate with a preset braking acceleration;
[0012] When s0 < s2, adjust the moving direction and moving speed of the robot according to the comparison result between the number of obstacles in front of the robot and a preset number threshold, and the comparison result between the friction coefficient of the current moving surface obtained in advance and the braking acceleration;
[0013] Wherein, s0 represents the front distance, s1 represents the preset safety distance value, and s2 represents the preset emergency braking distance value.
[0014] As a preferred solution, the direction adjustment parameter at least includes a moving angle adjustment parameter and an adjustment angular velocity;
[0015] Then, calculating the direction adjustment parameter of the robot according to the side distance and the side angle specifically includes the following steps:
[0016] According to the side distance and the side angle, calculate a first moving angle and a second moving angle through the following expression:
[0017] β start = γ start - θ start = γ start - tan -1 (D s / d start )
[0018] β end = γ end + θ end = γ end + tan -1 (D s / d end )
[0019] Wherein, β start represents the first moving angle, γ start represents the first side angle where the right side of the circumscribed rectangular area is located, θ start represents the minimum adjustment angle required for the robot to pass through the right side of the circumscribed rectangular area, D sIndicates the preset distance value, d start represents the first side distance between the right side of the circumscribed rectangular area and the robot, β end represents the second moving angle, γ end represents the second side angle of the left side of the circumscribed rectangular area, θ end represents the minimum adjustment angle required for the robot to pass through the left side of the circumscribed rectangular area, d end Indicates the second side distance between the left side of the circumscribed rectangular area and the robot;
[0020] When |β start -π / 2|<|β end -π / 2|, the first moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the first moving angle is calculated by the following expression:
[0021]
[0022] When |β start -π / 2|<|β end -π / 2|, the second moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the second moving angle is calculated by the following expression:
[0023]
[0024] Among them, v0 represents the moving speed of the robot, ω1 represents the adjustment angular velocity of the first moving angle, and ω2 represents the adjustment angular velocity of the second moving angle.
[0025] As a preferred solution, the moving direction and moving speed of the robot are adjusted according to the comparison result of the number of obstacles currently located in front of the robot with a preset number threshold, and the comparison result of the friction coefficient of the current moving surface obtained in advance with the braking acceleration, which specifically includes the following steps:
[0026] When the number of obstacles currently located in front of the robot is less than the preset number threshold, adjusting the moving direction of the robot so that there are no obstacles on the moving track of the robot;
[0027] When the number of obstacles currently located in front of the robot is equal to or greater than the preset number threshold, and |f|≤|a|, the robot is decelerated by the braking acceleration, and the moving direction of the robot is adjusted so that there are no obstacles on the moving trajectory of the robot;
[0028] When the number of obstacles currently located in front of the robot is equal to or greater than the preset number threshold, and |f|>|a|, locking the wheels of the robot;
[0029] Wherein, f represents the friction coefficient of the current moving surface, and a represents the braking acceleration.
[0030] As a preferred solution, the step of obtaining the circumscribed rectangular area of the obstacle according to the real-time image containing the obstacle specifically comprises the following steps:
[0031] According to the real-time image containing the obstacle, the first pixel points with the largest grayscale difference in the real-time image are obtained by the following expression:
[0032] g(x,y)=max{q 1,1 (x,y),…,q K,K (x,y)}
[0033]
[0034] Among them, g(x,y) represents the grayscale difference of the first pixel in any pixel range of size K×K, q n,m (x, y) represents the absolute value of the grayscale difference of each pixel within a pixel range of size K×K, I(x, y) represents the grayscale value of the pixel at position (x, y), I(x+n, y+m) represents the grayscale value of the pixel at position (x+n, y+m), W represents the number of pixels in the horizontal direction of the real-time image, and H represents the number of pixels in the vertical direction of the real-time image;
[0035] Identifying an obstacle area in the real-time image based on a comparison result of the grayscale difference value of the first pixel point and a preset brightness threshold;
[0036] A horizontal projection model and a vertical projection model are established in the obstacle area to obtain a circumscribed rectangular area of the obstacle.
[0037] As a preferred solution, the step of identifying the obstacle area in the real-time image based on the comparison result of the grayscale difference of the first pixel point with a preset brightness threshold specifically includes the following steps:
[0038] Based on the comparison result of the gray value of the first pixel point and the preset brightness threshold, the obstacle area in the real-time image is identified by the following expression:
[0039]
[0040] Where g(x,y) represents the grayscale difference of any first pixel, T Hrepresents the preset brightness threshold, and R(x, y) represents the grayscale difference of any pixel in the obstacle area.
[0041] As a preferred solution, the method detects the obstacle within the preset detection range through the following steps:
[0042] The obstacle is detected within the preset detection range by the ACCONEER PCR radar sensor.
[0043] A second aspect of an embodiment of the present invention provides a robot avoidance control device, comprising:
[0044] A circumscribed rectangular area acquisition module, used to acquire a circumscribed rectangular area of the obstacle according to a real-time image containing the obstacle when an obstacle is detected within a preset detection range;
[0045] A position information acquisition module, used to acquire the position information of the side of the circumscribed rectangular area based on a coordinate system preset in the real-time image;
[0046] An avoidance control module is used to generate an avoidance control strategy according to the position information based on a comparison result between the front distance and a preset distance parameter, and control the robot according to the avoidance control strategy; wherein the front distance is the distance between the robot and the obstacle in the moving direction.
[0047] A third aspect of an embodiment of the present invention provides a robot avoidance control device, 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 robot avoidance control method as described in any one of the first aspects is implemented.
[0048] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the robot avoidance control method as described in any one of the first aspects.
[0049] Compared with the prior art, the beneficial effect of the embodiments of the present invention is that when an obstacle is detected in front, the circumscribed rectangular area of the obstacle is obtained, and based on the comparison result of the front distance and the preset distance parameter, an avoidance control strategy for controlling the robot is generated according to the position information of the side of the circumscribed rectangular area, which can effectively avoid the obstacle in front. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a flow chart of a robot avoidance control method provided by an embodiment of the present invention;
[0051] Figure 2 It is a schematic diagram of movement angle adjustment of a robot according to position information of a rectangular area circumscribed by a human body provided by an embodiment of the present invention;
[0052] Figure 3 is a schematic diagram of a circumscribed rectangular area for identifying a human body provided by an embodiment of the present invention;
[0053] Figure 4 It is a schematic diagram of the transient change of the pulse signal of the ACCONEER PCR radar sensor provided by the embodiment of the present invention when capturing the human breathing signal;
[0054] Figure 5 It is a schematic diagram of the structure of a robot avoidance control device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0056] See also Figure 1 A first aspect of an embodiment of the present invention provides a robot avoidance control method, comprising the following steps S1 to S3:
[0057] Step S1, when an obstacle is detected within a preset detection range, obtaining a circumscribed rectangular area of the obstacle based on a real-time image containing the obstacle;
[0058] Step S2, obtaining position information of the side of the circumscribed rectangular area based on a coordinate system preset in the real-time image;
[0059] Step S3, based on the comparison result between the front distance and the preset distance parameter, an avoidance control strategy is generated according to the position information, and the robot is controlled according to the avoidance control strategy; wherein the front distance is the distance between the robot and the obstacle in the moving direction.
[0060] Specifically, considering that most obstacles such as human bodies are non-simple geometric shapes, converting the problem of avoiding obstacles into the problem of avoiding a simple geometric shape helps to improve the effectiveness of avoidance. When an obstacle is detected within a preset detection range, an embodiment of the present invention obtains the circumscribed rectangular area of the obstacle based on a real-time image containing the obstacle.
[0061] Further, since the avoidance control strategies to be adopted are different due to different distances from the obstacle ahead, the embodiments of the present invention generate an avoidance control strategy based on the comparison result between the forward distance and the preset distance parameter according to the position information of the side of the circumscribed rectangular area, and control the robot according to the avoidance control strategy; wherein, the forward distance is the distance between the robot and the obstacle in the moving direction.
[0062] A robot avoidance control method provided by an embodiment of the present invention, after detecting an obstacle ahead, obtains the circumscribed rectangular area of the obstacle, and generates an avoidance control strategy for controlling the robot based on the comparison result between the forward distance and the preset distance parameter according to the position information of the side of the circumscribed rectangular area, and can effectively avoid the obstacle ahead.
[0063] As a preferred solution, the position information at least includes the side distance between the side of the circumscribed rectangular area and the robot and the side angle where the side is located, and the preset distance parameter at least includes a preset safety distance value and a preset emergency braking distance value;
[0064] Then, the generating an avoidance control strategy according to the position information based on the comparison result between the forward distance and the preset distance parameter, and controlling the robot according to the avoidance control strategy specifically includes the following steps:
[0065] When s0 > s1, calculate the direction adjustment parameter of the robot according to the side distance and the side angle, and adjust the moving direction of the robot according to the direction adjustment parameter;
[0066] When s2 ≤ s0 ≤ s1, calculate the direction adjustment parameter of the robot according to the side distance and the side angle, adjust the moving direction of the robot according to the direction adjustment parameter, and control the robot to decelerate with a preset braking acceleration;
[0067] When s0 < s2, adjust the moving direction and moving speed of the robot according to the comparison result between the number of obstacles currently in front of the robot and the preset number threshold and the comparison result between the friction coefficient of the current moving surface obtained in advance and the braking acceleration;
[0068] Wherein, s0 represents the forward distance, s1 represents the preset safety distance value, and s2 represents the preset emergency braking distance value.
[0069] It should be noted that the settings of the preset safety distance value and the preset emergency braking distance value in the embodiments of the present invention are as follows:
[0070] s1 = v0t
[0071] s2 = v0t + at 2 / 2
[0072] Wherein, v0 represents the moving speed of the robot, a represents the braking acceleration, t represents the time required for the robot to stop, and its expression is: t = -v0 / a.
[0073] Specifically, when s0 > s1, that is, the distance ahead is greater than the preset safe distance value, the embodiment of the present invention calculates the direction adjustment parameter of the robot according to the side distance and the side angle, and adjusts the moving direction of the robot according to the direction adjustment parameter. At the same time, the distance ahead is continuously detected within a future period of time t. If the obstacle never deviates from the moving trajectory of the robot, the avoidance control strategy is changed in real time according to the distance ahead.
[0074] When s2 ≤ s0 ≤ s1, that is, the distance ahead is between the preset safe distance value and the preset emergency braking distance value, the embodiment of the present invention calculates the direction adjustment parameter of the robot according to the side distance and the side angle, adjusts the moving direction of the robot according to the direction adjustment parameter, and controls the robot to decelerate with a preset braking acceleration. At the same time, the distance ahead is continuously detected within a future period of time t. If the obstacle never deviates from the moving trajectory of the robot, the avoidance control strategy is changed in real time according to the distance ahead.
[0075] When s0 < s2, that is, the distance ahead is less than the preset emergency braking distance value, the embodiment of the present invention adjusts the moving direction and moving speed of the robot according to the comparison result between the number of obstacles currently in front of the robot and the preset number threshold, and the comparison result between the friction coefficient of the current moving surface obtained in advance and the braking acceleration. It can be understood that since the distance ahead is already less than the preset emergency braking distance value, in order to reduce the possibility of collision, it is necessary to consider the density of the obstacles ahead and the friction coefficient of the current moving surface, and then adopt a more effective avoidance control strategy.
[0076] As a preferred solution, the direction adjustment parameter at least includes a moving angle adjustment parameter and an adjustment angular velocity;
[0077] Then, calculating the direction adjustment parameter of the robot according to the side distance and the side angle specifically includes the following steps:
[0078] According to the side distance and the side angle, the first moving angle and the second moving angle are calculated through the following expression:
[0079] β start = γ start - θstart =γ start -tan -1 (D s / d start )
[0080] β end =γ enf +θ end =γ end +tan -1 (D s / d end )
[0081] Among them, β start represents the first moving angle, γ start represents the first side angle of the right side of the circumscribed rectangular area, θ start It represents the minimum adjustment angle required for the robot to pass through the right side of the circumscribed rectangular area, D s Indicates the preset distance value, d start represents the first side distance between the right side of the circumscribed rectangular area and the robot, β end represents the second moving angle, γ end represents the second side angle of the left side of the circumscribed rectangular area, θ end represents the minimum adjustment angle required for the robot to pass through the left side of the circumscribed rectangular area, d end Indicates the second side distance between the left side of the circumscribed rectangular area and the robot;
[0082] When |β start -π / 2|<|β end -π / 2|, the first moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the first moving angle is calculated by the following expression:
[0083]
[0084] When |β start -π / 2|<|β end -π / 2|, the second moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the second moving angle is calculated by the following expression:
[0085]
[0086] Among them, v0 represents the moving speed of the robot, ω1 represents the adjustment angular velocity of the first moving angle, and ω2 represents the adjustment angular velocity of the second moving angle.
[0087] Specifically, the preset detection range of the embodiment of the present invention can be understood as follows: the center of the range is the position of the detector inside the robot, and the radius of the range is the farthest distance that the detector can detect. Therefore, the distance between the two sides of the circumscribed rectangular area of the obstacle and the robot is the distance from the two sides to the detector, which is recorded as d start and d end .
[0088] When an obstacle is detected in front of the robot, if the robot continues to move along its current trajectory, it will collide with the obstacle. Then the most ideal trajectory is to move along the side of the circumscribed rectangular area of the obstacle. The preset distance value D s Represents the safe distance between the robot and the obstacle, and its expression is as follows:
[0089]
[0090] Where b represents the width of the robot, and ε represents the safety parameter, that is, the distance required to be away from the side of the circumscribed rectangular area of the obstacle to ensure that there is no collision with the obstacle.
[0091] Furthermore, the embodiment of the present invention selects the smaller angle that the robot needs to adjust by the following rules:
[0092] When |β start -π / 2|<|β end -π / 2|, the first moving angle is used as the moving angle adjustment parameter; when |β start -π / 2|<|β end -π / 2|, the second moving angle is used as the moving angle adjustment parameter.
[0093] Considering that the robot moves in a curve during the actual adjustment of the moving angle, its movement time must be greater than Therefore, the embodiment of the present invention determines the adjustment angular velocity of the first moving angle and the adjustment angular velocity of the second moving angle respectively according to the following expressions:
[0094]
[0095]
[0096] like Figure 2 As shown, it is a schematic diagram of the robot's movement angle adjustment for avoidance based on the position information of the rectangular area circumscribed by the human body.
[0097] It is worth noting that, through the expression: β start =γ start -θ start =γ start -tan-1 (D s / dstart) may be a positive number or a negative number. A positive number means that the robot's moving direction needs to be adjusted to the right, and a negative number means that the robot's moving direction needs to be adjusted to the left.
[0098] As a preferred solution, the moving direction and moving speed of the robot are adjusted according to the comparison result of the number of obstacles currently located in front of the robot with a preset number threshold, and the comparison result of the friction coefficient of the current moving surface obtained in advance with the braking acceleration, which specifically includes the following steps:
[0099] When the number of obstacles currently located in front of the robot is less than the preset number threshold, adjusting the moving direction of the robot so that there are no obstacles on the moving track of the robot;
[0100] When the number of obstacles currently located in front of the robot is equal to or greater than the preset number threshold, and |f|≤|a|, the robot is decelerated by the braking acceleration, and the moving direction of the robot is adjusted so that there are no obstacles on the moving trajectory of the robot;
[0101] When the number of obstacles currently located in front of the robot is equal to or greater than the preset number threshold, and |f|>|a|, locking the wheels of the robot;
[0102] Wherein, f represents the friction coefficient of the current moving surface, and a represents the braking acceleration.
[0103] It should be noted that when the number of obstacles currently located in front of the robot is less than the preset number threshold, it indicates that the obstacles in front are relatively sparse. In this case, although linear deceleration movement cannot avoid collision, the robot's moving direction can be adjusted to make the obstacles deviate from the robot's moving trajectory, thereby avoiding a collision between the robot and the obstacles.
[0104] When the number of obstacles currently located in front of the robot is equal to or greater than the preset number threshold, it indicates that the obstacles in front are dense. In this case, it is difficult to avoid collision with obstacles by adjusting the moving direction of the robot. Therefore, the robot needs to be decelerated to the maximum extent according to the friction coefficient of the moving surface, as follows:
[0105] When |f|≤|a|, for example, the robot is moving on an ice surface, the robot can achieve a better deceleration effect by performing linear deceleration motion. Therefore, the embodiment of the present invention controls the deceleration of the robot with braking acceleration and adjusts the moving direction of the robot so that there are no obstacles on the moving trajectory of the robot.
[0106] When |f|>|a|, locking the robot's wheels can achieve a better deceleration effect, and the direction of movement cannot be adjusted at this time, and only deceleration movement is performed with acceleration f.
[0107] As a preferred solution, the step of obtaining the circumscribed rectangular area of the obstacle according to the real-time image containing the obstacle specifically comprises the following steps:
[0108] According to the real-time image containing the obstacle, the first pixel points with the largest grayscale difference in the real-time image are obtained by the following expression:
[0109] g(x,y)=max{q 1,1 (x,y),…,q K,K (x,y)}
[0110]
[0111] Among them, g(x,y) represents the grayscale difference of the first pixel in any pixel range of size K×K, q n,m (x, y) represents the absolute value of the grayscale difference of each pixel within a pixel range of size K×K, I(x, y) represents the grayscale value of the pixel at position (x, y), I(x+n, y+m) represents the grayscale value of the pixel at position (x+n, y+m), W represents the number of pixels in the horizontal direction of the real-time image, and H represents the number of pixels in the vertical direction of the real-time image;
[0112] Identifying an obstacle area in the real-time image based on a comparison result of the grayscale difference value of the first pixel point and a preset brightness threshold;
[0113] A horizontal projection model and a vertical projection model are established in the obstacle area to obtain a circumscribed rectangular area of the obstacle.
[0114] It should be noted that, considering that the grayscale values of homogeneous areas and heterogeneous areas in the infrared image are different, and the homogeneous area is not affected by the light and contrast of the local area, the embodiment of the present invention obtains the first pixel points with the largest grayscale difference in the real-time image through the following expression:
[0115] g(x,y)=max{q 1,1 (x,y),…,q K,K (x,y)}
[0116]
[0117] When g(x,y) is large, it indicates a heterogeneous region, and when g(x,y) is small, it indicates a homogeneous region. Generally speaking, in order to clearly distinguish between homogeneous and heterogeneous regions, a threshold T needs to be determined. L , homogeneous regions are identified by the following expression:
[0118]
[0119] Among them, F(x,y) represents the grayscale difference of any pixel in the homogeneous area.
[0120] Since the difference in the homogeneous area is less than the average value of the differential image, the threshold T L Determined by the following expression:
[0121]
[0122]
[0123] However, when the obstacle is a human body, considering that in the uniform area, the brightness inside the human body area is higher than the brightness of the background area, the embodiment of the present invention sets a brightness threshold to identify the obstacle area.
[0124] As a preferred solution, the step of identifying the obstacle area in the real-time image based on the comparison result of the grayscale difference of the first pixel point with a preset brightness threshold specifically includes the following steps:
[0125] Based on the comparison result of the gray value of the first pixel point and the preset brightness threshold, the obstacle area in the real-time image is identified by the following expression:
[0126]
[0127] Where g(x,y) represents the grayscale difference of any first pixel, T H represents the preset brightness threshold, and R(x, y) represents the grayscale difference of any pixel in the obstacle area.
[0128] It is worth noting that the embodiment of the present invention sets T by the following expression: H :
[0129]
[0130]
[0131] Furthermore, based on the preset coordinate system in the real-time image, a horizontal projection model and a vertical projection model are established in the obstacle area to obtain the circumscribed rectangular area of the obstacle. Continuous non-zero projection points are static and form a set where xbn and xe n are the starting and ending coordinates of the nth consecutive non-zero projection point, respectively.
[0132] The vertical projection model is used as an example to illustrate the establishment process: by projecting vertically onto the x-axis and accumulating non-zero pixels, a vertical projection model is formed. Continuous non-zero projection points are static and form a set where xb n and xe n are the starting and ending coordinates of the nth consecutive non-zero projection point, respectively.
[0133] The circumscribed rectangular area of the obstacle can be determined by the starting and ending coordinates of the non-zero projection points on the x-axis and y-axis, as follows: Figure 3 shown.
[0134] As a preferred solution, the method detects the obstacle within the preset detection range through the following steps:
[0135] The obstacle is detected within the preset detection range by the ACCONEER PCR radar sensor.
[0136] Specifically, when the obstacle is a human body, in order to better detect the stationary human body, the embodiment of the present invention detects the obstacle within the preset detection range through the ACCONEER PCR radar sensor.
[0137] like Figure 4 As shown, the ACCONEER PCR radar sensor is able to capture the transient changes of the human breathing signal concentrated near a time window, that is, the pulse-shaped signal, thereby detecting the presence of the human body.
[0138] See also Figure 5 A second aspect of an embodiment of the present invention provides a robot avoidance control device, comprising:
[0139] The circumscribed rectangular region acquisition module 501 is used to acquire the circumscribed rectangular region of the obstacle according to the real-time image containing the obstacle when an obstacle is detected within a preset detection range;
[0140] A position information acquisition module 502, configured to acquire position information of a side edge of the circumscribed rectangular area based on a coordinate system preset in the real-time image;
[0141] The avoidance control module 503 is used to generate an avoidance control strategy according to the position information based on the comparison result between the front distance and the preset distance parameter, and control the robot according to the avoidance control strategy; wherein the front distance is the distance between the robot and the obstacle in the moving direction.
[0142] As a preferred solution, the position information at least includes the side distance between the side of the circumscribed rectangular area and the robot and the side angle where the side is located, and the preset distance parameter at least includes a preset safety distance value and a preset emergency braking distance value;
[0143] Then, the avoidance control module 503 is configured to generate an avoidance control strategy based on the comparison result between the forward distance and the preset distance parameter, and control the robot according to the avoidance control strategy, which specifically includes the following steps:
[0144] When s0 > s1, calculate the direction adjustment parameter of the robot according to the side distance and the side angle, and adjust the moving direction of the robot according to the direction adjustment parameter;
[0145] When s2 ≤ s0 ≤ s1, calculate the direction adjustment parameter of the robot according to the side distance and the side angle, adjust the moving direction of the robot according to the direction adjustment parameter, and control the robot to decelerate with a preset braking acceleration;
[0146] When s0 < s2, adjust the moving direction and moving speed of the robot according to the comparison result between the number of obstacles currently in front of the robot and the preset number threshold, and the comparison result between the friction coefficient of the current moving surface obtained in advance and the braking acceleration;
[0147] Wherein, s0 represents the forward distance, s1 represents the preset safety distance value, and s2 represents the preset emergency braking distance value.
[0148] As a preferred solution, the direction adjustment parameter at least includes a moving angle adjustment parameter and an adjustment angular velocity;
[0149] Then, the avoidance control module 503 is configured to calculate the direction adjustment parameter of the robot according to the side distance and the side angle, which specifically includes the following steps:
[0150] Calculate a first moving angle and a second moving angle according to the side distance and the side angle through the following expression:
[0151] β start =γ start -θ start =γ start -tan -1 (D s / d start )
[0152] β end =γ end +θend =γ end +tan -1 (D s / d end )
[0153] Among them, β start represents the first moving angle, γ start represents the first side angle of the right side of the circumscribed rectangular area, θ start represents the minimum adjustment angle required for the robot to pass through the right side of the circumscribed rectangular area, D s Indicates the preset distance value, d start represents the first side distance between the right side of the circumscribed rectangular area and the robot, β end represents the second moving angle, γ end represents the second side angle of the left side of the circumscribed rectangular area, θ end represents the minimum adjustment angle required for the robot to pass through the left side of the circumscribed rectangular area, d end Indicates the second side distance between the left side of the circumscribed rectangular area and the robot;
[0154] When |β start -π / 2|<|β end -π / 2|, the first moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the first moving angle is calculated by the following expression:
[0155]
[0156] When |β start -π / 2|<|β end -π / 2|, the second moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the second moving angle is calculated by the following expression:
[0157]
[0158] Among them, v0 represents the moving speed of the robot, ω1 represents the adjustment angular velocity of the first moving angle, and ω2 represents the adjustment angular velocity of the second moving angle.
[0159] As a preferred solution, the avoidance control module 503 is used to adjust the moving direction and moving speed of the robot according to the comparison result of the number of obstacles currently located in front of the robot and the preset number threshold, and the comparison result of the friction coefficient of the current moving surface obtained in advance and the braking acceleration, and specifically includes the following steps:
[0160] When the number of obstacles currently located in front of the robot is less than the preset number threshold, adjusting the moving direction of the robot so that there are no obstacles on the moving track of the robot;
[0161] When the number of obstacles currently located in front of the robot is equal to or greater than the preset number threshold, and |f|≤|a|, the robot is decelerated by the braking acceleration, and the moving direction of the robot is adjusted so that there are no obstacles on the moving trajectory of the robot;
[0162] When the number of obstacles currently located in front of the robot is equal to or greater than the preset number threshold, and |f|>|a|, locking the wheels of the robot;
[0163] Wherein, f represents the friction coefficient of the current moving surface, and a represents the braking acceleration.
[0164] As a preferred solution, the circumscribed rectangular area acquisition module 501 is used to acquire the circumscribed rectangular area of the obstacle according to the real-time image containing the obstacle, and specifically includes the following steps:
[0165] According to the real-time image containing the obstacle, the first pixel points with the largest grayscale difference in the real-time image are obtained by the following expression:
[0166] g(x,y)=max{q 1,1 (x,y),…,q K,K (x,y)}
[0167]
[0168] Among them, g(x,y) represents the grayscale difference of the first pixel in any pixel range of size K×K, q n,m (x, y) represents the absolute value of the grayscale difference of each pixel within a pixel range of size K×K, I(x, y) represents the grayscale value of the pixel at position (x, y), I(x+n, y+m) represents the grayscale value of the pixel at position (x+n, y+m), W represents the number of pixels in the horizontal direction of the real-time image, and H represents the number of pixels in the vertical direction of the real-time image;
[0169] Identifying an obstacle area in the real-time image based on a comparison result of the grayscale difference value of the first pixel point and a preset brightness threshold;
[0170] A horizontal projection model and a vertical projection model are established in the obstacle area to obtain a circumscribed rectangular area of the obstacle.
[0171] As a preferred solution, the circumscribed rectangular region acquisition module 501 is used to identify the obstacle region in the real-time image based on the comparison result of the grayscale difference of the first pixel point and the preset brightness threshold, and specifically includes the following steps:
[0172] Based on the comparison result of the gray value of the first pixel point and the preset brightness threshold, the obstacle area in the real-time image is identified by the following expression:
[0173]
[0174] Where g(x,y) represents the grayscale difference of any first pixel, T H represents the preset brightness threshold, and R(x, y) represents the grayscale difference of any pixel in the obstacle area.
[0175] As a preferred solution, the device further includes an obstacle detection module, which is used to:
[0176] The obstacle is detected within the preset detection range by the ACCONEER PCR radar sensor.
[0177] It should be noted that a robot avoidance control device provided in an embodiment of the present invention can implement all the processes of the robot avoidance control method described in any of the above embodiments. The functions of each module in the device and the technical effects achieved are respectively the same as the functions and technical effects achieved by the robot avoidance control method described in the above embodiments, and will not be repeated here.
[0178] A third aspect of an embodiment of the present invention provides a robot avoidance control device, 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 robot avoidance control method as described in any embodiment of the first aspect is implemented.
[0179] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory. The terminal device may also include an input / output device, a network access device, a bus, etc.
[0180] The processor may be a central processing unit (CPU), 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. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0181] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, 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), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0182] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the robot avoidance control method as described in any embodiment of the first aspect.
[0183] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary hardware platform, and of course can also be implemented entirely by hardware. Based on such an understanding, all or part of the contribution of the technical solution of the present invention to the background technology can be embodied in the form of a software product, and the computer software product can be stored in a storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0184] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A robot avoidance control method, characterized in that: It includes the following steps: When an obstacle is detected within a preset detection range, obtain the circumscribed rectangular area of the obstacle according to the real-time image including the obstacle; Based on the coordinate system preset in the real-time image, obtain the position information of the sides of the circumscribed rectangular area; Based on the comparison result between the forward distance and the preset distance parameter, generate an avoidance control strategy according to the position information, and control the robot according to the avoidance control strategy; wherein, the forward distance is the distance between the robot and the obstacle in the moving direction; Wherein, the position information at least includes the side distance between the side of the circumscribed rectangular area and the robot and the side angle where the side is located, and the preset distance parameter at least includes a preset safety distance value and a preset emergency braking distance value; Then, the step of generating an avoidance control strategy according to the position information based on the comparison result between the forward distance and the preset distance parameter, and controlling the robot according to the avoidance control strategy specifically includes the following steps: When s0 > s1, calculate the direction adjustment parameter of the robot according to the side distance and the side angle, and adjust the moving direction of the robot according to the direction adjustment parameter; When s2 ≤ s0 ≤ s1, calculate the direction adjustment parameter of the robot according to the side distance and the side angle, adjust the moving direction of the robot according to the direction adjustment parameter, and control the robot to decelerate with a preset braking acceleration; Wherein, s0 represents the forward distance, and s1 represents the preset safety distance value; The direction adjustment parameter at least includes a moving angle adjustment parameter and an adjustment angular velocity; Then, the step of calculating the direction adjustment parameter of the robot according to the side distance and the side angle specifically includes the following steps: Calculate the first moving angle and the second moving angle through the following expression according to the side distance and the side angle: b start =c start -θ start =c start -tan -1 (D s / d start ) b end =c end +θ end =c end +tan -1 (D s / d end ) Among them, β start represents the first moving angle, γ start represents the first side angle of the right side of the circumscribed rectangular area, θ start It represents the minimum adjustment angle required for the robot to pass through the right side of the circumscribed rectangular area, D s Indicates the preset distance value, d start represents the first side distance between the right side of the circumscribed rectangular area and the robot, β end represents the second moving angle, γ end represents the second side angle of the left side of the circumscribed rectangular area, θ end represents the minimum adjustment angle required for the robot to pass through the left side of the circumscribed rectangular area, d end Indicates the second side distance between the left side of the circumscribed rectangular area and the robot; When |β start -π / 2|<|β end -π / 2|, the first moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the first moving angle is calculated by the following expression: When |β start -π / 2|<|β end -π / 2|, the second moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the second moving angle is calculated by the following expression: Wherein, v0 represents the moving speed of the robot, ω1 represents the adjustment angular velocity of the first moving angle, and ω2 represents the adjustment angular velocity of the second moving angle.
2. The robot avoidance control method according to claim 1, characterized in that: The step of generating an avoidance control strategy according to the position information based on the comparison result between the forward distance and the preset distance parameter, and controlling the robot according to the avoidance control strategy specifically further includes the following steps: When s0 < s2, adjust the moving direction and moving speed of the robot according to the comparison result between the number of obstacles currently in front of the robot and the preset number threshold, and the comparison result between the friction coefficient of the current moving surface obtained in advance and the braking acceleration; Wherein, s2 represents the preset emergency braking distance value.
3. The robot avoidance control method according to claim 2, characterized in that: The step of adjusting the moving direction and moving speed of the robot according to the comparison result between the number of obstacles currently in front of the robot and the preset number threshold, and the comparison result between the friction coefficient of the current moving surface obtained in advance and the braking acceleration specifically includes the following steps: When the number of obstacles currently located in front of the robot is less than the preset number threshold, adjusting the moving direction of the robot so that there are no obstacles on the moving track of the robot; When the number of obstacles currently located in front of the robot is equal to or greater than the preset number threshold, and |f|≤|a|, the robot is decelerated by the braking acceleration, and the moving direction of the robot is adjusted so that there are no obstacles on the moving trajectory of the robot; When the number of obstacles currently located in front of the robot is equal to or greater than the preset number threshold, and |f|>|a|, locking the wheels of the robot; Wherein, f represents the friction coefficient of the current moving surface, and a represents the braking acceleration.
4. The robot avoidance control method according to claim 3, characterized in that: The step of obtaining the circumscribed rectangular area of the obstacle according to the real-time image containing the obstacle specifically comprises the following steps: According to the real-time image containing the obstacle, the first pixel points with the largest grayscale difference in the real-time image are obtained by the following expression: g(x,y)=max{q 1,1 (x,y),…,q K,K (x,y)} Among them, g(x,y) represents the grayscale difference of the first pixel in any pixel range of size K×K, q n,m (x, y) represents the absolute value of the grayscale difference of each pixel within a pixel range of size K×K, I(x, y) represents the grayscale value of the pixel at position (x, y), I(x+n, y+m) represents the grayscale value of the pixel at position (x+n, y+m), W represents the number of pixels in the horizontal direction of the real-time image, and H represents the number of pixels in the vertical direction of the real-time image; Identifying an obstacle area in the real-time image based on a comparison result of the grayscale difference value of the first pixel point and a preset brightness threshold; A horizontal projection model and a vertical projection model are established in the obstacle area to obtain a circumscribed rectangular area of the obstacle.
5. The robot avoidance control method according to claim 4, characterized in that: The step of identifying the obstacle area in the real-time image by comparing the grayscale difference of the first pixel point with a preset brightness threshold specifically includes the following steps: Based on the comparison result of the gray value of the first pixel point and the preset brightness threshold, the obstacle area in the real-time image is identified by the following expression: Where g(x,y) represents the grayscale difference of any first pixel, T H represents the preset brightness threshold, and R(x, y) represents the grayscale difference of any pixel in the obstacle area.
6. The robot avoidance control method according to claim 5, characterized in that: The method detects the obstacle within the preset detection range by the following steps: The obstacle is detected within the preset detection range by the ACCONEER PCR radar sensor.
7. A robot avoidance control device, characterized in that: include: A circumscribed rectangular area acquisition module, used to acquire a circumscribed rectangular area of the obstacle according to a real-time image containing the obstacle when an obstacle is detected within a preset detection range; A position information acquisition module, used to acquire the position information of the side of the circumscribed rectangular area based on a coordinate system preset in the real-time image; an avoidance control module, configured to generate an avoidance control strategy according to the position information based on a comparison result between the front distance and a preset distance parameter, and control the robot according to the avoidance control strategy; wherein the front distance is the distance between the robot and the obstacle in the moving direction; The position information at least includes a side distance between a side of the circumscribed rectangular area and the robot and a side angle of the side, and the preset distance parameters at least include a preset safety distance value and a preset emergency braking distance value; Then, the avoidance control module is used to generate an avoidance control strategy according to the position information based on the comparison result between the front distance and the preset distance parameter, and control the robot according to the avoidance control strategy, which specifically includes the following steps: When s0>s1, a direction adjustment parameter of the robot is calculated according to the side distance and the side angle, and the moving direction of the robot is adjusted according to the direction adjustment parameter; When s2≤s0≤s1, a direction adjustment parameter of the robot is calculated according to the side distance and the side angle, the moving direction of the robot is adjusted according to the direction adjustment parameter, and the robot is controlled to decelerate with a preset braking acceleration; Wherein, s0 represents the front distance, and s1 represents the preset safety distance value; The direction adjustment parameters at least include a moving angle adjustment parameter and an adjustment angular velocity; Then, the avoidance control module is used to calculate the direction adjustment parameter of the robot according to the side distance and the side angle, which specifically includes the following steps: According to the side distance and the side angle, the first movement angle and the second movement angle are calculated by the following expression: b start =c start -θ start =c start -tan -1 (D s / d start ) b end =c end +θ end =c end +tan -1 (D s / d end ) Among them, β start represents the first moving angle, γ start represents the first side angle of the right side of the circumscribed rectangular area, θ start It represents the minimum adjustment angle required for the robot to pass through the right side of the circumscribed rectangular area, D s Indicates the preset distance value, d start represents the first side distance between the right side of the circumscribed rectangular area and the robot, β end represents the second moving angle, γ end represents the second side angle of the left side of the circumscribed rectangular area, θ end represents the minimum adjustment angle required for the robot to pass through the left side of the circumscribed rectangular area, d end Indicates the second side distance between the left side of the circumscribed rectangular area and the robot; When |β start -π / 2|<|β end -π / 2|, the first moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the first moving angle is calculated by the following expression: When |β start -π / 2|<|β end -π / 2|, the second moving angle is used as the moving angle adjustment parameter, and the adjustment angular velocity of the second moving angle is calculated by the following expression: Among them, v0 represents the moving speed of the robot, ω1 represents the adjustment angular velocity of the first moving angle, and ω2 represents the adjustment angular velocity of the second moving angle.
8. A robot avoidance control device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the robot avoidance control method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the robot avoidance control method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for obstacle avoidance of AUV in zigzag obstacle environment
CN109782807A
Obstacle avoidance method, device and equipment for unmanned vehicle and storage medium
CN111506084A
Obstacle avoidance method and device for mobile robot, robot and storage medium
CN112171675A
Autonomous obstacle avoidance method based on deep learning and stereoscopic vision
CN113031597A