Obstacle avoidance method and system for mobile robot, terminal device and storage medium
By using a time-of-flight (TOF) sensor with a preset number of pixels and analog LiDAR segmentation technology, the problem of mobile robots being unable to detect low obstacles has been solved, achieving precise obstacle avoidance and a wider detection range.
Patent Information
- Application Number
- CN202210280321.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2042-03-22
AI Technical Summary
Existing obstacle avoidance sensors cannot effectively detect low or relatively low obstacles, resulting in a limited detection range for mobile robots during autonomous navigation, making it impossible to achieve precise obstacle avoidance.
The system uses a time-of-flight (TOF) sensor with a preset number of pixels to acquire the position information of the target obstacle, and calculates the rotation angle and angular velocity based on the position information to control the mobile robot to avoid the obstacle. The system also uses simulated LiDAR for block processing to improve detection accuracy.
It enables precise obstacle avoidance for mobile robots, improves the detection range, effectively avoids low obstacles, and makes the obstacle avoidance route smoother.
Smart Images

Figure CN114815809B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent robots, and in particular to an obstacle avoidance method and system for a mobile robot, a terminal device and a storage medium. BACKGROUND
[0002] The obstacle avoidance function is one of the important functions in the autonomous navigation process of a mobile robot. At present, commonly used obstacle avoidance sensors include mechanical collision switches, line structured light sensors, laser radar sensors and the like. These sensors usually have collision detection functions, proximity detection functions or ranging functions. However, the mechanical collision switch cannot detect low obstacles. The line structured light sensor can only obtain the depth information of the obstacles on the laser line and cannot measure obstacles not on the laser line. The laser radar sensor can only measure obstacles in the horizontal plane where the radar is located and cannot measure relatively low obstacles. It can be found that the detection range of the commonly used obstacle avoidance sensors is limited and the precise obstacle avoidance of the mobile robot cannot be achieved. SUMMARY
[0003] The main purpose of the embodiments of the present application is to provide an obstacle avoidance method and system for a mobile robot, a terminal device and a storage medium, which improve the detection range of the mobile robot and achieve precise obstacle avoidance of the mobile robot.
[0004] To achieve the above-mentioned purpose, the embodiments of the present application provide an obstacle avoidance method for a mobile robot, which comprises:
[0005] acquiring position information of a target obstacle by a time of flight (TOF) sensor with a preset number of pixels;
[0006] when the distance between the mobile robot and the target obstacle is less than a first preset threshold, calculating a rotation angle and an angular velocity based on the position information;
[0007] controlling the mobile robot to advance according to the rotation angle and the angular velocity, and returning to the step of acquiring the position information of the target obstacle by the TOF sensor with the preset number of pixels, so that the mobile robot avoids the target obstacle.
[0008] Optionally, the step of calculating the angular velocity based on the position information comprises:
[0009] constructing a simulated laser radar based on the position information, and dividing the detection range of the simulated laser radar into blocks based on the number of TOF sensors to obtain a first block result;
[0010] calculating a distance parameter based on the first block result;
[0011] calculating the angular velocity based on the distance parameter and a preset standard distance.
[0012] Optionally, the step of calculating the angular velocity based on the position information comprises:
[0013] If the side of the mobile robot is not provided with the TOF sensor, it is determined whether the TOF sensor can detect the target obstacle;
[0014] If the TOF sensor cannot detect the target obstacle, the mobile robot is controlled to rotate by a first preset angle towards a first preset direction;
[0015] If the TOF sensor can detect the target obstacle, the mobile robot is controlled to walk by a preset forward distance towards the current orientation of the mobile robot;
[0016] When the distance walked by the mobile robot exceeds the preset forward distance, the mobile robot is controlled to rotate by a second preset angle towards a second preset direction, walk by the preset forward distance, and return to execute the step of acquiring the position information of the target obstacle by the TOF sensor with a preset number of pixels, thereby cycling to make the mobile robot avoid the target obstacle.
[0017] Optionally, the step of calculating the rotation angle based on the position information comprises:
[0018] Based on the position information, a simulated laser radar is constructed, and the detection range of the simulated laser radar is divided into blocks based on the number of TOF sensors, to obtain a second block result;
[0019] Based on the position information, the second block result, and a preset threshold, the rotation angle is calculated.
[0020] Optionally, the step of acquiring the position information of the target obstacle by the TOF sensor with a preset number of pixels comprises:
[0021] When the distance between the mobile robot and the target obstacle is less than a second preset threshold, a walking speed is calculated according to the distance between the mobile robot and the target obstacle, and the mobile robot is controlled to move forward according to the walking speed, wherein the second preset threshold is greater than the first preset threshold.
[0022] Optionally, the step of calculating the walking speed according to the distance between the mobile robot and the target obstacle when the distance between the mobile robot and the target obstacle is less than a second preset threshold comprises:
[0023] When the distance between the mobile robot and the target obstacle is less than a second preset threshold, a deceleration ratio is calculated based on the distance between the mobile robot and the target obstacle and a current walking speed of the mobile robot.
[0024] The walking speed is calculated based on the deceleration ratio and the distance between the mobile robot and the target obstacle.
[0025] Optionally, the step of obtaining the position information of the target obstacle by the time-of-flight (TOF) sensor with a preset number of pixels comprises:
[0026] A memory map of obstacles is created.
[0027] The memory map of obstacles is filled based on the position information to obtain a filled map.
[0028] An analog laser radar is constructed based on the position information.
[0029] In addition, to achieve the above object, the present application further provides an obstacle avoidance system of a mobile robot, which comprises:
[0030] A position information obtaining module is configured to obtain position information of a target obstacle by a time-of-flight (TOF) sensor with a preset number of pixels.
[0031] A motion parameter calculating module is configured to calculate a rotation angle and an angular velocity based on the position information when the distance between the mobile robot and the target obstacle is less than a first preset threshold.
[0032] A motion control module is configured to control the mobile robot to move forward according to the rotation angle and the angular velocity.
[0033] In addition, to achieve the above object, the present application further provides a terminal device, which comprises a memory, a processor and a mobile robot obstacle avoidance method stored in the memory and executable on the processor, wherein the program of the mobile robot obstacle avoidance is executed by the processor to realize the steps of the mobile robot obstacle avoidance method as described above.
[0034] In addition, to achieve the above object, the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a program of a mobile robot obstacle avoidance, and the program of the mobile robot obstacle avoidance is executed by a processor to realize the steps of the mobile robot obstacle avoidance method as described above.
[0035] The obstacle avoidance method and system of the mobile robot, the terminal device and the storage medium provided by the embodiment of the present application obtain the position information of the target obstacle through the time of flight (TOF) sensor with a preset number of pixels; when the distance between the mobile robot and the target obstacle is less than a first preset threshold, the rotation angle and the angular velocity are calculated based on the position information; the mobile robot is controlled to advance according to the rotation angle and the angular velocity, and the step of obtaining the position information of the target obstacle through the time of flight (TOF) sensor with a preset number of pixels is performed again, so that the mobile robot avoids the target obstacle. The present application realizes accurate obstacle avoidance of the mobile robot, improves the detection range of the mobile robot by obtaining the position information of the target obstacle through the time of flight (TOF) sensor with a preset number of pixels, and controls the mobile robot to avoid the target obstacle according to the rotation angle and the angular velocity when the distance between the mobile robot and the target obstacle is less than a first preset threshold. BRIEF DESCRIPTION OF DRAWINGS
[0036] Figure 1 The functional module schematic diagram of the terminal device to which the obstacle avoidance device of the mobile robot of the present application belongs;
[0037] Figure 2 The flowchart schematic diagram of the first embodiment of the obstacle avoidance method of the mobile robot of the present application;
[0038] Figure 3 The first structure schematic diagram of the mobile robot related to the embodiment of the obstacle avoidance method of the mobile robot of the present application;
[0039] Figure 4 The first schematic diagram of the mobile robot obtaining the target obstacle information related to the embodiment of the obstacle avoidance method of the mobile robot of the present application;
[0040] Figure 5 The second schematic diagram of the mobile robot obtaining the target obstacle information related to the embodiment of the obstacle avoidance method of the mobile robot of the present application;
[0041] Figure 6 The flowchart schematic diagram of the second embodiment of the obstacle avoidance method of the mobile robot of the present application;
[0042] Figure 7 The second structure schematic diagram of the mobile robot related to the embodiment of the obstacle avoidance method of the mobile robot of the present application;
[0043] Figure 8 The third structure schematic diagram of the mobile robot related to the embodiment of the obstacle avoidance method of the mobile robot of the present application;
[0044] Figure 9A third schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0045] Figure 10 A fourth schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0046] Figure 11 A fifth schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0047] Figure 12 A sixth schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0048] Figure 13 A seventh schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0049] Figure 14 A fourth schematic diagram of the mobile robot according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0050] Figure 15 An eighth schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0051] Figure 16 A ninth schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0052] Figure 17 A tenth schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0053] Figure 18 An eleventh schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0054] Figure 19 A twelfth schematic diagram of the mobile robot acquiring target obstacle information according to an embodiment of the mobile robot obstacle avoidance method of the present application;
[0055] Figure 20 A functional module schematic diagram of the mobile robot obstacle avoidance system of the present application.
[0056] The implementation, functional features and advantages of the present application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are merely illustrative of the present application and do not limit the present application.
[0058] The main solution of the embodiment of the present application is: acquiring position information of a target obstacle by a time of flight (TOF) sensor with a preset number of pixels; when a distance between a mobile robot and the target obstacle is less than a first preset threshold, calculating a rotation angle and an angular velocity based on the position information; controlling the mobile robot to advance according to the rotation angle and the angular velocity, and returning to the step of acquiring the position information of the target obstacle by the TOF sensor with the preset number of pixels, so that the mobile robot avoids the target obstacle.
[0059] The technical terms involved in the embodiment of the present application are:
[0060] TOF: (Time of flight, flight time), which measures the distance between the sensor and the object according to the time difference between the emission of the signal and the return of the sensor after being reflected by the object.
[0061] SLAM: (Simultaneous localization and mapping, simultaneous localization and mapping), also known as CML (Concurrent Mapping and Localization, real-time positioning and mapping), a robot starts moving from an unknown position in an unknown environment, and positions itself according to the position and map during the movement, and builds an incremental map on the basis of the self-positioning, realizing the autonomous positioning and navigation of the robot.
[0062] FOV: (Field of view, field of view), the field of view is also called field of view in optical engineering, and the size of the field of view determines the field of view of the optical instrument. The field of view can also be represented by FOV, and its relationship with focal length is as follows: h = f * tan\[Theta]; image height = EFL * tan (half FOV); EFL is focal length; FOV is field of view.
[0063] Euclidean distance: Euclidean distance generally refers to Euclidean metric. In mathematics, Euclidean distance or Euclidean metric is the "ordinary" (i.e. straight line) distance between two points in Euclidean space.
[0064] The obstacle avoidance function is one of the important functions in the autonomous navigation process of the mobile robot. At present, the commonly used obstacle avoidance sensors include mechanical collision switch, infrared proximity sensor, ultrasonic sensor, microwave radar, laser radar, structured light sensor, TOF sensor, etc. These sensors usually have collision detection, proximity detection function or ranging function.
[0065] Among them, TOF sensors have been applied in some robot products. For example, 3D TOF sensors are used for obstacle avoidance in front of service robots; single-point TOF sensors are used to measure the height of unmanned aerial vehicles relative to the ground, assisting the take-off and landing of unmanned aerial vehicles.
[0066] At present, the household mobile robots that have been mass-produced on the market use more obstacle avoidance sensors, such as mechanical collision switches, infrared proximity sensors, single-point TOF sensors, line structured light sensors, and laser radars.
[0067] Specifically, the mechanical collision switch is a contact type obstacle avoidance sensor, and the mechanical collision switch is simple and reliable, and the detection angle can cover 180°. However, the mechanical collision switch must collide with the obstacle to detect the obstacle, and the mechanical collision switch cannot detect low or small obstacles.
[0068] The infrared proximity sensor is easily affected by light and reflectivity, and has poor stability.
[0069] The single-point TOF sensor can output distance information of a point, and the size of the single-point TOF sensor is small and not easily disturbed by light. However, since the detection range of the single-point TOF sensor is small, multiple sensors are usually needed to detect obstacles, and even if the single-point TOF sensor detects obstacles, it cannot identify the height of the obstacles, and cannot identify low obstacles.
[0070] The line structured light sensor obtains depth information by using the triangulation ranging principle. The line structured light sensor has high ranging accuracy and can obtain height information of obstacles, especially for low obstacles. However, the line structured light sensor can only obtain depth information on the laser line, and the sensor size is large, the material cost is high, and the structural stability is high.
[0071] The laser radar sensor is mainly used for mobile robot positioning and mapping, and can also be used for obstacle avoidance at close range. However, the laser radar sensor can only measure obstacles in the horizontal plane where the radar is located, and cannot measure relatively low obstacles.
[0072] The present application provides a solution that improves the detection range of the mobile robot and realizes accurate obstacle avoidance of the mobile robot.
[0073] Specifically, referring to Figure 1 , Figure 1is a functional module schematic diagram of a terminal device to which the mobile robot obstacle avoidance device belongs. The mobile robot obstacle avoidance device can be a device independent of the terminal device, capable of picture processing and network model training, which can be carried on the terminal device in the form of hardware or software. The terminal device can be a smart mobile terminal such as a mobile phone or a tablet computer having a data processing function, and can also be a fixed terminal device or a server having a data processing function.
[0074] In this embodiment, the terminal device to which the mobile robot obstacle avoidance device belongs at least includes an output module 110, a processor 120, a memory 130, and a communication module 140.
[0075] The memory 130 stores an operation method and a mobile robot obstacle avoidance program; the output module 110 can be a display screen or the like. The communication module 140 can include a WIFI module, a mobile communication module, a Bluetooth module, and the like, and communicates with external devices or servers through the communication module 140.
[0076] When the mobile robot obstacle avoidance program in the memory 130 is executed by the processor, the following steps are implemented:
[0077] The position information of the target obstacle is obtained by a time of flight (TOF) sensor with a preset number of pixels;
[0078] When the distance between the mobile robot and the target obstacle is less than a first preset threshold, the rotation angle and the angular velocity are calculated based on the position information;
[0079] The mobile robot is controlled to advance according to the rotation angle and the angular velocity, and returns to execute the step of obtaining the position information of the target obstacle by the time of flight (TOF) sensor with a preset number of pixels, so that the mobile robot avoids the target obstacle.
[0080] Further, when the mobile robot obstacle avoidance program in the memory 130 is executed by the processor, the following steps are also implemented:
[0081] An analog laser radar is constructed based on the position information, and the detection range of the analog laser radar is divided into blocks based on the number of TOF sensors to obtain a first block result;
[0082] A distance parameter is calculated based on the first block result;
[0083] The angular velocity is calculated based on the distance parameter and a preset standard distance.
[0084] Further, when the mobile robot obstacle avoidance program in the memory 130 is executed by the processor, the following steps are also implemented:
[0085] If the side of the mobile robot is not provided with the TOF sensor, it is determined whether the TOF sensor can detect the target obstacle;
[0086] If the TOF sensor cannot detect the target obstacle, the mobile robot is controlled to rotate by a first preset angle towards a first preset direction;
[0087] If the TOF sensor detects the target obstacle, the mobile robot is controlled to walk by a preset forward distance towards the current orientation of the mobile robot;
[0088] When the distance walked by the mobile robot exceeds the preset forward distance, the mobile robot is controlled to rotate by a second preset angle towards a second preset direction, walk by the preset forward distance, and return to execute the step of obtaining the position information of the target obstacle by the TOF sensor with a preset number of pixels, thereby cycling to make the mobile robot avoid the target obstacle.
[0089] Further, the obstacle avoidance program of the mobile robot in the memory 130, when executed by the processor, also implements the following steps:
[0090] Based on the position information, an analog laser radar is constructed, and the detection range of the analog laser radar is divided based on the number of TOF sensors to obtain a second division result;
[0091] Based on the position information, the second division result, and a preset threshold, the rotation angle is calculated.
[0092] Further, the obstacle avoidance program of the mobile robot in the memory 130, when executed by the processor, also implements the following steps:
[0093] When the distance between the mobile robot and the target obstacle is less than a second preset threshold, the walking speed is calculated according to the distance between the mobile robot and the target obstacle, and the mobile robot is controlled to move forward according to the walking speed, wherein the second preset threshold is greater than the first preset threshold.
[0094] Further, the obstacle avoidance program of the mobile robot in the memory 130, when executed by the processor, also implements the following steps:
[0095] When the distance between the mobile robot and the target obstacle is less than a second preset threshold, the deceleration ratio is calculated based on the distance between the mobile robot and the target obstacle and the current walking speed of the mobile robot.
[0096] Based on the deceleration ratio and the distance between the mobile robot and the target obstacle, the walking speed is calculated.
[0097] Further, the obstacle avoidance program of the mobile robot in the memory 130 is also implemented when executed by the processor to implement the following steps:
[0098] creating an obstacle memory map;
[0099] filling the obstacle memory map based on the position information to obtain a filled map;
[0100] constructing a simulated laser radar based on the position information.
[0101] In the embodiment, the position information of the target obstacle is obtained by the time of flight (TOF) sensor with a preset number of pixels, and when the distance between the mobile robot and the target obstacle is less than a first preset threshold, the rotation angle and the angular velocity are calculated based on the position information. The mobile robot is controlled to advance according to the rotation angle and the angular velocity, and the position information of the target obstacle is obtained by the time of flight (TOF) sensor with a preset number of pixels to make the mobile robot avoid the target obstacle. The detection range of the mobile robot is improved, the precise obstacle avoidance of the mobile robot is realized, the obstacle avoidance of the mobile robot is realized, and the route of the obstacle avoidance is more smooth.
[0102] Based on the terminal device architecture but not limited to the above-mentioned architecture, the method embodiment of the present application is proposed.
[0103] Reference Figure 2 , Figure 2 The flowchart of the first embodiment of the obstacle avoidance method of the mobile robot is shown. The obstacle avoidance method of the mobile robot comprises:
[0104] In step S101, the position information of the target obstacle is obtained by the time of flight (TOF) sensor with a preset number of pixels.
[0105] The execution subject of the method of the embodiment can be an obstacle avoidance device of a mobile robot, an obstacle avoidance terminal device or a server of a mobile robot, and the embodiment is exemplified by a mobile robot.
[0106] In order to realize the precise obstacle avoidance of the mobile robot, the position information of the target obstacle is obtained by the time of flight (TOF) sensor with a preset number of pixels, and the simulated laser radar is generated based on the position information, and the specific scheme is as follows:
[0107] As an implementation manner, in the embodiment, the mobile robot obtains the position information of the target obstacle by the TOF sensor.
[0108] Currently, commercially available multi-pixel Time-of-Flight (TOF) sensors range in pixel count from tens to hundreds of thousands. Considering the obstacle avoidance requirements of mobile robots, this embodiment uses TOF sensors with a preset pixel count ranging from tens to hundreds. TOF sensors with pixel counts in the tens to hundreds range are designated as low-pixel-count TOF sensors, with the upper limit of 120 degrees for low-pixel-count TOF sensors set as a preset pixel count threshold. TOF sensors with pixel counts ranging from tens of thousands to hundreds of thousands are designated as high-pixel-count TOF sensors. Low-pixel-count TOF sensors can generally be integrated onto a single chip, are small in size, flexible in placement, easy to mass-produce, and have low cost. They can identify the shape and size of most obstacles.
[0109] Low-pixel count TOF sensors typically have a field of view ranging from 20 to 120 degrees. Based on the different field of view of low-pixel count TOF sensors, their placement on mobile robots can be adjusted accordingly. In this embodiment, a low-pixel count TOF sensor with a field of view of 90 degrees is used.
[0110] Low-pixel-count Time-of-Flight (TOF) sensors typically consist of an emitting light source, a receiving photoelectric sensor, optical lenses, integrated circuits, and a chip package. Generally, the emission angle of the light source is slightly larger than the detection range of the receiving component. The receiving component, composed of multiple pixels, can detect the specific distance and shape of obstacles.
[0111] like Figure 3 As shown, a mobile robot comprises the mechanical structure itself, a control board, moving parts, sensors, and other components. The moving parts mainly consist of drive wheels and casters. Figure 3 The mobile robot has a drive wheel on each side, forming a common differential robot chassis. A swivel wheel near the front of the robot provides additional support. Sensors detect obstacles; when an obstacle is detected, the sensor sends the distance information to the robot's control board. The control board, using pre-calibrated structural parameters, converts the three-dimensional distance information into two-dimensional orientation information in the robot's coordinate system, plans a new path, and controls the drive wheels to perform obstacle avoidance maneuvers.
[0112] When the mobile robot is running, it creates a map centered on the robot's current location as an obstacle memory map so that the mobile robot can continuously acquire obstacle locations in the future.
[0113] Specifically, when the mobile robot is running, it creates a local grid map centered on the current position of the mobile robot, with a size of 5m*5m and a resolution of 2cm, as an obstacle memory map so that the mobile robot can continuously acquire the position of the target obstacle in the future.
[0114] wherein the grid map, also called a raster image, is an image that has been both spatially and in intensity discretized. A grid map can be considered as a matrix, where each element of the matrix corresponds to a point in the image and the corresponding value corresponds to the gray level of that point. The elements of the digital matrix are called pixels.
[0115] It should be noted that the size and resolution of the obstacle memory map can be set according to actual conditions, and the present embodiment does not make specific limitations thereto.
[0116] Further, when the mobile robot approaches the target obstacle, the position of the target obstacle is calculated according to the current position of the mobile robot and the SLAM map position, and the position of the target obstacle is filled in the obstacle memory map to obtain a filled map.
[0117] Specifically, when the mobile robot approaches the target obstacle, the current position of the mobile robot is obtained by the TOF sensor; the control board calculates the position of the target obstacle as position information according to the current position of the mobile robot and the SLAM map position, and fills the position of the target obstacle in the obstacle memory map to obtain a filled map, wherein the position information includes the distance of the target obstacle to the mobile robot, the orientation of the target obstacle relative to the mobile robot, and the information of the target obstacle; the information of the target obstacle includes the shape of the target obstacle, the size of the target obstacle, etc.
[0118] Further, the simulation of the laser radar is performed according to the position information of the target obstacle.
[0119] Specifically, the control board performs the simulation of the laser radar according to the position information of the target obstacle. The simulation of the laser radar will take the current radar of the mobile robot as the center, calculate the point with the shortest Euclidean distance between the current radar and the target obstacle according to a resolution of 1°, and convert the distance information from the radar to the point into the data structure of the radar. In the present embodiment, the front of the mobile robot is taken as the positive direction of the radar, and the rotation direction of the radar is counterclockwise.
[0120] Further, when the mobile robot continuously approaches the obstacle, the mobile robot will perform the filling of the obstacle memory map and the generation of the simulated laser radar according to the information fed back by the TOF sensor.
[0121] When the mobile robot detects that the distance between the simulated laser radar and the target obstacle is less than a second preset threshold within a preset angle range, the mobile robot calculates the walking speed according to the distance between the simulated laser radar and the target obstacle, and controls the mobile robot to move forward according to the walking speed.
[0122] Specifically, when the mobile robot continuously approaches the target obstacle, the mobile robot fills the obstacle memory map and generates the simulated laser radar according to the information of the target obstacle fed back by the TOF sensor; wherein the information of the target obstacle includes distance information between the target obstacle and the mobile robot, size information of the target obstacle.
[0123] When the shortest distance between the target obstacle and the simulated laser radar in the range of 130° to 230° fed back by the simulated laser radar is less than 0.5m, the mobile robot calculates the deceleration ratio. The ratio size is calculated according to the shortest distance between the target obstacle and the mobile robot in the range fed back by the simulated laser radar, the historical deceleration ratio, the control speed issued by the mobile robot in the last cycle, and the current speed. Then the control unit of the mobile robot calculates the current speed after deceleration as the walking speed to decelerate; and takes 0.5m as the second preset threshold.
[0124] Wherein, when the mobile robot continuously approaches the target obstacle, the distance information, position information, and object information obtained depend on the receiving range of the TOF sensor. In this embodiment, the range of the TOF sensor used for obstacle avoidance is defined as 1m.
[0125] Thus, by continuously obtaining the information of the target obstacle through the TOF sensor, the obstacle memory map is filled, and the position information of the target obstacle is more accurate. And when the distance between the mobile robot and the target obstacle is less than the second preset threshold, the mobile robot is controlled to decelerate, so as to better complete the obstacle avoidance route of the target obstacle.
[0126] Step S102, when the distance between the mobile robot and the target obstacle is less than the first preset threshold, the rotation angle and the angular velocity are calculated based on the position information.
[0127] As an implementation, when the distance between the mobile robot and the target obstacle is less than the first preset threshold, the mobile robot is controlled to stop, and the simulated laser radar data fed back by the simulated laser radar is obtained as follows:
[0128] In this embodiment, when it is detected that the distance between the mobile robot and the target obstacle fed back by the simulated laser radar is less than the first preset threshold, the control unit of the mobile robot sends a stop control instruction to control the driving wheel. Then, the mobile robot stops in front of the target obstacle, and the distance information between the mobile robot and the target obstacle at this time is calculated as the simulated laser radar data.
[0129] Specifically, when the simulated laser radar of the mobile robot detects the distance information of the target obstacle within the detection range of the simulated laser radar, the control unit converts the distance information (three-dimensional data) of the target obstacle detected by the TOF sensor into two-dimensional data, and takes the two-dimensional data as the feedback information of the simulated laser radar.
[0130] Further, when the feedback information of the simulated laser radar is less than the obstacle avoidance control minimum distance (5cm), the mobile robot sends a parking control instruction to control the driving wheel to stop working, and then the mobile robot stops at a distance of 3cm to 5cm in front of the obstacle, and calculates the distance information of the mobile robot to the target obstacle at this time as the simulated laser radar data.
[0131] Wherein, since the side-scan length of the mobile robot is 5cm (the distance is derived from the farthest distance from the mobile robot shell collision sensor to the side-scan); therefore, 5cm is taken as the first preset threshold.
[0132] Thus, by means of the simulated laser radar, the position information of the target obstacle is obtained, when the distance between the target obstacle and the mobile robot meets the preset condition, the mobile robot is controlled to stop and calculate the simulated laser radar data, so as to control the working state of the mobile robot based on the first simulated laser radar data.
[0133] Step S103, control the mobile robot to advance according to the rotation angle and angular velocity, and return to execute step S101: obtain the position information of the target obstacle by the TOF sensor with a preset number of pixels.
[0134] As an embodiment, in the present embodiment, first, the number of TOF sensors of the mobile robot is detected, second, the rotation angle is calculated based on the number of TOF sensors of the mobile robot, the simulated laser radar data and the preset threshold.
[0135] Specifically, if the number of TOF sensors is less than 3, and the TOF sensors are located at the front side and / or the right side of the mobile robot, the mobile robot divides the simulated laser radar into multiple blocks to obtain secto0r as the second block result. For example, 60° to 90° is divided into the right front range, 90° to 180° is divided into the right middle range, 180° to 270° is divided into the left middle range, and 270° to 300° is divided into the left front range.
[0136] Further, the mobile robot selects the shortest distance fed back by the simulated laser radar according to the simulated laser radar data obtained in the range detected by the simulated laser radar, and calculates a specific angle at which the mobile robot needs to rotate (for example, 90 degrees when the distance is 0-5 cm). Since the obstacle avoidance behavior occurs in the right edge mode of the mobile robot, when the mobile robot encounters an obstacle, it must rotate to the left, and therefore the obtained angle should be the counterclockwise rotation angle.
[0137] For example, when the minimum distances in the right front range and the right middle range are less than the set threshold value (0.05 cm), the calculated angle is 60 degrees of left turn. After the mobile robot turns 60 degrees to the left, the minimum distance in the right front range may still be less than the set threshold value, and the calculated angle is 30 degrees of left turn.
[0138] Referring to Figure 4 , Figure 5 If the number of TOF sensors is greater than 3, and the TOF sensors are located on the front side, right side, and left side of the mobile robot, the scheme for calculating the rotation angle based on the number of TOF sensors, simulated laser radar data, and a preset threshold value is as follows:
[0139] The mobile robot selects the shortest distance fed back by the simulated laser radar according to the simulated laser radar data obtained in the range detected by the simulated laser radar, and calculates a specific angle at which the mobile robot needs to rotate. Since the obstacle avoidance behavior occurs in the right edge mode of the mobile robot, when the mobile robot encounters an obstacle, it must rotate to the left, and therefore the obtained angle should be the counterclockwise rotation angle.
[0140] The specific scheme is as follows:
[0141] (1) When the minimum distances in the left front, left middle, right middle, and right front ranges are all less than the set threshold value (0.05 cm), the calculated angle is 90 degrees of left turn.
[0142] (2) When only the minimum distances in the left front and left middle ranges are less than the set threshold value (0.05 cm), the calculated angle is 70 degrees of left turn.
[0143] (3) When the minimum distance in the right front range is less than the set threshold value (0.05 cm) and the minimum distances in the remaining ranges are less than the set threshold value (0.05 cm), the calculated angle is 60 degrees of left turn.
[0144] (4) When the minimum distances in the right front range and the right middle range are less than the set threshold value (0.05 cm), the calculated angle is 60 degrees of left turn.
[0145] (5) None of the above conditions are met, but the distance is less than the set threshold (0.05 cm), and the calculated angle is 30° left turn at this time.
[0146] Again, the angular velocity is calculated based on the number of TOF sensors and the simulated laser radar data; finally, the mobile robot is controlled to avoid the target obstacle according to the rotation angle and the angular velocity, and returns to step S101: the position information of the target obstacle is obtained by the time-of-flight TOF sensor with a preset number of pixels, so that the mobile robot avoids the target obstacle.
[0147] Therefore, the position information of the target obstacle is obtained by the TOF sensor, the obstacle avoidance function of the mobile robot is realized, the size of the TOF sensor is small, which is convenient to arrange, and even in the scene of floor-to-ceiling window, balcony and the like with sufficient light, the TOF sensor can still work normally; and the detection range of the TOF sensor is wide, which reduces the blind area of the mobile robot during movement, so that the obstacle avoidance route is smoother.
[0148] In the embodiment, the position information of the target obstacle is obtained by the time-of-flight TOF sensor with a preset number of pixels; when the distance between the mobile robot and the target obstacle is less than a first preset threshold, the rotation angle and the angular velocity are calculated based on the position information; the mobile robot is controlled to advance according to the rotation angle and the angular velocity, and returns to step: the position information of the target obstacle is obtained by the time-of-flight TOF sensor with a preset number of pixels, so that the mobile robot avoids the target obstacle. The present application realizes precise obstacle avoidance of the mobile robot, collects the position information of the environment where the mobile robot is located through the TOF sensor, improves the detection range of the mobile robot, obtains the position of the target obstacle in real time through the TOF sensor, and can easily avoid the obstacle for the relatively low obstacle, and the obstacle avoidance route is smoother.
[0149] Reference Figure 6 , Figure 6 The flowchart of the second embodiment of the obstacle avoidance method of the mobile robot is shown. Based on the above Figure 2 The embodiment shown in the embodiment, step S102: calculating the angular velocity based on the simulated laser radar data includes:
[0150] Step S1021, based on the position information, constructing a simulated laser radar, and dividing the detection range of the simulated laser radar based on the number of TOF sensors to obtain a first division result.
[0151] Step S1022, calculating the distance parameter based on the first division result.
[0152] Step S1023, calculating the angular velocity based on the distance parameter and a preset standard distance.
[0153] As an implementation, in the present embodiment, first, it is determined whether the side of the mobile robot has a TOF sensor, and if the side of the mobile robot does not have a TOF sensor, the scheme for calculating the angular velocity based on the simulated laser radar data is as follows:
[0154] If the front of the mobile robot has one or more TOF sensors, and the side of the mobile robot does not have a sensor, a filled map is generated based on the position information, and the data structure of the target obstacle of the filled map is changed to obtain simulated laser radar data.
[0155] Referring to Figure 7 , Figure 8 Since the side of the mobile robot does not have a TOF sensor, when the mobile robot encounters a target obstacle and turns left by a certain angle, the mobile robot cannot detect the target obstacle information on the right side. In the present embodiment, the information of the target obstacle is filled into the obstacle memory map to obtain a filled map, and the filled map is persistently processed. Therefore, even if the right side of the mobile robot does not have a TOF sensor, the mobile robot can use the information of the historical target obstacle to perform edge obstacle avoidance processing.
[0156] Specifically, if the front of the mobile robot has one or more TOF sensors, and the side of the mobile robot does not have a sensor, the control board of the mobile robot generates an obstacle memory map according to the position information obtained by the TOF; secondly, the control board of the mobile robot fills the obstacle memory map according to the position information of the target obstacle obtained by the TOF to generate a filled map; thirdly, the control board of the mobile robot converts the target obstacle in the filled map into the data structure of the laser radar to obtain simulated laser radar data, which is used as the simulated laser radar data of the simulated laser radar feedback.
[0157] As shown in Figure 9 , Figure 10 Since the TOF sensor is small in size, easy to install, and not sensitive to environmental light and reflectivity of obstacles, two or more TOF sensors can be used to expand the detection range of the sensor, and a low-pixel TOF sensor can not only detect the height information of the target obstacle, but also detect relatively low obstacles, thereby achieving easy obstacle avoidance.
[0158] Specifically, the control unit of the mobile robot obtains the ranging information of the plurality of points detected by the low-pixel TOF sensor, and calculates the information to obtain the size information of the target obstacle, thereby achieving easy obstacle avoidance.
[0159] If the height of the TOF sensor from the ground is 6 cm, the longitudinal field of view angle of the sensor is 90°, and the longitudinal pixels of the sensor are 8 rows. After calculation, the height of the target obstacle corresponding to a single pixel of the edge is about 1.5 cm to 2 cm. Therefore, the low-pixel TOF sensor can detect relatively low obstacles.
[0160] If the mobile robot has multiple TOF sensors, the TOF sensors can be installed in the manner shown in FIGS. 1A and 1B. One TOF sensor can be arranged at a higher position and one TOF sensor can be arranged at a lower position, and the two TOF sensors can be used in combination, so that the blind area of the near distance is smaller. Different arrangements of the TOF sensors only affect the size of the horizontal FOV and the vertical FOV of the target obstacle detection, and further affect the range of the obstacle detection by the sensor and the blind area of the obstacle detection by the sensor. Figure 11 、 Figure 12 The different arrangements of the TOF sensors only affect the size of the horizontal FOV and the vertical FOV of the target obstacle detection, and further affect the range of the obstacle detection by the sensor and the blind area of the obstacle detection by the sensor.
[0161] Thus, the position information obtained by the TOF sensor is used to generate an obstacle memory map and a filled map, and the information of the target obstacle in the filled map is converted into simulated laser radar data, so as to facilitate the mobile robot to calculate and process the simulated laser radar data, and improve the working efficiency and accuracy of the mobile robot.
[0162] Further, in the present embodiment, since there is no TOF sensor on the side of the mobile robot, the control mainboard of the mobile robot divides the real-time simulated laser radar data into two parts, which are right sector and right front sector, as a first divided result.
[0163] Further, the mobile robot calculates a distance parameter based on the first divided result.
[0164] Specifically, the control mainboard of the mobile robot obtains the minimum distance in the right sector and the right front sector, and obtains the distance parameter.
[0165] Further, an angular velocity is calculated based on the distance parameter and a preset standard distance.
[0166] Specifically, the along-edge distance between the mobile robot and the target obstacle is defined as 1 cm in advance, and thus 1 cm is taken as the preset standard distance when along the edge.
[0167] The distance error is calculated by comparing the preset standard distance with the actual feedback distance of the right sector and the right front sector, and the angular velocity is calculated according to the distance error and a magnification ratio, so as to achieve the effect of the mobile robot along the edge.
[0168] For example, when the mobile robot is far away from the target obstacle, the angular velocity calculated by the mobile robot is negative, which makes the mobile robot close to the obstacle; when the mobile robot is close to the obstacle, the angular velocity calculated by the mobile robot is positive, which makes the mobile robot away from the obstacle.
[0169] Therefore, the information obtained by the transfer robot TOF sensor is used to calculate the angular velocity, so as to control the mobile robot to walk along the target obstacle according to the angular velocity, so as to make the mobile robot away from the obstacle, and improve the working efficiency of the mobile robot.
[0170] As another embodiment, referring to Figure 3 , if the side of the TOF sensor has a TOF sensor, it is determined whether the right side of the mobile robot has a TOF sensor. If the right side of the mobile robot has a TOF sensor, it is determined whether the left side of the mobile robot has a TOF sensor. If the left side of the mobile robot has no TOF sensor, the scheme for calculating the angular velocity based on the simulated laser radar data is as follows:
[0171] If the front of the mobile robot has one or more TOF sensors, and the right side of the mobile robot has a TOF sensor, a filled map is generated based on the position information obtained by the TOF, and the filled map is obtained based on the filled map; the simulated laser radar data is obtained by simulating the laser radar.
[0172] When the mobile robot encounters a target obstacle and turns left by a certain angle, the TOF sensor on the right side of the mobile robot can detect the target obstacle information on the right side. In this embodiment, the target obstacle is filled into the obstacle memory map to obtain a filled map, and the filled map is persisted.
[0173] Specifically, if the front of the mobile robot has one or more TOF sensors, and the right side of the mobile robot has a sensor, the control board of the mobile robot generates an obstacle memory map according to the position information obtained by the TOF; then, a filled map is generated based on the position information of the target obstacle obtained by the TOF; again, the control board of the mobile robot converts the area array distance information fed back by the TOF sensor into the data structure of the laser radar based on the filled map, to obtain simulated laser radar data as the simulated laser radar data fed back by the simulated laser radar.
[0174] As shown in Figure 9 , Figure 10 , since the TOF sensor is small in size, easy to install, and not sensitive to environmental light and reflectivity of obstacles, two or more TOF sensors can be used to expand the detection range of the sensor, and the low-pixel TOF sensor can not only detect the height information of the target obstacle, but also detect relatively low obstacles, so as to easily avoid obstacles.
[0175] Specifically, by the control unit of the mobile robot, ranging information of multiple points detected by the low-pixel TOF sensor is acquired and calculated to obtain size information of the target obstacle, so as to easily avoid obstacles.
[0176] If the height of the TOF sensor from the ground is 6 cm, the longitudinal field of view angle of the sensor is 90°, and the longitudinal pixels of the sensor are 8 rows. After calculation, the height of the target obstacle corresponding to a single pixel of the edge is about 1.5 cm to 2 cm. Therefore, the low-pixel TOF sensor can detect relatively low obstacles.
[0177] The TOF sensor can also be installed in the manner shown in Figure 11 、 Figure 12 . One TOF sensor can be arranged at a higher and a lower position respectively, and used in combination, so that the blind area of the near distance is smaller. Among them, the arrangement of the TOF sensor only affects the size of the horizontal FOV and the vertical FOV of the target obstacle detection, and further affects the range of the sensor detecting the obstacle and the blind area of the sensor detecting the obstacle.
[0178] Therefore, the position information obtained by the TOF sensor generates an obstacle memory map, fills the map, and converts the information of the target obstacle in the filled map into simulated laser radar data, so as to facilitate the mobile robot to calculate and process the simulated laser radar data, and improve the working efficiency and accuracy of the mobile robot.
[0179] Further, referring to Figure 13 , in the embodiment, the control mainboard of the mobile robot divides the real-time simulated laser radar data into two blocks, which are right sector and right front sector, as the first divided result.
[0180] Further, the mobile robot calculates the distance parameter based on the first divided result.
[0181] Specifically, the control mainboard of the mobile robot obtains the minimum value of the distance in the right sector and the right front sector, to obtain the distance parameter.
[0182] Further, the angular velocity is calculated based on the distance parameter and the preset standard distance.
[0183] Specifically, the along-edge distance between the mobile robot and the target obstacle is defined as 1 cm in advance, so that 1 cm is taken as the preset standard distance when along the edge.
[0184] The distance error is calculated by comparing the preset standard distance with the actual feedback distance parameters of the right and right front, and the angular velocity is calculated according to the distance error and the amplification ratio, so as to achieve the effect of the mobile robot along the edge.
[0185] For example, when the mobile robot is far away from the target obstacle, the calculated angular velocity of the mobile robot is negative, which makes the mobile robot close to the obstacle; when the mobile robot is close to the obstacle, the calculated angular velocity of the mobile robot is positive, which makes the mobile robot away from the obstacle.
[0186] Therefore, first, the mobile robot detects the target obstacle through the TOF sensor in the front direction, and then detects the target obstacle through the TOF sensor on the right side of the mobile robot; finally, the angular velocity is calculated based on the position information obtained by the TOF sensor on the right side of the mobile robot, so as to control the mobile robot to walk along the target obstacle according to the angular velocity, so as to make the mobile robot away from the obstacle and improve the working efficiency of the mobile robot.
[0187] In the process of turning of the mobile robot, the target obstacle can be detected again by the TOF sensor as the mobile robot continuously moves. In the case that the wide angle of the right TOF sensor is large enough, the mobile robot can continuously detect the target obstacle to avoid the target obstacle.
[0188] As another embodiment, with reference to Figure 14 , if the side of the TOF sensor has a TOF sensor, it is determined whether the right side of the mobile robot has a TOF sensor. If the right side of the mobile robot has a TOF sensor, it is determined whether the left side of the mobile robot has a TOF sensor. If the left side of the mobile robot has a TOF sensor, the scheme for calculating the angular velocity based on the simulated laser radar data is as follows:
[0189] Since the mobile robot has no TOF sensor on the side, when the mobile robot encounters a target obstacle and turns left by a certain angle, the TOF sensor on the right side of the mobile robot can detect the target obstacle information on the right side. In this embodiment, the target obstacle is filled into the obstacle memory map to obtain a filled map, and the filled map is persistently processed.
[0190] If the front of the mobile robot has one or more TOF sensors, and the right and left sides of the mobile robot have TOF sensors, a filled map is generated based on the position information obtained by the TOF, and the data structure of the information fed back by the TOF sensor is changed based on the filled map to obtain simulated laser radar data, which is used as the simulated laser radar data fed back by the simulated laser radar.
[0191] Specifically, if the mobile robot has one or more TOF sensors in front and sensors on the right and left sides, the control board of the mobile robot generates an obstacle map based on the position information obtained by the TOF; then, generates a filling map based on the position information of the target obstacle obtained by the TOF; again, the control board of the mobile robot converts the area array distance information fed back by the TOF sensor into the data structure of the laser radar based on the filling map, obtains simulated laser radar data, and feeds back the simulated laser radar data as simulated laser radar data.
[0192] As shown in Figure 9 , Figure 10 , since the TOF sensor is small in size, easy to install, and not sensitive to environmental light and the reflectivity of obstacles, two or more TOF sensors can be used to expand the detection range of the sensor. In addition, the low-pixel TOF sensor can not only detect the height information of the target obstacle, but also detect relatively low obstacles, thereby achieving easy obstacle avoidance.
[0193] Specifically, the control unit of the mobile robot obtains the ranging information of multiple points detected by the low-pixel TOF sensor and calculates the size information of the target obstacle based on the information, thereby achieving easy obstacle avoidance.
[0194] If the height of the TOF sensor from the ground is 6 cm, the longitudinal field of view angle of the sensor is 90°, and the longitudinal pixels of the sensor have 8 rows. After calculation, the height of the target obstacle corresponding to a single pixel on the edge is about 1.5 cm to 2 cm. Therefore, the low-pixel TOF sensor can detect relatively low obstacles.
[0195] The TOF sensor can also be installed in the manner shown in Figure 11 , Figure 12 . One TOF sensor can be arranged at a higher and a lower position, respectively, and used in combination to make the blind area at a close distance smaller. Among them, the different arrangement of the TOF sensor will only affect the size of the horizontal FOV and the vertical FOV of the target obstacle detection, and further affect the range of the sensor detecting obstacles and the blind area of the sensor detecting obstacles.
[0196] Therefore, since the mobile robot has TOF sensors on the left side, the middle side, and the right side, at this time, the left and right sides of the mobile robot have smaller blind areas. The position information obtained by the TOF sensor is used to generate an obstacle memory map and a filling map, and the information of the target obstacle in the filling map is converted into simulated laser radar data, which is convenient for the mobile robot to calculate and process the simulated laser radar data, and improves the working efficiency and accuracy of the mobile robot.
[0197] Further, in the embodiment, the control mainboard of the mobile robot divides the real-time simulated lidar data into two blocks, right sector and right front sector, as the first block result.
[0198] Further, the mobile robot calculates a distance parameter based on the first block result.
[0199] Specifically, the control mainboard of the mobile robot obtains the minimum distance in the right sector and the right front sector, and obtains the distance parameter.
[0200] Further, the angular velocity is calculated based on the distance parameter and a preset standard distance.
[0201] Specifically, the along-edge distance between the mobile robot and the target obstacle is defined as 1 cm, and thus, 1 cm is taken as the preset standard distance when along the edge.
[0202] The distance error is calculated by comparing the preset standard distance with the actual feedback distance of the right sector and the right front sector, and the angular velocity is calculated according to the distance error and the amplification ratio, so as to achieve the effect of the mobile robot along the edge.
[0203] For example, when the mobile robot is far away from the target obstacle, the angular velocity calculated by the mobile robot is negative, which makes the mobile robot close to the obstacle; when the mobile robot is close to the obstacle, the angular velocity calculated by the mobile robot is positive, which makes the mobile robot away from the obstacle.
[0204] Therefore, the angular velocity is calculated by the information obtained by the TOF sensor of the mobile robot, so as to control the mobile robot to walk along the target obstacle according to the angular velocity, so that the mobile robot is away from the obstacle, and the working efficiency of the mobile robot is improved. In the process of turning of the mobile robot, when the wide angle of the left TOF sensor and the right TOF sensor is large enough, the mobile robot can continuously detect the target obstacle, so as to avoid the target obstacle.
[0205] The embodiment obtains position information of a target obstacle through the TOF sensor with a preset number of pixels, calculates a rotation angle and an angular velocity based on the position information when the distance between the mobile robot and the target obstacle is less than a first preset threshold, controls the mobile robot to advance according to the rotation angle and the angular velocity, and returns to the step of obtaining the position information of the target obstacle through the TOF sensor with a preset number of pixels, so that the mobile robot avoids the target obstacle, and returns to the step of obtaining the position information of the target obstacle through the TOF sensor with a preset number of pixels and constructing a simulated laser radar based on the position information, and the cycle is repeated until the walking path of the mobile robot forms a closed loop and the cycle is terminated, so that the mobile robot avoids the target obstacle. The application realizes accurate obstacle avoidance of the mobile robot, adopts a low-pixel TOF sensor, realizes the obstacle avoidance function of the robot through the combination of multiple TOF sensors, improves the detection range of the mobile robot, and can easily avoid obstacles that are relatively low, and the route of obstacle avoidance is more smooth.
[0206] Based on the above Figure 6 In the embodiment shown, the step S102: calculating an angular velocity based on the position information, comprises the following steps:
[0207] In step S104, if the side of the mobile robot is not provided with the TOF sensor, it is judged whether the TOF sensor can detect the target obstacle.
[0208] In step S105, if the TOF sensor cannot detect the target obstacle, the mobile robot is controlled to rotate by a first preset angle towards a first preset direction.
[0209] In step S106, if the TOF sensor detects the target obstacle, the mobile robot is controlled to walk a preset advancing distance towards the current direction of the mobile robot.
[0210] In step S107, when the distance walked by the mobile robot exceeds the preset advancing distance, the mobile robot is controlled to rotate by a second preset angle towards a second preset direction, walk the preset advancing distance, and return to the step S101 of obtaining the position information of the target obstacle through the TOF sensor with a preset number of pixels, so that the mobile robot avoids the target obstacle.
[0211] As an implementation, in the embodiment, if the side of the mobile robot does not have a TOF sensor, the mobile robot is processed according to the historical target obstacle position information. However, the historical target obstacle position information is fed back according to the TOF sensor in front of the mobile robot, so when the mobile robot advances along the target obstacle, the signal loss will occur.
[0212] In order to solve the problem of signal loss, the mobile robot needs to retreat to obtain the information of the target obstacle, and the specific solution is as follows:
[0213] As shown in Figure 15 , Figure 16 , Figure 17 , Figure 18 , Figure 19 , first, it is judged whether the TOF sensor can detect the target obstacle, if the TOF sensor detects the target obstacle, the mobile robot is controlled to walk a preset forward distance in the current direction of the mobile robot; if the TOF sensor cannot detect the target obstacle, the mobile robot is controlled to rotate a first preset angle in a first preset direction.
[0214] If the TOF detects the target obstacle, the mobile robot is controlled to walk a preset forward distance in the first preset direction, when the mobile robot walks more than the preset forward distance, the mobile robot is controlled to walk a preset forward distance in a second preset direction, and returns to execute step S101: obtaining the position information of the target obstacle by the time-of-flight TOF sensor of a preset number of pixels.
[0215] For example, first, it is judged whether the TOF sensor can detect the target obstacle, if the TOF sensor cannot detect the target obstacle, the mobile robot is controlled to rotate a first preset angle in reverse.
[0216] After the TOF detects the target obstacle, it is rotated in reverse by a first preset angle and walks a preset forward distance. When the mobile robot walks more than the preset forward distance, the mobile robot is controlled to rotate a second preset angle in a forward direction and walks a preset forward distance, and returns to execute step S101: obtaining the position information of the target obstacle by the time-of-flight TOF sensor of a preset number of pixels, so that the mobile robot avoids the target obstacle.
[0217] It should be noted that the first preset angle and the second preset angle are calculated according to the simulation laser radar data and the preset threshold, and the first preset direction and the second preset direction can be set according to the actual situation.
[0218] Therefore, by controlling the mobile robot to perform the rear arc action and the front arc action, the mobile robot walks along the obstacle, and the purpose of the mobile robot turning back to detect the target obstacle is achieved.
[0219] The embodiment realizes accurate obstacle avoidance of the mobile robot, improves the detection range of the mobile robot, when the mobile robot does not have a TOF sensor on the side, the mobile robot is controlled to perform a rear-radian action and a front-radian action, so as to realize walking of the mobile robot along the obstacle, and the mobile robot can also easily avoid the obstacle, and the route of the obstacle avoidance is more smooth.
[0220] Reference Figure 20 , Figure 20 The function module schematic diagram of the obstacle avoidance system of the mobile robot. The obstacle avoidance system of the mobile robot comprises:
[0221] The position information acquisition module 10 is used for acquiring position information of a target obstacle through a time of flight (TOF) sensor with a preset number of pixels.
[0222] The motion parameter calculation module 20 is used for calculating a rotation angle and an angular velocity based on the position information when the distance between the mobile robot and the target obstacle is less than a first preset threshold.
[0223] The motion control module 30 is used for controlling the mobile robot to advance according to the rotation angle and the angular velocity.
[0224] The principle and implementation process of the embodiment for realizing the obstacle avoidance of the mobile robot are described above, and will not be repeated here.
[0225] In addition, the embodiment of the present application also provides a terminal device, which comprises a memory, a processor, and a mobile robot obstacle avoidance program stored in the memory and executable on the processor. When the mobile robot obstacle avoidance program is executed by the processor, the steps of the mobile robot obstacle avoidance method described above are realized.
[0226] Since the mobile robot obstacle avoidance program is executed by the processor, all the technical solutions of the foregoing embodiments are adopted, and at least all the beneficial effects brought by all the technical solutions of the foregoing embodiments are achieved, which will not be repeated here.
[0227] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing an obstacle avoidance program for a mobile robot, wherein when the obstacle avoidance program for the mobile robot is executed by a processor, the steps of the obstacle avoidance method for the mobile robot as described above are implemented.
[0228] Since the obstacle avoidance program of this mobile robot adopts all the technical solutions of all the aforementioned embodiments when it is executed by the processor, it has at least all the beneficial effects brought about by all the technical solutions of all the aforementioned embodiments, which will not be repeated here.
[0229] Compared to existing technologies, this invention provides a method, system, terminal device, and storage medium for obstacle avoidance in mobile robots. It acquires the position information of a target obstacle using a Time-of-Flight (TOF) sensor with a preset number of pixels. When the distance between the mobile robot and the target obstacle is less than a first preset threshold, it calculates a rotation angle and angular velocity based on the position information. The mobile robot is then controlled to move forward according to the rotation angle and angular velocity, and then returns to execute the step of acquiring the position information of the target obstacle using a TOF sensor with a preset number of pixels, thereby enabling the mobile robot to avoid the target obstacle. This invention achieves precise obstacle avoidance for mobile robots. Acquiring the position information of the target obstacle using a TOF sensor with a preset number of pixels improves the detection range of the mobile robot. A simulated LiDAR is generated based on the position information, facilitating the positioning and mapping of the mobile robot. Furthermore, the simulated LiDAR can be used for obstacle avoidance at close range. When the distance between the mobile robot and the target obstacle is less than the first preset threshold, the mobile robot is controlled to stop, and simulated LiDAR data is acquired to calculate the rotation angle and angular velocity, thereby controlling the mobile robot to avoid the target obstacle based on the rotation angle and angular velocity.
[0230] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or approach that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or approach. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or approach that includes that element.
[0231] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0232] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, also can be through hardware, but in many cases the former is the better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the contribution to the prior art can be embodied in the form of software products, the computer software product is stored in the above-mentioned storage medium (such as ROM / RAM, magnetic disc, optical disc), including a number of instructions to make a terminal device (may be a mobile phone, computer, server, controlled terminal, or network equipment, etc.) executes the method of each embodiment of the present application.
[0233] The above is only the preferred embodiment of the present application, not therefore limit the patent scope of the present application, any equivalent structure or equivalent flow transformation made by using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An obstacle avoidance method for a mobile robot, characterized in that, The method includes the following steps: The location information of the target obstacle is obtained by a time-of-flight (TOF) sensor with a preset number of pixels; When the distance between the mobile robot and the target obstacle is less than a first preset threshold, the rotation angle and angular velocity are calculated based on the position information. The step of calculating the angular velocity based on the position information includes: A simulated lidar is constructed based on the location information, and the detection range of the simulated lidar is divided into blocks based on the number of TOF sensors to obtain the first block result; The step of constructing a simulated lidar based on the location information includes: Centered on the radar of the mobile robot, the point with the shortest Euclidean distance to the target obstacle is calculated according to a preset resolution, and the distance information of the radar to the shortest point is converted into the data structure of the simulated lidar. Calculate the distance parameter based on the first block result; Based on the distance parameters and the preset standard distance, the angular velocity is calculated, where the preset standard distance is the edge distance between the mobile robot and the target obstacle; Wherein, if the TOF sensor is located in front of and to the right of the mobile robot, the first segmentation result includes a right region and a right front region, and the step of calculating the distance parameter based on the first segmentation result includes: Obtain the minimum distance within the right and right front regions to obtain the distance parameter; The mobile robot is controlled to move forward according to the rotation angle and angular velocity, and then return to execute the following steps: the position information of the target obstacle is obtained through a time-of-flight (TOF) sensor with a preset number of pixels, so that the mobile robot can avoid the target obstacle.
2. The obstacle avoidance method for a mobile robot according to claim 1, characterized in that, The step of calculating the angular velocity based on the position information is followed by: If the TOF sensor is not located on the side of the mobile robot, then determine whether the TOF sensor can detect the target obstacle; If the TOF sensor fails to detect the target obstacle, the mobile robot is controlled to rotate to a first preset position by a first preset angle. If the TOF sensor detects the target obstacle, the mobile robot is controlled to move forward a preset distance in the direction the mobile robot is currently facing. When the distance traveled by the mobile robot exceeds the preset forward distance, the mobile robot is controlled to rotate to a second preset position by a second preset angle, travel the preset forward distance, and return to the execution step: obtain the position information of the target obstacle through a time-of-flight (TOF) sensor with a preset number of pixels, and repeat this process to enable the mobile robot to avoid the target obstacle.
3. The obstacle avoidance method for a mobile robot according to claim 1, characterized in that, The step of calculating the rotation angle based on the position information includes: A simulated lidar is constructed based on the location information, and the detection range of the simulated lidar is divided into blocks based on the number of TOF sensors to obtain a second block result; The rotation angle is calculated based on the location information, the second segmentation result, and the preset threshold.
4. The obstacle avoidance method for a mobile robot according to claim 1, characterized in that, The step of acquiring the location information of the target obstacle using a time-of-flight (TOF) sensor with a preset number of pixels is followed by: When the distance between the mobile robot and the target obstacle is less than a second preset threshold, the walking speed is calculated based on the distance between the mobile robot and the target obstacle, and the mobile robot is controlled to move forward according to the walking speed, wherein the second preset threshold is greater than the first preset threshold.
5. The obstacle avoidance method for a mobile robot according to claim 4, characterized in that, The step of calculating the walking speed based on the distance between the mobile robot and the target obstacle when the distance between the mobile robot and the target obstacle is less than a second preset threshold includes: When the distance between the mobile robot and the target obstacle is less than a second preset threshold, the deceleration ratio is calculated based on the distance between the mobile robot and the target obstacle and the current walking speed of the mobile robot; The walking speed is calculated based on the deceleration ratio and the distance between the mobile robot and the target obstacle.
6. The obstacle avoidance method for a mobile robot according to claim 1, characterized in that, The step of acquiring the location information of the target obstacle using a time-of-flight (TOF) sensor with a preset number of pixels is followed by: Create an obstacle memory map; The obstacle memory map is filled in based on the location information to obtain a filled map; A simulated lidar is constructed based on the location information.
7. An obstacle avoidance system for a mobile robot, characterized in that, include: The location information acquisition module is used to acquire the location information of the target obstacle through a time-of-flight (TOF) sensor with a preset number of pixels; The motion parameter calculation module is used to calculate the rotation angle and angular velocity based on the position information when the distance between the mobile robot and the target obstacle is less than a first preset threshold. The motion parameter calculation module is also used for: A simulated lidar is constructed based on the location information, and the detection range of the simulated lidar is divided into blocks based on the number of TOF sensors to obtain the first block result; Calculate the distance parameter based on the first block result; Based on the distance parameters and the preset standard distance, the angular velocity is calculated, where the preset standard distance is the edge distance between the mobile robot and the target obstacle; Wherein, if the TOF sensor is located in front of and to the right of the mobile robot, the first segmentation result includes a right region and a right front region, and the step of calculating the distance parameter based on the first segmentation result includes: Obtain the minimum distance within the right and right front regions to obtain the distance parameter; The motion parameter calculation module is also used for: Centered on the radar of the mobile robot, the point with the shortest Euclidean distance to the target obstacle is calculated according to a preset resolution, and the distance information of the radar to the shortest point is converted into the data structure of the simulated lidar. The motion control module is used to control the mobile robot to move forward according to the rotation angle and angular velocity.
8. A terminal device, characterized in that, The terminal device includes a memory, a processor, and an obstacle avoidance method for a mobile robot stored in the memory and executable on the processor. When the obstacle avoidance program of the mobile robot is executed by the processor, it implements the steps of the obstacle avoidance method for a mobile robot as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program for obstacle avoidance of a mobile robot, which, when executed by a processor, implements the steps of the obstacle avoidance method for a mobile robot as described in any one of claims 1-6.
Citation Information
Patent Citations
Method for avoiding obstacles and electronic equipment
CN106595631A
Automatic-moving robot and control method thereof
CN109719736A
Mobile robot control method and mobile robot
CN111203873A
Obstacle avoidance method of mobile equipment and mobile equipment
CN111513626A
Robot control method and system based on TOF camera module and robot
CN111624997A