Disclosure of Invention
The invention aims to provide an obstacle avoidance method and electronic equipment, which enable obstacle avoidance processing to be more flexible and flexible through different obstacle avoidance modes, ensure that a heavy-load robot can avoid obstacles, improve the safety of the robot, reduce the times of emergency stop, and further reduce the abrasion to wheels of the heavy-load robot and the damage to a motor of the heavy-load robot caused by the emergency stop.
In order to solve the technical problem, an embodiment of the present invention provides an obstacle avoidance method, including the following steps: determining the type of the entered obstacle avoidance area according to the distance between the obstacle avoidance area and the obstacle; determining the motion mode of the robot according to the current motion speed of the robot; determining an obstacle avoidance mode of the robot according to the motion mode of the robot and the type of the obstacle avoidance area; and avoiding the obstacle according to the determined obstacle avoiding mode.
An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the obstacle avoidance method.
Compared with the prior art, the method and the device have the advantages that different obstacle avoidance modes can be adopted in different obstacle avoidance areas by the robot according to the types of the obstacle avoidance areas and the motion mode of the robot, the obstacle avoidance is carried out by using the different obstacle avoidance modes, the obstacle avoidance processing is more flexible, the heavy-load robot can avoid obstacles, the safety of the robot is improved, the emergency stop times are reduced, and the abrasion to wheels of the heavy-load robot and the damage to a motor of the heavy-load robot caused by the emergency stop are reduced.
In addition, the types of the obstacle avoidance areas include: a deceleration zone, an emergency deceleration zone and an emergency braking zone; determining the type of the entered obstacle avoidance area according to the distance between the obstacle avoidance area and the obstacle, wherein the method comprises the following steps: if the distance between the obstacle avoidance area and the obstacle is larger than a second preset threshold value and smaller than a first preset threshold value, determining that the type of the entered obstacle avoidance area is a deceleration area; if the distance is larger than a third preset threshold value and smaller than a second preset threshold value, determining that the type of the entered obstacle avoidance area is an emergency deceleration area; if the distance is smaller than a third preset threshold value, determining that the type of the entered obstacle avoidance area is an emergency braking area; the first preset threshold is larger than the second preset threshold, and the second preset threshold is larger than the third preset threshold.
In the mode, according to the distance between the robot and the obstacle, the robot is compared with preset threshold values of all areas corresponding to the types of the obstacle avoidance areas, according to the comparison result, which obstacle avoidance areas the robot enters is specifically determined, different obstacle avoidance modes are used in different obstacle avoidance areas to avoid the obstacles, the robot is enabled to flexibly avoid the obstacles, the robot can stably decelerate to avoid the obstacles, or the robot is braked to avoid the obstacles after the robot steadily decelerates, and the heavy-load robot is prevented from being abraded to wheels of the heavy-load robot due to large inertia when the robot is parked emergently.
In addition, the movement speed includes: linear velocity, and/or, angular velocity; determining the motion mode of the robot according to the current motion speed of the robot, wherein the motion mode comprises the following steps: if the current linear velocity of the robot is determined to be greater than the fourth preset threshold value and the current angular velocity of the robot is determined to be less than the fifth preset threshold value, determining that the motion mode of the robot is linear motion according to the linear velocity; otherwise, determining the motion mode of the robot to be curvilinear motion according to the linear velocity and the angular velocity.
In addition, the determining that the robot moves in a curvilinear manner according to the linear velocity and the angular velocity includes: if the linear velocity is not larger than the fourth preset threshold value, determining that the motion mode of the robot is the displacement-free curvilinear motion according to the angular velocity and the linear velocity; and if the linear velocity is determined to be greater than the fourth preset threshold value and the angular velocity is determined to be not less than the fifth preset threshold value, determining that the motion mode of the robot is the curvilinear motion with displacement according to the linear velocity and the angular velocity.
In addition, the method for determining the obstacle avoidance mode of the robot according to the motion mode of the robot and the type of the obstacle avoidance area comprises the following steps: if the motion mode of the robot is determined to be linear motion, keeping the angular velocity unchanged, adjusting the linear velocity of the robot according to the type and the linear velocity of the obstacle avoidance area, and avoiding obstacles by using the adjusted linear velocity; if the motion mode of the robot is determined to be the displacement-free curvilinear motion, keeping the linear velocity unchanged, adjusting the angular velocity of the robot according to the type and the angular velocity of the obstacle avoidance area, and avoiding the obstacle by using the adjusted angular velocity; and if the motion mode of the robot is determined to be the curve motion with displacement, adjusting the linear velocity and the angular velocity of the robot according to the type, the linear velocity and the angular velocity of the obstacle avoidance area, and avoiding the obstacle by using the adjusted linear velocity and the adjusted angular velocity.
In the mode, different obstacle avoidance modes are obtained through different motion modes, types and motion speeds of obstacle avoidance areas of the robot, and the robot can avoid obstacles stably at the adjusted motion speed by adopting the different obstacle avoidance modes, so that the phenomenon that the inertia of the heavy-load robot is large, and the abrasion to wheels of the robot is caused during the emergency deceleration is avoided.
In addition, according to the type and the linear velocity of obstacle avoidance area, the linear velocity of the robot is adjusted, including: if the type of the entered obstacle avoidance area is determined to be a deceleration area, adjusting the linear speed of the robot according to a first obstacle avoidance coefficient and the linear speed corresponding to the deceleration area; if the type of the entered obstacle avoidance area is determined to be an emergency deceleration area, adjusting the linear speed of the robot according to a second obstacle avoidance coefficient and the linear speed corresponding to the emergency deceleration area, wherein the second obstacle avoidance coefficient is larger than the first obstacle avoidance coefficient, and is in direct proportion to the motion acceleration of the robot; and if the type of the entered obstacle avoidance area is determined to be an emergency braking area, emergency braking is carried out, and the linear speed is reduced to zero.
In the mode, the adjusted linear velocity is obtained through the linear velocity of the robot and the type of the obstacle avoidance area which is determined to enter, the obstacle is avoided in time by using the adjusted linear velocity, and the robot is ensured to be capable of reducing the linear velocity stably so as to avoid the obstacle.
In addition, according to the type and the angular speed of the obstacle avoidance area, the method for adjusting the angular speed of the robot comprises the following steps: if the type of the entered obstacle avoidance area is determined to be a deceleration area, adjusting the angular speed of the robot according to the first obstacle avoidance coefficient and the angular speed; if the type of the entered obstacle avoidance area is determined to be an emergency deceleration area, adjusting the angular speed of the robot according to a second obstacle avoidance coefficient and the angular speed, wherein the second obstacle avoidance coefficient is larger than the first obstacle avoidance coefficient and is in direct proportion to the motion acceleration of the robot; and if the type of the entered obstacle avoidance area is determined to be an emergency braking area, emergency braking is carried out, and the angular speed is reduced to zero.
In the mode, the adjusted angular speed is obtained through the angular speed of the robot and the type of the obstacle avoidance area which is determined to enter, the robot is guaranteed to be capable of avoiding obstacles stably at the adjusted angular speed, and the phenomenon that the wheels of the robot are abraded due to the fact that the inertia of the heavy-load robot is large and the robot is subjected to emergency deceleration is avoided.
In addition, according to the type, linear velocity and angular velocity of the obstacle avoidance area, the linear velocity and angular velocity of the robot are adjusted, and the method comprises the following steps: if the type of the entered obstacle avoidance area is determined to be a deceleration area, adjusting the angular speed and the linear speed of the robot according to the first obstacle avoidance coefficient, the angular speed and the linear speed; if the type of the entered obstacle avoidance area is determined to be an emergency deceleration area, adjusting the angular speed and the linear speed of the robot according to a second obstacle avoidance coefficient, the angular speed and the linear speed, wherein the second obstacle avoidance coefficient is larger than the first obstacle avoidance coefficient, and is in direct proportion to the motion acceleration of the robot; and if the type of the entered obstacle avoidance area is determined to be an emergency braking area, emergency braking is carried out, and the angular speed and the linear speed of the robot are reduced to zero.
In addition, a first obstacle avoidance coefficient corresponding to the deceleration area is determined according to the distance and a first preset threshold value, and a second obstacle avoidance coefficient corresponding to the emergency deceleration area is determined according to the motion acceleration of the robot, or the distance and a second preset threshold value.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
A first embodiment of the present invention relates to an obstacle avoidance method. The robot is used for enabling obstacle avoidance processing to be more flexible, and guaranteeing that the robot can avoid obstacles, so that the safety of the robot is improved, the number of times of emergency stop is reduced, and abrasion to wheels of the heavy-duty robot and damage to a motor of the heavy-duty robot due to the fact that the robot is in emergency stop are reduced.
The following describes details of the implementation of the obstacle avoidance method in the present embodiment in detail, and the following is only for facilitating understanding of the details of the implementation of the present invention, and is not essential to the implementation of the present invention.
Fig. 1 is a flowchart illustrating an obstacle avoidance method according to the present embodiment, which can be applied to a robot. The method may include the following steps.
In step 101, the type of the obstacle avoidance area is determined according to the distance from the obstacle.
The types of the obstacle avoidance areas comprise: a deceleration zone, an emergency deceleration zone and an emergency braking zone.
Specifically, if the distance between the obstacle avoidance area and the obstacle is larger than a second preset threshold value and smaller than a first preset threshold value, determining that the type of the entered obstacle avoidance area is a deceleration area; if the distance is larger than a third preset threshold value and smaller than a second preset threshold value, determining that the type of the entered obstacle avoidance area is an emergency deceleration area; if the distance is smaller than a third preset threshold value, determining that the type of the entered obstacle avoidance area is an emergency braking area; the first preset threshold is larger than the second preset threshold, and the second preset threshold is larger than the third preset threshold.
It should be noted that the deceleration zone, the emergency deceleration zone and the emergency braking zone are a geometric division of the planar area in front of the robot: the area farthest away from the robot is a deceleration area, the next is an emergency deceleration area, and the area closest to the robot is an emergency braking area. In the process of avoiding the obstacle of the robot, the distance threshold value between the robot and the obstacle, which is detected by the sensor, is divided into a first preset threshold value, a second preset threshold value and a third preset threshold value, wherein the third preset threshold value is the shortest tolerable distance in the driving direction of the robot when the obstacle suddenly appears.
In step 102, the motion mode of the robot is determined according to the current motion speed of the robot.
Wherein, the motion speed includes: linear velocity, and/or angular velocity.
Specifically, if the current linear velocity of the robot is determined to be greater than a fourth preset threshold value and the current angular velocity of the robot is determined to be less than a fifth preset threshold value, the motion mode of the robot is determined to be linear motion according to the linear velocity; otherwise, determining the motion mode of the robot to be curvilinear motion according to the linear velocity and the angular velocity.
It should be noted that the movement speed includes a linear speed and an angular speed, or includes only a linear speed, or includes only an angular speed. For example, the robot has a movement velocity [ V ] at time kk,Wk]In which V iskRepresents the linear velocity of the robot at time k, WkIndicating the angular velocity of the robot at the time k, and determining the linear velocity V of the robotkGreater than a fourth preset threshold value VtAnd the angular velocity W of the robotkIs less than a fifth preset threshold value WtWherein, the fifth preset threshold value WtA number greater than zero, the robot is determined to move in a manner according to the linear velocity VkPerforming a linear motion, or, according to the linear velocity VkAnd angular velocity WkMake an approximately linear motion due to the angular velocity WkVery small but not zero, mainly by adjusting the linear velocity VkTo avoid obstacles; otherwise, determining the motion mode of the robot to be according to the linear velocity VkAnd angular velocity WkA curvilinear motion is performed.
The curvilinear motion is divided into curvilinear motion with displacement and curvilinear motion without displacement, and the specific distinguishing mode is as follows: if the linear velocity is not larger than the fourth preset threshold value, determining that the motion mode of the robot is the displacement-free curvilinear motion according to the angular velocity; and if the linear velocity is determined to be greater than the fourth preset threshold value and the angular velocity is determined to be not less than the fifth preset threshold value, determining that the motion mode of the robot is the curvilinear motion with displacement according to the linear velocity and the angular velocity.
For example: when the robot moves at the moment k, when the fifth preset threshold value W is usedtIf the linear velocity V of the robot is determined when the linear velocity V is a number larger than zerokIs not more than a fourth preset threshold value VtAnd, an angular velocity WkIs greater than a fifth preset threshold value WtThen determining the movement mode of the robot as the angular velocity WkPerforming a non-displacement curvilinear motion, wherein the non-displacement curvilinear motion may be that the robot performs a curvature comparisonThe large curve motion can also be the rotation motion of the robot in the original place. When the fifth preset threshold value WtWhen the linear velocity is an integer less than zero, if the linear velocity V of the robot is determinedkIs not more than a fourth preset threshold value VtAnd, an angular velocity WtIs less than a fifth preset threshold value WtThen determining the movement mode of the robot as the angular velocity WkThe robot performs the curvilinear motion without displacement, wherein the curvilinear motion without displacement can be the curvilinear motion with larger curvature of the robot or the rotational motion of the robot in situ. If the linear velocity V is determinedkGreater than a fourth preset threshold value VtAnd, an angular velocity WkNot less than a fifth preset threshold value WtWherein, the fifth preset threshold value WtIf the number is an integer not equal to zero, the motion mode of the robot is determined to be according to the linear velocity VkAnd angular velocity WkThe robot performs a curvilinear motion with displacement, wherein the curvilinear motion with displacement refers to the curvilinear motion with small curvature performed by the robot.
In step 103, an obstacle avoidance mode of the robot is determined according to the motion mode of the robot and the type of the obstacle avoidance area.
In one particular implementation, the motion profile of the robot includes: linear motion, curvilinear motion without displacement and curvilinear motion with displacement; the types of the entered obstacle avoidance areas include a deceleration area, an emergency deceleration area and an emergency braking area, and the adjusted movement speed of the robot is specifically determined according to a movement mode and the types of the entered obstacle avoidance areas, so that the obstacle avoidance mode of the robot is specifically determined. For example: when the robot moves at the moment k, the robot moves according to the moving speed [ V ] of the robotk,Wk]The adjusted movement speed for the robot to safely travel can be obtained: [ V ]safety_k,Wsafety_k]. If the motion mode of the robot is determined to be linear motion, the angular velocity is kept unchanged, namely Wsafety_k=WkUsing the adjusted linear velocity Vsafety_kAnd (6) avoiding obstacles. If the motion mode of the robot is determined to be the curvilinear motion without displacement, the linear velocity is kept unchanged, namely Vsafety_k=VkUse ofAdjusted angular velocity Wsafety_kAnd (6) avoiding obstacles. If the motion mode of the robot is determined to be curvilinear motion with displacement, the adjusted linear velocity V is usedsafety_kAnd the adjusted angular velocity Wsafety_kAnd (6) avoiding obstacles.
In step 104, obstacle avoidance is performed according to the determined obstacle avoidance mode.
It should be noted that, on the body of the robot, the ultrasonic sensors are installed in eight directions, which are three layers, and 24 ultrasonic sensors in total, in the running process of the robot, the robot can detect an obstacle according to each layer of ultrasonic sensors, each ultrasonic sensor needs to calculate the distance between the robot and the obstacle in the lower computer processor, and reports data to the upper computer processor through a serial port, the upper computer processor compresses the data processed by the ultrasonic sensors in the three layers into one layer, and the distances between the robot and the obstacle in the eight directions are obtained by combining the data in the eight directions, wherein the data in each direction represents the smallest value in the data obtained by the ultrasonic sensors in the direction. Moreover, a laser radar sensor is arranged in the middle of the front of the robot, and the installation height of the laser radar sensor is reasonably selected according to the working environment of the robot; the laser radar sensor continuously traverses a plurality of laser beams, obtains included angles among the laser beams, and calculates and obtains distances and directions between the laser radar sensor and the obstacles. The control system of the robot obtains a minimum adjusted movement speed according to the data obtained by the measurement of the ultrasonic sensor and the laser sensor, and sends the adjusted movement speed to the lower computer processor for controlling the robot to avoid the obstacle, for example, at the time k, the adjusted movement speed is [ V ]safety_k,Wsafety_k]。
In this embodiment, through the type of keeping away the barrier region and the motion mode of robot, confirm that the robot can adopt the difference to keep away the barrier mode in the barrier region is kept away to the difference, use the difference to keep away the barrier mode and keep away the barrier, it is more nimble to make and keep away the barrier processing, guarantee that the robot can steadily slow down the parking when meetting the barrier, or, steadily slow current to lower safe speed, make the barrier of avoiding that the heavy-duty robot can the flexibility, reduce the number of times of emergency stop, and then reduce and cause the wearing and tearing to the wheel of heavy-duty robot and the harm to the motor of heavy-duty robot because of emergency stop.
A second embodiment of the present invention relates to an obstacle avoidance method. The second embodiment is substantially the same as the first embodiment, and mainly differs therefrom in that: and determining the obstacle avoidance mode of the robot according to different motion modes of the robot and different obstacle avoidance coefficients corresponding to the types of the entered obstacle avoidance areas.
Fig. 2 shows a flowchart of an obstacle avoidance method in this embodiment, and the method may include the following steps.
In step 201, if it is determined that the robot moves linearly, the angular velocity is kept unchanged, the linear velocity of the robot is adjusted according to the type and the linear velocity of the obstacle avoidance area, and the adjusted linear velocity is used for obstacle avoidance.
If the type of the entered obstacle avoidance area is determined to be a deceleration area, adjusting the linear speed of the robot according to a first obstacle avoidance coefficient and the linear speed corresponding to the deceleration area; if the type of the entered obstacle avoidance area is determined to be an emergency deceleration area, adjusting the linear speed of the robot according to a second obstacle avoidance coefficient and the linear speed corresponding to the emergency deceleration area, wherein the second obstacle avoidance coefficient is larger than the first obstacle avoidance coefficient, and is in direct proportion to the motion acceleration of the robot; and if the type of the entered obstacle avoidance area is determined to be an emergency braking area, emergency braking is carried out, and the linear speed is reduced to zero.
It should be noted that the first obstacle avoidance coefficient corresponding to the deceleration zone is determined according to the distance and a first preset threshold, and the second obstacle avoidance coefficient corresponding to the emergency deceleration zone is determined according to the motion acceleration of the robot, or the distance and a second preset threshold.
In one specific implementation, the first obstacle avoidance coefficient M1=(dis_obs/dis_th_1)2Second avoidance coefficient M2=(dis_obs/dis_th_2)3Where dis _ obs is the distance between the robot and the obstacle in the direction of travel, dis _th _1 is a first preset threshold, and dis _ th _2 is a second preset threshold.
In one implementation, the robot has a motion velocity at time k of [ V ]k,Wk]When the robot performs linear motion, the angular velocity W is reduced to stopkThe size remaining unchanged, i.e. Wsafety_k=Wk. If the type of the entered obstacle avoidance area is determined to be a deceleration area, the robot uses the adjusted linear velocity Vsafety_k=M1*VkCarrying out deceleration driving so as to avoid obstacles; if the type of the entered obstacle avoidance area is determined to be an emergency deceleration area, the robot uses the adjusted linear velocity Vsafety_k=M2*VkCarrying out emergency deceleration to avoid the barrier; if the type of the entered obstacle avoidance area is determined to be an emergency braking area, the robot uses the adjusted linear velocity Vsafety_kWhen the brake is 0, emergency braking is performed to avoid the obstacle.
In step 202, if it is determined that the robot moves in a non-displacement curve manner, the linear velocity is kept unchanged, the angular velocity of the robot is adjusted according to the type and the angular velocity of the obstacle avoidance area, and obstacle avoidance is performed using the adjusted angular velocity.
If the type of the entered obstacle avoidance area is determined to be a deceleration area, adjusting the angular speed of the robot according to the first obstacle avoidance coefficient and the angular speed; if the type of the entered obstacle avoidance area is determined to be an emergency deceleration area, adjusting the angular speed of the robot according to a second obstacle avoidance coefficient and the angular speed, wherein the second obstacle avoidance coefficient is larger than the first obstacle avoidance coefficient and is in direct proportion to the motion acceleration of the robot; and if the type of the entered obstacle avoidance area is determined to be an emergency braking area, emergency braking is carried out, and the angular speed is reduced to zero.
In one implementation, the robot has a motion velocity at time k of [ V ]k,Wk]When the robot does the curvilinear motion without displacement, the linear velocity V is in the process of decelerating to stopkThe size remaining constant, i.e. Vsafety_k=Vk. If the type of the entered obstacle avoidance area is determined to be a deceleration area, determining that the type of the entered obstacle avoidance area is the deceleration areaThe angular velocity of the robot after use adjustment is Wsafety_k=M1*WkCarrying out deceleration driving so as to avoid obstacles; if the type of the entered obstacle avoidance area is determined to be an emergency deceleration area, the robot uses the adjusted angular speed Wsafety_k=M2*WkCarrying out emergency deceleration to avoid the barrier; if the type of the entered obstacle avoidance area is determined to be an emergency braking area, the robot uses the adjusted angular speed Wsafety_kWhen the brake is 0, emergency braking is performed to avoid the obstacle.
In step 203, if it is determined that the robot moves in a curve with displacement, the linear velocity and the angular velocity of the robot are adjusted according to the type, the linear velocity and the angular velocity of the obstacle avoidance area, and the obstacle avoidance is performed using the adjusted linear velocity and the adjusted angular velocity.
If the type of the entered obstacle avoidance area is determined to be a deceleration area, adjusting the angular speed and the linear speed of the robot according to the first obstacle avoidance coefficient, the angular speed and the linear speed; if the type of the entered obstacle avoidance area is determined to be an emergency deceleration area, adjusting the angular speed and the linear speed of the robot according to a second obstacle avoidance coefficient, the angular speed and the linear speed, wherein the second obstacle avoidance coefficient is larger than the first obstacle avoidance coefficient, and is in direct proportion to the motion acceleration of the robot; and if the type of the entered obstacle avoidance area is determined to be an emergency braking area, emergency braking is carried out, and the angular speed and the linear speed of the robot are reduced to zero.
In one implementation, the robot has a motion velocity at time k of [ V ]k,Wk]When the robot performs a curvilinear motion with displacement, if the type of the entered obstacle avoidance area is determined to be a deceleration area, the robot uses the adjusted angular velocity Wsafety_k=M1*WkAnd the adjusted linear velocity Vsafety_k=M1*VkCarrying out deceleration driving so as to avoid obstacles; if the type of the entered obstacle avoidance area is determined to be an emergency deceleration area, the robot uses the adjusted angular speed Wsafety_k=M2*WkAnd the adjusted linear velocity Vsafety_k=M2*VkCarrying out emergency deceleration to avoid the barrier; if the type of the entered obstacle avoidance area is determined to be an emergency braking area, the robot uses the adjusted angular speed Wsafety_kLinear velocity V equal to 0safety_kAnd (5) performing emergency braking when the brake is 0, and further avoiding the obstacle.
In the embodiment, different obstacle avoidance modes are obtained through different motion modes, types and motion speeds of obstacle avoidance areas of the robot, and the robot can avoid obstacles stably at the adjusted motion speed by adopting the different obstacle avoidance modes, so that the selectivity of the obstacle avoidance modes of the robot is increased, and the abrasion to wheels of the robot caused by large inertia of the heavy-load robot during emergency deceleration is avoided.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
The third embodiment of the present invention relates to an obstacle avoidance device, and the specific implementation of the obstacle avoidance device can be referred to the related description of the first embodiment, and repeated descriptions are omitted. It should be noted that, the specific implementation of the apparatus in this embodiment may also refer to the related description of the second embodiment, but is not limited to the above two examples, and other unexplained examples are also within the protection scope of the apparatus.
As shown in fig. 3, the apparatus mainly includes: the obstacle avoidance method comprises a module 301 for determining obstacle avoidance area types, a module 302 for determining motion modes, a module 303 for determining obstacle avoidance modes and a module 304 for avoiding obstacles; the obstacle avoidance area type determining module 301 is configured to determine the type of an entering obstacle avoidance area according to a distance between the obstacle avoidance area and an obstacle; the motion mode determining module 302 is configured to determine a motion mode of the robot according to a current motion speed of the robot; the obstacle avoidance mode determining module 303 is configured to determine an obstacle avoidance mode of the robot according to the motion mode of the robot and the type of the obstacle avoidance area; the obstacle avoidance module 304 is configured to avoid an obstacle according to the determined obstacle avoidance manner.
It should be understood that this embodiment is an example of the apparatus corresponding to the first or second embodiment, and may be implemented in cooperation with the first or second embodiment. The related technical details mentioned in the first or second embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first or second embodiment.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present invention, elements that are not so closely related to solving the technical problems proposed by the present invention are not introduced in the present embodiment, but this does not indicate that other elements are not present in the present embodiment.
A fourth embodiment of the present application provides an electronic device, and a specific structure of the electronic device is shown in fig. 4. Comprises at least one processor 401; and a memory 402 communicatively coupled to the at least one processor 401. The memory 402 stores instructions executable by the at least one processor 401, and the instructions are executed by the at least one processor 401, so that the at least one processor 401 can execute the obstacle avoidance method described in the first embodiment.
In this embodiment, the processor 401 is exemplified by a Central Processing Unit (CPU), and the Memory 402 is exemplified by a Random Access Memory (RAM). The processor 401 and the memory 402 may be connected by a bus or other means, and fig. 4 illustrates the connection by a bus as an example. The memory 402 is a non-volatile computer-readable storage medium, and can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the programs for implementing the obstacle avoidance method in the embodiment of the present application, in the memory 402. The processor 401 executes various functional applications and data processing of the device by running the nonvolatile software programs, instructions and modules stored in the memory 402, so as to implement the above-mentioned obstacle avoidance method.
The memory 402 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store a list of options, etc. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some embodiments, memory 402 may optionally include memory located remotely from processor 401, which may be connected to an external device via a network.
One or more program modules are stored in the memory 402 and, when executed by the one or more processors 401, perform the obstacle avoidance method of any of the method embodiments described above.
The product can execute the method provided by the embodiment of the application, has corresponding functional modules and beneficial effects of the execution method, and can refer to the method provided by the embodiment of the application without detailed technical details in the embodiment.
A fifth embodiment of the present application relates to a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the computer program can implement the obstacle avoidance method in any method embodiment of the present application.
Those skilled in the art will understand that all or part of the steps in the method according to the above embodiments may be implemented by a program instructing related hardware to complete, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps in the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.