disclosure of Invention
in view of this, embodiments of the present invention provide a method and an apparatus for robot obstacle avoidance, which reduce signal interference existing between different sensors by controlling the working time of each obstacle avoidance sensor, and improve the accuracy of robot obstacle identification.
the embodiment of the invention provides a robot obstacle avoidance method, which comprises the following steps:
Acquiring the position relation of N obstacle avoidance sensors configured on a robot body, wherein N is more than 1;
Grouping the N obstacle avoidance sensors according to the position relation;
respectively controlling the obstacle avoidance sensors in each group to work in different working periods;
And identifying the obstacles according to the received detection data sent by the N obstacle avoidance sensors in the corresponding working time period.
Optionally, the method further comprises: if the operation resource occupancy rate caused by processing other tasks is greater than a preset threshold value, adjusting the working time interval of at least one obstacle avoidance sensor of the N obstacle avoidance sensors within a preset time length, or adjusting the detection data quantity required to be acquired by at least one obstacle avoidance sensor of the N obstacle avoidance sensors within each working time interval.
Optionally, the adjusting, within a preset time period, a working period interval of at least one of the N obstacle avoidance sensors, or adjusting a detection data amount that needs to be acquired by at least one of the N obstacle avoidance sensors in each working period includes:
Determining the upper limit of the actual detection data amount allowed to be received from the N obstacle avoidance sensors within the preset duration according to the degree that the occupancy rate of the operation resources is greater than the preset threshold;
Determining the detection data volume to be reduced according to the theoretical maximum detection data volume and the actual detection data volume upper limit which are allowed to be received from the N obstacle avoidance sensors within the preset time;
And according to the detection data volume to be reduced, prolonging the working time interval of at least one obstacle avoidance sensor in the N obstacle avoidance sensors, or reducing the detection data volume which needs to be acquired by at least one obstacle avoidance sensor in the N obstacle avoidance sensors in each working time interval.
Optionally, the method further comprises:
And selecting the at least one obstacle avoidance sensor from the N obstacle avoidance sensors according to the preset priority of the N obstacle avoidance sensors and the sequence of the priority from low to high, wherein the preset priority is related to the distribution condition of the obstacles.
optionally, the adjusting, within a preset time period, a working period interval of at least one of the N obstacle avoidance sensors, or adjusting a detection data amount that needs to be acquired by at least one of the N obstacle avoidance sensors in each working period includes:
And determining the working period interval of the at least one obstacle avoidance sensor or determining the detection data quantity required to be acquired by the at least one obstacle avoidance sensor in each working period according to the priority of the at least one obstacle avoidance sensor.
The embodiment of the invention provides a robot obstacle avoidance device, which comprises:
The acquisition module is used for acquiring the position relation of N obstacle avoidance sensors configured on the robot body, wherein N is more than 1;
The grouping module is used for grouping the N obstacle avoidance sensors according to the position relation;
The control module is used for respectively controlling the obstacle avoidance sensors in each group to work in different working time periods;
and the identification module is used for identifying the obstacles according to the received detection data sent by the N obstacle avoidance sensors in the corresponding working time period.
Optionally, the apparatus further comprises:
And the adjusting module is used for adjusting the working period interval of at least one obstacle avoidance sensor in the N obstacle avoidance sensors within a preset time length or adjusting the detection data quantity which needs to be acquired by at least one obstacle avoidance sensor in the N obstacle avoidance sensors within each working period if the operation resource occupancy rate caused by processing other tasks is greater than a preset threshold value.
optionally, the adjusting module specifically includes:
A determining unit, configured to determine, according to a degree that the operation resource occupancy rate is greater than the preset threshold, an actual detection data amount upper limit that is allowed to be received from the N obstacle avoidance sensors within the preset duration, and determine, according to a theoretical maximum detection data amount that is allowed to be received from the N obstacle avoidance sensors within the preset duration and the actual detection data amount upper limit, a detection data amount to be reduced;
And the adjusting unit is used for prolonging the working time interval of at least one obstacle avoidance sensor in the N obstacle avoidance sensors according to the detection data volume to be reduced, or reducing the detection data volume which needs to be acquired by at least one obstacle avoidance sensor in the N obstacle avoidance sensors in each working time interval.
Optionally, the apparatus further comprises:
and the selection module is used for selecting the at least one obstacle avoidance sensor from the N obstacle avoidance sensors according to the preset priority of the N obstacle avoidance sensors and the sequence of the priority from low to high, wherein the preset priority is related to the distribution condition of the obstacles.
Optionally, the adjusting module is further configured to: and determining the working period interval of the at least one obstacle avoidance sensor or determining the detection data quantity required to be acquired by the at least one obstacle avoidance sensor in each working period according to the priority of the at least one obstacle avoidance sensor.
According to the robot obstacle avoidance method and device provided by the embodiment of the invention, the processor groups N obstacle avoidance sensors configured on the robot body according to the position relation, and enables the obstacle avoidance sensors belonging to different groups to work in different working time, so that the time-sharing work of the N obstacle avoidance sensors is realized. The N obstacle avoidance sensors can avoid mutual interference among signals sent by different sensors in a time-sharing working mode, so that the processor can receive detection data which are not interfered and collected by the obstacle avoidance sensors working at different working times, and the processor can realize accurate identification of obstacles by analyzing the detection data.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
the terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
it should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe XXX in embodiments of the present invention, these XXX should not be limited to these terms. These terms are only used to distinguish XXX from each other. For example, a first XXX may also be referred to as a second XXX, and similarly, a second XXX may also be referred to as a first XXX, without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
Fig. 1 is a flowchart of a first embodiment of a robot obstacle avoidance method according to the present invention, and an execution main body of the robot obstacle avoidance method according to the present embodiment may be a processor, such as an industrial control processor, disposed in a robot. As shown in fig. 1, the method comprises the steps of:
s101, acquiring the position relation of N obstacle avoidance sensors configured on the robot body, wherein N is larger than 1.
In order to detect an obstacle in a scene, which is nearly a full angle, of a robot, a plurality of obstacle avoidance sensors are generally arranged on a robot body. Optionally, the obstacle avoidance sensor in the embodiment of the present invention may be a depth sensor, an infrared sensor, a laser sensor, an ultrasonic sensor, or the like.
In an optional obstacle avoidance sensor arrangement scheme, the problem of mutual interference among a plurality of sensors can be avoided as much as possible by accurately setting the installation angle and position of each obstacle avoidance sensor based on the coverage range of detection signals transmitted by each obstacle avoidance sensor. In this case, a higher requirement is placed on the mounting accuracy of each obstacle avoidance sensor.
In another optional obstacle avoidance sensor arrangement scheme, a completely interference-free target between each obstacle avoidance sensor does not need to be pursued, at the moment, the requirement on the installation accuracy of each obstacle avoidance sensor is greatly reduced, and the method provided by the embodiment of the invention can be adopted to avoid the problem of mutual interference among a plurality of obstacle avoidance sensors.
the above-mentioned positional relationship refers to the mutual positional relationship of the obstacle avoidance sensors on the robot body, and can be obtained by the following optional methods:
When the plurality of obstacle avoidance sensors are arranged on the robot body, a worker can input approximate installation positions of the plurality of obstacle avoidance sensors on the robot body in an operation interface displayed on the robot, for example, a three-dimensional image of the robot is displayed in the operation interface, the worker can edit the image, position the installation positions of the obstacle avoidance sensors on the image, and input the identification of the obstacle avoidance sensors. Therefore, the processor can obtain the position relation of a plurality of obstacle avoidance sensors based on the analysis of the image, for example, the obstacle avoidance sensors are sequentially installed from top to bottom in the vertical direction.
And S102, grouping the N obstacle avoidance sensors according to the position relation.
Taking N obstacle avoidance sensors arranged on a robot body in the vertical direction as an example, the N obstacle avoidance sensors can be grouped according to their position relationship, and the obstacle avoidance sensors with overlapped detection ranges are grouped into different groups. When grouping is carried out, a grouping capacity can be preset, so that on one hand, the interference among the obstacle avoidance sensors can be further reduced, and on the other hand, the data volume of obstacle avoidance detection data processed by the processor at the same time can also be reduced. Grouping the N obstacle avoidance sensors can ensure that the processor cannot simultaneously receive detection data sent by the plurality of obstacle avoidance sensors with overlapped detection ranges. For example, A, B, C, D, E, 5 obstacle avoidance sensors are respectively provided in the vertical direction of the robot body, it is generally considered that there is coincidence of detection ranges between two adjacent obstacle avoidance sensors, and the grouping capacity is assumed to be 3, and therefore, the obstacle avoidance sensors A, C, E may be grouped into one group, and the obstacle avoidance sensors B, D may be grouped into another group.
it should be noted that the same grouping method is also applicable to N obstacle avoidance sensors arranged in the horizontal direction.
And S103, respectively controlling the obstacle avoidance sensors in each group to work in different working periods.
based on the grouping of the N obstacle avoidance sensors, the processor controls the obstacle avoidance sensors in different groups to work in different working periods by taking the groups as units, and the time-sharing work of the N obstacle avoidance sensors is realized. Still by way of example, the processor may control the obstacle avoidance sensors A, C, E in one group to operate during the time period t1-t2 and the obstacle avoidance sensors B, D in another group to operate during the time period t3-t 4.
it should be noted that, when the processor controls the obstacle avoidance sensors in each group to operate in different operation periods, for any group, the processor may control the operation periods of the obstacle avoidance sensors in the group through the corresponding initial operation period and the time interval between adjacent operation periods, which are input to each obstacle avoidance sensor in the group.
And S104, identifying the obstacle according to the received detection data sent by the N obstacle avoidance sensors in the corresponding working time period.
Each obstacle avoidance sensor can acquire detection data in the working time period of the obstacle avoidance sensor, the processor receives the detection data sent by each obstacle avoidance sensor in the corresponding working time period, and the obstacle is identified by analyzing the detection data. In practice, different detection data analysis means can be adopted according to different types of the obstacle avoidance sensors.
optionally, when the obstacle avoidance sensor is a laser sensor, the detection data may be a pulse laser signal emitted by a pulse laser and a laser signal returned after the pulse laser signal irradiates the obstacle, and the obstacle is identified by calculating a time interval between two paths of laser signals.
Optionally, when the obstacle avoidance sensor is an ultrasonic sensor, the detection data may be a transmitted ultrasonic signal and a returned ultrasonic signal after encountering an obstacle, and the position of the obstacle is calculated according to a time difference between reception of the two ultrasonic signals and a sound velocity, so as to identify the obstacle.
In this embodiment, the processor groups the N obstacle avoidance sensors configured on the robot body according to the position relationship, and causes each obstacle avoidance sensor belonging to a different group to operate in a different operating time, thereby implementing time-sharing operation of the N obstacle avoidance sensors. The N obstacle avoidance sensors can avoid mutual interference among signals sent by different sensors in a time-sharing working mode, so that the processor can receive detection data which are not interfered and collected by the obstacle avoidance sensors working at different working times, and the processor can realize accurate identification of obstacles by analyzing the detection data.
fig. 2 is a flowchart of a second embodiment of the obstacle avoidance method for a robot according to the embodiment of the present invention, where the robot needs to perform various other tasks in addition to determining the obstacle distribution of a road during traveling when the robot is in operation. Therefore, the processor needs to process the detection data corresponding to the obstacle avoidance task and also needs to process other data corresponding to other tasks, which is very easy to cause the situation that the utilization rate of the computing resources of the processor by other tasks is too high due to the fact that the processor processes other tasks. For this case, as shown in fig. 2, optionally, on the basis of the embodiment shown in fig. 1, after step S103, the method may further include the following steps:
S201, if the occupancy rate of the operation resources caused by processing other tasks is larger than a preset threshold value, the working time interval of at least one obstacle avoidance sensor in the N obstacle avoidance sensors is adjusted within a preset time length.
the processor needs to occupy the computing resource when processing any type of task, if the occupancy rates of other tasks except the obstacle avoidance task to the computing resource are larger than the preset threshold value, the processing load of other tasks is heavier, and at this time, in order to ensure the normal processing of other tasks, the occupancy rates of the obstacle avoidance task to the computing resource need to be reduced.
it should be noted that, in this embodiment, when the occupancy rate of the obstacle avoidance task on the operation resource of the processor needs to be reduced, it is not achieved by stopping the operation of part or all of the N obstacle avoidance sensors, because this will have a serious influence on the obstacle avoidance effect. In this embodiment, reducing the occupancy rate of the obstacle avoidance task on the operation resources of the processor is achieved by reducing the amount of detection data that the processor can receive from the N obstacle avoidance sensors within a certain preset time.
Alternatively, the reduction of the amount of the detection data received within the preset time period may be achieved by extending the working period interval of the at least one obstacle avoidance sensor within the preset time period.
The preset time length is set to be equivalent to the effective time length of each adjustment, so that the obstacle avoidance sensor is prevented from being executed at the adjusted working time interval all the time when the processing load of other tasks is light. It is understood that when the preset time is reached, the detection of the operation resource occupancy rate of the processor by other tasks may be triggered, and if the preset time is still greater than the threshold value, the adjustment of the working period interval of the at least one obstacle avoidance sensor may be continued for a preset time, and so on. The preset duration is generally set to be M times of the working period, M is greater than 1, and generally, the value of M can enable the N obstacle avoidance sensors to be covered by the preset duration at least for the length of one working period. The working period refers to an unadjusted working period, and in general practical applications, the working period length of each obstacle avoidance sensor is equal in an initial condition.
Optionally, adjusting the working period interval of at least one obstacle avoidance sensor of the N obstacle avoidance sensors within the preset time period may be implemented in the following manner.
firstly, the processor determines the upper limit of the actual detection data amount allowed to be received from the N obstacle avoidance sensors within the preset duration according to the degree that the occupancy rate of the operation resources of other tasks is greater than the preset threshold. And determining the detection data volume to be reduced in the preset time according to the theoretical maximum detection data volume allowed to be received from the N obstacle avoidance sensors in the preset time and the actual detection data volume upper limit.
the degree that the occupancy rates of the computing resources of the other tasks are greater than the preset threshold value can be determined according to the difference value between the occupancy rates of the computing resources and the preset threshold value.
specifically, the maximum detection data volume that each obstacle avoidance sensor can collect in the corresponding working period can be determined according to the rated collection rate of each obstacle avoidance sensor, and further, based on the multiple relation between the preset time and one working period and the number of the N obstacle avoidance sensors, the theoretical maximum detection data volume that the N obstacle avoidance sensors can collect in the preset time can be determined, the theoretical maximum detection data volume corresponds to the preset threshold, that is, when the operation resource occupancy rate of other tasks is not greater than the preset threshold, the N obstacle avoidance sensors are considered to collect the detection data at the rated collection rate. In addition, the corresponding relation between the difference interval between the computing resource occupancy rate of other tasks and the preset threshold value and the decreasing proportion of the detection data quantity of the N obstacle avoidance sensors can be preset. Based on the above, according to the difference interval where the difference between the current operation resource occupancy rates of other tasks and the preset threshold is located, the corresponding decreasing proportion is determined, and based on the decreasing proportion and the theoretical maximum detection data volume, the actual detection data volume upper limit currently allowed to be received from the N obstacle avoidance sensors can be determined. The difference value between the theoretical maximum detection data quantity which can be acquired by the N obstacle avoidance sensors in the preset time length and the actual detection data quantity upper limit is the detection data quantity which needs to be reduced by the N obstacle avoidance sensors in the preset time length, and the detection data quantity is called as detection data quantity to be reduced.
And then, the processor prolongs the working time interval of at least one obstacle avoidance sensor in the N obstacle avoidance sensors according to the detection data volume to be reduced.
Optionally, it may be determined how many working periods need to be extended according to the amount of the detection data to be reduced, that is, it is determined how many working periods need to be acquired to acquire the amount of the detection data to be reduced. Before adjustment, the working period lengths of the N obstacle avoidance sensors are equal, and the acquisition rates are equal, so that the number of the working periods required for completing acquisition of the detection data volume to be reduced can be determined according to the multiple relation between the detection data volume to be reduced and the maximum detection data volume which can be acquired by one obstacle avoidance sensor in one working period. And then, the working period interval of the obstacle avoidance sensors which needs to be prolonged can be determined according to the determined number of the working periods. Optionally, when the number of the working periods is less than N, the number of the working periods may be equal to the number of the obstacle avoidance sensors that need to extend the working period interval. Finally, a corresponding number of obstacle avoidance sensors can be selected from the N obstacle avoidance sensors to extend the working period interval thereof. For example, assuming that the number of the working periods is equal to the determined number of the obstacle avoidance sensors, at this time, the working period interval of the selected obstacle avoidance sensor may be extended by the length of one working period based on the original interval.
Certainly, the number of the obstacle avoidance sensors selected from the N obstacle avoidance sensors may not be equal to the determined number of the working periods, the number of the selected obstacle avoidance sensors may be preset, and assuming that the number of the selected obstacle avoidance sensors is a certain preset number, at this time, the length of the working period interval of each obstacle avoidance sensor in the preset number of obstacle avoidance sensors, which is extended on the basis of the original interval, may be: (number of working periods x length of working periods)/a preset number, at this time, the obstacle avoidance sensors in the preset number equally divide the amount of the detection data to be reduced.
Optionally, after the number of obstacle avoidance sensors that need to extend the working period interval is determined, the number of obstacle avoidance sensors may be selected from the N obstacle avoidance sensors by using a random selection method.
optionally, priorities may be set for the N obstacle avoidance sensors, and the number of obstacle avoidance sensors may be selected according to a sequence from low to high in priority. Specifically, since the distribution conditions of the obstacles corresponding to different working environments are different, priorities can be set for the N obstacle avoidance sensors according to the distribution conditions of the obstacles in the working environment where the robot is located. For example, priorities are set for the N obstacle avoidance sensors according to the number of obstacles in the detection range of the obstacle avoidance sensors, and the more obstacles, the higher the priority of the obstacle avoidance sensor corresponding to the detection range.
optionally, different working period intervals can be prolonged for obstacle avoidance sensors with different priorities according to the selected priorities of the obstacle avoidance sensors with the number. For example, the higher the priority of the obstacle avoidance sensor, the shorter the extended working period interval. The higher the priority of the obstacle avoidance sensor is, the more the number of obstacles in the detection range corresponding to the obstacle avoidance sensor is, so that the higher the priority of the obstacle avoidance sensor is, the shorter the working period interval prolonged for the obstacle avoidance sensor is, and the processing of the obstacle avoidance task can be guaranteed even if the working period interval of the obstacle avoidance sensor is prolonged.
In this embodiment, when the occupancy rate of the processor computing resources by other tasks is greater than the preset threshold value due to the fact that the processor processes other tasks, the detection data amount received by the processor from the N obstacle avoidance sensors within a certain time is reduced by prolonging the working period interval of at least one obstacle avoidance sensor of the N obstacle avoidance sensors, so that the processor processes other tasks with higher importance than the obstacle avoidance tasks with sufficient computing resources, and the robot can be guaranteed to normally operate.
fig. 3 is a flowchart of a third embodiment of the robot obstacle avoidance method provided in the embodiment of the present invention, where the processor has an excessively high utilization rate of computing resources of other tasks on the processor due to processing of other tasks, in addition to reducing the detection data amount received by the processor from the N obstacle avoidance sensors by extending the working period interval of the obstacle avoidance sensors, the detection data amount received by the processor from the N obstacle avoidance sensors by reducing the data amount acquired by at least one obstacle avoidance sensor in the working period may also be reduced. Based on this, as shown in fig. 3, optionally, on the basis of the embodiment shown in fig. 1, after step S103, the method may further include the following steps:
S301, if the occupancy rate of the operation resources caused by processing other tasks is larger than a preset threshold value, the detection data quantity which needs to be acquired by at least one obstacle avoidance sensor in the N obstacle avoidance sensors in each working period is adjusted within a preset time length.
Similar to the embodiment, if the operation resource occupancy rate caused by processing other tasks is greater than the preset threshold, normal processing of other tasks can be ensured by reducing the amount of detection data received within the preset time, and specifically, the normal processing can be realized by reducing the amount of detection data acquired by at least one obstacle avoidance sensor within the working period within the preset time.
Optionally, the detection data amount to be acquired by at least one obstacle avoidance sensor of the N obstacle avoidance sensors in each working period may be adjusted within a preset time period in the following manner.
Firstly, according to the degree that the occupancy rate of the operation resources is greater than a preset threshold value, determining the upper limit of the actual detection data amount allowed to be received from the N obstacle avoidance sensors within a preset time. And determining the detection data volume to be reduced in the preset time according to the theoretical maximum detection data volume allowed to be received from the N obstacle avoidance sensors in the preset time and the actual detection data volume upper limit.
For a specific execution process, reference may be made to the related description in embodiment two, which is not described herein again.
And then, adjusting the detection data quantity required to be acquired by at least one obstacle avoidance sensor in the N obstacle avoidance sensors in each working period within a preset time length according to the detection data quantity to be reduced.
Because the working period lengths of the obstacle avoidance sensors are equal, and the working period intervals are equal, the detection data volume acquired by the at least one obstacle avoidance sensor in the working period is reduced, namely the detection data acquisition rate of the at least one obstacle avoidance sensor in each working period is reduced.
Optionally, it may be determined how many working periods are included in the preset duration, and then the detection data amount that needs to be reduced in each average working period may be determined according to the detection data amount to be reduced and the number of the working periods. Therefore, for each obstacle avoidance sensor working within the preset duration, under one condition, the detection data quantity required to be acquired within one working period is as follows: and the difference value between the rated detection data volume and the detection data volume needing to be reduced, wherein the rated detection data volume refers to the detection data volume which can be collected in one working period when the device works at the rated collection rate. At this time, the acquisition rate of each obstacle avoidance sensor can be determined according to the detection data volume of each obstacle avoidance sensor which needs to be acquired in one working period and the duration of one working period, and the detection data volume received in the preset duration can be reduced by controlling the corresponding obstacle avoidance sensors to adopt the acquisition rate.
In the above example, it is assumed that the detection data amount required to be acquired in each working period is reduced for each obstacle avoidance sensor operating within the preset time period. However, in practice, this processing need not be performed for all of the obstacle avoidance sensors, and may be performed for only some of the obstacle avoidance sensors.
at this time, the number of the partial obstacle avoidance sensors may be preset, or may be determined according to the following rule:
it is assumed that each obstacle avoidance sensor is preset with a minimum detection data amount to be acquired in a working period. Therefore, the number of the working periods of the acquired detection data amount required to be reduced can be determined according to the quotient of the detection data amount to be reduced and the minimum detection data amount. Furthermore, the detection data amount required to be acquired by the obstacle avoidance sensors in each working period within the preset duration is determined to be reduced according to the determined number of the working periods, and the number is assumed to be K. For example, when the number of the working periods is less than the number of the obstacle avoidance sensors working within the preset time period, it may be determined that K is the number of the working periods. Or, if the number of the working periods of one obstacle avoidance sensor in the preset time length is equal to the determined number of the working periods, then K is 1, that is, the value of K can be determined according to the determined number of the working periods and the number of the working periods of each obstacle avoidance sensor working in the preset time length corresponding to the preset time length.
In addition, after the value of K is determined, optionally, specific K obstacle avoidance sensors can be selected according to the priority of the obstacle avoidance sensors. In addition, optionally, the detection data amount required to be acquired by each obstacle avoidance sensor in each working period can be controlled differently according to the priority of the selected obstacle avoidance sensor.
it should be noted that the present embodiment only relates to reducing the amount of detection data received by the processor from the N obstacle avoidance sensors within a certain time period by reducing the amount of detection data to be collected by at least one obstacle avoidance sensor during the operation period. In practical application, the adjustment method in this embodiment may also be combined with the adjustment method in the second embodiment, that is, the working period interval of at least one obstacle avoidance sensor of the N obstacle avoidance sensors and the detection data amount to be acquired in the working period are adjusted simultaneously to ensure that the processor has sufficient computational resources to process other tasks, thereby ensuring the normal work of the robot.
In this embodiment, when the processor processes other tasks and the occupancy rate of the processor by the other tasks to the computing resources of the processor is greater than the preset threshold, the amount of detection data required to be acquired by at least one obstacle avoidance sensor of the N obstacle avoidance sensors within the working period is reduced, so that the amount of detection data received by the processor from the N obstacle avoidance sensors within a certain time is reduced, the processor processes other types of tasks with higher importance than the obstacle avoidance tasks by using sufficient computing resources, and the robot is ensured to operate normally.
Fig. 4 is a schematic structural diagram of a first embodiment of the robot obstacle avoidance device according to the present invention, and as shown in fig. 4, the robot obstacle avoidance device includes: the device comprises an acquisition module 11, a grouping module 12, a control module 13 and an identification module 14.
the acquisition module 11 acquires the position relationship of N obstacle avoidance sensors configured on the robot body, where N is greater than 1.
And the grouping module 12 is configured to group the N depth sensors according to the position relationship.
And the control module 13 is used for respectively controlling the depth sensors in each group to work in different working periods.
And the identification module 14 is configured to identify an obstacle according to the received detection data sent by the N depth sensors in the corresponding working period.
The apparatus shown in fig. 4 can perform the method of the embodiment shown in fig. 1, and reference may be made to the related description of the embodiment shown in fig. 1 for a part of this embodiment that is not described in detail. The implementation process and technical effect of the technical solution refer to the description in the embodiment shown in fig. 1, and are not described herein again.
Fig. 5 is a schematic structural diagram of a second embodiment of the robot obstacle avoidance device according to the embodiment of the present invention, and as shown in fig. 5, on the basis of the embodiment shown in fig. 4, the robot obstacle avoidance device further includes: and an adjustment module 21.
The adjusting module 21 is configured to adjust a working period interval of at least one of the N obstacle avoidance sensors within a preset time period if the operation resource occupancy rate caused by processing of other tasks is greater than a preset threshold, or adjust a detection data amount that needs to be acquired by at least one of the N obstacle avoidance sensors within each working period.
optionally, the adjusting module 21 includes: a determining unit 211 and an adjusting unit 212.
the determining unit 211 is configured to determine, according to a degree that the operation resource occupancy is greater than a preset threshold, an actual detection data amount upper limit that is allowed to be received from the N obstacle avoidance sensors within a preset time, and determine, according to a theoretical maximum detection data amount and an actual detection data amount upper limit that are allowed to be received from the N obstacle avoidance sensors within a preset time, a detection data amount to be reduced.
The adjusting unit 212 is configured to extend a working time interval of at least one obstacle avoidance sensor of the N obstacle avoidance sensors according to the detection data amount to be reduced, or reduce the detection data amount that needs to be acquired by at least one obstacle avoidance sensor of the N obstacle avoidance sensors in each working time interval.
Optionally, the apparatus further comprises: a module 22 is selected.
The selection module 22 is configured to select at least one obstacle avoidance sensor from the N obstacle avoidance sensors according to a preset priority of the N obstacle avoidance sensors and a sequence of priorities from low to high, where the preset priority is related to an obstacle distribution situation.
Correspondingly, the adjusting module 21 is further configured to determine a working period interval of the at least one obstacle avoidance sensor according to the priority of the at least one obstacle avoidance sensor, or determine a detection data amount to be acquired by the at least one obstacle avoidance sensor in each working period.
The apparatus shown in fig. 5 can perform the method of the embodiment shown in fig. 2 or fig. 3, and the related description of the embodiment shown in fig. 2 or fig. 3 can be referred to for the part not described in detail in this embodiment. The implementation process and technical effect of the technical solution refer to the description in the embodiment shown in fig. 2 or fig. 3, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and certainly, the embodiments can also be implemented by hardware. With this understanding in mind, the above technical solutions may be embodied in the form of a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., which includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods according to the various embodiments or some parts of the embodiments.
finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.