Obstacle avoiding method and device of robot and robot
A robot and obstacle avoidance technology, applied in the field of robot navigation, can solve problems such as difficult and effective obstacle avoidance for robots, and achieve the effect of improving obstacle avoidance problems and improving obstacle avoidance efficiency
Pending Publication Date: 2020-05-01
ANKER INNOVATIONS TECH CO LTD
0 Cites 13 Cited by
AI-Extracted Technical Summary
Problems solved by technology
[0004] The technical problem mainly solved by this application is to provide a robot obstacle avoidance method, a robot and a device with...
Method used
In order to improve or solve the above-mentioned problems occurring in inertial navigation, the processor 110 of the present embodiment can realize the obstacle avoidance method described in the obstacle avoidance method embodiment of the robot of the present application as follows by executing the program data in the memory, Thereby improving or solving the above-mentioned technical problems.
[0045] As shown in FIG. 4, after determining the initial position and the target position, the robot 10 can plan a path to obtain a traveling path. The robot 10 can perform path planning through a jump point search algorithm to obtain the shortest travel path between the initial position and the target position. Jump point search (Jump Point Search, referred to as JPS) algorithm generates and expands a small number of nodes, and the speed of reaching the target is very fast, because the jump point search can eliminate the symmetry between the paths, through the straight line and diagonal direction Pruning nodes to identify successors, skipping a large number of intermediate nodes that may be added to the corresponding list and other calculations during the search, which greatly improves the search speed, and the node storage in ...
Abstract
The present invention discloses an obstacle avoiding method and device of a robot and the robot. The method comprises the following steps of obtaining an initial position and a target position on a map; determining a moving path with the initial position as a starting point and the target position as an end point and a plurality of track points arranged on the moving path in sequence; by using inertial navigation, tracking the multiple track points, so that the robot moves to the target position along the moving path; if the robot is detected to collide with an obstacle in a moving process, bypassing the obstacle; and determining position features in the process of bypassing the obstacle, comparing the position features with preset conditions corresponding to the position features to obtain a comparison result, and executing a bypassing strategy matched with the comparison result. In the way, the obstacle can be effectively avoided.
Application Domain
Target-seeking controlPosition/course control in two dimensions
Technology Topic
Computer visionEngineering +1
Image
Examples
- Experimental program(1)
Example Embodiment
[0029] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of this application.
[0030] The robots described in the robot embodiments of the present application may be smart home robots, such as cleaning robots such as sweeping robots or vacuuming robots, and of course other commercial robots, civilian robots, industrial robots, etc.
[0031] Refer to figure 1 Taking a sweeping robot as an example, the robot 10 may include a processor 110, a communication circuit 120, and a memory 130. The processor 110 may communicate with the communication circuit 120 and the memory 130 through a communication bus.
[0032] The processor 110 is used to control the operation of the robot 10, and the processor 110 may also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 110 may be an integrated circuit chip with signal processing capabilities. The processor 110 may also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component . The general-purpose processor may be a microprocessor or the processor 110 may also be any conventional processor or the like.
[0033] The communication circuit 120 may be an interface for the robot 10 to communicate with external devices, such as a transceiver. The memory 130 may include random access memory (RAM), read only memory (ROM), flash memory, erasable programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), registers, hard disks, Removable disk, CD-ROM, etc. The memory 130 may store program data. For example, the program data may include a single instruction or many instructions, and may be distributed on several different code segments, distributed among different programs, and distributed across multiple memories 130. The memory 130 may be coupled to the processor 110 so that the processor 110 can read and write information from/to the memory 130. Of course, the memory 130 may be integrated into the processor 110.
[0034] Refer to figure 1 with figure 2 , The robot 10 may include a housing 21, a walking component 22, a cleaning component 23, and a dust suction component 24. The housing 21 may be used as the housing of the entire robot 10, and the aforementioned circuits or control parts of the robot 10 may be arranged in the housing 21. The housing 21 may have a top 202, a bottom 201, and a peripheral side 203. The walking component 22 can be arranged on the bottom 201 of the housing 21, and the walking component 22 can work under the control of the processor 110 and the like, so that the robot 10 can move. The cleaning assembly 23 may be disposed on the housing 21 to provide a cleaning function when the cleaning device is working, and to clean the working surface of the robot 10.
[0035] The walking assembly 22 may include a driving mechanism 221 and a rolling wheel mechanism 222. The processor may be coupled to the driving mechanism 221, and the driving mechanism 221 drives the rolling wheel mechanism 222 to rotate under the control instructions of the processor 110 and the like, so as to realize walking on the working surface of the robot 10. The driving mechanism 221 is, for example, a driving motor. The cleaning assembly 23 may include a rolling brush 231 and a motor 232 connected to the rolling brush 231. The motor 232 is used to drive the rolling brush 231 to roll. The rolling brush 231 can contact the working surface (such as the ground) of the robot 10 and perform cleaning by rolling. figure 2 The positional relationship between the motor 232 and the roller brush 231 shown is only for illustration, and does not limit the connection, transmission, and operation between the two. The driving mechanism 221 of the walking assembly 22 and the motor 232 of the cleaning assembly 23 may be the same driving mechanism, that is, the two share a driving mechanism.
[0036] The housing 21 may be provided with a dust box 240 for collecting dust and garbage waiting to be processed. The dust collection box 240 may be provided with a dust suction port 241, a collection cavity 242 and an air outlet 243, and the collection cavity 242 is connected to the dust suction port 241 and the air outlet 243. The dust suction assembly 24 may further include a suction fan 244, and the suction fan 244 may form an air flow that sequentially passes through the dust suction port 241, the collection cavity 242, and the air outlet 243. The processor 110 may also control the operation of the exhaust fan 244 through control instructions. The dust suction port 241 may be set toward the working surface of the robot 10, for example, so that dust or garbage on the working surface can be sucked. Of course, the dust suction assembly 24 may also be provided with a filter element 245 such as a filter, for example, between the air outlet 243 and the collection cavity 242, so that larger garbage or particles can be retained in the collection cavity 242. The cleaning component 23 and the dust suction component 24 can cooperate with each other under the control of the processor 110 and the like, and work together. For example, the dust suction port 241 may be arranged adjacent to the roller brush 231, so that the garbage or dust removed during the rotation of the roller brush 231 can be sucked into the collection cavity 242.
[0037] Such as figure 2 As shown, in order to realize various navigation, addressing, path planning, or sensing functions, the robot 10 may further include a plurality of sensors 26, and the plurality of sensors 26 may be coupled to the processor 110. The plurality of sensors 26 include, for example, collision sensors, gyroscopes, accelerometers, and the like. The top 202, the bottom 201, and the peripheral side 203 of the housing 21 may be respectively provided with one or more sensors 26, such as collision sensors, accelerometers and the like. Accelerometers and gyroscopes can implement inertial navigation of the robot 10, and collision sensors can implement obstacle avoidance processing.
[0038] The above circuit and structure of the robot 10 are described as examples, and do not limit the specific structure or circuit of the robot 10 of the present application.
[0039] The inventor of the present application has discovered through long-term research that a real-time map can be constructed through a camera and an image sensor, and a global and local map can also be planned. Gyroscopes, accelerometers, etc. can also be used to construct a map of the working environment of the robot 10. But the land constructed by the gyroscope Figure one Generally, it is to construct an area where the robot 10 has traveled in motion, and the area that has not traveled is an unknown map. Moreover, a map constructed by a gyroscope is usually constructed in a non-real-time manner compared to a map constructed by a camera, image sensor, etc. Whether the map cannot be constructed or updated in real time, or the robot 10 is moving in an unknown map, path planning and navigation are relatively difficult. On the map constructed by the gyroscope, obstacle avoidance through inertial navigation has always been the difficulty of this technology.
[0040] In order to improve or solve the above-mentioned problems in inertial navigation, the processor 110 of this embodiment can implement the obstacle avoidance method described in the following embodiments of the obstacle avoidance method for a robot in this application by executing the program data in the memory, thereby improving or Solve the above technical problems.
[0041] Refer to image 3 , The embodiment of the obstacle avoidance method for the robot of the present application may include:
[0042] S100: Obtain the initial position and the target position on the map.
[0043] In this embodiment, the map may be constructed by the gyroscope of the robot 10 or the like. For example, the map can be presented in the form of a two-dimensional grid. Refer to Figure 4 , The initial position may refer to the original position of the robot 10 on the map before path planning. The target position may refer to the position of the destination that the robot 10 will reach. The initial position and the target position can have corresponding coordinates on the map, for example, in Figure 4 The coordinates of the initial position in (x s ,y s ), the coordinates of the target position are (x g ,y g ). The target location can be input by the user, for example, through an APP on a mobile phone, or through a remote control. Of course, the target location can be guided by other devices, such as a charging device installed in a certain place, and the location of the charging device is presented on the map as the target location to guide the robot 10 to move. Of course, the target position can also be set by the robot 10 itself, for example, the target position can be set by the robot 10 after training through a training model. The target position can also be entered or set in other ways.
[0044] S200: Determine a travel path with an initial position as a starting point and a target position as an end point, and multiple track points sequentially arranged on the travel path.
[0045] Such as Figure 4 As shown, after the initial position and the target position are determined, the robot 10 can plan a path to obtain a travel path. The robot 10 may perform path planning through a jump point search algorithm to obtain the shortest path from the initial position to the target position. The jump point search (ie Jump Point Search, JPS for short) algorithm generates and expands a small number of nodes, and the speed of reaching the target is very fast, because the jump point search can eliminate the symmetry between the paths, through the straight and diagonal directions Pruning the node to identify the successor, skipping a large number of intermediate nodes and other calculations that may be added to the corresponding list during the search, which greatly improves the search speed and has a small amount of node storage in the process. After the travel path is calculated, multiple trajectory points including the starting point and the end point can be determined on the travel path. By setting multiple trajectory points on the trajectory, the robot 10 can gradually move from the initial position to the target position, thereby improving the accuracy of path planning.
[0046] S300: Use inertial navigation to track multiple trajectory points to travel to the target position along the travel path.
[0047] Such as Figure 4 As shown, starting from the initial position through inertial navigation, tracking the currently tracked track point, and walking to the currently tracked track point. When reaching the currently tracked track point, continue to track the subsequent track point, and reciprocate in this way, moving toward the target position.
[0048] Suppose the coordinates of the target position are (x g ,y g ), the coordinates of the initial position are (x s ,y s ), the path of travel can be represented by a series of coordinates:
[0049] s ,y s ),(x 1 ,y 1 ),(x 2 ,y 2 ),(x 3 ,y 3 ),...,(x g ,y g )> .
[0050] The specific process of using inertial navigation can be implemented through the following steps included in S300:
[0051] S310: Determine whether the currently reached track point is the target position.
[0052] When the robot 10 starts from the initial position and reaches the adjacent track point, it needs to determine whether the currently reached track point is the target position. If it is the target position, it means that the robot 10 has reached the destination and there is no need to continue traveling.
[0053] S320: If not, adjust the route angle so that the travel direction is toward the currently tracked track point, and move in the travel direction to the currently tracked track point.
[0054] For tracking trajectory points, you can first track the course angle. Such as Figure 4 As shown, for example, the position information of the track point currently being tracked and the current course angle information collected by sensors such as a gyroscope are sent to the processor 110 for processing. Such as figure 1 with figure 2 As shown, the processor 110 sends the adjusted signal generated after processing to the corresponding component of the robot 10, for example, the driving mechanism 221 in the walking assembly 22, which can rotate the course angle of the robot 10, thereby adjusting the traveling direction of the robot 10, thereby making The traveling direction of the robot 10 is toward the track point currently being tracked.
[0055] Such as Figure 4 As shown, it is assumed that the coordinates of the track point currently reached by the robot 10 are (x i ,y i ), the coordinates of the track point currently being tracked (x j ,y j ) To track the course angle, then the angle that the robot 10 needs to rotate can be:
[0056]
[0057] Such as Figure 4 As shown, the track point (x i ,y i ) Is the initial position (x s ,y s ), the track point currently being tracked (x j ,y j ) For example (x 1 ,y 1 ).
[0058] Furthermore, perform movement tracking. For example, the robot 10 may calculate the distance between the current trajectory point and the currently tracked trajectory point, match the new moving speed according to the rotation angle and distance required for the aforementioned course angle tracking, and then move to the currently tracked trajectory point according to the moving speed. The moving distance is the distance between the current track point and the current track point d i ,As follows:
[0059]
[0060] In this way, each track point is continuously tracked through steps S310-S320, and finally the target position is reached. If the obstacle is not hit during the travel, the target position can be reached smoothly.
[0061] S400: When a collision with an obstacle is detected during the traveling process, the obstacle is bypassed.
[0062] Refer to Figure 5 , The robot 10 enters the obstacle area while tracking the trajectory point, and may collide with the obstacle. When a collision occurs, the robot 10 can detect the collision with an obstacle through a collision sensor or the like, and obtain the initial collision position when the first collision occurs. The initial collision position may refer to the position on the map of the collision point where the robot 10 first encounters an obstacle during its travel. The initial position can also be referred to as the obstacle entrance position, that is to say, the robot 10 collides with an obstacle for the first time in the process of traveling, and may also collide with obstacles in other positions during the circling process. Therefore, the initial collision position It can be called an obstacle entrance. In this embodiment, the obstacle may be an obstacle presented as a whole, or a scattered obstacle, that is, the obstacle in this embodiment, and it is not limited to a single or only obstacle.
[0063] After the robot 10 detects a collision with an obstacle, it needs to go around the obstacle. For example, by analyzing the map, and calculating the Bresenham line between the previous track point before the initial collision position and the current track point after the initial collision position through the Bresenham line algorithm, and then the obstacles on both sides of the Bresenham line The object distribution is analyzed, and the robot 10 can circumvent the obstacle to the side with less obstacle distribution.
[0064] Specifically, in order to determine the position characteristics of the robot 10 in the process of circumventing the obstacle, the robot 10 can obtain the initial collision position of the first collision with the obstacle and the current position in the process of circumventing the obstacle, and can also obtain the current tracking Track point. The current position may refer to the presented position on the map where the robot 10 is currently orbiting.
[0065] S500: Determine the location feature in the process of circumventing the obstacle, compare the location feature with a preset condition corresponding to the location feature to obtain a comparison result, and execute a detour strategy that matches the comparison result.
[0066] Since in the process of circumventing obstacles, it may deviate from the planned travel path, the robot 10 can analyze the position characteristics or position relationship during the circumvention. The location feature can be used to determine the current circumvention of the robot 10. Different detour situations can correspond to different location features, and different location features can correspond to different preset conditions. The location feature is compared with the corresponding preset conditions to obtain a comparison result, and then a detour strategy matching the comparison result is executed, that is, a corresponding detour strategy can be executed for different situations.
[0067] For the robot 10 using inertial navigation, even if the robot 10 deviates from the path of travel while circumventing an obstacle, by determining the position characteristics of the robot 10 when circumventing the obstacle, it can be concluded that the robot 10 is deviating from the path of travel Under the position situation, use the position feature to compare with the preset conditions to match the corresponding position situation, and execute the matching detour strategy according to the comparison result, that is, execute the corresponding detour strategy for different position features, which can be better improved The inertial navigation robot 10 performs obstacle avoidance problems under a non-real-time map, and improves the obstacle avoidance efficiency of the robot 10 in areas that are not planned or deviated from the path of travel.
[0068] Such as Figure 5 As shown, assuming that the coordinates of the track point currently tracked are (x j ,y j ), the coordinates of the current position are (x,y), and the coordinates of the initial collision position are (x H ,y H ).
[0069] The distance between the current position and the target position is:
[0070]
[0071] The distance between the current position and the track point currently being tracked is:
[0072]
[0073] The distance between the initial collision position and the track point currently being tracked is:
[0074]
[0075] The distance between the current position and the initial collision position is:
[0076]
[0077] The distance from the current position to the line between the initial collision position and the track point currently being tracked:
[0078] Where A=y j -y H ,B=x j -x H ,C=x j y H -x H y j.
[0079] Generally, since the travel path between two adjacent track points is a straight line, the previous track point and the initial collision position and the currently tracked track point are roughly on the same straight line. Therefore, the distance from the current position to the line between the initial collision position and the currently tracked track point is roughly equivalent to the distance from the current position to the line between the previous track point and the currently tracked track point.
[0080] Due to the need to deviate from the path of travel during the circumnavigation process, the course angle also needs to be adjusted accordingly so that the robot 10 can circumvent obstacles from the initial collision position. The angle of rotation required angle The calculation can also be used to facilitate the calculation of the cumulative angle of the robot 10 circumventing the current obstacle for subsequent calculations, where Can be:
[0081]
[0082] among them Is the vector from the initial collision position to the current position, that is Figure 5 The vector corresponding to L2, Is the vector from the initial collision position to the track point currently being tracked, that is Figure 5 The vector corresponding to L1, And The value range of can be [0, π].
[0083] In the process of circumventing obstacles, the robot 10 may be able to have a variety of situations or scenes, and it can judge which scene to use according to different location characteristics and preset conditions, and then perform corresponding circumvention processing:
[0084] The first scenario: the location feature may include the distance between the current location and the target location, and the preset condition includes a preset distance value. See Image 6 For the first scenario, step S500 includes the following steps for judgment and processing:
[0085] S510: Calculate the distance between the current position and the target position.
[0086] For example, the distance between the current position and the target position is Euler distance. Such as Figure 4 with Image 6 The distance S indicated in
[0087] S511: Determine whether the distance between the current position and the target position is less than or equal to a preset distance value.
[0088] The preset distance value may be a value corresponding to a part of the width of the robot 10. For example, the shape of the robot 10 is arranged in a cylindrical shape. Assuming that the radius of the robot 10 is R, the preset distance value may be R/4 to R, and may be R/2 or R/3.
[0089] If it is less than or equal to, S512 is executed. If it is larger, continue to bypass the obstacle. For example, the distance S between the current position and the target position is greater than R/2, then continue to circumvent the obstacle, and continue to determine and compare the position features in real time, continuously or intermittently.
[0090] S512: If it is less than or equal to, it is determined that the target position is reached and the obstacle is stopped.
[0091] Such as Image 6 As shown, taking the preset distance value R/2 as an example, if the distance S between the current position and the target position is less than or equal to R/2, it means that the target position is within the coverage of the robot 10, and the robot 10 determines that it has When the target position is reached, the circumvention strategy of stopping circumnavigating the obstacle is executed, that is, the circumvention obstacle is stopped, and the path tracking ends.
[0092] The second scenario: the location feature may include the distance between the current location and the track point currently being tracked, and the preset condition includes a preset distance value. See Figure 7 For the second scenario, step S500 includes the following steps for judgment and processing:
[0093] S520: Calculate the distance between the current position and the track point currently being tracked.
[0094] For example, calculate the Euler distance between the current position and the track point currently being tracked, for example Figure 4 with Figure 7 The distance L indicated in
[0095] S521: Determine whether the distance between the current position and the track point currently being tracked is less than or equal to a preset distance value.
[0096] The preset distance value may be a value corresponding to at least part of the width of the robot 10. For example, the outer shape of the robot 10 is arranged in a cylindrical shape. Assuming that the radius of the robot 10 is R, the preset distance value may be R/4 to R, and may be R/2 or R/3.
[0097] If it is larger, continue to bypass the obstacle. For example, if the distance L between the current position and the track point currently tracked is greater than R/2, it means that the track point currently tracked is not yet within the effective coverage range of the robot 10, and it is necessary to continue to circumvent obstacles and continue to real-time , Determine and compare location features continuously or intermittently. If it is less than or equal to, S522 is executed.
[0098] S522: Determine that the track point currently being tracked is reached, stop the detour and continue to track the subsequent track point along the travel path.
[0099] Such as Figure 7 As shown, taking the preset distance value R/2 as an example, if the distance L between the current position and the currently tracked track point is less than or equal to R/2, it means that the currently tracked track point is in the coverage area of the robot 10 Inside, the robot 10 determines that it has reached the track point currently being tracked, and executes the circumvention strategy of stopping circumventing the obstacle, that is, stopping circumvention of the obstacle and continuing to track the subsequent trajectory point. The robot 10 continues to track subsequent trajectory points until it moves to the target position, and the distance S between the current position of the robot 10 and the target position is less than or equal to R/2, and the destination is reached.
[0100] The third scenario: The location feature can include the distance from the current position to the line connecting the initial collision position and the currently tracked track point, the distance between the current position and the currently tracked track point, and the distance between the current tracked track point and the initial collision location The preset condition includes the preset distance value. See Figure 8 For the third scenario, step S500 includes the following steps for judgment and processing:
[0101] S530: Calculate the distance from the current position to the line connecting the initial collision position and the currently tracked track point, the distance between the current position and the currently tracked track point, and the distance between the currently tracked track point and the initial collision location.
[0102] E.g Figure 8 The indicated distance D from the current position to the line connecting the initial collision position and the currently tracked track point, the distance L between the current position and the currently tracked track point, and the distance L1 between the current tracked track point and the initial collision position.
[0103] S531: Determine whether the distance from the current position to the line connecting the initial collision position and the currently tracked track point is less than or equal to a preset distance value.
[0104] The preset distance value may be a value corresponding to at least part of the width of the robot 10. For example, the outer shape of the robot 10 is arranged in a cylindrical shape. Assuming that the radius of the robot 10 is R, the preset distance value may be R/4 to R, and may be R/2 or R/3.
[0105] Such as Figure 8 As shown, if the distance D from the current position to the line between the initial collision position and the track point currently being tracked is less than or equal to the preset distance value, it means that the travel path is relatively close to the current position of the robot 10, and the travel path is located in the coverage of the robot 10. It may be considered that the robot 10 roughly walks on the travel path within the range.
[0106] If the distance D from the current position to the line connecting the initial collision position and the track point currently being tracked is less than or equal to the preset distance value, S532 is executed. If the distance D from the current position to the initial collision position and the current track point is greater than the preset distance value, you can continue to bypass the obstacle, and you can determine the location characteristics in real time, continuously or intermittently, and execute the corresponding bypass strategy .
[0107] S532: Determine whether the difference between the distance between the currently tracked track point and the initial collision position and the distance between the current position and the currently tracked track point is greater than or equal to a preset distance value.
[0108] Such as Figure 8 As shown, taking the preset distance value of R/2 as an example, if the distance D from the current position to the line connecting the initial collision position and the currently tracked track point is less than or equal to R/2, continue to determine the current tracked track point Whether the difference between the distance L1 from the initial collision position and the distance L between the current position and the track point currently being tracked is greater than or equal to R/2. If the difference between the distance L1 between the currently tracked track point and the initial collision position and the distance L between the current position and the currently tracked track point is greater than or equal to the preset distance value, S533 is executed.
[0109] S533: Leave the obstacle and continue to track the track point currently being tracked.
[0110] In this embodiment, the difference between the distance L1 between the currently tracked track point and the initial collision position and the distance L between the current position and the currently tracked track point refers to the difference between the currently tracked track point and the initial collision position The difference between the distance L1 and the distance L between the current position and the track point currently being tracked is subtracted, namely L1-L.
[0111] Such as Figure 8 As shown, continue to take the preset distance value R/2 as an example, if the difference between the distance L1 between the current track point and the initial collision position and the distance L between the current position and the current track point is L1 -L is greater than or equal to R/2, it means that the current position of the robot 10 has almost bypassed the obstacle, and is relatively close to the track point, then executes the bypass strategy of leaving the obstacle and continuing to pass the course angle and move to track the track point currently being tracked . If the robot 10 continues to move and track the track point currently being tracked, and when the distance between the current position of the robot 10 and the track point currently tracked is less than or R/2, it is the second scenario described above, and the second scenario is executed. Line strategy.
[0112] If the difference L1-L between the distance between the currently tracked track point and the initial collision position and the distance between the current position and the currently tracked track point is less than the preset distance value, continue to circumvent the obstacle. For example, if the difference between the distance L1 between the current track point and the initial collision position and the distance L between the current position and the current track point is less than R/2, the distance from the current track point If it is still far away, you need to continue to circumvent obstacles and track the current track point.
[0113] The fourth scenario: The location feature can include the distance from the current position to the line connecting the initial collision position and the current tracked track point, the distance between the current position and the initial collision position, and the distance between the tracked track point and the initial collision position. The preset condition includes a preset distance value. See Picture 9 For the fourth scenario, step S500 includes the following steps for judgment and processing:
[0114] S540: Calculate the distance from the current position to the line connecting the initial collision position and the currently tracked track point, the distance between the current position and the initial collision position, and the distance between the current tracked track point and the initial collision position.
[0115] E.g Picture 9 The indicated distance L2 from the current position to the initial collision position, the distance D from the current position to the initial collision position and the track point currently being tracked, the distance L1 between the initial collision position and the track point currently being tracked and the track currently being tracked The distance between the point and the initial collision location L1.
[0116] S541: Determine whether the distance from the current position to the line connecting the initial collision position and the currently tracked track point is less than or equal to a preset distance value.
[0117] The preset distance value may be a value corresponding to at least part of the width of the robot 10. For example, the shape of the robot 10 is arranged in a cylindrical shape. Assuming that the radius of the robot 10 is R, the preset distance value may be R/4 to R, and may be R/2 or R/3.
[0118] If the distance D from the current position to the initial collision position and the track point currently tracked is less than or equal to the preset distance value, it means that the travel path is relatively close to the current position of the robot 10, and the travel path is within the coverage of the robot 10 or It can be said that the robot 10 roughly walks on the travel path, and then S542 is executed. If the distance D from the current position to the initial collision position and the current track point is greater than the preset distance value, you can continue to circumvent the obstacle, and determine the position feature in real time, continuously or intermittently, and execute the corresponding circumvention Line strategy.
[0119] S542: Determine whether the difference between the distance between the current position and the initial collision position and the distance between the initial collision position and the currently tracked track point is greater than or equal to a preset distance value.
[0120] In this embodiment, the difference between the distance L2 between the current position and the initial collision position and the distance L1 between the initial collision position and the track point currently being tracked refers to the distance L2 between the current position and the initial collision position minus The difference between the initial collision position and the distance L1 between the track point currently being tracked is L2-L1.
[0121] Such as Picture 9 As shown, taking the preset distance value of R/2 as an example, if the distance D between the current position and the initial collision position and the line of the track point being tracked is less than or equal to R/2, continue to judge the current position and the initial collision Whether the difference between the distance L2 between the positions and the distance L1 between the initial collision position and the currently tracked track point is greater than or equal to R/2.
[0122] By judging whether the difference between the distance L2 between the current position and the initial collision position and the distance L1 between the initial collision position and the currently tracked track point is greater than or equal to R/2, the current position and the current tracking are determined The bearing relationship between the track points. If the difference L2-L1 between the distance L2 between the current position and the initial collision position and the distance L1 between the initial collision position and the currently tracked track point is greater than or equal to the preset distance value, S543 is executed.
[0123] S543: Determine that it has detoured to the front of the track point currently being tracked, stop detouring obstacles and re-plan the travel path.
[0124] Such as Picture 9 As shown, continue to take the preset distance value R/2 as an example, if the difference between the distance L2 between the current position and the initial collision position and the distance L1 between the initial collision position and the current track point is L2-L1 Greater than or equal to R/2, the robot 10 determines that the current position has moved to the front of the track point currently being tracked (that is, between the track point currently being tracked and the target position), indicating that the robot 10 cannot track the track point currently being tracked , The subsequent trajectory points cannot be tracked continuously, and the robot 10 executes to stop and detour, and re-plan the travel path.
[0125] For example, the currently tracked trajectory point to be tracked by the robot 10 is already surrounded by obstacles, so that when it circumvents the obstacle, it will go around in front of the currently tracked trajectory point.
[0126] If the difference between the distance L2 between the current position and the initial collision position and the distance L1 between the initial collision position and the current track point is less than R/2, it means that the robot 10 is approaching the current track point or Slightly deviate to the front of the currently tracked trajectory point and continue to circumvent obstacles. The location feature can be determined in real time, continuously or intermittently, for example, the second scene or the first scene mentioned above appears.
[0127] Fifth scenario: Location features can include the distance from the current position to the line connecting the initial collision position and the currently tracked track point, the distance between the current position and the currently tracked track point, and the distance between the current tracked track point and the initial collision location The distance and the cumulative angle of the rotation course angle from the initial collision position to the current position. The preset condition includes a preset distance value. Refer to Figure 10 and Picture 11 For the fifth scenario, step S500 includes the following steps for judgment and processing:
[0128] S550: Calculate the distance from the current position to the line connecting the initial collision position and the currently tracked track point, the distance between the current position and the currently tracked track point, the distance between the currently tracked track point and the initial collision position, and the self-initial collision The cumulative angle of the rotation route angle from the position detour to the current position.
[0129] E.g Figure 15 The indicated distance D from the current position to the line connecting the initial collision position and the currently tracked track point, the distance L between the current position and the currently tracked track point, and the distance L1 between the current tracked track point and the initial collision position. The robot 10 continuously rotates the course angle from the initial collision position and gradually travels to the cumulative angle of the current position
[0130] S551: Determine whether it is satisfied that the cumulative angle is greater than or equal to 2π and the distance from the current position to the line connecting the initial collision position and the currently tracked track point is less than or equal to a preset distance value.
[0131] The preset distance value may be a value corresponding to at least part of the width of the robot 10. For example, the outer shape of the robot 10 is arranged in a cylindrical shape. Assuming that the radius of the robot 10 is R, the preset distance value can be 0-R, and can be R/2 or R/3. The preset distance value is less than the distance between the track point currently being tracked and the initial collision position. If the distance D from the current position to the line connecting the initial collision position and the currently tracked track point is less than or equal to the preset distance value, it means that the current position is closer to the path of travel. For example, when the preset distance value is 0, then D is 0, and the robot 10 returns to the travel path.
[0132] Cumulative angle If it is greater than or equal to 2π, it means that the robot 10 may have gone around the obstacle once. After the robot 10 circumnavigated the obstacle, it is close to the travel path, and may have recirculated to the initial collision position. If the cumulative angle is satisfied If it is greater than or equal to 2π and the distance D from the current position to the line connecting the initial collision position and the currently tracked track point is less than or equal to the preset distance value, S552 is executed. If it is not satisfied, continue to circumvent the obstacle, and determine the location feature in real time, continuously or intermittently, and execute the corresponding circumvention strategy.
[0133] S552: Determine whether the absolute value of the difference between the distance between the current position and the currently tracked track point and the distance between the currently tracked track point and the initial collision position is less than the set parameter value.
[0134] The absolute value of the distance L between the current position and the currently tracked track point and the difference between the currently tracked track point and the initial collision position L1 is |L-L1|. The parameter value can be R/4~1.5R. The setting parameter value can be greater than the preset distance value. For example, if the preset distance value is 0, the setting parameter value may be R. That is, S552 is used to judge |L-L1|
[0135] S553: Determine to return to the initial collision position by circumventing the obstacle one round, and re-plan the travel path or reverse the obstacle in the opposite direction of the current circumvention direction.
[0136] Such as Picture 10 or Picture 11 As shown, the accumulated angle of the robot 10 in the process of circumventing obstacles is greater than or equal to 2π, and it can be determined whether the robot 10 has returned to the initial collision position by determining whether |L-L1| is less than or equal to the set parameter value. Generally speaking, if the current position is at the initial collision position, L=L1, |L-L1|=0, but it may not be possible to accurately obtain |L-L1|=0 due to the map accuracy. The setting parameter value can be determined according to the relationship between the map accuracy and the radius of the robot 10. For example, the preset distance value is 0, and the parameter value is R. Or the preset distance value is R/2, and the parameter value is R/2. If |L-L1|
[0137] It is determined that the robot 10 has circumvented the obstacle and returned to the initial collision position, which means that the current circumvention of the robot 10 cannot reach the current track point. For example, the path of the robot 10 to the track point currently being tracked during the circumnavigation process is already surrounded by obstacles, and no matter how it moves toward the track point currently tracked, it cannot move to the track point currently tracked. There can be two situations here: such as Picture 11 As shown, one is that the robot 10 itself is surrounded by obstacles, and the obstacles in the inner ring return to the initial collision position once; Picture 10 As shown, the other is that the track point currently being tracked is surrounded by obstacles. The robot 10 circles the obstacle around, but it cannot reach the track point currently tracked anyway. That is, the current travel path cannot track the track point currently being tracked, and the robot 10 can re-plan the travel path. Of course, the robot 10 can also implement a reverse detour strategy, that is, reverse the obstacle in the opposite direction of the current detour direction.
[0138] In this embodiment, the robot 10 returns to the initial collision position and circulates around the obstacle in the reverse direction, and its cumulative angle Clear and recalculate.
[0139] Refer to Figure 16 In order to improve the efficiency of obstacle avoidance, the circumvention process of the robot 10 may be processed through the cumulative distance traveled by the robot 10 circumvention and/or the distance from the current position to the initial collision position is greater than or equal to the preset distance. For example, this embodiment includes the following steps:
[0140] S610: Determine whether the cumulative distance from the initial collision position to the current position is greater than or equal to a preset cumulative distance.
[0141] The preset cumulative distance may be defined as the maximum cumulative distance allowed for the robot 10 to circumvent the obstacle from the initial collision position.
[0142] S620: Determine whether the distance between the current position and the initial collision position is greater than or equal to the maximum distance value.
[0143] The maximum distance value can be positioned as the maximum Euler distance value allowed for the robot 10 to bypass the obstacle from the initial collision position to the current position. The maximum distance value can be set according to the actual situation, for example, it can be set to 6R.
[0144] Among them, S610 and S620 can be met either alternatively or simultaneously. If it is greater than or equal to, S630 is executed. Here, “if greater than or equal to” corresponds to step S610 and step S620 respectively. If it corresponds to S610, the cumulative distance from the initial collision position to the current position is greater than or equal to the preset cumulative distance. If it corresponds to S620, the distance from the current position to the initial collision position is greater than or equal to the maximum distance value. If the corresponding S610 and S620 are met simultaneously, the cumulative distance from the initial collision position to the current position is greater than or equal to the preset cumulative distance and the distance between the initial collision position and the current position is greater than or equal to the maximum distance value.
[0145] If the cumulative distance from the initial collision position to the current position is greater than or equal to the preset cumulative distance, and/or if the distance from the current position to the initial collision position is greater than or equal to the maximum distance value, the robot 10 may determine that the distance around the obstacle is too large . These two situations mean that the robot 10 is circumventing abnormally, for example, the obstacle is too large. In order to avoid unnecessary obstacles, it is necessary to calculate the position of the robot 10 at the initial collision position and the current track point. Perform S630 to determine the angle between the initial collision position and the current position and the initial collision position and the current track point.
[0146] S630: Determine whether the angle between the line between the initial collision position and the current position and the line between the initial collision position and the track point currently being tracked is greater than or equal to a preset angle.
[0147] The preset angle can be from π/4 to π/2, and can be selected as π/3. The preset angle can be determined according to the accuracy of the map, the known area and the unknown area for the travel path.
[0148] If the angle is greater than or equal to the preset angle, it means that the distance of the robot 10 around the obstacle is too large, and the degree of deviation of the travel path is large, which may cause it to enter an unknown area, and the robot 10 may not reach the current track point even if it continues to orbit. The target position, the re-planned travel path may also be the current travel path, the robot 10 may try to go around in the reverse direction, and perform step S631. If the angle is less than the preset angle, it means that the robot 10 has traveled a certain distance and has not deviated much from the path of travel. It is located in a known area of the map. The current position of the robot 10 is between the initial collision position and the track point currently being tracked. The path of travel is better than continuing to circumvent the obstacle, then execute S632.
[0149] S631: Reversely circumvent the obstacle in the direction opposite to the current circumvention direction to return to the initial collision position, and continue to circumvent the obstacle from the other side of the obstacle in the reverse circumvention direction. .
[0150] If it is greater than or equal to the preset angle, the robot 10 reverses its orbiting strategy, returns to the initial collision position, and orbits from the other side of the obstacle.
[0151] Define the distance constant ∑L for the robot 10 to return to the initial collision position m , If the robot 10 is at the current position to the initial collision position, the maximum allowable distance L2 max , The robot 10 moves from the initial collision position to the current position, and then returns from the current position to the initial collision position by the distance L2, if L2> L2 max +∑L m , It means that during the process of returning the robot 10 to the initial collision position, it is far away from the initial collision position, and the detour strategy of replanning the travel path needs to be implemented.
[0152] S632: Determine that the current position is between the initial collision position and the track point currently being tracked, and replan the travel path.
[0153] If it is less than the preset angle, the robot 10 executes a strategy of replanning the travel path. Of course, the robot 10 may stop the current circumvention first, and then proceed along the new travel path after the travel path planning is completed.
[0154] Of course, the robot 10 may go around other obstacles. For example, the preset cumulative angle is 3π. If the robot 10 goes around the cumulative angle of the rotation course angle on either side of the obstacle It may indicate that the obstacle that the robot 10 hits and orbits disappears, and it circumvents on another outer or inner ring obstacle, and it can perform reverse circumvention or re-planning.
[0155] Such as Picture 12 As shown, in step S630, the robot 10 reverses to return to the initial collision position, and the next procedure can be followed to facilitate the execution of corresponding actions during or after the robot 10 returns to the initial collision position.
[0156] In order to improve the accuracy of path planning, the map can be updated during the process of circling obstacles in the opposite direction of the current circling direction and returning to the initial collision position. Since it is difficult for the robot 10 using inertial navigation to update the map in real time, this embodiment can update the map during the process of returning to the initial collision position, and replan the travel path after the map can be updated, thereby improving the accuracy of path planning and obstacle avoidance.
[0157] Refer to Figure 13 ,Such as Figure 13 The following procedure shown can be Picture 12 Connect to the next process. In the aforementioned step S632, if the robot 10 still needs to detour to the other side of the obstacle in the reverse direction, according to the detour strategy of the aforementioned step S632, it will detour again. Regarding the problem that repeated detours may cause low obstacle avoidance efficiency, this embodiment passes after step S632, including:
[0158] S710: Record the number of times of circling obstacles back and forth in a direction opposite to the current circling direction.
[0159] Each reverse detour can be recorded once. For example, the first reverse detour is recorded once, the reverse detours after the first reverse detour are recorded twice, and so on.
[0160] S720: Determine whether the number of times of circling the obstacle back and forth is greater than the preset number of times.
[0161] The preset number of times is set to limit the robot 10 from circling obstacles back and forth too much, so as to avoid the inefficient obstacle avoidance of the robot 10. The preset times can be set reasonably according to actual conditions or through big data statistical analysis.
[0162] S730: If it is greater than, stop the detour or replan the travel path.
[0163] If the number of circling obstacles back and forth is greater than the preset number of times, the robot 10 may determine that the target position is difficult to reach, stop the circumvention, or re-plan the travel path and continue to track the track point.
[0164] If the number of times of circling the obstacle back and forth is less than the preset number of times, the robot 10 can continue to circumvent and detect whether the aforementioned five scenarios are satisfied, and if so, execute the corresponding circumvention strategy. If the number of continued round trips is greater than the preset number, stop the detour or replan the travel path.
[0165] In this embodiment, if the number of times to circumvent the obstacle is greater than the preset number, the map can be updated, and the map can be updated, and the position of the obstacle in the map can be confirmed, and then the path of travel can be re-planned, thereby improving The accuracy of path planning and obstacle avoidance.
[0166] Refer to Figure 14 with Figure 15 ,Such as Figure 14 The following procedure shown can be Picture 12 Connect to the next process in the middle. In the above step S632, in the process of circling the obstacle in the opposite direction to the current circling direction and returning to the initial collision position, if the target point is not far away and the map has a deviation in accuracy, the robot 10 may have actually reached it. There is no need to go around obstacles. This situation can be handled through the following steps:
[0167] S810: Determine whether the distance between the bypass position of the obstacle and the target location in the opposite direction of the current bypass direction is less than or equal to a preset value.
[0168] The robot 10 calculates the distance between the circling position and the target position while circling the obstacle in the reverse direction. The preset value can be set according to the accuracy of the map of the robot 10, and can be set to 2 to 3 times the radius of the robot 10, that is, 2 to 3R.
[0169] Such as Figure 15 As shown, assuming that the coordinates of the detour position are (x r ,y r ), the distance between the detour position and the target position
[0170] S820: If it is less than or equal to, align the detour position with the target position on the abscissa or ordinate.
[0171] Take the preset range of 2R as an example, L3 <2R, that is, the distance between the detour position and the target position is less than or at a preset value, then the abscissa or ordinate of the detour position is set to be equal, that is, alignment is performed. The specific expression can be: |x r -x g |=0 or |y r -y g |=0. Fig. 15 shows the state before and after alignment.
[0172] S830: Determine the orientation where the aligned detour position is located at the target position.
[0173] Such as Figure 15 As shown, taking the target position as a reference, acquiring the orientation of the aligned orbiting position at the target position on the map is equivalent to acquiring the orientation of the current robot 10 at the target position. This embodiment defines eight directions: east, west, south, north, southeast, southwest, northeast, and northwest. There are four directions between the aligned detour position and the target position, namely east, west, south, and north.
[0174] Of course, the current orbiting position of the robot 10 can also be used as a reference to obtain the orientation of the target position at the aligned orbiting position.
[0175] S840: Circulately check from the target position along the azimuth whether multiple sets of positions in the azimuth with a preset interval as the step length are obstacle areas.
[0176] Such as Figure 15 As shown, after determining the orientation of the aligned detour position at the target position, the obstacle situation of a certain distance in the target position can be checked. Each group of positions is separated by a preset step length, and each group of positions includes the position Of multiple locations on at least one side. For example, check the distance of the target position in the direction The preset step size is R.
[0177] For the multiple positions of the north position cycle check: (x g -mR,y g +iR),......, (x g -R,y g +iR), (x g ,y g +iR), (x g +R,y g +iR),......,(x g +mR,y g +iR).
[0178] For the multiple positions of the southern position circular inspection: (x g -mR,y g -iR),......, (x g -R,y g -iR), (x g ,y g -iR), (x g +R,y g -iR),......,(x g +mR,y g -iR).
[0179] For the multiple positions of the Eastern position loop check: (x g +iR,y g -mR),......, (x g +iR,y g -R), (x g +iR,y g ), (x g +iR,y g +R),......,(x g +iR,y g +mR).
[0180] For the multiple positions of the western position loop check: (x g -iR,y g -mR),......, (x g -iR,y g -R), (x g -iR,y g ), (x g -iR,y g +R),......,(x g -iR,y g +mR).
[0181] Among them, i≤N, m is the number of positions to be inspected. m can take a value of 1 to 2, and 3 to 5 points can be checked for each direction.
[0182] By checking whether it is an obstacle area on the map, the obstacle situation between the robot 10 and the target position can be further determined.
[0183] S850: If multiple sets of positions are obstacle areas, it is determined that the target position is reached and the detour is stopped.
[0184] Such as Figure 15 As shown, for example, the bypass position of the robot 10 is located in the western position of the target position, and multiple position ranges of the western position are cyclically checked. If the multiple position ranges are all obstacle areas, the robot 10 determines that the target position has been reached. Because this azimuth is an obstacle area, it is difficult for the robot 10 to finally travel to the target position, and the current detour position is relatively close to the position. After aligning the continuing coordinates and judging the obstacle situation in the corresponding azimuth, it can be determined to be equivalent. After reaching the target position, stop the detour.
[0185] In the several embodiments provided in this application, it should be understood that the disclosed robot and the obstacle avoidance method of the robot can be implemented in other ways. For example, the embodiments of the robot described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components can be combined. Or it can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
[0186] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of this embodiment.
[0187] In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be realized in the form of hardware or software functional unit.
[0188] Refer to Figure 16 If the aforementioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the device 200 with a storage function. Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage device. , Including a number of instructions (program data) to make a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage devices include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media, as well as those with the above storage media Computers, mobile phones, laptops, tablets, cameras and other electronic equipment.
[0189] Regarding the description of the execution process of the program data in the device with storage function, reference may be made to the description in the above-mentioned embodiment of the obstacle avoidance method for the robot of the present application, which will not be repeated here.
[0190] The above are only examples of this application, and do not limit the scope of this application. Any equivalent structure or equivalent process transformation made by using the description and drawings of this application, or directly or indirectly applied to other related technologies In the same way, all fields are included in the scope of patent protection of this application.
PUM


Description & Claims & Application Information
We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Similar technology patents
Unmanned obstacle avoidance driving method and terminal based on laser radar and UWB array
PendingCN113296119Areduce avoidanceImprove obstacle avoidance efficiency
Owner:福建盛海智能科技有限公司
Classification and recommendation of technical efficacy words
- Improve obstacle avoidance efficiency
Unmanned obstacle avoidance driving method and terminal based on laser radar and UWB array
PendingCN113296119Areduce avoidanceImprove obstacle avoidance efficiency
Owner:福建盛海智能科技有限公司