Disclosure of Invention
In view of this, the present disclosure proposes a single line positioning obstacle avoidance method with non-horizontal orientation, including:
acquiring sensor data in real time; the sensor data includes a time parameter;
establishing a single-line barrier layer on the cost map;
marking the sensor data at the single-line barrier layer;
clearing the sensor data to obtain an obstacle;
and planning a path according to the obstacle.
In one possible implementation, the clearing of the sensor data includes:
traversing the sensor data in the cost map;
and clearing the isolated sensor data.
In one possible implementation, the clearing the sensor data further includes:
and clearing the sensor data according to a set time period.
In one possible implementation, the method further includes: a step of neighborhood expansion of the sensor data;
performing neighborhood dilation on the sensor data includes:
and if other sensor data exist in the neighborhood of the current sensor data in all directions, carrying out neighborhood expansion on the current sensor data.
In one possible implementation, the number of neighbors ranges from 1-2.
In one possible implementation, the clearing the sensor data according to a set period of time includes:
acquiring the set time period;
and if the time parameter of the current sensor data is outside the set time period, clearing the current sensor data.
In one possible implementation, the method further includes:
acquiring laser sensor data;
calculating the position of the laser sensor data on the single-line obstacle layer;
detecting whether the obstacle exists in the vicinity of the laser sensor data;
and if the obstacle exists, clearing the single-line obstacle layer.
According to an aspect of the present disclosure, there is provided a single-line positioning obstacle avoidance apparatus with a non-horizontal orientation, which is characterized by comprising a data acquisition module, an obstacle layer establishment module, a sensor data marking module, a sensor data clearing module and a path planning module;
the data acquisition module is configured to acquire sensor data in real time; the sensor data includes a time parameter;
the barrier layer establishing module is configured to establish a single-line barrier layer on the cost map;
the sensor data marking module is configured to mark the sensor data at the single-line obstacle layer;
the sensor data clearing module is configured to clear the sensor data to obtain an obstacle;
the path planning module is configured to plan a path according to the obstacle.
According to an aspect of the present disclosure, there is provided a single-wire positioning obstacle avoidance apparatus of non-horizontal orientation, characterized by comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement any of the methods described above when executing the executable instructions;
the system also comprises a single-wire positioning sensor and a laser sensor;
the single-wire positioning sensor is in communication connection with the processor;
the laser sensor is in communication connection with the processor;
the single-wire positioning sensor is obliquely arranged;
the laser sensor is horizontally arranged;
the single wire positioning sensor is located above the laser sensor.
According to an aspect of the present disclosure there is provided a non-transitory computer readable storage medium having stored thereon computer program instructions, characterized in that the computer program instructions, when executed by a processor, implement the method of any of the preceding.
The method comprises the steps of acquiring sensor data in real time, establishing a single-line obstacle layer on a cost map, marking the sensor data on the single-line obstacle layer, removing the sensor data to obtain an obstacle, and planning a path according to the obstacle. Therefore, the map is effectively marked and cleared, collision with the obstacle is effectively reduced, and influence on trafficability on a path is reduced, so that the path can be planned to achieve the effect of obstacle avoidance under the condition that a depth camera is not used.
Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, which proceeds with reference to the accompanying drawings.
Detailed Description
Various exemplary embodiments, features and aspects of the disclosure will be described in detail below with reference to the drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
In addition, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements, and circuits well known to those skilled in the art have not been described in detail in order not to obscure the present disclosure.
Fig. 1 illustrates a flow chart of a non-horizontally oriented single line locating obstacle avoidance method according to an embodiment of the present disclosure. As shown in fig. 1, the single-line positioning obstacle avoidance method with non-horizontal orientation comprises the following steps:
step S100, acquiring sensor data in real time, wherein the sensor data comprises time parameters, step S200, establishing a single-line obstacle layer on a cost map, step S300, marking the sensor data on the single-line obstacle layer, step S400, removing the sensor data to obtain an obstacle, and step S500, and planning a path according to the obstacle.
The method comprises the steps of acquiring sensor data in real time, establishing a single-line obstacle layer on a cost map, marking the sensor data on the single-line obstacle layer, removing the sensor data to obtain an obstacle, and planning a path according to the obstacle. Therefore, the map is effectively marked and cleared, collision with the obstacle is effectively reduced, and influence on trafficability on a path is reduced, so that the path can be planned to achieve the effect of obstacle avoidance under the condition that a depth camera is not used.
Specifically, referring to fig. 1, step S100 is performed to acquire sensor data in real time, where the sensor data includes a time parameter.
In one possible implementation, the robot is provided with a single line positioning sensor, the single line positioning sensor is arranged on the upper half part of the robot, the robot is also provided with a laser sensor, the laser sensor is arranged on the lower half part of the robot, the single line positioning sensor is obliquely arranged, the oblique direction is downward inclination, the laser sensor is horizontally arranged, the inclination angle of the single line positioning sensor is 75 degrees, the single line positioning sensor returns sensor data in real time, and the sensor data comprise time parameters. And is a real-time transmission.
Further, referring to fig. 1, step S200 is performed to build a single line obstacle layer in the cost map.
In one possible implementation, a single line positioning sensor barrier layer (single line barrier layer) is built on the cost map, meanwhile, a float type pointer is added to perform time management on sensor data in the single line barrier layer, and a time dimension is recorded for each sensor data in the cost map, namely, the time parameters of the sensor data are managed.
Further, referring to fig. 1, step S300 is performed to mark sensor data at a single line obstacle layer.
In one possible implementation, the detected sensor data is projected under the robot coordinate system and the projected sensor data is fully marked on the single line obstacle layer, and the time of the marked sensor data is set to the current latest time. For example, when acquiring sensor data at point a, if the time parameter at point a is 17 points 2 minutes 48 seconds, then 17 points 2 minutes 48 seconds is set as the current time.
It should be noted that, the steps S100, S200, and S300 are not sequential, and may be performed according to the sequence of the steps S100, S200, and S300, or the steps S200 and S100 and S300 may be performed first, and the disclosure is not set.
Further, referring to fig. 1, step S400 is performed to clear the sensor data to obtain an obstacle, and in one possible implementation, the clearing the sensor data includes: traversing the sensor data in the cost map, clearing away the isolated sensor data, and clearing away the sensor data according to a set time period.
In one possible implementation, referring to fig. 2, performing step S402, purging the isolated sensor data includes: if no other sensor data exists in the neighborhood of the current sensor data in all directions, the current sensor data is cleared: each direction includes up, down, left, right, upper left, lower left, upper right, and lower right. For example, if the sensor data includes a noise point, then the noise point in the current sensor data has no other sensor data in all directions, that is, there is no other sensor data in the neighborhood of the current sensor data in the directions of up, down, left, right, up left, down left, up right and down right, then this point is determined to be an isolated point, where the range of the neighborhood is set manually, and may be set to 1 neighborhood, or may be set to 2 neighborhood, if the set neighborhood is 1, then 8 positions around the isolated point are the neighborhood, and if the neighborhood is set to 2, then 16 positions around the noise point are the neighborhood (i.e., the "X" type). For example, the neighborhood is set to be 1, the S point is one sensor data, and there is one sensor data at the left position of the S point, the S point is not an isolated point, that is, the S point is not deleted, and if there is no other sensor data at 8 positions of the neighborhood of the S point, the S point is an isolated point, and the S point is deleted.
In another possible implementation, if the neighborhood is set to 2, then the number of positions around the noise is neighborhood 24 (i.e. "mouth") and, illustratively, the neighborhood is set to 2, the Q point is one sensor data, and if there is no other sensor data in the neighborhood 24 of the Q point, the S point is an isolated point, and the S point is deleted. All sensor data is traversed in this way, and all isolated points are cleared.
In addition, in one possible implementation manner, referring to fig. 2, step S403 is further included: the step of neighborhood expanding the sensor data, the neighborhood expanding the sensor data comprising: and if the neighborhood of the current sensor data in each direction has other sensor data, carrying out neighborhood expansion on the current sensor data. For example, when there are other sensor data in each direction in one sensor data, that is, there are other sensor data in the neighborhood of the current sensor data in the eight directions of up, down, left, right, left up, left down, right up and right down, this point is determined to be an aggregated point, and likewise, the range of the neighborhood is manually set, and may be set to 1 neighborhood or 2 neighborhood, if the set neighborhood is 1, then 8 positions around the isolated point are the neighborhood, and if the neighborhood is set to 2, then 16 positions around the noise point are the neighborhood. For example, the neighborhood is set to be 1, the point A is sensor data, and the sensor data is located at the left position of the point A, so that the point A is an aggregated point, and the neighborhood of the point A is expanded.
Further, in one possible implementation, referring to fig. 2, performing step S401, clearing the sensor data according to the set period of time includes: and acquiring a set time period, and if the time parameter of the current sensor data is outside the set time period, clearing the current sensor data. For example, the time period is set to 2 seconds manually, if the time parameter of the point a is 17 points 2 minutes 48 seconds and the current time is 17 points 2 minutes 59 seconds, the point a is already reserved for 10 seconds, and if the time parameter exceeds the set time period by two seconds, the point a is deleted, namely the point a is cleared. For continuous moving objects, the fluency of the robot is improved by setting the data retention time, so that the number of data processing is reduced, the data processing speed is increased, and the jamming of the robot during obstacle avoidance is reduced. After the above steps, an obstacle composed of a plurality of sensor data can be obtained.
It should be noted that, clearing the isolated sensor data and clearing the sensor data according to the set time period are not ordered, that is, the sensor data may be cleared according to the set time period first, or the isolated sensor data may be cleared first, which is not set in the present disclosure.
Further, referring to fig. 2, in one possible implementation manner, the method further includes step S404: and acquiring laser sensor data, calculating the position of the laser sensor data on the single-line obstacle layer, detecting whether an obstacle exists in the vicinity of the laser sensor data, and if the obstacle exists, cleaning the single-line obstacle layer. For example, the single-wire sensor detects the obstacle X, and at the same time, when receiving the data returned by the laser sensor, some laser sensor data are on the single-wire obstacle layer where the obstacle X is located, and when the obstacle X is located in the neighborhood of the laser sensor, the single-wire obstacle layer where the obstacle X is located is cleared, so that repeated processing is avoided, the data processing amount is reduced, the data processing speed is further effectively improved, and the jam of the robot during obstacle avoidance is reduced.
Further, referring to fig. 1, step S500 is performed to perform path planning according to the obstacle.
In a possible implementation manner, referring to fig. 2, step S501 is performed, after an obstacle is identified, a current single-line obstacle layer where the obstacle is located is merged into a local cost map, so that step S502 is performed to instruct the robot to perform local planning, and obstacle avoidance is effectively performed. If the robot has not traveled to completion after merging the current single-line obstacle layer in which the obstacle is located into the local cost map, the marking is continued from step S300.
It should be noted that, although the above-described single line positioning obstacle avoidance method with non-horizontal orientation is described as an example, those skilled in the art will appreciate that the disclosure should not be limited thereto. In fact, the user can flexibly set the single-line positioning obstacle avoidance method with non-horizontal orientation according to personal preference and/or actual application scene, so long as the required function is achieved.
In this way, sensor data are obtained in real time, the sensor data comprise time parameters, a single-line obstacle layer is established on the cost map, the sensor data are marked on the single-line obstacle layer, the sensor data are cleared to obtain obstacles, and path planning is carried out according to the obstacles. Therefore, the map is effectively marked and cleared, collision with the obstacle is effectively reduced, and influence on trafficability on a path is reduced, so that the path can be planned to achieve the effect of obstacle avoidance under the condition that a depth camera is not used.
Further, in accordance with another aspect of the present disclosure, there is also provided a single line locating obstacle avoidance device 100 oriented non-horizontally. Since the working principle of the non-horizontally oriented single-wire positioning obstacle avoidance device 100 of the embodiments of the present disclosure is the same as or similar to that of the non-horizontally oriented single-wire positioning obstacle avoidance method of the embodiments of the present disclosure, the repetition is not repeated. Referring to fig. 3, a non-horizontally oriented single-wire positioning obstacle avoidance apparatus 100 of an embodiment of the disclosure includes a data acquisition module 110, an obstacle layer establishment module 120, a sensor data tagging module 130, a sensor data clearing module 140, and a path planning module 150;
a data acquisition module 110 configured to acquire sensor data in real time; the sensor data includes a time parameter;
an obstacle layer establishment module 120 configured to establish a single line obstacle layer on the cost map;
a sensor data tagging module 130 configured to tag sensor data at a single line barrier layer;
a sensor data clearing module 140 configured to clear the sensor data to obtain an obstacle;
the path planning module 150 is configured to perform path planning according to the obstacle.
Still further in accordance with another aspect of the present disclosure, there is also provided a single line locating obstacle avoidance device 200 oriented non-horizontally. Referring to fig. 4, a non-horizontally oriented single-wire positioning obstacle avoidance device 200 of an embodiment of the disclosure includes a processor 210 and a memory 220 for storing instructions executable by the processor 210. Wherein the processor 210 is configured to implement any of the non-horizontally oriented single line location obstacle avoidance methods described above when executing the executable instructions.
Here, it should be noted that the number of processors 210 may be one or more. Meanwhile, in the non-horizontally oriented single line positioning obstacle avoidance apparatus 200 of the embodiments of the present disclosure, an input device 230 and an output device 240 may also be included. The processor 210, the memory 220, the input device 230, and the output device 240 may be connected by a bus, or may be connected by other means, which is not specifically limited herein.
The memory 220 is a computer-readable storage medium that can be used to store software programs, computer-executable programs, and various modules, such as: the program or module corresponding to the non-horizontally oriented single-line positioning obstacle avoidance method in the embodiment of the disclosure. The processor 210 executes various functional applications and data processing of the non-horizontally oriented single-wire-positioning obstacle avoidance device 200 by running software programs or modules stored in the memory 220.
The input device 230 may be used to receive an input digital or signal. Wherein the signal may be a key signal generated in connection with user settings of the device/terminal/server and function control. The output means 240 may comprise a display device such as a display screen.
Further, referring to fig. 5, the non-horizontally oriented single line positioning obstacle avoidance device of the present disclosure further includes a single line positioning sensor and a laser sensor, the single line positioning sensor is in communication connection with the processor, the laser sensor is in communication connection with the processor, the single line positioning sensor is obliquely arranged, the laser sensor is horizontally arranged, and the single line positioning sensor is located above the laser sensor.
In one possible implementation, the non-horizontally oriented single line locating obstacle avoidance device of the present disclosure is a robot 300, the robot 300 is mounted with a single line locating sensor 320, the single line locating sensor 320 is mounted on the upper half of the robot 300, the robot 300 is further mounted with a laser sensor 330, the laser sensor 330 is mounted on the lower half of the robot 300, wherein the single line locating sensor 320 is mounted obliquely, the oblique direction is downward oblique, the laser sensor 330 is mounted horizontally, and the oblique angle of the single line locating sensor 320 is 75 ° by way of example. In this way, the detection light emitted by the single-wire positioning sensor 320 and the laser sensor 330 forms a closed area, and when the robot 300 touches an obstacle, effective marking can be performed. The single-wire positioning sensor 320 transmits sensor data back to the processor in real time, and the sensor data includes a time parameter. The processor and storage processor are mounted inside the robot 300, and wheels 310 are mounted at the bottom of the robot 300 to perform the non-horizontally oriented single line location obstacle avoidance method described above. Therefore, the map is effectively marked and cleared, collision with the obstacle is effectively reduced, and influence on trafficability on a path is reduced, so that the path can be planned to achieve the effect of obstacle avoidance under the condition that a depth camera is not used.
According to another aspect of the present disclosure, there is also provided a non-transitory computer readable storage medium having stored thereon computer program instructions that, when executed by the processor 210, implement any of the non-horizontally oriented single line locating obstacle avoidance methods described above.
The foregoing description of the embodiments of the present disclosure has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the technical improvements in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.