CN116466704A - Obstacle avoidance optimization method, device, equipment and storage medium - Google Patents

Obstacle avoidance optimization method, device, equipment and storage medium Download PDF

Info

Publication number
CN116466704A
CN116466704A CN202310291426.6A CN202310291426A CN116466704A CN 116466704 A CN116466704 A CN 116466704A CN 202310291426 A CN202310291426 A CN 202310291426A CN 116466704 A CN116466704 A CN 116466704A
Authority
CN
China
Prior art keywords
dimensional
coordinates
point cloud
mapping
obstacle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310291426.6A
Other languages
Chinese (zh)
Inventor
刘元财
张泫舜
陈浩宇
张志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ecoflow Technology Ltd
Original Assignee
Ecoflow Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ecoflow Technology Ltd filed Critical Ecoflow Technology Ltd
Priority to CN202310291426.6A priority Critical patent/CN116466704A/en
Publication of CN116466704A publication Critical patent/CN116466704A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0219Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory ensuring the processing of the whole working surface

Landscapes

  • Engineering & Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

The application is suitable for the technical field of self-mobile equipment and provides a method, a device, equipment and a storage medium for obstacle avoidance optimization. The obstacle avoidance optimization method comprises the following steps: in each detection period, acquiring two-dimensional point cloud coordinate data of an obstacle detected in the current period and sampling time corresponding to the two-dimensional point cloud coordinate data; mapping the two-dimensional point cloud coordinate data to obtain corresponding one-dimensional mapping coordinates; storing the one-dimensional mapping coordinates and sampling time corresponding to the one-dimensional mapping coordinates; according to the sampling time and the current time of each stored one-dimensional mapping coordinate, calculating the storage time length of each stored one-dimensional mapping coordinate, and deleting the one-dimensional mapping coordinate with the storage time length longer than the preset time length. According to the method and the device, the storage space occupied by the barrier information can be reduced, the speed and the accuracy of reading the barrier information from the mobile equipment are improved, and therefore the barrier avoiding efficiency of the mobile equipment is improved.

Description

Obstacle avoidance optimization method, device, equipment and storage medium
Technical Field
The application belongs to the technical field of self-mobile equipment, and particularly relates to an obstacle avoidance optimization method, device, equipment and storage medium.
Background
In the moving process of the self-moving equipment such as the sweeping robot and the mowing robot, various obstacles can be encountered to influence the work of the self-moving equipment. In order for the self-moving device to avoid the obstacle, a general method is to store the obstacle that the self-moving device may encounter in a buffer or a map equivalent to an original map, and to read the stored obstacle information from the mobile device to plan a moving route. However, when there are more stored obstacles and updating is not timely, the speed of reading the obstacle information from the mobile device is slow or the obstacle information is wrongly read, so that the obstacle avoidance efficiency of the mobile device is poor.
Disclosure of Invention
The embodiment of the application provides an obstacle avoidance optimization method, device, equipment and storage medium, which can solve the problems of low speed and accuracy of reading obstacle information from mobile equipment and poor obstacle avoidance efficiency in the prior art.
A first aspect of an embodiment of the present application provides a method for obstacle avoidance optimization, including:
in each detection period, acquiring two-dimensional point cloud coordinate data of an obstacle detected in the current period and sampling time corresponding to the two-dimensional point cloud coordinate data;
mapping the two-dimensional point cloud coordinate data to obtain corresponding one-dimensional mapping coordinates;
storing the one-dimensional mapping coordinates and sampling time corresponding to the one-dimensional mapping coordinates;
according to the sampling time and the current time of each stored one-dimensional mapping coordinate, calculating the storage time length of each stored one-dimensional mapping coordinate, and deleting the one-dimensional mapping coordinate with the storage time length longer than the preset time length.
Optionally, the mapping the two-dimensional point cloud coordinate data to obtain a corresponding one-dimensional mapping coordinate includes:
rasterizing the two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates;
and calculating according to the two-dimensional grid coordinates and a preset mapping formula to obtain corresponding one-dimensional mapping coordinates.
Optionally, the rasterizing the two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates includes:
and according to the preset grid resolution, carrying out rasterization processing on the two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates.
Optionally, the storing the one-dimensional mapping coordinate and the sampling time corresponding to the one-dimensional mapping coordinate includes:
storing the one-dimensional mapping coordinates into a one-dimensional array;
and calculating a first hash value corresponding to the one-dimensional mapping coordinate, and storing the sampling time into a storage position corresponding to the first hash value.
Optionally, deleting the one-dimensional mapping coordinate with the stored time length longer than the preset time length includes:
calculating a second hash value of the timeout coordinates; the overtime coordinates are one-dimensional mapping coordinates with the stored time length longer than the preset time length;
deleting the value of the storage position corresponding to the second hash value;
and deleting the timeout coordinates in the one-dimensional array.
Optionally, the acquiring the two-dimensional point cloud coordinate data of the obstacle detected in the current period includes:
acquiring three-dimensional point cloud coordinate data of an obstacle detected in a current period;
and deleting the height coordinates in the three-dimensional point cloud coordinate data to obtain the two-dimensional point cloud coordinate data.
Optionally, before calculating the storage duration of each stored one-dimensional mapping coordinate according to the sampling time and the current time of each stored one-dimensional mapping coordinate, the method further includes:
when the preset accelerated aging condition is met, subtracting a preset time interval from the sampling time corresponding to each stored one-dimensional mapping coordinate to obtain updated sampling time corresponding to each stored one-dimensional mapping coordinate.
A second aspect of embodiments of the present application provides an obstacle avoidance optimization device, including:
the point cloud acquisition module is used for acquiring two-dimensional point cloud coordinate data of the obstacle detected in the current period and sampling time corresponding to the two-dimensional point cloud coordinate data in each detection period;
the coordinate mapping module is used for mapping the two-dimensional point cloud coordinate data to obtain corresponding one-dimensional mapping coordinates;
the coordinate storage module is used for storing the one-dimensional mapping coordinates and sampling time corresponding to the one-dimensional mapping coordinates;
the obstacle updating module is used for calculating the storage duration of each stored one-dimensional mapping coordinate according to the sampling time and the current time of each stored one-dimensional mapping coordinate, and deleting the one-dimensional mapping coordinates with the storage duration longer than the preset duration.
Optionally, the coordinate mapping module includes:
the grid processing unit is used for carrying out rasterization processing on the two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates;
and the mapping calculation unit is used for calculating according to the two-dimensional grid coordinates and a preset mapping formula to obtain corresponding one-dimensional mapping coordinates.
Optionally, the grid processing unit is specifically configured to perform rasterization processing on the two-dimensional point cloud coordinate data according to a preset grid resolution, so as to obtain a two-dimensional grid coordinate.
Optionally, the coordinate storage module includes:
the coordinate storage unit is used for storing the one-dimensional mapping coordinates into a one-dimensional array;
and the time storage unit is used for calculating a first hash value corresponding to the one-dimensional mapping coordinate and storing the sampling time into a storage position corresponding to the first hash value.
Optionally, the obstacle updating module includes:
a timeout calculating unit for calculating a second hash value of the timeout coordinates; the overtime coordinates are one-dimensional mapping coordinates with the stored time length longer than the preset time length;
a storage deleting unit, configured to delete a value of a storage location corresponding to the second hash value;
and the coordinate deleting unit is used for deleting the overtime coordinates in the one-dimensional array.
Optionally, the point cloud acquisition module includes:
the coordinate acquisition unit is used for acquiring three-dimensional point cloud coordinate data of the obstacle detected in the current period;
and the data deleting unit is used for deleting the height coordinates in the three-dimensional point cloud coordinate data to obtain the two-dimensional point cloud coordinate data.
Optionally, the obstacle avoidance optimization device further includes:
and the time updating module is used for subtracting a preset time interval from the sampling time corresponding to each stored one-dimensional mapping coordinate when the preset accelerated aging condition is met, so as to obtain updated sampling time corresponding to each stored one-dimensional mapping coordinate.
A third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the obstacle avoidance optimization method as described above when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements an obstacle avoidance optimization method as described above.
According to the obstacle avoidance optimization method provided by the first aspect of the embodiment of the application, the two-dimensional point cloud coordinate data of the detected obstacle are mapped into the one-dimensional mapping coordinate and stored, the one-dimensional mapping coordinate with the storage time longer than the preset time length is deleted, the storage space occupied by the obstacle information can be reduced, the speed and the accuracy of reading the obstacle information from the mobile equipment are improved, and therefore the obstacle avoidance efficiency of the mobile equipment is improved.
It will be appreciated that the advantages of the second, third and fourth aspects may be found in the relevant description of the first aspect and are not repeated here.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a first flow chart of an obstacle avoidance optimization method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a second flow of the obstacle avoidance optimization method provided in the embodiment of the present application;
fig. 3 is a schematic diagram of a third flow of the obstacle avoidance optimization method according to the embodiment of the present application;
fig. 4 is a fourth flowchart of an obstacle avoidance optimization method according to an embodiment of the present disclosure;
fig. 5 is a fifth flowchart of an obstacle avoidance optimization method according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an obstacle avoidance optimization device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise. "plurality" means "two or more".
At present, when more obstacles are stored and updating is not timely, the speed of reading obstacle information from the mobile device is slow or the obstacle information is wrongly read, so that the obstacle avoidance efficiency of the mobile device is poor.
In view of the above problems, the embodiments of the present application provide an obstacle avoidance optimization method, which maps two-dimensional point cloud coordinate data of a detected obstacle into one-dimensional mapping coordinates and stores the one-dimensional mapping coordinates, deletes the one-dimensional mapping coordinates with a storage time longer than a preset time length, can reduce a storage space occupied by obstacle information, and improves a speed and an accuracy of reading the obstacle information from a mobile device, thereby improving obstacle avoidance efficiency of the mobile device.
The obstacle avoidance optimization method provided by the application is described in an exemplary manner with reference to specific embodiments.
Example 1
As shown in fig. 1, the obstacle avoidance optimization method provided in this embodiment includes the following steps S11 to S14:
s11, acquiring two-dimensional point cloud coordinate data of an obstacle detected in a current period and sampling time corresponding to the two-dimensional point cloud coordinate data in each detection period;
in an application, the two-dimensional point cloud coordinate data of the obstacle detected in the current period may be obtained through sensing by a sensor installed on the self-mobile device, where the sensor may include a laser radar, a binocular vision camera, a depth camera, or the like. The obstacle may be an obstacle that the self-moving device may encounter during movement. The two-dimensional point cloud coordinate data may be plane coordinate data (x, y) corresponding to the obstacle on an original map constructed according to a moving range of the self-moving device. When two-dimensional point cloud coordinate data of the obstacle detected in the current period are acquired, sampling time t corresponding to the two-dimensional point cloud coordinate data can be acquired 1
S12, mapping the two-dimensional point cloud coordinate data to obtain corresponding one-dimensional mapping coordinates;
in application, the mapping processing is performed on the two-dimensional point cloud coordinate data to obtain corresponding one-dimensional mapping coordinates, which may be thatConverting the two-dimensional point cloud coordinate data (x, y) to obtain a one-dimensional mapping coordinate h corresponding to the cost map p . The cost map is a grid map based on a certain resolution, and the one-dimensional mapping coordinates corresponding to the cost map are converted into unsigned integer data coordinates by performing resolution reduction on two-dimensional point cloud coordinate data of the original map.
S13, storing the one-dimensional mapping coordinates and sampling time corresponding to the one-dimensional mapping coordinates;
in application, the storing the one-dimensional mapping coordinate and the sampling time corresponding to the one-dimensional mapping coordinate may be by mapping the one-dimensional mapping coordinate h p Sampling time t corresponding to the one-dimensional mapping coordinate 1 The storage to the designated storage area enables the self-mobile device to avoid the obstacle based on the obstacle information in the designated storage area.
S14, calculating the storage time length of each stored one-dimensional mapping coordinate according to the sampling time and the current time of each stored one-dimensional mapping coordinate, and deleting the one-dimensional mapping coordinates with the storage time length longer than the preset time length.
In the application, the current time may be the time t when the cost map processes the stored obstacle n . The storage time length of the stored one-dimensional mapping coordinate may be the difference t obtained by subtracting the sampling time of the stored one-dimensional mapping coordinate from the current time n -t 1 . In order to store as many obstacles perceived by the mobile device as possible and avoid accumulation of a large amount of invalid obstacle information, a proper preset time length can be selected, and a delay deleting strategy of the preset time length is adopted for the obstacle information. The preset time length may be a time length T preset by a user m Can effectively reserve T as long as the obstacle appears in the field of view of the self-mobile equipment m Time. The one-dimensional mapping coordinate with the deleted storage time longer than the preset time length can be that the deleted storage time longer than the preset time length, namely t, in the designated storage area n -t 1 >T m Is used for mapping coordinates and corresponding sampling time.
According to the obstacle avoidance optimization method, the two-dimensional point cloud coordinate data of the detected obstacle are mapped into the one-dimensional mapping coordinate and stored, the one-dimensional mapping coordinate with the storage time longer than the preset time length is deleted, the obstacle information can be compressed, the storage space of the obstacle information is optimized, the speed of reading the obstacle information from the mobile device is improved, the stored obstacle information can be updated in time, the accuracy of reading the obstacle information from the mobile device is improved, and therefore the obstacle avoidance efficiency of the mobile device is improved. By adopting a delay deleting strategy with preset duration for the obstacle information, the perceived obstacle of the self-mobile device can be stored as much as possible, and a large amount of invalid obstacle information is prevented from being accumulated, so that the self-mobile device can avoid the obstacle in a blind area of the visual field.
Example two
The present embodiment is further described in the first embodiment, and the same or similar parts as those of the first embodiment can be referred to in the description of the first embodiment, which is not repeated here.
As shown in fig. 2, step S12 includes: s21, rasterizing the two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates; s22, calculating according to the two-dimensional grid coordinates and a preset mapping formula to obtain corresponding one-dimensional mapping coordinates.
In application, before the two-dimensional grid coordinates are obtained by rasterizing the two-dimensional point cloud coordinate data, parameter information of the cost map can be quoted, so that the two-dimensional point cloud coordinate data can be conveniently mapped into one-dimensional mapping coordinates. The parameter information of the cost map includes resolution and boundary size of the cost map, for example, the resolution of the cost map is 0.1m, which means that the size of each grid in the grid map is 10cm x 10cm.
In the application, the rasterizing process is performed on the two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates, which may be that the rasterizing process is performed on the two-dimensional point cloud coordinate data (x, y) of the obstacle based on the parameter information of the cost map to obtain two-dimensional grid coordinates (m) of the corresponding cost map i ,n j ). The two-dimensional grid coordinate sum according to the aboveCalculating a preset mapping formula to obtain a corresponding one-dimensional mapping coordinate, wherein the two-dimensional grid coordinate can be compressed into a one-dimensional mapping coordinate h through the preset mapping formula p The preset mapping formula may be expressed as h=m×n, H p =m i +n j * M, 0.ltoreq.p < H, where M, N represents the maximum boundary value of the cost map.
According to the obstacle avoidance optimization method, two-dimensional grid coordinates are obtained through rasterizing two-dimensional point cloud coordinate data of the obstacle, and corresponding one-dimensional mapping coordinates are obtained through calculation according to the two-dimensional grid coordinates and a preset mapping formula.
It will be appreciated that in the relevant storage scheme, storing the two-dimensional grid coordinates of the obstacle requires maintaining a two-dimensional matrix of size M x N, and the self-moving device determines whether the obstacle exists at the corresponding location by accessing the value of the corresponding location in the matrix. This approach not only requires a large amount of memory space, but also the rate of reading the obstacle information is slow.
In comparison, in the method provided by the application, the two-dimensional grid coordinates are converted into the one-dimensional mapping coordinates, so that the compression of the barrier information is realized, the corresponding barrier information can be stored only by establishing one-dimensional array, the two-dimensional matrix is not required to be maintained, and the storage space of the barrier information is greatly optimized.
For example, assuming that the cost map has a size of 10M by 10M and a resolution of 0.1M, M and N are both 100, and 9 grids in the cost map have obstacles. In the related scheme, a matrix of 100×100 needs to be maintained, but in the scheme provided by the application, only one-dimensional array of 9*1 is needed to store related obstacle information, so that the storage space of the obstacle information is greatly optimized.
In one embodiment, step S21 includes: and according to the preset grid resolution, carrying out rasterization processing on the two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates.
In application, the two-dimensional point cloud coordinate data is rasterized according to a preset grid resolution to obtain a two-dimensional gridThe coordinates can be two-dimensional point cloud coordinate data (x, y) of the obstacle and cost map origin coordinates (m 0 ,n 0 ) The difference is made and then divided by the cost map resolution r to obtain two-dimensional grid coordinates (m i ,n j ) Expressed as by the formula of0≤i<M,/>0.ltoreq.j < N, where M, N represents the maximum boundary value of the cost map.
According to the obstacle avoidance optimization method, the two-dimensional grid coordinates are obtained by carrying out rasterization processing on the two-dimensional point cloud coordinate data of the obstacle according to the preset grid resolution, so that the obstacle information can be mapped to the cost map, and the self-mobile equipment can avoid the obstacle based on the cost map.
As shown in fig. 3, in one embodiment, step S13 includes: s31, storing the one-dimensional mapping coordinates into a one-dimensional array; s32, calculating a first hash value corresponding to the one-dimensional mapping coordinate, and storing the sampling time into a storage position corresponding to the first hash value.
In application, the one-dimensional mapping coordinate is stored in a one-dimensional array, which may be the one-dimensional mapping coordinate h of the obstacle p And storing the sampling time corresponding to the one-dimensional mapping coordinates into a redundancy-preventing hash table in a one-dimensional array, wherein the time complexity of the hash table is O (1). The calculating of the first hash value corresponding to the one-dimensional mapping coordinate, and the storing of the sampling time in the storage location corresponding to the first hash value may be calculating of the one-dimensional mapping coordinate h of the obstacle p Corresponding first hash value and sampling time t of the obstacle 1 And storing the storage position corresponding to the first hash value.
According to the obstacle avoidance optimization method, the one-dimensional mapping coordinates of the obstacle are stored in the one-dimensional array, and the sampling time is stored in the storage position corresponding to the first hash value of the one-dimensional mapping coordinates, so that the reading, writing and searching of the obstacle information can be realized very quickly, and the speed of reading the obstacle information from the mobile equipment is further improved.
As shown in fig. 4, in one embodiment, deleting the one-dimensional mapping coordinates with the stored time period longer than the preset time period includes: s41, calculating a second hash value of the overtime coordinate; the overtime coordinates are one-dimensional mapping coordinates with the storage time length longer than the preset time length; s42, deleting the value of the storage position corresponding to the second hash value; s43, deleting the overtime coordinates in the one-dimensional array.
In application, when one-dimensional mapping coordinate h of obstacle p Is stored for a period t n -t 1 Is longer than a preset time period T m When the one-dimensional mapping coordinate h of the obstacle p Namely the overtime coordinate, at this time, the one-dimensional mapping coordinate h of the obstacle can be calculated p And deleting the value of the storage position corresponding to the second hash value, and deleting the one-dimensional mapping coordinate h of the obstacle in the one-dimensional array p Thereby deleting the obstacle information in the cost map.
According to the obstacle avoidance optimization method, the second hash value of the overtime coordinate is calculated, the value of the storage position corresponding to the second hash value and the overtime coordinate in the one-dimensional array are deleted, the obstacle information in the cost map can be updated timely, and the accuracy of reading the obstacle information from the mobile equipment is improved.
As shown in fig. 5, in one embodiment, the acquiring the two-dimensional point cloud coordinate data of the obstacle detected in the current period includes: s51, three-dimensional point cloud coordinate data of the obstacle detected in the current period are obtained; and S52, deleting the height coordinates in the three-dimensional point cloud coordinate data to obtain the two-dimensional point cloud coordinate data.
In application, the three-dimensional point cloud coordinate data of the obstacle detected in the current period can be obtained through sensing by a sensor installed on the self-mobile device, and the point cloud data of the obstacle obtained by the sensor is generally three-dimensional point cloud coordinate data. And before the height coordinates in the three-dimensional point cloud coordinate data are deleted to obtain the two-dimensional point cloud coordinate data, the three-dimensional point cloud of the obstacle and the picture can be subjected to segmentation clustering through a deep learning algorithm, and the point cloud of an effective class is reserved and is output as final three-dimensional point cloud coordinate data. The three-dimensional point cloud coordinate data of the obstacle can be directly subjected to dimension reduction, height coordinates are deleted, horizontal plane coordinates are reserved, and the two-dimensional point cloud coordinate data of the obstacle are obtained.
According to the obstacle avoidance optimization method, the three-dimensional point cloud coordinate data of the obstacle detected in the current period is obtained, and the height coordinates in the three-dimensional point cloud coordinate data are deleted to obtain the two-dimensional point cloud coordinate data of the obstacle, so that the compression of the obstacle information can be realized, the storage space of the obstacle is optimized, and the speed of reading the obstacle information from the mobile equipment is improved.
In one embodiment, before step S14, the method further includes: when the preset accelerated aging condition is met, subtracting a preset time interval from the sampling time corresponding to each stored one-dimensional mapping coordinate to obtain updated sampling time corresponding to each stored one-dimensional mapping coordinate.
In application, the above-mentioned preset accelerated aging condition may be that the mobile device is completely surrounded by a circle of surrounding obstacles, and an effective escape path cannot be found, if all the stored obstacle information is normally waiting for being gradually disappeared, the time will be longer, so that the aging of the obstacle information can be accelerated, and the stored obstacle information is disappeared as soon as possible. The step of subtracting a preset time interval from the sampling time corresponding to each stored one-dimensional mapping coordinate to obtain an updated sampling time corresponding to each stored one-dimensional mapping coordinate may be the step of subtracting the one-dimensional mapping coordinate h of the stored obstacle p Corresponding sampling time t 1 Subtracting the preset time interval T c Obtaining updated sampling time t corresponding to the obstacle 2 =t 1 -T c The thus updated sampling time t 2 Can be more quickly longer than the preset time period T m :t n -t 2 =t n -(t 1 -T c )>t n -t 1 Thereby addingAnd the obstacle information disappears quickly.
According to the obstacle avoidance optimization method, the updated sampling time corresponding to each stored one-dimensional mapping coordinate is obtained by subtracting the preset time interval from the sampling time corresponding to each stored one-dimensional mapping coordinate, so that the updated sampling time can be faster than the preset duration, the disappearance of obstacle information is accelerated, and the self-mobile equipment can avoid the obstacle as soon as possible.
The following describes an exemplary obstacle avoidance optimization device provided in the present application with reference to the accompanying drawings.
Example III
As shown in fig. 6, the present embodiment provides an obstacle avoidance optimization device, where the obstacle avoidance optimization device 600 includes:
the point cloud obtaining module 601 is configured to obtain, in each detection period, two-dimensional point cloud coordinate data of an obstacle detected in a current period and a sampling time corresponding to the two-dimensional point cloud coordinate data;
the coordinate mapping module 602 is configured to map the two-dimensional point cloud coordinate data to obtain a corresponding one-dimensional mapping coordinate;
a coordinate storage module 603, configured to store the one-dimensional mapping coordinate and a sampling time corresponding to the one-dimensional mapping coordinate;
the obstacle updating module 604 is configured to calculate a storage duration of each stored one-dimensional mapping coordinate according to the sampling time and the current time of each stored one-dimensional mapping coordinate, and delete the one-dimensional mapping coordinates with the storage duration longer than a preset duration.
In one embodiment, the coordinate mapping module 602 includes:
the grid processing unit is used for carrying out rasterization processing on the two-dimensional point cloud coordinates to obtain two-dimensional grid coordinates;
and the mapping calculation unit is used for calculating according to the two-dimensional grid coordinates and a preset mapping formula to obtain corresponding one-dimensional mapping coordinates.
In one embodiment, the grid processing unit is specifically configured to perform rasterization processing on the two-dimensional point cloud coordinate according to a preset grid resolution, so as to obtain a two-dimensional grid coordinate.
In one embodiment, the coordinate storage module 603 includes:
the coordinate storage unit is used for storing the one-dimensional mapping coordinates into a one-dimensional array;
and the time storage unit is used for calculating a first hash value corresponding to the one-dimensional mapping coordinate and storing the sampling time into a storage position corresponding to the first hash value.
In one embodiment, the obstacle updating module 604 includes:
a timeout calculating unit for calculating a second hash value of the timeout coordinates; the overtime coordinates are one-dimensional mapping coordinates with the storage time length longer than the preset time length;
a storage deleting unit configured to delete a value of a storage location corresponding to the second hash value;
and the coordinate deleting unit is used for deleting the overtime coordinates in the one-dimensional array.
In one embodiment, the point cloud obtaining module 601 includes:
the coordinate acquisition unit is used for acquiring three-dimensional coordinate point cloud data of the obstacle detected in the current period;
and the data deleting unit is used for deleting the height coordinates in the three-dimensional coordinate point cloud data to obtain the two-dimensional point cloud coordinate data.
In one embodiment, the obstacle avoidance optimization device 600 further includes:
and the time updating module is used for subtracting a preset time interval from the sampling time corresponding to each stored one-dimensional mapping coordinate when the preset accelerated aging condition is met, so as to obtain updated sampling time corresponding to each stored one-dimensional mapping coordinate.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the present application further provides a terminal device 700, as shown in fig. 7, including a memory 701, a processor 702, and a computer program 703 stored in the memory 701 and capable of running on the processor 702, where the processor 702 implements the steps of the obstacle avoidance optimization method provided in the first aspect when executing the computer program 703.
In application, the terminal device may include, but is not limited to, a processor and a memory, fig. 7 is merely an example of the terminal device and does not constitute limitation of the terminal device, and may include more or less components than illustrated, or combine some components, or different components, such as an input-output device, a network access device, etc. The input output devices may include cameras, audio acquisition/playback devices, display screens, and the like. The network access device may include a network module for wireless networking with an external device.
In application, the processor may be a central processing unit (Central Processing Unit, CPU), which may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In applications, the memory may in some embodiments be an internal storage unit of the terminal device, such as a hard disk or a memory of the terminal device. The memory may in other embodiments also be an external storage device of the terminal device, for example a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the terminal device. The memory may also include both internal storage units of the terminal device and external storage devices. The memory is used to store an operating system, application programs, boot Loader (Boot Loader), data, and other programs, etc., such as program code for a computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.
The embodiments of the present application also provide a computer readable storage medium storing a computer program, where the computer program can implement the steps in the above-mentioned method embodiments when executed by a processor.
All or part of the process in the method of the above embodiments may be implemented by a computer program, which may be stored in a computer readable storage medium and which, when executed by a processor, implements the steps of the method embodiments described above. The computer program comprises computer program code, and the computer program code can be in a source code form, an object code form, an executable file or some intermediate form and the like. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a terminal device, a recording medium, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Such as a U-disk, removable hard disk, magnetic or optical disk, etc.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative apparatus and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the embodiments of the apparatus described above are illustrative only, and the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, the apparatus may be indirectly coupled or in communication connection, whether in electrical, mechanical or other form.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. The obstacle avoidance optimization method is characterized by comprising the following steps of:
in each detection period, acquiring two-dimensional point cloud coordinate data of an obstacle detected in the current period and sampling time corresponding to the two-dimensional point cloud coordinate data;
mapping the two-dimensional point cloud coordinate data to obtain corresponding one-dimensional mapping coordinates;
storing the one-dimensional mapping coordinates and sampling time corresponding to the one-dimensional mapping coordinates;
according to the sampling time and the current time of each stored one-dimensional mapping coordinate, calculating the storage time length of each stored one-dimensional mapping coordinate, and deleting the one-dimensional mapping coordinate with the storage time length longer than the preset time length.
2. The obstacle avoidance optimization method of claim 1 wherein said mapping said two-dimensional point cloud coordinate data to obtain corresponding one-dimensional mapped coordinates comprises:
rasterizing the two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates;
and calculating according to the two-dimensional grid coordinates and a preset mapping formula to obtain corresponding one-dimensional mapping coordinates.
3. The obstacle avoidance optimization method of claim 2 wherein said rasterizing said two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates comprises:
and according to the preset grid resolution, carrying out rasterization processing on the two-dimensional point cloud coordinate data to obtain two-dimensional grid coordinates.
4. The obstacle avoidance optimization method of claim 1 wherein said storing the one-dimensional map coordinates and the sampling times corresponding to the one-dimensional map coordinates comprises:
storing the one-dimensional mapping coordinates into a one-dimensional array;
and calculating a first hash value corresponding to the one-dimensional mapping coordinate, and storing the sampling time into a storage position corresponding to the first hash value.
5. The obstacle avoidance optimization method of claim 4 wherein said deleting the one-dimensional map coordinates for which the stored time period is longer than a preset time period comprises:
calculating a second hash value of the timeout coordinates; the overtime coordinates are one-dimensional mapping coordinates with the stored time length longer than the preset time length;
deleting the value of the storage position corresponding to the second hash value;
and deleting the timeout coordinates in the one-dimensional array.
6. The obstacle avoidance optimization method of claim 1 wherein said obtaining two-dimensional point cloud coordinate data of the obstacle detected in the current cycle comprises:
acquiring three-dimensional point cloud coordinate data of an obstacle detected in a current period;
and deleting the height coordinates in the three-dimensional point cloud coordinate data to obtain the two-dimensional point cloud coordinate data.
7. The obstacle avoidance optimization method of claim 5 wherein prior to said calculating the storage time for each stored one-dimensional mapped coordinate from the sample time and the current time for each stored one-dimensional mapped coordinate, the method further comprises:
when the preset accelerated aging condition is met, subtracting a preset time interval from the sampling time corresponding to each stored one-dimensional mapping coordinate to obtain updated sampling time corresponding to each stored one-dimensional mapping coordinate.
8. An obstacle avoidance optimization device, comprising:
the point cloud acquisition module is used for acquiring two-dimensional point cloud coordinate data of the obstacle detected in the current period and sampling time corresponding to the two-dimensional point cloud coordinate data in each detection period;
the coordinate mapping module is used for mapping the two-dimensional point cloud coordinate data to obtain corresponding one-dimensional mapping coordinates;
the coordinate storage module is used for storing the one-dimensional mapping coordinates and sampling time corresponding to the one-dimensional mapping coordinates;
the obstacle updating module is used for calculating the storage duration of each stored one-dimensional mapping coordinate according to the sampling time and the current time of each stored one-dimensional mapping coordinate, and deleting the one-dimensional mapping coordinates with the storage duration longer than the preset duration.
9. A self-moving device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the obstacle avoidance optimization method of any of claims 1 to 7 when executing the computer program.
10. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the obstacle avoidance optimization method of any of claims 1 to 7.
CN202310291426.6A 2023-03-17 2023-03-17 Obstacle avoidance optimization method, device, equipment and storage medium Pending CN116466704A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310291426.6A CN116466704A (en) 2023-03-17 2023-03-17 Obstacle avoidance optimization method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310291426.6A CN116466704A (en) 2023-03-17 2023-03-17 Obstacle avoidance optimization method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116466704A true CN116466704A (en) 2023-07-21

Family

ID=87176237

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310291426.6A Pending CN116466704A (en) 2023-03-17 2023-03-17 Obstacle avoidance optimization method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116466704A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117951240A (en) * 2024-03-27 2024-04-30 国能龙源环保有限公司 Global three-dimensional point cloud map storage and real-time voxel retrieval method, device and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117951240A (en) * 2024-03-27 2024-04-30 国能龙源环保有限公司 Global three-dimensional point cloud map storage and real-time voxel retrieval method, device and equipment

Similar Documents

Publication Publication Date Title
CN109359614B (en) Laser point cloud plane identification method, device, equipment and medium
WO2022142628A1 (en) Point cloud data processing method and device
CN112132929A (en) Grid map marking method based on depth vision and single line laser radar
CN112129266B (en) Method, apparatus, device and computer readable storage medium for processing map
AU2020329283B2 (en) Point cloud occlusion mapping for autonomous vehicles
CN116466704A (en) Obstacle avoidance optimization method, device, equipment and storage medium
CN112270642A (en) Method, system and device for constructing external rectangular frame of obstacle point cloud
CN112258519A (en) Automatic extraction method and device for way-giving line of road in high-precision map making
CN112462758A (en) Drawing establishing method and device, computer readable storage medium and robot
CN114627175A (en) Image processing method, intelligent terminal and computer readable storage medium
CN114779787A (en) Grid map construction method, robot and machine-readable storage medium
CN113763438B (en) Point cloud registration method, device, equipment and storage medium
WO2020248118A1 (en) Point cloud processing method, system and device, and storage medium
CN116358528A (en) Map updating method, map updating device, self-mobile device and storage medium
CN113077396B (en) Straight line segment detection method and device, computer readable medium and electronic equipment
CN114943954A (en) Parking space detection method, device and system
CN114943805A (en) Parking occlusion determination method, device, equipment, storage medium and program product
CN111665522B (en) Method, medium, terminal and device for filtering static object in laser scanning pattern
CN113721240A (en) Target association method and device, electronic equipment and storage medium
CN114025089A (en) Video image acquisition jitter processing method and system
CN113808196A (en) Plane fusion positioning method and device, electronic equipment and storage medium
CN113776520A (en) Map construction method, map use method, map construction device, map use device, robot and medium
CN112991451A (en) Image recognition method, related device and computer program product
CN112329547A (en) Data processing method and device
CN110599542A (en) Method and device for local mapping of adaptive VSLAM (virtual local area model) facing to geometric area

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination