Method and device for correcting heading of self-propelled equipment, and self-propelled equipment
By detecting the position and obstacles of the self-moving device, determining the heading angle and correcting the heading, the problem that the self-moving device cannot make autonomous corrections when starting in the working area is solved, and autonomous heading correction is achieved in non-charging base station areas, thereby improving convenience.
Patent Information
- Application Number
- CN202211278843.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2042-10-19
AI Technical Summary
When existing self-propelled equipment is started in the work area, it cannot automatically perform heading correction and needs to be manually transported to the charging base station for correction, which causes inconvenience in use.
By detecting the position of the mobile device, detecting obstacles, and calculating the heading angle, the device is controlled to travel a preset distance in a straight line. The current heading angle is determined using the coordinate information of the target position and the current position, and the actual heading angle of the device is corrected relative to the preset reference heading.
The heading correction of the self-moving equipment in the non-charging base station area is realized, which reduces the trouble of manual handling and improves convenience and autonomous operation capability.
Smart Images

Figure CN115562287B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of autonomous mobile equipment, and in particular to a heading correction method, apparatus, computer equipment, storage medium, and computer program product for an autonomous mobile equipment. Background Art
[0002] Autonomous devices are smart devices that can move autonomously when driven by a driver. In recent years, autonomous device technology has rapidly developed, and their widespread use has brought significant convenience to people's lives. Examples of autonomous devices include lawn mowers, robot vacuums, and intelligent robots.
[0003] When autonomous vehicles are in motion, their working heading is crucial. They must follow the set working heading to operate along the designated working path. Autonomous vehicles typically initialize their working heading upon startup to ensure accurate working heading. Autonomous vehicles are typically powered on at a charging station, so traditional methods for correcting their heading also use the charging station as a reference.
[0004] However, in actual application, there may be situations where the self-moving device needs to be started in the working area. If the traditional heading correction method of the self-moving device is used, the self-moving device can only be manually moved to the charging base station for starting and completing the heading correction of the self-moving device, which brings inconvenience to use. Summary of the Invention
[0005] Based on this, it is necessary to provide a heading correction method, device, computer equipment, computer-readable storage medium and computer program product for a self-moving device that can improve convenience in order to address the above technical problems.
[0006] In a first aspect, the present application provides a method for correcting the heading of a self-propelled device. The method comprises:
[0007] In response to the calibration instruction, determining coordinate information of a current position of the self-mobile device;
[0008] Controlling the self-moving device to travel a preset distance in a straight line to obtain coordinate information of a target location;
[0009] Determining a current heading angle according to the coordinate information of the current position and the target coordinates;
[0010] The actual heading angle of the mobile device relative to a preset reference heading is corrected according to the current heading angle.
[0011] In one embodiment, controlling the self-moving device to travel a preset distance in a straight line to obtain coordinate information of a target location includes:
[0012] Performing obstacle detection on the surrounding environment of the self-moving device to determine a target path that can travel at least a preset distance;
[0013] The self-moving device is controlled to travel a preset distance in a straight line along the target path to obtain coordinate information of the target position.
[0014] In one embodiment, detecting obstacles in the surrounding environment of the self-moving device and determining a target path that can travel at least a preset distance includes:
[0015] Detecting obstacles around the self-moving device, and if an obstacle is detected around the self-moving device, determining the location of the obstacle;
[0016] Determining a distance and a direction of the obstacle relative to the current position based on the position of the obstacle and the current position;
[0017] Determining, based on the distance and direction of the obstacle relative to the current position, a plurality of candidate paths that can be traveled for at least a preset distance;
[0018] A candidate path with the smallest direction angle is selected from the multiple candidate paths as the target path.
[0019] In another embodiment, detecting obstacles around the self-moving device and determining the location of the obstacle if an obstacle is detected around the self-moving device includes:
[0020] Controlling the image acquisition device of the mobile device to rotate one circle to acquire multiple frames of environmental images;
[0021] Obstacle detection is performed on the multiple frames of environmental images, and if obstacles are detected in the surroundings according to the image recognition result, the positions of the obstacles are determined.
[0022] In another embodiment, detecting obstacles in the surrounding environment of the self-moving device and determining a target path that can travel at least a preset distance includes:
[0023] Detecting whether there is an obstacle in front of the self-moving device;
[0024] If no obstacle is detected in front of the self-moving device, the straight path in front of the self-moving device is determined to be the target path.
[0025] In another embodiment, the method further comprises:
[0026] If an obstacle is detected in front of the mobile device, determining a distance of the obstacle relative to the current position;
[0027] If the distance of the obstacle relative to the current position is not less than the preset distance, the straight path ahead of the self-moving device is determined to be the target path.
[0028] In another embodiment, if the distance of the obstacle relative to the current position is less than a preset distance, the direction of travel of the self-moving device is adjusted, and the process returns to the step of detecting whether there is an obstacle in front of the self-moving device, until no obstacle is detected in front of the self-moving device after adjustment, or an obstacle is detected in front of the self-moving device after adjustment but the distance between the obstacle and the self-moving device is not less than the preset distance.
[0029] In a second aspect, the present application also provides a heading correction device for a self-propelled device. The device comprises:
[0030] a position acquisition module, configured to determine coordinate information of a current position of the mobile device in response to the calibration instruction;
[0031] A travel control module, configured to control the self-moving device to travel a preset distance in a straight line to obtain coordinate information of a target position;
[0032] A heading angle calculation module, configured to determine a current heading angle based on the coordinate information of the current position and the target coordinates;
[0033] The correction module is used to correct the actual heading angle of the mobile device relative to a preset reference heading according to the current heading angle.
[0034] In a third aspect, the present application further provides a self-propelled device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the following steps:
[0035] In response to the calibration instruction, determining coordinate information of a current position of the self-mobile device;
[0036] Controlling the self-moving device to travel a preset distance in a straight line to obtain coordinate information of a target location;
[0037] Determining a current heading angle according to the coordinate information of the current position and the target coordinates;
[0038] The actual heading angle of the mobile device relative to a preset reference heading is corrected according to the current heading angle.
[0039] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:
[0040] In response to the calibration instruction, determining coordinate information of a current position of the self-mobile device;
[0041] Controlling the self-moving device to travel a preset distance in a straight line to obtain coordinate information of a target location;
[0042] Determining a current heading angle according to the coordinate information of the current position and the target coordinates;
[0043] The actual heading angle of the mobile device relative to a preset reference heading is corrected according to the current heading angle.
[0044] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:
[0045] In response to the calibration instruction, determining coordinate information of a current position of the self-mobile device;
[0046] Controlling the self-moving device to travel a preset distance in a straight line to obtain coordinate information of a target location;
[0047] Determining a current heading angle according to the coordinate information of the current position and the target coordinates;
[0048] The actual heading angle of the mobile device relative to a preset reference heading is corrected according to the current heading angle.
[0049] The above-mentioned heading correction method, device, computer device, storage medium and computer program product of the self-moving device, when the heading of the self-moving device needs to be corrected, controls the self-moving device to travel a preset distance in a straight line, uses the coordinate information of the target position and the current position to determine the current heading angle, and then corrects the actual heading angle of the self-moving device relative to the preset reference heading based on the previous heading angle, so that the heading correction of the self-moving device is not restricted by the charging base station, thereby improving convenience. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A diagram illustrating an application environment of a heading correction method for a mobile device according to an embodiment;
[0051] Figure 2 1 is a flow chart of a method for correcting the heading of a mobile device according to an embodiment;
[0052] Figure 3 is a schematic diagram of the current heading direction of a mobile device in one embodiment;
[0053] Figure 4 is a schematic diagram of a mobile device before heading correction in one embodiment;
[0054] Figure 5 A schematic diagram of an automatic device after heading correction in one embodiment;
[0055] Figure 6 A schematic diagram of the relative positions of a self-moving device and an obstacle in one embodiment;
[0056] Figure 7 A schematic diagram of a target path determined in one embodiment;
[0057] Figure 8 A schematic diagram of controlling a mobile device to travel along a target path to a target location in one embodiment;
[0058] Figure 9 is a flow chart of a heading correction method for a mobile device according to another embodiment;
[0059] Figure 10 is a structural block diagram of a heading correction device for a mobile device in one embodiment;
[0060] Figure 11 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0062] The heading correction method for a self-moving device provided in the embodiment of the present application can be applied to a variety of self-moving devices, such as sweeping robots, lawn mowers, and intelligent driving robots. The self-moving device includes a device body, the movement of which is controlled by a controller 101. The controller 101 is connected to an auxiliary device provided on the device body, wherein the auxiliary device can be at least one of an image acquisition device 102, a positioning device 103, a laser radar 104, and a sensor 105. Among them, the sensor 105 can be a touch sensor, a distance sensor, etc. By equipping the self-moving device with a variety of auxiliary devices, the intelligence level of the self-moving device can be improved.
[0063] In one embodiment, Figure 2 As shown, a heading correction method for a self-propelled device is provided, and the method is applied to Figure 1 The following steps are used as an example to illustrate the self-mobile device in the example:
[0064] Step 202: In response to the calibration instruction, determine the coordinate information of the current position of the mobile device.
[0065] Specifically, when the correction condition is met, a correction instruction is generated, and in response to the correction instruction, coordinate information of the current position of the mobile device is determined.
[0066] Among them, the correction conditions can be set according to the needs of the actual application scenarios. For example, the correction conditions may include: when a start-up command is received, when the self-moving device works for a set period of time, when the self-moving device is restarted, when the self-moving device completes the operation in a task area, when the self-moving device is ready to move to the target task area, when the self-moving device is not started at the charging base station, or when the heading angle of the self-moving device produces a cumulative error, correction can be triggered.
[0067] In response to the calibration instruction, the self-mobile device can determine the coordinate information of the current position of the self-mobile device on the map based on a pre-built map and a positioning device. The positioning device is installed on the self-mobile device and can be at least one of GPS, inertial navigation, VSLAM, Wi-Fi positioning, Bluetooth positioning, and UWB positioning. The coordinate information of the current position is obtained by recording positioning using GPS, inertial navigation, VSLAM, Wi-Fi positioning, Bluetooth positioning, UWB positioning, etc.
[0068] Step 204 : Control the self-mobile device to travel a preset distance in a straight line to obtain coordinate information of the target location.
[0069] A charging base station, typically consisting of a charging cradle or charging station, provides charging for mobile devices. The charging base station's orientation serves as the mobile device's reference heading. When a mobile device is activated, it typically exits the charging base station in this direction. This heading also serves as a reference for controlling the mobile device's travel direction. During travel, the mobile device typically moves in accordance with or perpendicular to the reference heading.
[0070] In one method, the orientation of the base station is used as a preset reference heading. After the mobile device is charged, or in response to a start command, the mobile device can adjust its body to be perpendicular to the charging base station and exit the station based on the charging orientation of the base station.
[0071] During operation, autonomous vehicles typically use a reference heading, such as moving along or perpendicular to the reference heading. However, if the autonomous vehicle is activated within the work area, it cannot adjust its heading based on the charging base station's orientation because it is not within the charging base station.
[0072] To address this issue, in this embodiment, the self-mobile device is controlled to travel a preset distance in a straight line to obtain the coordinate information of the target location, thereby determining the current heading after traveling the preset distance. For example, if the current location is determined not to be within a charging base station based on the coordinate information, the self-mobile device is controlled to travel a preset distance in a straight line to obtain the coordinate information of the target location.
[0073] Step 206: Determine the current heading angle based on the coordinate information of the current position and the coordinates of the target position.
[0074] Among them, such as Figure 3 As shown in the figure, the azimuth angle determined by the coordinates of the current position and the target position is determined as the current heading angle. If the current position is the oigin point and the target position is the aim point, the current heading angle yaw is:
[0075] yaw=atan2(aim.y–origin.y,aim.x–origin.x)
[0076] Among them, aim.x is the horizontal coordinate of the target position, aim.y is the vertical coordinate of the target position, origin.x is the horizontal coordinate of the current position, origin.y is the vertical coordinate of the current position, and atan2 is the inverse trigonometric function.
[0077] Step 208: Correct the actual heading angle of the mobile device relative to the preset reference heading according to the current heading angle.
[0078] A self-propelled device must have the correct heading angle to function properly. This heading angle is the angle relative to the preset reference heading. The preset reference heading serves as a reference for controlling the direction of travel of the self-propelled device. When planning a work path, the self-propelled device typically moves parallel to or perpendicular to the preset reference heading. If the self-propelled device is not activated within a base station, the reference heading cannot be determined, and its actual heading angle relative to the reference heading cannot be determined.
[0079] like Figure 4 As shown, the angle parallel to the base station is set as the preset reference heading of 0 degrees, and the angle perpendicular to the base station is set as 90 degrees. If the mobile device is powered on outside the base station, the default heading angle is 0 degrees. However, the current orientation of the mobile device deviates from the preset reference heading, and its actual heading angle is not 0 degrees. If the actual heading angle of the mobile device is not corrected, it will not function properly.
[0080] The traditional calibration method requires manual transport of the mobile device back to the base station, where the base station obtains the reference heading to calibrate the actual heading angle, which is inconvenient for the user. In this embodiment, the actual heading angle of the mobile device relative to the preset reference heading is corrected based on the current heading angle.
[0081] Specifically, if the angle parallel to the base station is used as the reference heading, the current heading angle can be used as the actual heading angle of the mobile device relative to the preset reference heading. Figure 5 As shown, the calculated current heading angle is 45 degrees, so the actual course angle of the mobile device relative to the preset reference heading is corrected to 45 degrees.
[0082] If the angle perpendicular to the base station is used as the reference heading, 90 degrees minus the current heading angle can be used as the actual heading angle of the mobile device relative to the preset reference heading.
[0083] This method allows the heading correction of the self-moving device to be free from the restrictions of the charging base station. For example, even if the self-moving device is not started at the charging base station, the actual heading angle relative to the preset reference heading can be corrected, reducing the trouble of moving the self-moving device. One application scenario is that the self-moving device is in operation and the user turns it off and goes out, causing the self-moving device to stop in the middle of the operation. When the user returns home and turns on the self-moving device to continue the operation, the self-moving device uses the method of this application to correct the actual heading angle, so that the self-moving device has the correct direction guidance.
[0084] The above-mentioned heading correction method for a self-moving device, when the heading of the self-moving device needs to be corrected, controls the self-moving device to travel a preset distance in a straight line, uses the coordinate information of the target position and the current position to determine the current heading angle, and then corrects the actual heading angle of the self-moving device relative to the preset reference heading based on the previous heading angle, so that the heading correction of the self-moving device is not restricted by the charging base station, thereby improving convenience.
[0085] In another embodiment, controlling the self-moving device to travel a preset distance in a straight line to obtain coordinate information of the target position includes: performing obstacle detection on the environment surrounding the self-moving device to determine a target path that can travel at least the preset distance; controlling the self-moving device to travel a preset distance in a straight line along the target path to obtain coordinate information of the target position.
[0086] Specifically, when it is determined based on the coordinate information of the current position that the current position is not at the charging base station, obstacle detection is performed on the surrounding environment of the mobile device to avoid hitting obstacles during the course correction process.
[0087] The self-propelled device is equipped with obstacle detection equipment, including image acquisition devices, lidar, and distance sensors. These devices detect obstacles in the surrounding environment and determine a target path that allows the self-propelled device to travel at least a preset distance. This means that the self-propelled device searches the surrounding environment to find the target path, allowing it to travel the preset distance along the target path without encountering obstacles. The self-propelled device then travels the preset distance in a straight line to reach the target location, allowing the current heading angle to be calculated based on the current and target locations.
[0088] To accurately determine the heading angle, the distance traveled in a straight line should be sufficiently long. The preset distance can be the length of the mobile device itself, meaning the mobile device travels at least one length of the preset distance in a straight line to the target location. The preset distance can also be a fixed distance set based on experience, such as 1 meter, requiring the mobile device to travel at least one meter in a straight line to the target location. After the mobile device reaches the target location, the coordinates of the target location are recorded.
[0089] In this embodiment, by controlling the self-moving device to avoid obstacles during the course correction process, the self-moving device can be prevented from colliding with obstacles during the course correction process.
[0090] In another embodiment, obstacle detection is performed on the environment around the self-moving device to determine a target path that can travel at least a preset distance, including: obstacle detection is performed on the environment around the self-moving device, and if an obstacle is detected in the surrounding area, the position of the obstacle is determined; based on the position of the obstacle and the current position, the distance and direction of the obstacle relative to the current position are determined; based on the distance and direction of the obstacle relative to the current position, multiple candidate paths that can travel at least the preset distance are determined; and a candidate path with the smallest direction angle is selected from the multiple candidate paths as the target path.
[0091] Among them, the self-moving device can detect surrounding obstacles in a variety of ways, such as through image detection, through distance sensors, and through laser radar.
[0092] By detecting obstacles around the mobile device, when an obstacle is detected, the position of the obstacle is determined. When determining the position of the obstacle, the position of the obstacle in the map coordinate system is determined according to a preset coordinate system conversion relationship.
[0093] Based on the location of the obstacle and the current location, the distance and direction of the obstacle relative to the current location are determined. Based on the distance and direction of the obstacle relative to the current location, multiple candidate paths that can travel at least a preset distance are determined. Specifically, in the process of determining candidate paths, there are the following situations:
[0094] 1. If the distance between the obstacle and the current position is less than the preset distance, the direction of the obstacle cannot provide sufficient distance for the mobile device to travel in a straight line, and the path in this direction is a non-target path.
[0095] 2. If the distance between the obstacle and the current position is not less than the preset distance, the direction of the obstacle provides sufficient distance for the mobile device to travel in a straight line, and the path in this direction is the target path.
[0096] 3. There are no obstacles ahead, and the path in this direction is the target path.
[0097] The candidate path with the smallest bearing angle is selected as the target path. When determining the bearing angle, for candidate paths with obstacles ahead, the bearing angle is calculated based on the coordinates of the obstacle and the current position. For candidate paths without obstacles ahead, the bearing angle is calculated for any point on the candidate path based on the coordinates of any point on the candidate path and the current position. After calculating the bearing angles for each candidate path, the candidate path with the smallest bearing angle is selected as the target path.
[0098] By selecting the candidate path with the smallest direction angle as the target path, the self-moving device can travel to the target location with the smallest deviation angle, thereby improving the heading correction efficiency.
[0099] Among them, the auxiliary tool of the self-moving device can be controlled to rotate one circle to detect the surrounding obstacles. Take the auxiliary tool as an image acquisition device as an example, Figure 6 As shown, the image acquisition device is controlled to rotate once to capture multiple frames of environmental images. Image recognition is performed on each of the captured frames. Image recognition can be performed locally or by communicating with the cloud to send the multiple frames to the cloud, where they are recognized to determine whether there are obstacles in each frame.
[0100] Among them, image recognition can use a pre-trained neural network model, input each frame of the environmental image into the pre-trained neural network model, and the neural network model outputs whether the environmental image includes obstacles and the type of obstacles.
[0101] In this embodiment, the image acquisition device is controlled to rotate one circle to capture multiple frames of environmental images. The obstacle detection results of the multiple frames of environmental images are used to determine multiple candidate paths that can travel at least a preset distance. The candidate path with the smallest direction angle is selected from the multiple candidate paths as the target path. Figure 7 As shown, the target path with the smallest direction angle is selected from multiple candidate paths, as shown in Figure 8 As shown, the self-mobile device is controlled to travel at least a preset distance along a target path to a target location.
[0102] In this embodiment, the image acquisition device is first controlled to rotate once, capturing multiple frames of environmental images. These frames are then used to detect obstacles around the self-moving device and find the target path with the smallest azimuth angle. This method allows for the rapid and global determination of the target path with the lowest movement cost.
[0103] In another embodiment, obstacle detection is performed on the surrounding environment of the self-moving device to determine a target path that can travel at least a preset distance, including: detecting whether there is an obstacle in front of the self-moving device; if no obstacle is detected, determining the straight path in front of the self-moving device as the target path.
[0104] Specifically, when detecting obstacles around a self-moving device, it is possible to first detect whether there are obstacles in front. If there are no obstacles in front, the straight path in front of the self-moving device is directly used as the target path. If there is an obstacle in front, the distance of the obstacle relative to the current position is determined. If the distance of the obstacle relative to the current position is not less than the preset distance, it means that the straight path in front is far enough for the self-moving device to travel at least the preset distance, and the heading correction can be completed. The straight path in front of the self-moving device is determined as the target path. If the distance of the obstacle relative to the current position is less than the preset distance, it means that the straight path in front is not far enough for the self-moving device to travel at least the preset distance, and the heading correction cannot be completed. The direction of travel of the self-moving device is adjusted, and the detection of whether there are obstacles in front of the adjusted self-moving device is continued until no obstacle is detected in front of the adjusted self-moving device, or an obstacle is detected in front of the adjusted self-moving device but the distance between the obstacle and the self-moving device is not less than the preset distance.
[0105] In this embodiment, a traversal method is used to first detect whether there are any obstacles in front of the current self-moving device. If there are no obstacles in front of the self-moving device, or if there is an obstacle in front but the distance between the obstacle and the current position is not less than a preset distance, the straight path in front of the self-moving device is determined to be the target path. If there is an obstacle in front of the self-moving device and the distance between the obstacle and the current position is less than a preset distance, the direction of travel of the self-moving device is adjusted and obstacle detection is continued to determine whether the path in the adjusted direction can be used as the target path. This method uses a traversal method to search for the target path starting from the current direction, which can quickly locate the target path for heading correction.
[0106] like Figure 9 As shown, a heading correction method for a self-moving device includes the following steps:
[0107] Step 902: Determine coordinate information of the current location of the mobile device in response to the calibration instruction.
[0108] Step 904: Detect obstacles in the surrounding environment of the mobile device and determine a target path that can travel at least a preset distance.
[0109] Among them, the image acquisition device of the mobile device can be controlled to rotate one circle to collect multiple frames of environmental images, and obstacle detection can be performed on the multiple frames of environmental images. If an obstacle is detected in the surrounding according to the image recognition result, the position of the obstacle is determined. According to the position of the obstacle and the current position, the distance and direction of the obstacle relative to the current position are determined. According to the distance and direction of the obstacle relative to the current position, multiple candidate paths that can travel at least a preset distance are determined, and the candidate path with the smallest direction angle is selected as the target path from the multiple candidate paths.
[0110] Among them, it is also possible to detect whether there is an obstacle in front of the self-moving device. If no obstacle is detected in front of the self-moving device, the straight path in front of the self-moving device is determined to be the target path. If an obstacle is detected in front of the self-moving device, the distance of the obstacle relative to the current position is determined. If the distance of the obstacle relative to the current position is not less than the preset distance, the straight path in front of the self-moving device is determined to be the target path. If the distance of the obstacle relative to the current position is less than the preset distance, the direction of travel of the self-moving device is adjusted, and the step of detecting whether there is an obstacle in front of the self-moving device is returned until no obstacle is detected in front of the self-moving device after adjustment, or an obstacle is detected in front of the self-moving device after adjustment but the distance between the obstacle and the self-moving device is not less than the preset distance.
[0111] Step 906 , controlling the mobile device to travel a preset distance in a straight line along the target path to obtain coordinate information of the target location.
[0112] Step 908: Determine the current heading angle based on the coordinate information of the current position and the target coordinates.
[0113] Step 910: Correct the actual heading angle of the mobile device relative to the preset reference heading based on the current heading angle.
[0114] This heading correction method for a self-propelled device enables it to be calibrated even in non-charging locations, such as work areas, improving convenience. For example, a lawn mower can be calibrated even when it's started in the middle of a lawn, resolving the issue of requiring it to be calibrated at a charging station and avoiding the hassle of moving the machine around.
[0115] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0116] Based on the same inventive concept, embodiments of the present application also provide a heading correction device for a self-moving device for implementing the aforementioned heading correction method for a self-moving device. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more of the following embodiments of the heading correction device for a self-moving device can be found in the aforementioned limitations of the heading correction method for a self-moving device, and will not be further elaborated here.
[0117] In one embodiment, Figure 10 As shown, a heading correction device for a self-propelled device is provided, comprising:
[0118] The location acquisition module 1002 is configured to determine the coordinate information of the current location of the mobile device in response to the calibration instruction.
[0119] The travel control module 1004 is used to control the self-mobile device to travel a preset distance in a straight line to obtain the coordinate information of the target position.
[0120] The heading angle calculation module 1006 is used to determine the current heading angle according to the coordinate information of the current position and the target coordinates.
[0121] The correction module 1008 corrects the actual heading angle of the mobile device relative to the preset reference heading according to the current heading angle.
[0122] The above-mentioned heading correction device for the self-moving device, when it is necessary to correct the heading of the self-moving device, controls the self-moving device to travel a preset distance in a straight line, uses the coordinate information of the target position and the current position to determine the current heading angle, and then corrects the actual heading angle of the self-moving device relative to the preset reference heading based on the previous heading angle, so that the heading correction of the self-moving device is not restricted by the charging base station, thereby improving convenience.
[0123] In another embodiment, the walking control module includes:
[0124] A path planning module is used to detect obstacles in the environment surrounding the self-moving device and determine a target path that can travel at least a preset distance;
[0125] The control module is used to control the mobile device to travel a preset distance in a straight line along the target path to obtain the coordinate information of the target position.
[0126] In another embodiment, a path planning module is used to detect obstacles around the mobile device, and if an obstacle is detected around, determine the location of the obstacle; determine the distance and direction of the obstacle relative to the current location based on the location of the obstacle and the current location; determine multiple candidate paths that can travel at least a preset distance based on the distance and direction of the obstacle relative to the current location; and select the candidate path with the smallest direction angle from the multiple candidate paths as the target path.
[0127] Among them, the path planning module controls the image acquisition device of the mobile device to rotate one circle to collect multiple frames of environmental images; obstacle detection is performed on the multiple frames of environmental images, and if obstacles are detected around according to the image recognition results, the location of the obstacles is determined.
[0128] In another embodiment, the path planning module is configured to detect whether there is an obstacle in front of the self-moving device, and if no obstacle is detected in front of the self-moving device, determine the straight path in front of the self-moving device as the target path.
[0129] Among them, the path planning module is also used to determine the distance of the obstacle relative to the current position if an obstacle is detected in front of the mobile device. If the distance of the obstacle relative to the current position is not less than a preset distance, the straight path in front of the mobile device is determined to be the target path.
[0130] Among them, the path planning module is also used to adjust the direction of travel of the self-moving device if the distance of the obstacle relative to the current position is less than the preset distance, and return to the step of detecting whether there is an obstacle in front of the self-moving device, until no obstacle is detected in front of the self-moving device after adjustment, or an obstacle is detected in front of the self-moving device after adjustment but the distance between the obstacle and the self-moving device is not less than the preset distance.
[0131] Each module in the aforementioned heading correction device for a self-propelled device may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a computer device memory in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0132] In one embodiment, a self-mobile device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 11 As shown. The computer device includes a processor, memory, communication interface and other auxiliary devices connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a heading correction method for a self-moving device is implemented. Other auxiliary devices can be image acquisition devices, distance sensors, lidars, etc.
[0133] Those skilled in the art will understand that Figure 11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0134] In one embodiment, a self-moving device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the heading correction method of the self-moving device in the above embodiments when executing the computer program.
[0135] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the heading correction method for a mobile device according to the above embodiments are implemented.
[0136] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the heading correction method for a mobile device according to the above embodiments are implemented.
[0137] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0138] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0139] The above embodiments merely illustrate several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A heading correction method for a self-propelled device, characterized in that: The method comprises: determining coordinate information of a current position of the self-mobile device in response to a correction instruction, the correction instruction being generated when a correction condition is satisfied; Controlling the image acquisition device of the mobile device to rotate one circle to acquire multiple frames of environmental images; Performing obstacle detection on the multiple frames of environmental images, and if obstacles are detected around according to the image recognition results, determining the location of the obstacles; Determining a distance and a direction of the obstacle relative to the current position based on the position of the obstacle and the current position; Determining, based on the distance and direction of the obstacle relative to the current position, a plurality of candidate paths that can be traveled for at least a preset distance; Selecting a candidate path with the smallest direction angle from the multiple candidate paths as the target path; Controlling the self-moving device to travel a preset distance in a straight line along the target path to obtain coordinate information of the target position; Determining a current heading angle according to the coordinate information of the current position and the coordinate information of the target position; The actual heading angle of the mobile device relative to a preset reference heading is corrected according to the current heading angle.
2. The method according to claim 1, characterized in that The preset distance is the body length of at least one of the self-moving devices.
3. The method according to claim 2, characterized in that The method further comprises: The multiple frames of environmental images are sent to the cloud, and the multiple frames of environmental images are identified in the cloud to determine whether there are obstacles in each frame of the environmental image.
4. The method according to claim 3, characterized in that The method further comprises: Each frame of the environmental image is input into a pre-trained neural network model, and the neural network model outputs whether each frame of the environmental image includes an obstacle and the type of obstacle.
5. The method according to claim 2, characterized in that The method further comprises: Detecting whether there is an obstacle in front of the self-moving device; If no obstacle is detected in front of the self-moving device, the straight path in front of the self-moving device is determined to be the target path.
6. The method according to claim 5, characterized in that The method further comprises: If an obstacle is detected in front of the mobile device, determining a distance of the obstacle relative to the current position; If the distance of the obstacle relative to the current position is not less than the preset distance, determining the straight path ahead of the mobile device as the target path; If the distance of the obstacle relative to the current position is less than the preset distance, the process returns to the step of controlling the image acquisition device of the mobile device to rotate one circle to acquire multiple frames of environmental images.
7. A heading correction device for a self-propelled device, characterized in that: The device comprises: a position acquisition module for determining coordinate information of a current position of the self-mobile device in response to a correction instruction, wherein the correction instruction is generated when a correction condition is satisfied; a path planning module configured to control the image acquisition device of the self-mobile device to rotate once to capture multiple frames of environmental images; perform obstacle detection on the multiple frames of environmental images, and if an obstacle is detected in the surroundings based on the image recognition results, determine the location of the obstacle; determine the distance and direction of the obstacle relative to the current position based on the location of the obstacle and the current position; determine multiple candidate paths that can be traveled for at least a preset distance based on the distance and direction of the obstacle relative to the current position; and select the candidate path with the smallest direction angle from the multiple candidate paths as the target path; A control module is used to control the self-moving device to travel a preset distance in a straight line along the target path to obtain coordinate information of the target position; A heading angle calculation module, configured to determine a current heading angle based on the coordinate information of the current position and the target coordinates; The correction module is used to correct the actual heading angle of the mobile device relative to a preset reference heading according to the current heading angle.
8. The heading correction device according to claim 7, characterized in that: The path planning module is further configured to send the multiple frames of environmental images to the cloud, identify the multiple frames of environmental images in the cloud, and determine whether there are obstacles in each frame of the environmental image.
9. A self-propelled device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, 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 6 are implemented.
Citation Information
Patent Citations
Vehicle navigation positioning method, vehicle and storage medium
CN113448328A
Course correction method and system, self-moving device and readable storage medium
CN113703432A
Vision-based design method for precise inter-row positioning and operation of intelligent orchard agricultural machinery
CN114812536A