Map generation method and device of robot, equipment, medium and product
By collecting and analyzing TOF sensor data in the robot's in-situ spin state, using coordinate system conversion and brute force matching algorithms, the problem of map construction error during in-situ rotation is solved, and a fast and accurate robot map construction is achieved.
Patent Information
- Application Number
- CN202411714789.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
AI Technical Summary
The existing robot mapping scheme based on TOF sensors is prone to errors when the robot rotates in place, affecting the accuracy of map construction.
When the robot is in the spin state in place, preset sensors are used to collect data and analyze it through coordinate system conversion and brute force matching algorithms to generate an accurate map.
By performing data analysis in the spin state in situ, fast and accurate robot mapping is achieved, improving the robot's map construction accuracy in complex environments.
Smart Images

Figure CN119618192A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot technology, and in particular to a robot map generation method, device, equipment, medium and product. Background Art
[0002] With the rapid development of robotics, autonomous navigation and positioning technologies of robots have also been widely studied and applied. In robot navigation, map construction (SLAM, Simultaneous Localization and Mapping) is a key technology. As a high-precision distance measurement tool, TOF (Time-of-Flight) sensors play an important role in the robot mapping process. However, existing mapping solutions based on TOF sensors are prone to errors when the robot rotates in place, affecting the accuracy of map construction.
[0003] Therefore, how to analyze the data collected by the sensors based on the brute force matching algorithm to complete fast and accurate robot mapping when the robot is in a spinning state is an urgent problem to be solved. Summary of the invention
[0004] The present invention provides a robot map generation method, device, equipment, medium and product, so as to analyze the data collected by the sensor based on the brute force matching algorithm when the robot is in a spinning state in situ to complete fast and accurate robot mapping.
[0005] According to one aspect of the present invention, a map generation method for a robot is provided, comprising:
[0006] During the movement of the target robot, the movement state and rotation angle of the target robot are determined;
[0007] Determine the target acquisition frame number, and when the motion state is a spinning state in place and the rotation angle is less than or equal to the standard angle, use a preset sensor to collect data of the target acquisition frame number to obtain target acquisition data;
[0008] The target acquisition data is subjected to coordinate system conversion processing to obtain the final acquisition data, and the final acquisition data is matched on the candidate construction map based on the brute force matching algorithm, so as to update the candidate construction map according to the matching result and generate the target construction map.
[0009] According to another aspect of the present invention, there is provided a map generating device for a robot, comprising:
[0010] A determination module is used to determine the motion state and rotation angle of the target robot during the motion of the target robot;
[0011] The module is used to determine the target acquisition frame number, and when the motion state is a spinning state in place and the rotation angle is less than or equal to the standard angle, a preset sensor is used to collect data of the target acquisition frame number to obtain target acquisition data;
[0012] The generation module is used to perform coordinate system conversion processing on the target acquisition data to obtain the final acquisition data, and match the final acquisition data on the candidate construction map based on the brute force matching algorithm, so as to update the candidate construction map according to the matching results and generate the target construction map.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the map generation method for the robot described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the map generation method for a robot described in any embodiment of the present invention when executed.
[0018] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the robot map generation method according to any embodiment of the present invention is implemented.
[0019] The technical solution of the embodiment of the present invention is to determine the motion state and rotation angle of the target robot during the motion of the target robot; determine the target acquisition frame number, and when the motion state is a spinning state in place and the rotation angle is less than or equal to the standard angle, use a preset sensor to collect data of the target acquisition frame number to obtain target acquisition data; perform coordinate system conversion processing on the target acquisition data to obtain final acquisition data, and match the final acquisition data on the candidate construction map based on a brute force matching algorithm, so as to update the candidate construction map based on the matching result and generate a target construction map. By analyzing the data collected by the sensor based on the brute force matching algorithm when the robot is in a spinning state in place, fast and accurate robot mapping can be completed, and the accuracy of robot map construction in complex environments can be improved.
[0020] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 is a flow chart of a robot map generation method provided in Embodiment 1 of the present invention;
[0023] Figure 2 is a flow chart of a robot map generation method provided by Embodiment 2 of the present invention;
[0024] Figure 3 is a structural block diagram of a map generating device for a robot provided in Embodiment 3 of the present invention;
[0025] Figure 4 It is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", "target", "candidate", "alternative", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. The acquisition, storage, use, processing, etc. of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0028] Embodiment 1
[0029] Figure 1 is a flow chart of a robot map generation method provided by the first embodiment of the present invention; this embodiment can be applied to the case where the robot is in a state of motion and is spinning in place, and the data collected by the sensor is analyzed based on the brute force matching algorithm to complete the robot map building quickly and accurately. The method can be executed by the robot map generation device, and the robot map generation device can be implemented in the form of hardware and / or software. The robot map generation device can be configured in an electronic device, such as a robot, such as Figure 1 As shown, the map generation method of the robot includes:
[0030] S101. During the movement of the target robot, determine the movement state and rotation angle of the target robot.
[0031] The target robot refers to the robot for robot mapping. The target robot can be equipped with preset sensors, differential wheels, gyroscopes, and left and right wheels. The motion state can be a spinning state, a straight state, a backward state, or an arc turning state. The rotation angle refers to the rotation angle of the target robot within the preset monitoring time. The rotation angle can be detected by the gyroscope configured on the target robot.
[0032] Optionally, during the movement of the robot, the motion state and rotation angle of the target robot may be detected based on a preset period (such as 20 ms). Specifically, a preset gyroscope may be used to detect the rotation angle of the target robot.
[0033] Optionally, during the movement of the target robot, the movement state of the target robot is determined, including: during the movement of the target robot, using differential wheels to determine the rotational speed direction of the left and right wheels of the target robot; determining the movement state of the target robot according to the rotational speed direction of the wheels of the target robot.
[0034] The arc turning state refers to the state in which the target robot is turning and walking, and the walking route is an arc. The rotation speed direction refers to the rotation speed and direction of the left and right wheels of the target robot. The motion state is a spinning state, a straight state, a backward state or an arc turning state.
[0035] Optionally, during the movement of the target robot, the differential wheels on the target robot can be controlled at corresponding detection moments according to a preset detection cycle to detect the rotation speed and direction of the left and right wheels of the target robot, that is, to determine the rotation speed direction of the left and right wheels of the target robot.
[0036] Optionally, according to the rotational speed direction of the wheels of the target robot, if the rotational speeds of the left wheel and the right wheel of the target robot are the same and in opposite directions, it can be determined that the motion state of the target robot is a spinning state.
[0037] It should be noted that the advantage of generating a robot map by considering the rotation angle collected by the gyroscope when judging that the robot is in a state of spinning in place is that the rotation angle of the robot in the state of spinning in place can be directly obtained through the gyroscope data. Compared with calculating through the wheel speed while walking, the error of the gyroscope is significantly smaller.
[0038] S102, determining the target acquisition frame number, and when the motion state is a spinning state and the rotation angle is less than or equal to the standard angle, using a preset sensor to acquire data of the target acquisition frame number to obtain target acquisition data.
[0039] Among them, the target acquisition frame number refers to the frame number of the target control preset sensor for data acquisition, and the standard angle refers to the preset angle for evaluating the rotation amplitude of the target robot, and the standard angle can be 180 degrees, for example. The preset sensor may include a preset distance sensor and a posture sensor, and the preset distance sensor may be a TOF sensor (Time-of-Flight). The TOF sensor performs a distance strategy through light reflection, and can measure the distance between the target robot and the nearest reflective material in front of it. The preset sensor can be installed in front of the target robot and in the same direction as the robot. The target acquisition data may include: robot posture data and sensor data corresponding to the target acquisition frame number. The sensor data includes distance data collected by the TOF sensor and posture data collected by the posture sensor. The posture data can be calculated by a wheel odometer, and the obtained posture data can also be corrected by matching.
[0040] Optionally, based on the TOF sensor and the posture sensor, the posture data and distance data of the robot corresponding to the target collection frame number can be periodically collected to obtain the target collection data.
[0041] Optionally, determining the target acquisition frame number includes: determining the minimum angle and maximum angle that the target robot needs to rotate from one grid to the next based on the target resolution of the target map, the maximum range and the minimum effective distance of the preset distance sensor; determining the target acquisition frame number based on the minimum angle, maximum angle and standard angle.
[0042] The target construction map refers to the navigation and positioning map of the area where the target robot is located constructed during the operation of the target robot, and the target construction map can specifically be a grid map. The maximum range refers to the farthest distance that can be measured by the preset distance sensor. The minimum effective distance refers to the shortest distance that can be measured by the preset distance sensor. The target acquisition frame number can be, for example, 40 frames.
[0043] Exemplarily, the minimum angle that the target robot needs to rotate from one grid to the next grid can be determined based on the formula "acos(resolution*resolution / (2*(Xm*Xm)))", where Xm refers to the maximum range and resolution refers to the target resolution of the target map.
[0044] Exemplarily, the maximum angle that the target robot needs to rotate from one grid to the next grid can be determined based on the formula "acos(resolution*resolution / (2*(Ym*Ym)))", where Ym refers to the minimum effective distance and resolution refers to the target resolution of the target map.
[0045] Optionally, a first ratio of the standard angle to the minimum angle and a second ratio of the standard angle to the maximum angle may be determined, and the target acquisition frame number may be determined based on an average value of the first ratio and the second ratio.
[0046] It should be noted that in the case where the robot turns 90 degrees left and then 90 degrees right, although it does not appear to have turned to the naked eye, the data will record the entire process of turning left and right, and the rotation angle obtained at this time is 180 degrees.
[0047] S103, coordinate system conversion processing is performed on the target collected data to obtain final collected data, and matching is performed on the candidate constructed map based on the final collected data based on a brute force matching algorithm, so as to update the candidate constructed map according to the matching result and generate a target constructed map.
[0048] Among them, the target acquisition data collected by the preset sensor of the target robot control is located in the local coordinate system, and the final acquisition data refers to the data obtained after two coordinate system conversion processes are performed on the target acquisition data. Specifically, the target acquisition data can be first transferred to the global coordinate system and then to the local coordinate system corresponding to the last frame to obtain the final acquisition data.
[0049] Optionally, coordinate system conversion processing is performed on the target acquisition data to obtain the final acquisition data, including: based on a preset coordinate conversion strategy, converting the sensor data in the target acquisition data from the local coordinate system to the global coordinate system to obtain the global acquisition data; determining the target coordinate system corresponding to the sensor data collected in the last frame of the target acquisition data, and converting the global acquisition data to the target coordinate system to obtain the final acquisition data. The target coordinate system refers to the local coordinate system corresponding to the position of the robot in the last frame.
[0050] It should be noted that the global coordinate system is considered to be the odometer coordinate system in the robot system, that is, the reference of the actual distance traveled by the robot. The preset distance sensor can only obtain the distance of the nearest obstacle in front of the robot, which is relative to the robot and is in the local coordinate system. Therefore, the data in the local coordinate system needs to be transferred to the global coordinate system when the robot starts, for unified calculation. Assuming that the global coordinates of the robot are robotx, roboty, robott, and the preset distance sensor in the target acquisition data detects the distance as distance, then the coordinates (obstaclex, Obstacley) corresponding to the target acquisition data in the global coordinate system can be determined by the following formula:
[0051] obstaclex=robotx+(distance*cos(robott))
[0052] Obstacley=roboty+(distance*sin(robott))
[0053] It should be noted that the purpose of switching to the global coordinate system is to unify the robot data at different positions. This is the reference system used for matching. The purpose of converting to the local coordinate system of the last frame is to facilitate the calculation of sampling during subsequent matching. By calculating the coordinates of the data after rotating around the local coordinate system, it is equivalent to rotating the robot, which can be used as a sampling of the possible correct position of the machine during matching.
[0054] Optionally, matching is performed on the candidate constructed map based on the final collected data and based on a brute force matching algorithm, including: based on the brute force matching algorithm, projecting the final collected data on the candidate constructed map to obtain candidate sampling points, and performing position sampling and angle sampling on each candidate sampling point to obtain a sampling score corresponding to each candidate sampling point; and determining whether the match to the candidate constructed map is successful based on a correlation between the sampling score and a preset sampling threshold.
[0055] Among them, the Brute-Force algorithm (BF algorithm for short) is a common pattern matching algorithm. The candidate construction map refers to the robot map that has not been updated.
[0056] Optionally, a brute force matching algorithm can be used to match the recorded data with the known map to obtain the current best pose. If the match is successful, the data is inserted into the map in sequence; if the match fails, all data is cleared.
[0057] Optionally, the candidate construction map is updated according to the matching results to generate a target construction map, including: if the matching of the candidate construction map is successful, the corresponding target sampling position and target sampling angle are determined, and the target sampling position and target sampling angle are converted back to the global coordinate system to obtain the global position; data is inserted into the candidate construction map according to the global position to update the candidate construction map and generate the target construction map.
[0058] Optionally, matching and updating based on a brute force matching algorithm to obtain a target map construction process may include the following steps:
[0059] 1) Based on the brute force matching algorithm, the final collected data is projected onto the candidate construction map and rotated sampling is performed.
[0060] Optionally, the entire area can be projected with the target robot's starting point as the origin and the target resolution as the unit (5 cm is selected here). The current position obtained from the final collected data is divided by 0.05 and then rounded off to the nearest integer, which is the grid position.
[0061] It should be noted that rotation sampling is to obtain data for illustration or matching. The reason for collecting data during rotation is that the gyroscope error is small. After determining the maximum and minimum angles required to reach the next grid through rotation, we can use the actual rotation action of the machine during movement, such as the bow-shaped cleaning used by our robot, which generally rotates 90 degrees, divided by the above angular resolution to obtain the amount of sensor data that can be collected by rotating 90 degrees in theory, and then fine-tune it on this basis to be slightly less than the theoretical amount, which is rotation sampling.
[0062] 2) Rotate according to the target coordinate system, and then project the rotated coordinates onto the grid map as angle sampling;
[0063] Exemplarily, in the local coordinate system, the data obtained by rotation can be regarded as a whole, which can be understood as a frame of data. The whole is sampled and selected according to a preset angle threshold, such as one sampling point of 1 degree, and 10 degrees of sampling points are collected, that is, 5 points are sampled in each positive and negative direction, namely 1, 2, 3, 4, 5, -1, -2, -3, -4, -5, plus the default 0 degree, a total of 11 sampling points.
[0064] 3) Perform position sampling on all grids; assuming the position sampling is k, then all sampling points are moved -k grids and then stored, -(k-1) grids, and then recorded until k grids are moved, and both the x and y directions must be moved separately to obtain all position samplings;
[0065] It should be noted that position sampling is to translate the rotation sampled data and the angle sampled data in units of one grid. The translation is divided into four directions, namely up, down, left and right. The sampling method is similar to the angle sampling. The angle sampling is clockwise and counterclockwise, and the position sampling is in the four directions of up, down, left and right, and the number of samples is also preset, such as 3, then (-3, -3), (-3, -2), (-3, -1), (-3, 0), (-3, 1), (-3, 2), (-3, 3), (-2, -3)... and so on.
[0066] 4) Calculate the corresponding average value of the probability of the grid corresponding to the sampling points in all cases;
[0067] It should be noted that the grid probability is only related to the number of times the TOF hits the point during acquisition. When collecting data, when hitting the same position, the probability of the corresponding grid will increase until it reaches the set maximum value. The cartographer probability update method can be used to update the grid probability.
[0068] 5) Obtain the highest score among all samples and determine whether the score is greater than a preset threshold of 0.6. If so, the match is successful, and the corresponding target sampling position and target sampling angle are determined as the final matching result;
[0069] 6) According to the target sampling position and target sampling angle in the final matching result, the target sampling position is matched with the robot posture at the corresponding time, and the data is inserted according to the original position to update the candidate construction map and obtain the target construction map.
[0070] It should be noted that the original position is because all the data have been integrated into the local coordinate system of the last frame of data. It is necessary to restore the data according to the original position angle of the robot and insert the data at that time.
[0071] It should be noted that, because the final collected data is the data converted to the coordinate system of the last frame, after the matching is successful, it is necessary to perform another conversion to obtain the data in the global coordinate system.
[0072] Optionally, when the matching is successful, the candidate constructed map may be updated according to the target collected data to obtain the target constructed map.
[0073] The technical solution of the embodiment of the present invention is to determine the motion state and rotation angle of the target robot during the motion of the target robot; determine the target acquisition frame number, and when the motion state is a spinning state in place and the rotation angle is less than or equal to the standard angle, use a preset sensor to collect data of the target acquisition frame number to obtain target acquisition data; perform coordinate system conversion processing on the target acquisition data to obtain final acquisition data, and match the final acquisition data on the candidate construction map based on a brute force matching algorithm, so as to update the candidate construction map based on the matching result and generate a target construction map. By analyzing the data collected by the sensor based on the brute force matching algorithm when the robot is in a spinning state in place, fast and accurate robot mapping can be completed, and the accuracy of robot map construction in complex environments can be improved.
[0074] Embodiment 2
[0075] Figure 2 is a flow chart of a robot map generation method provided in Embodiment 2 of the present invention; based on the above embodiments, this embodiment provides a preferred example of robot map building, specifically, Figure 2 As shown, the method includes:
[0076] S201. During the movement of the target robot, a differential wheel is used to determine the rotational speed direction of the left and right wheels of the target robot.
[0077] S202: Determine the motion state of the target robot and the rotation angle of the target robot according to the rotation direction of the wheels of the target robot.
[0078] S203, determining the minimum angle and maximum angle that the target robot needs to rotate from one grid to the next grid according to the target resolution of the target constructed map, the maximum range and the minimum effective distance of the preset distance sensor.
[0079] S204. Determine the target acquisition frame number according to the minimum angle, the maximum angle and the standard angle, and when the motion state is a spinning state and the rotation angle is less than or equal to the standard angle, use a preset sensor to collect data of the target acquisition frame number to obtain target acquisition data.
[0080] S205 . Based on a preset coordinate conversion strategy, the sensor data in the target acquisition data is converted from the local coordinate system to the global coordinate system to obtain the global acquisition data.
[0081] S206 , determining a target coordinate system corresponding to the sensor data collected in the last frame of the target collected data, and converting the global collected data into the target coordinate system to obtain final collected data.
[0082] S207 . Based on the brute force matching algorithm, the final collected data is projected onto the candidate constructed map to obtain candidate sampling points, and position sampling and angle sampling are performed on each candidate sampling point to obtain a sampling score corresponding to each candidate sampling point.
[0083] S208: Determine whether the match of the candidate constructed map is successful based on the correlation between the sampling score and the preset sampling threshold.
[0084] S209: If the candidate constructed map is matched successfully, the corresponding target sampling position and target sampling angle are determined, and the target sampling position and target sampling angle are converted back to the global coordinate system to obtain the global position.
[0085] S210: insert data into the candidate construction map according to the global position to update the candidate construction map and generate a target construction map.
[0086] Embodiment 3
[0087] Figure 3 is a structural block diagram of a robot map generation device provided in the third embodiment of the present invention; this embodiment can be applied to the case where the robot is in a state of motion and is spinning in place, and the data collected by the sensor is analyzed based on the brute force matching algorithm to complete the rapid and accurate robot map building. The robot map generation device provided in the embodiment of the present invention can execute the robot map generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method; the robot map generation device can be implemented in the form of hardware and / or software, and configured in an electronic device with a robot map generation function, such as a robot, such as Figure 3 As shown, the map generating device of the robot specifically includes:
[0088] A determination module 301 is used to determine the motion state and rotation angle of the target robot during the motion of the target robot;
[0089] The module 302 is used to determine the target acquisition frame number, and when the motion state is the spinning state in place and the rotation angle is less than or equal to the standard angle, a preset sensor is used to acquire data of the target acquisition frame number to obtain target acquisition data;
[0090] The generation module 303 is used to perform coordinate system conversion processing on the target acquisition data to obtain final acquisition data, and match the final acquisition data on the candidate construction map based on a brute force matching algorithm, so as to update the candidate construction map according to the matching result and generate the target construction map.
[0091] The technical solution of the embodiment of the present invention is to determine the motion state and rotation angle of the target robot during the motion of the target robot; determine the target acquisition frame number, and when the motion state is a spinning state in place and the rotation angle is less than or equal to the standard angle, use a preset sensor to collect data of the target acquisition frame number to obtain target acquisition data; perform coordinate system conversion processing on the target acquisition data to obtain final acquisition data, and match the final acquisition data on the candidate construction map based on a brute force matching algorithm, so as to update the candidate construction map based on the matching result and generate a target construction map. By analyzing the data collected by the sensor based on the brute force matching algorithm when the robot is in a spinning state in place, fast and accurate robot mapping can be completed, and the accuracy of robot map construction in complex environments can be improved.
[0092] Furthermore, the determination module 301 is specifically used for:
[0093] During the movement of the target robot, a differential wheel is used to determine the rotational speed direction of the left and right wheels of the target robot;
[0094] The motion state of the target robot is determined according to the rotational speed direction of the wheels of the target robot; the motion state is a spinning state, a straight-moving state, a backward state or an arc turning state.
[0095] Further, the module 302 is specifically used for:
[0096] According to the target resolution of the target map, the maximum range and the minimum effective distance of the preset distance sensor, the minimum and maximum angles that the target robot needs to rotate from one grid to the next grid are determined;
[0097] Determine the target acquisition frame number based on the minimum angle, maximum angle and standard angle.
[0098] Furthermore, the generating module 303 is specifically used for:
[0099] Based on a preset coordinate transformation strategy, the sensor data in the target acquisition data is transformed from the local coordinate system to the global coordinate system to obtain the global acquisition data;
[0100] Determine the target coordinate system corresponding to the sensor data collected in the last frame of the target acquisition data, and convert the global acquisition data to the target coordinate system to obtain the final acquisition data.
[0101] Furthermore, the generating module 303 is also used for:
[0102] Based on the brute force matching algorithm, the final collected data is projected onto the candidate constructed map to obtain candidate sampling points, and position sampling and angle sampling are performed on each candidate sampling point to obtain the sampling score corresponding to each candidate sampling point;
[0103] Whether the match to the candidate constructed map is successful is determined based on the correlation between the sampling score and the preset sampling threshold.
[0104] Furthermore, the generating module 303 is also used for:
[0105] If the match of the candidate constructed map is successful, the corresponding target sampling position and target sampling angle are determined, and the target sampling position and target sampling angle are converted back to the global coordinate system to obtain the global position;
[0106] Data is inserted into the candidate construction map according to the global position to update the candidate construction map and generate a target construction map.
[0107] Embodiment 4
[0108] Figure 4 It is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0109] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0110] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0111] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the map generation method of the robot.
[0112] In some embodiments, the map generation method of the robot may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the map generation method of the robot described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the map generation method of the robot in any other appropriate manner (e.g., by means of firmware).
[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0115] In the context of the present invention, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0118] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0119] In one embodiment, the embodiment of the present invention further includes a computer program product, the computer program product includes a computer program, and when the computer program is executed by a processor, the robot map generation method of any embodiment of the present invention is implemented.
[0120] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0121] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0122] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A robot map generation method, characterized in that: include: During the movement of the target robot, the movement state and rotation angle of the target robot are determined; Determine the target acquisition frame number, and when the motion state is a spinning state in place and the rotation angle is less than or equal to the standard angle, use a preset sensor to collect data of the target acquisition frame number to obtain target acquisition data; The target acquisition data is subjected to coordinate system conversion processing to obtain the final acquisition data, and the final acquisition data is matched on the candidate construction map based on the brute force matching algorithm, so as to update the candidate construction map according to the matching result and generate the target construction map.
2. The method according to claim 1, characterized in that: During the movement of the target robot, the movement state of the target robot is determined, including: During the movement of the target robot, a differential wheel is used to determine the rotational speed direction of the left and right wheels of the target robot; The motion state of the target robot is determined according to the rotational speed direction of the wheels of the target robot; the motion state is a spinning state, a straight-moving state, a backward state or an arc turning state.
3. The method according to claim 1, characterized in that Determine the target acquisition frame number, including: According to the target resolution of the target map, the maximum range and the minimum effective distance of the preset distance sensor, the minimum and maximum angles that the target robot needs to rotate from one grid to the next grid are determined; Determine the target acquisition frame number based on the minimum angle, maximum angle and standard angle.
4. The method according to claim 1, characterized in that The target acquisition data is processed by coordinate system conversion to obtain the final acquisition data, including: Based on a preset coordinate transformation strategy, the sensor data in the target acquisition data is transformed from the local coordinate system to the global coordinate system to obtain the global acquisition data; Determine the target coordinate system corresponding to the sensor data collected in the last frame of the target acquisition data, and convert the global acquisition data to the target coordinate system to obtain the final acquisition data.
5. The method according to claim 1, characterized in that: According to the final collected data, matching is performed on the candidate construction map based on the brute force matching algorithm, including: Based on the brute force matching algorithm, the final collected data is projected onto the candidate constructed map to obtain candidate sampling points, and position sampling and angle sampling are performed on each candidate sampling point to obtain the sampling score corresponding to each candidate sampling point; Whether the match to the candidate constructed map is successful is determined based on the correlation between the sampling score and the preset sampling threshold.
6. The method according to claim 1, characterized in that The candidate build map is updated according to the matching results to generate the target build map, including: If the match of the candidate constructed map is successful, the corresponding target sampling position and target sampling angle are determined, and the target sampling position and target sampling angle are converted back to the global coordinate system to obtain the global position; Data is inserted into the candidate construction map according to the global position to update the candidate construction map and generate a target construction map.
7. A map generating device for a robot, characterized in that: include: A determination module is used to determine the motion state and rotation angle of the target robot during the motion of the target robot; The module is used to determine the target acquisition frame number, and when the motion state is a spinning state in place and the rotation angle is less than or equal to the standard angle, a preset sensor is used to collect data of the target acquisition frame number to obtain target acquisition data; The generation module is used to perform coordinate system conversion processing on the target acquisition data to obtain the final acquisition data, and match the final acquisition data on the candidate construction map based on the brute force matching algorithm, so as to update the candidate construction map according to the matching results and generate the target construction map.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the map generation method for a robot according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the map generation method for a robot according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the map generation method for a robot according to any one of claims 1 to 6.
