Robot and mapping method, device and storage medium thereof

By detecting and optimizing the linear trajectory and positioning keyframes during the robot drawing construction process, the coordinate system alignment error problem caused by positioning deviation of UWB base station is solved, and the accuracy and stability of robot navigation are improved.

CN115371661BActive Publication Date: 2025-01-10UBTECH ROBOTICS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210970258.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-12
Publication Date
2025-01-10
Estimated Expiration
2042-08-12

AI Technical Summary

Technical Problem

In large scenarios, due to the possible deviation in positioning of UWB base stations, the conversion relationship errors in the alignment of the map coordinate system and the UWB coordinate system are large, and the accuracy of alignment cannot be accurately affected, affecting the robot navigation.

Method used

By detecting the straight line trajectory during the robot's graph construction process, inserting the positioning keyframes, and loopback constraint optimization is performed according to the displacement of adjacent straight line trajectories to generate an accurate map.

Benefits of technology

The map accuracy of the robot navigation is improved, the trouble of manual alignment is avoided, the angle error of positioning keyframes is reduced, and the robot is accurately positioned in large scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115371661B_ABST
    Figure CN115371661B_ABST
Patent Text Reader

Abstract

The present application relates to the field of robot mapping, and proposes a robot and its mapping method, device and storage medium. The method comprises: detecting the straight line trajectory of the robot during the mapping process; inserting the corresponding positioning keyframe according to the straight line trajectory, the positioning keyframe comprising the first posture of the robot in the positioning coordinate system when the robot is located on the straight line trajectory, and the second posture of the robot in the map coordinate system; optimizing the second posture of the positioning keyframe with loop constraints according to the first posture determined by the displacement between the positioning keyframes of two adjacent straight line trajectories, and generating a map according to the optimized positioning keyframe. The trouble of first mapping and then aligning is avoided, and the positioning keyframe determined by the straight line trajectory is optimized according to the first posture of the two positioning keyframes with loop constraints, which can effectively reduce the positioning error, thereby improving the accuracy of the robot navigation map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot mapping, and in particular to a robot and a mapping method, device and storage medium thereof. Background Art

[0002] When a robot navigates in a large scene, it usually needs to first use sensors such as single-line laser radar, multi-line laser radar, or cameras, RGB cameras, etc. as mapping devices to build a scene map. Due to the limited detection distance of the sensor, it is easy to fail to detect surrounding static objects such as walls in open areas in large scenes, and the robot cannot be accurately positioned.

[0003] To facilitate robot positioning, UWB (Ultra Wide Band) base stations can be deployed in large scenes. The robot can measure the distance with surrounding base stations by deploying UWB tags, and determine the robot's positioning coordinates in the UWB coordinate system based on the coordinates of the base stations and the distance between the base stations and the robot.

[0004] After the map is built by the mapping equipment, the conversion relationship between the UWB coordinates and the map coordinate system is calculated through manual calibration, so that the robot with low-cost sensors can be combined with the wireless positioning information of the UWB tag to stably locate and navigate in the map.

[0005] However, in some large scenarios, the map constructed by the mapping equipment may be deformed, and the UWB base station positioning may also have slight deviations, resulting in large coordinate conversion errors in some areas when the map coordinate system and the UWB coordinate system are aligned to obtain a conversion relationship. The coordinates cannot be effectively aligned, and the determined map cannot be accurately and effectively used for robot navigation. Summary of the invention

[0006] In view of this, the embodiments of the present application provide a robot and a mapping method, device and storage medium thereof to solve the problem in the prior art that when mapping large scenes, due to the possible positioning deviation of the UWB base station positioning, the coordinates cannot be effectively aligned when the map coordinate system and the UWB coordinate system are aligned to obtain a conversion relationship, and the determined map cannot be accurately and effectively used for robot navigation.

[0007] A first aspect of an embodiment of the present application provides a robot mapping method, the method comprising:

[0008] Detecting a straight line trajectory of the robot during mapping;

[0009] Inserting a corresponding positioning key frame according to the straight track, wherein the positioning key frame includes a first posture of the robot in the positioning coordinate system when the robot is located on the straight track, and a second posture of the robot in the map coordinate system;

[0010] According to a first pose determined by the displacement between positioning key frames of two adjacent straight line trajectories, a second pose of the positioning key frame is optimized with loop constraints, and a map is generated according to the optimized positioning key frame.

[0011] In combination with the first aspect, in a first possible implementation manner of the first aspect, inserting a corresponding positioning key frame according to the straight line trajectory includes:

[0012] Acquire a first positioning point detected first after the start of the straight line trajectory and a second positioning point detected last before the end of the straight line trajectory;

[0013] Determine the orientation of the first pose of the positioning key frame according to the coordinates of the first positioning point and the second positioning point in the positioning coordinate system;

[0014] The position of the second positioning point in the positioning coordinate system is used as the coordinates of the first pose of the positioning key frame.

[0015] In combination with the first aspect, in a second possible implementation manner of the first aspect, before inserting the corresponding positioning key frame according to the straight line trajectory, the method further includes:

[0016] Determine a first positioning point detected first after the start of the straight line trajectory and a second positioning point detected last before the end of the straight line trajectory;

[0017] When the distance between the first positioning point and the second positioning point is greater than a predetermined first distance threshold, the trajectory of the current linear motion of the robot is determined to be a valid linear trajectory.

[0018] In combination with the first aspect, in a third possible implementation manner of the first aspect, detecting whether the robot is in a linear motion state includes:

[0019] When the robot is a wheeled chassis, determining whether the robot is in a linear motion state according to detection information of the odometer;

[0020] Alternatively, when the robot is a foot-type chassis, it is determined whether the robot is in a linear motion state according to a control instruction of the robot.

[0021] In combination with the second possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, before determining that the trajectory of the current linear motion of the robot is a valid linear trajectory, the method further includes:

[0022] It is determined that the distance between the second positioning point of the current linear motion and the second positioning point of the previous linear trajectory is greater than a second distance threshold.

[0023] In combination with the first aspect, in a fifth possible implementation manner of the first aspect, before generating a map according to the optimized positioning keyframe, the method further includes:

[0024] Perform loop detection based on the image detected by the main sensor during map construction;

[0025] According to the loop constraints detected by the main sensor, loop optimization is performed on the map keyframes determined by the main sensor;

[0026] Generate a map based on the optimized positioning keyframes, including:

[0027] Generate a map based on the optimized positioning keyframes and map keyframes.

[0028] In combination with the first aspect, in a sixth possible implementation manner of the first aspect, performing loop constraint optimization processing on a second pose of the positioning key frame according to a first pose determined by a displacement between positioning key frames of two adjacent straight line trajectories, including:

[0029] Determine the position error of the first pose of the positioning key frame of the two straight line trajectories according to a preset positioning accuracy;

[0030] Determining an angular error of the first posture according to the positioning accuracy and a length from a first positioning point to a second positioning point in the straight line trajectory;

[0031] According to the position error and the angle error, a loop closure constraint optimization process is performed on the second posture of the positioning key frame.

[0032] A second aspect of an embodiment of the present application provides a robot mapping device, the device comprising:

[0033] A straight line trajectory detection unit, used to detect the straight line trajectory of the robot during the mapping process;

[0034] A positioning key frame determining unit, configured to insert a corresponding positioning key frame according to the straight track, wherein the positioning key frame includes a first posture of the robot in the positioning coordinate system when the robot is located on the straight track, and a second posture of the robot in the map coordinate system;

[0035] The loop constraint unit is used to optimize the second posture of the positioning key frame according to the first posture determined by the displacement between the positioning key frames of two adjacent straight line trajectories, and generate a map according to the optimized positioning key frame.

[0036] A third aspect of an embodiment of the present application provides a robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in any one of the first aspects when executing the computer program.

[0037] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.

[0038] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application determine the positioning key frame when the robot is on the straight line trajectory by detecting the straight line trajectory of the robot in the mapping process, optimize the second posture of the positioning key frame with loop constraints through the displacement determined by the first posture of the positioning key frame of the two straight line trajectories, generate a map based on the optimized positioning key frame, so that the robot can be aligned in the process of mapping, avoiding the trouble of mapping first and then aligning, and based on the positioning key frame determined by the straight line trajectory, the second posture is optimized with loop constraints according to the first posture of the two positioning key frames, which can effectively reduce the angular error of the positioning key frame, thereby improving the accuracy of the robot's navigation map. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0040] Figure 1 It is a schematic diagram of an implementation scenario of a robot mapping method provided in an embodiment of the present application;

[0041] Figure 2 It is a schematic diagram of the implementation process of a robot mapping method provided in an embodiment of the present application;

[0042] Figure 3 is a schematic diagram of a straight line trajectory of a screening robot provided in an embodiment of the present application;

[0043] Figure 4 is a schematic diagram of a robot mapping device provided in an embodiment of the present application;

[0044] Figure 5 It is a schematic diagram of the robot provided in the embodiment of the present application. DETAILED DESCRIPTION

[0045] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0046] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0047] The robot's mapping algorithm usually includes two threads: front-end odometer and back-end loop optimization. The front-end generally uses lidar or visual sensors to calculate the odometer to estimate the robot's own posture and record a key frame at a certain displacement or time interval. The key frame retains sensor information and map posture data. The back-end optimization is a program that runs synchronously with the front-end. In the back-end optimization program, it is detected whether the historical key frame is in the same scene as the current key frame. If it is recognized as the same scene, a displacement constraint is established between the current key frame and the historical key frame, so that all key frames between the current key frame and the historical key frame become loops, so as to optimize the loop and optimize the posture of all key frames on the loop. After loop optimization, the current map is generated according to the posture of the new key frame.

[0048] However, in some large scenarios, due to some deformations in the maps created by the mapping equipment and slight errors in the calibration of the UWB base station, after the map coordinate system and the UWB coordinate system are aligned to obtain the conversion relationship, the coordinate conversion errors in some areas are large and the coordinates cannot be aligned well. In these areas, the error of UWB positioning information after conversion to the map coordinate system is too large to be used for navigation.

[0049] Based on this, the embodiment of the present application proposes a mapping method based on a robot in a large scene, such as Figure 1 The following is a schematic diagram of the implementation scenario of the robot's mapping method. Figure 1 As shown, the implementation scenario is a large scenario, in which multiple positioning base stations are set up, and the coordinates of each positioning base station in the positioning coordinate system can be obtained in advance by measuring with a total station. During the movement of the robot, the robot may pass by an area where a positioning base station is set up. The positioning base station exchanges data with the robot, and the positioning coordinates of the robot in the positioning coordinate system can be obtained. When the robot is in a state of linear motion and the distance of the linear motion is large, during the same linear motion process, the robot may obtain two or more positioning coordinates determined by different base stations. When the robot moves in a straight line for a short distance, the robot may not be able to obtain the robot's mapping coordinates, or may only obtain one positioning coordinate determined by the same base station.

[0050] The positioning coordinate system is a coordinate system determined by the positioning base station in the robot's working scene. The map coordinate system is a coordinate system determined by the robot based on the starting position or other specific positions when building a map.

[0051] In the process of mapping, the robot can collect environmental image information based on the robot's main sensor. The main sensor can include one or more of a single-line laser radar, a multi-line laser radar, a monocular camera, a multi-camera, or a depth camera.

[0052] Figure 2 A schematic diagram of the implementation process of a robot mapping method provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the method includes:

[0053] In S201 , the straight line trajectory of the robot during the mapping process is detected.

[0054] In the embodiment of the present application, the robot may be a wheeled robot, or may be a legged robot.

[0055] When the robot is a wheeled robot, the chassis of the robot is a wheeled chassis. The movement state of the robot can be monitored according to the speed of the odometer of the wheeled robot to determine whether the movement trajectory of the robot is a straight trajectory.

[0056] According to the collected odometer information, if the linear speed of the robot's current direction is greater than a predetermined speed threshold (greater than 0), the speed of the odometer in other directions is 0 or less than the predetermined speed threshold, and the angular velocity is 0 or less than the predetermined angular velocity threshold, then the robot is determined to be in a linear motion state. When the speed of the odometer in other directions is not 0 or greater than the predetermined speed threshold, or the angular velocity is not 0 or greater than the predetermined angular velocity threshold, then the robot is determined to end the linear motion state.

[0057] The odometer may include one or more sensors. For example, the odometer may include one or more of a wheel encoder odometer, a laser radar odometer, a visual odometer, and an IMU odometer.

[0058] When the robot is a legged robot, it will sway left and right when it moves in a straight line. The trajectory detected by the odometer will sway left and right. Therefore, in order to accurately detect the straight line trajectory of the legged robot, the control instruction content given by the monitoring system can be used to determine whether the instruction content is straight line movement. When the robot starts to move forward after the straight line movement instruction is detected, it is determined as the starting time of the straight line movement state. After the forward end instruction or other instructions are detected, the robot stops moving forward, which is determined as the end time of the robot's straight line movement.

[0059] After determining the straight line trajectory of the robot when it moves, the straight line trajectory can be further screened.

[0060] During the mapping process, when the robot moves a short straight-line distance, the robot may not obtain the positioning coordinates in the positioning coordinate system, or may only obtain one positioning coordinate in the straight-line trajectory. In order to accurately locate the robot, the straight-line trajectory with a straight-line moving distance less than the first distance threshold can be screened out and determined as an invalid straight-line trajectory. In the process of straight-line movement, the robot can obtain two or more positioning coordinates determined by the positioning base station. The first distance threshold can be determined according to the size of the scene and the density of the positioning base stations. In a possible implementation, the first distance threshold can be 4-8 meters.

[0061] In order to make the positioning coordinates (coordinates in the positioning coordinate system) in the two straight line trajectories used for map optimization determined by different positioning base stations as much as possible, the distance between the positioning coordinates of the corresponding positions in the two straight line trajectories can be set to be greater than the second distance threshold. For example, the distance between the positioning coordinates at the beginning of the two straight line trajectories can be greater than the second distance threshold. The second distance threshold can be determined according to the size of the scene and the density of the positioning base stations. In a possible implementation, the second distance threshold can be 20-50 meters.

[0062] The base station used for robot positioning may include any one or more of a UWB base station, a Bluetooth base station, and a WIFI base station.

[0063] like Figure 3 The figure shows a schematic diagram of a straight line trajectory of a screening robot. The robot starts from a stationary state, the robot receives a straight line movement instruction, or detects that the robot is in a straight line motion state, and the length d1 from the first positioning point to the second positioning point of the straight line trajectory L1 is greater than the first distance threshold, then it is determined that the straight line trajectory L1 of the moving process meets the preset length requirement. By performing positioning detection through the positioning base station, it can be determined that when the robot is at the beginning of the straight line trajectory, the first positioning point pu1' of L1 is determined by the positioning base station, and when it is at the end of the straight line trajectory, the second positioning point pu2' of L1 is determined by the positioning base station.

[0064] After the straight line trajectory L1 ends, it is detected that the robot is in a straight line motion state again, and the length d2 from the first positioning point to the second positioning point in the straight line trajectory L2 is greater than the first distance threshold. It can be detected that at the beginning of the trajectory L2, the first positioning point pu1 of L2 is determined by the positioning base station, and at the end of the trajectory, the second positioning point pu2 of L2 is determined by the positioning base station. The distance between the corresponding positioning points in two adjacent straight line trajectories can be calculated. For example, the distance pu1-pu1' of the first positioning point in two adjacent straight line trajectories, or the distance pu2-pu2' of the second positioning point in two adjacent straight line trajectories can be calculated. If the calculated distance pu1-pu1' of the first positioning point or the distance pu2-pu2' of the second positioning point is greater than the second distance threshold, the straight line trajectory is determined to be a valid straight line trajectory, otherwise, the straight line trajectory is determined to be an invalid straight line trajectory.

[0065] The first positioning point may be a positioning point detected by the positioning base station after the straight line track starts, and the second positioning point may be a positioning point detected by the positioning base station before the straight line track ends.

[0066] After determining that the straight line trajectory L2 is a valid straight line trajectory, the straight line trajectory can be used as a basis for subsequent straight line trajectory calculations, and further straight line trajectory screening can be performed until all straight line trajectories in the robot path are screened.

[0067] In S202, corresponding positioning key frames are inserted according to the straight line trajectory.

[0068] The positioning key frame includes the first posture of the robot in the positioning coordinate system when the robot is located on a straight track, and the second posture of the robot in the map coordinate system.

[0069] In the embodiment of the present application, the positioning coordinate system is a coordinate system determined based on the positioning base station, that is, a coordinate system determined when the coordinates of the pre-set positioning base station are determined. The map coordinate system is a coordinate system determined by the robot for mapping, based on the collected map information, and the origin of the map coordinate system can be the starting point of the robot when mapping.

[0070] In the embodiment of the present application, the positioning key frame may include the first position of the robot in the positioning coordinate system and the second position of the robot in the map coordinate system. It may also include the positioning key frame sequence number, the main sensor information for mapping, the length from the first positioning point to the second positioning point of the straight line trajectory, etc.

[0071] When determining the first posture, the coordinates of the first posture can be taken as the coordinates of the first positioning point according to the positioning point of the straight line trajectory, such as the coordinates of the second positioning point, and the direction of the straight line can be taken as the direction of the first posture. For example, the coordinates of the second positioning point are (pu2_x, pu2_y), and the coordinates of the first positioning point are (pu1_x, pu1_y), then the orientation of the robot at the second positioning point can be determined as: atan((pu2_y-pu1_y) / (pu2_x-pu1_x)). Therefore, when the coordinates of the first posture in the key frame are determined by the coordinates of the second positioning point, the first posture can be expressed as (pu2_x, pu2_y, pu_theta), where pu_theta=atan((pu2_y-pu1_y) / (pu2_x-pu1_x)). The determined positioning keyframe can be added to the map keyframe in the mapping algorithm. The displacement between the current positioning keyframe and the previous positioning keyframe is recorded, for example, the length between the second positioning point pu2' of the previous positioning keyframe and the current second positioning point pu2.

[0072] Since the first pose includes the orientation of the robot, and the orientation is determined based on the straight trajectory of the robot, the loop constraint optimization calculation of the robot can be performed more effectively based on the orientation of the robot.

[0073] The second position and posture of the robot in the map coordinate system can be determined based on the orientation information and displacement information of the main sensor of the robot.

[0074] In a possible implementation, when the robot starts to build a map, the robot can be controlled to perform linear motion, so that the positioning key frame for loop constraint optimization can be obtained as quickly as possible.

[0075] In S203, according to the first pose determined by the displacement between the positioning key frames of two adjacent straight line trajectories, the second pose of the positioning key frame is optimized with loop constraints, and a map is generated according to the optimized positioning key frame.

[0076] In the embodiment of the present application, each straight line trajectory may correspond to a positioning keyframe. The binding constraint relationship between two adjacent positioning keyframes, that is, the binding constraint relationship between the current positioning keyframe and the positioning keyframe of the previous straight line trajectory, may be determined according to the first pose in the positioning keyframe in the positioning coordinate system.

[0077] When the first position of the robot is the position determined by the last positioning point (i.e., the second positioning point) before the end of the robot's linear trajectory, the length of the robot at the corresponding position of the two linear trajectories can be determined according to the first position in the two adjacent linear trajectories. For example, the first position of the previous linear trajectory is (pu2_x', pu2_y', pu_theta'), and the first position of the current linear trajectory is (pu2_x, pu2_y, pu_theta), and the length between the first positions of the two adjacent linear trajectories can be determined.

[0078] During the mapping process, when the mapping program is optimized at the back end, if the number of positioning keyframes is greater than 2, the nearest positioning keyframe to the current positioning keyframe can be searched, that is, the previous positioning keyframe that can be used to establish the binding constraint relationship. After finding the nearest previous positioning keyframe, the second pose of the robot when it moves from the position of the previous positioning keyframe to the position of the current positioning keyframe, that is, the position and orientation of the robot in the map coordinate system, can be optimized based on the position error and angle error of the first pose of the current positioning keyframe.

[0079] The position error of the first pose can be determined as Error_p according to the preset positioning accuracy error Error_p. When determining the orientation in the first pose in the positioning keyframe, the orientation can be determined according to the coordinates of the first positioning point and the second positioning point in the linear trajectory of the positioning keyframe in the positioning coordinate system. Therefore, when the distance between the first positioning point and the second positioning point is d2, the angle error of the first pose can be calculated in combination with the determined position error of the first pose. For example, based on the length d2 from the first positioning point to the second positioning point, the angle error of the orientation can be calculated as: Error_a=atan(Error_p / d2). Based on the determined position error and angle error, the pose of the map keyframe corresponding to the positioning keyframe (the map keyframe includes the pose of the robot in the map coordinate system, and each positioning keyframe corresponds to a map keyframe) can be subjected to loop constraint optimization, including the optimization of the second pose of the map keyframe corresponding to the positioning keyframe. For example, the map coordinate system position and orientation of the robot in the map keyframe can be subjected to loop constraint and optimization.

[0080] In an embodiment of the present application, the robot can obtain map key frames at predetermined time intervals or predetermined displacement intervals. The robot can determine the positioning key frames during the movement of the robot based on the collected straight line trajectory. When the positioning key frames of the robot are determined, the map key frames can be generated accordingly. When two adjacent positioning key frames are detected, the positioning range of the first posture can be determined based on the displacement of the first posture in the two adjacent positioning key frames, combined with a predetermined positioning accuracy, and based on the positioning range, the positioning of the map key frame between the current straight line trajectory and the first posture of the previous straight line trajectory is optimized.

[0081] Based on the orientation of the first pose determined by the linear trajectory and the length from the first positioning point to the second positioning point, the angular error Error_a of the orientation of the first pose can be determined by Error_a=atan(Error_p / d2). Error_p is the position error of the first pose, and d2 is the length from the first positioning point to the second positioning point in the linear trajectory.

[0082] After determining the position error and angle error of the robot at the position corresponding to the positioning keyframe of the straight trajectory through the positioning coordinate system, when the robot moves from the position of the previous positioning keyframe to the position of the current positioning keyframe, the robot’s second posture, i.e., the map keyframe, can be loop-optimized based on the position, position error, orientation, and angle error of the current positioning keyframe.

[0083] While building the map, the map keyframes collected by the main sensor are optimized with loop constraints based on the position information and orientation angle information determined by the positioning base station in the positioning coordinate system to obtain the optimized map keyframes.

[0084] During the acquisition process, the read map keyframes can also be compared with the previously stored map keyframes. If they match, image-based loop constraints are established, all map keyframes in the loop are re-loop optimized, and the recorded map keyframes and the poses of the map keyframes are updated.

[0085] While building the map, the embodiment of the present application determines the position accuracy Error_p of the two straight line trajectories through the positioning information of the positioning base station, and the distance d2 between the first positioning point and the second positioning point of the straight line trajectory, and combines the determined position accuracy Error_p to obtain the angle accuracy Error_a when the robot is in the first posture. For example, the angle accuracy can be expressed as: Error_a = atan (Error_p / d2). And based on the orientation of the first posture determined by the straight line trajectory, the loop constraint of the robot can be calculated more accurately.

[0086] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0087] Figure 4 A schematic diagram of a robot mapping device provided in an embodiment of the present application, such as Figure 4 As shown, the device comprises:

[0088] A straight line trajectory detection unit 401 is used to detect the straight line trajectory of the robot during the mapping process;

[0089] A positioning key frame determining unit 402 is used to insert a corresponding positioning key frame according to the straight track, wherein the positioning key frame includes a first posture of the robot in the positioning coordinate system when the robot is located on the straight track, and a second posture of the robot in the map coordinate system;

[0090] The loop constraint unit 403 is used to optimize the second pose of the positioning key frame with loop constraints according to the first pose determined by the displacement between the positioning key frames of two adjacent straight line trajectories, and generate a map according to the optimized positioning key frame.

[0091] Figure 4 The robot's mapping device is shown in FIG. Figure 2 The mapping method of the robot shown corresponds to .

[0092] Figure 5 is a schematic diagram of a robot provided in one embodiment of the present application. Figure 5 As shown, the robot 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50, such as a robot mapping program. When the processor 50 executes the computer program 52, the steps in the above-mentioned robot mapping method embodiments are implemented. Alternatively, when the processor 50 executes the computer program 52, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0093] Exemplarily, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 52 in the robot 5.

[0094] The robot may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5It is only an example of the robot 5 and does not constitute a limitation of the robot 5. The robot 5 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the robot may also include input and output devices, network access devices, buses, etc.

[0095] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0096] The memory 51 may be an internal storage unit of the robot 5, such as a hard disk or memory of the robot 5. The memory 51 may also be an external storage device of the robot 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the robot 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the robot 5. The memory 51 is used to store the computer program and other programs and data required by the robot. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0097] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0098] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0099] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0100] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0102] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0103] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0104] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A robot mapping method, characterized in that: The method comprises: Detecting a straight line trajectory of the robot during mapping; Inserting a corresponding positioning key frame according to the straight line trajectory includes: obtaining a first positioning point detected first after the start of the straight line trajectory, and a second positioning point detected last before the end of the straight line trajectory; determining the orientation of a first position of the positioning key frame according to the coordinates of the first positioning point and the second positioning point in the positioning coordinate system; using the position of the second positioning point in the positioning coordinate system as the coordinates of the first position of the positioning key frame; the positioning key frame includes the first position of the robot in the positioning coordinate system when the robot is located on the straight line trajectory, and the second position of the robot in the map coordinate system; According to the angle error and position error of the first pose determined by the displacement between the positioning key frames of two adjacent straight line trajectories, the second pose of the positioning key frame is optimized with loop closure constraints, including: determining the position error of the first pose determined by the displacement of two adjacent positioning points of the straight line trajectory according to a preset positioning accuracy; determining the angle error of the first pose according to the positioning accuracy and the length from the first positioning point to the second positioning point in the straight line trajectory; and optimizing the second pose of the positioning key frame with loop closure constraints according to the position error and the angle error; Generate a map based on the optimized positioning keyframes.

2. The method according to claim 1, characterized in that Before inserting the corresponding positioning key frame according to the straight line trajectory, the method further includes: Determine a first positioning point detected first after the start of the straight line trajectory and a second positioning point detected last before the end of the straight line trajectory; When the distance between the first positioning point and the second positioning point is greater than a predetermined first distance threshold, the trajectory of the current linear motion of the robot is determined to be a valid linear trajectory.

3. The method according to claim 2, characterized in that Detecting whether the robot is in a linear motion state comprises: When the robot is a wheeled chassis, determining whether the robot is in a linear motion state according to detection information of the odometer; Alternatively, when the robot is a foot-type chassis, it is determined whether the robot is in a linear motion state according to a control instruction of the robot.

4. The method according to claim 2, characterized in that: Before determining that the trajectory of the current linear motion of the robot is a valid linear trajectory, the method further includes: It is determined that the distance between the second positioning point of the current linear motion and the second positioning point of the previous linear trajectory is greater than a second distance threshold.

5. The method according to claim 1, characterized in that: Before generating a map according to the optimized positioning keyframe, the method further includes: Perform loop detection based on the image detected by the main sensor during map construction; According to the loop constraints detected by the main sensor, loop optimization is performed on the map keyframes determined by the main sensor; Generate a map based on the optimized positioning keyframes, including: Generate a map based on the optimized positioning keyframes and map keyframes.

6. A robot mapping device, characterized in that: The device comprises: A straight line trajectory detection unit, used to detect the straight line trajectory of the robot during the mapping process; A positioning key frame determination unit, for inserting a corresponding positioning key frame according to the straight line trajectory, comprising: obtaining a first positioning point detected first after the start of the straight line trajectory, and a second positioning point detected last before the end of the straight line trajectory; determining the orientation of the first position of the positioning key frame according to the coordinates of the first positioning point and the second positioning point in the positioning coordinate system; using the position of the second positioning point in the positioning coordinate system as the coordinates of the first position of the positioning key frame; the positioning key frame includes the first position of the robot in the positioning coordinate system when the robot is located on the straight line trajectory, and the second position of the robot in the map coordinate system; A loop constraint unit is used to optimize the second posture of the positioning key frame with loop constraints according to the angle error and position error of the first posture determined by the displacement between the positioning key frames of two adjacent straight line trajectories, including: determining the position error of the first posture determined by the displacement of two adjacent positioning points of the straight line trajectory according to a preset positioning accuracy; determining the angle error of the first posture according to the positioning accuracy and the length from the first positioning point to the second positioning point in the straight line trajectory; optimizing the second posture of the positioning key frame with loop constraints according to the position error and the angle error, and generating a map according to the optimized positioning key frame.

7. A robot comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Closed-loop detection method based on reverse index key frame selection strategy, storage medium and equipment

    CN113298014A

  • Map construction method, device and equipment

    CN114627253A