Method for self-mobile device to walk along the edge, self-mobile device and storage medium
By using preset sensors in the self-mobile device to identify boundaries and obtain slope information, and implementing corresponding control strategies, the boundary outage and omission problems when walking along the edge of the self-mobile device is solved, and a more efficient boundary walking effect is achieved.
Patent Information
- Application Number
- CN202410497993.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-04-24
AI Technical Summary
When walking along the edge, mobile devices are prone to boundary problems due to inaccurate identification, and it is difficult to maintain a suitable parallel distance, resulting in some parts of the work area being missed, affecting the overall work effect.
By obtaining the slope information between the mobile device and the boundary when the sensor is preset to identify the boundary in the self-mobile device, and performing a preset control strategy based on the positive and negative conditions of the slope information to maintain the parallel state between the self-mobile device and the boundary. Ensure the accuracy of walking along the edge.
It effectively avoids boundary problems and missing work areas, ensures that the self-mobile device can walk normally in a straight line on the boundary, and improves the overall working effect.
Smart Images

Figure CN118192609B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of self-moving equipment walking, and in particular to a method for a self-moving equipment to walk along an edge, a self-moving equipment and a storage medium. Background Art
[0002] As a machine that can autonomously perform tasks in specific work areas such as courtyards, self-moving devices have shown broad application prospects in the field of smart courtyards in recent years. Its core working principle is that according to the pre-set boundaries of the work area, the self-moving device can autonomously plan the path and perform the corresponding work tasks. However, in actual applications, the boundary shape of the work area is often not a regular geometric figure, but an irregular shape such as multiple broken line points. It is easy for the self-moving device to have boundary problems due to inaccurate recognition during the movement along the edge, and it is difficult for the self-moving device to maintain a suitable parallel distance during the movement, resulting in some parts of the work area being missed. The above problems will affect the overall working effect of the self-moving device.
[0003] Therefore, those skilled in the art are in urgent need of finding a new technical solution to solve the above technical problems. Summary of the invention
[0004] Based on this, it is necessary to provide a method for a self-moving device to walk along the edge, a self-moving device and a storage medium to address the above technical problems, so as to solve the technical problem in the prior art that the self-moving device walking along the edge affects the overall working effect.
[0005] To achieve the above object, a method for a self-moving device to walk along an edge is provided, the method comprising:
[0006] When a preset sensor in the self-moving device recognizes a boundary, the self-moving device is controlled to move along the boundary, and slope information between the self-moving device and the boundary is obtained;
[0007] When the slope information is not the preset fixed slope information, the self-moving device is controlled to execute the corresponding preset control strategy according to the positive or negative condition of the slope information, so as to control the self-moving device to continue walking along the boundary when the self-moving device is in a parallel state with the boundary.
[0008] Optionally, the controlling the self-moving device to walk along the border includes:
[0009] determining a distance between the self-moving device and the boundary;
[0010] When the distance is greater than or equal to a preset distance threshold, the self-moving device is controlled to move in a traction direction corresponding to the boundary, and when the self-moving device is parallel to the boundary, the self-moving device is controlled to move along the boundary.
[0011] Optionally, controlling the self-moving device to move in a traction direction corresponding to the boundary, and when the self-moving device is parallel to the boundary, controlling the self-moving device to move along the boundary, includes:
[0012] determining at least one of the pulling directions from the boundaries;
[0013] Controlling the self-moving device to move toward the traction direction;
[0014] When it is determined that the angle formed by the direction line segment of the self-moving device toward the boundary and the traction direction line segment is equal to the preset angle, it is determined that the self-moving device is parallel to the boundary, and the self-moving device is controlled to move in a straight line along the boundary.
[0015] Optionally, before determining that an angle formed by a direction of the self-moving device toward the boundary and the pulling direction is equal to a preset angle, the method includes:
[0016] determining a first angle according to boundary information of the boundary;
[0017] Determine a second angle according to the distance between the self-moving device and the boundary and the visual blind spot distance of the self-moving device;
[0018] Determine a third angle according to the second angle and the pulling direction line segment;
[0019] The angle formed between the direction line segment of the self-moving device toward the boundary and the pulling direction line segment is determined according to the first angle and the third angle.
[0020] Optionally, after determining the angle formed by the self-moving device toward the boundary and the pulling direction according to the first angle and the third angle, the method further includes:
[0021] Determining the angular velocity of the self-moving device according to the angle formed between the direction line segment of the self-moving device toward the boundary and the pulling direction line segment;
[0022] The linear velocity of the self-moving device is determined according to the angular velocity of the self-moving device; the linear velocity is the speed at which the self-moving device moves in a straight line along the boundary.
[0023] Optionally, controlling the self-moving device to execute a corresponding preset control strategy according to the positive or negative condition of the slope information includes:
[0024] When the slope information is a positive number, controlling the self-mobile device to turn left and move forward, and determining whether the slope information is the preset fixed slope information;
[0025] When the slope information is not the preset fixed slope information, determining a distance between the self-moving device and the boundary;
[0026] When the distance is less than a preset threshold distance, the self-moving device is controlled to advance to the boundary and then retreat from the boundary, and after the self-moving device completes retreating, the self-moving device is controlled to execute a preset turning strategy.
[0027] Optionally, the controlling the self-moving device to advance to the boundary and then retreat from the boundary, and after the self-moving device has retreated, controlling the self-moving device to execute a preset turning strategy includes:
[0028] Control the mobile device to retreat from the boundary to a target position by a preset distance threshold according to the boundary information of the boundary;
[0029] After controlling the mobile device to make a left arc forward turn at the target position, determining whether the slope information is the preset fixed slope information;
[0030] When the slope information is not the preset fixed slope information, determining whether the self-moving device touches the right boundary;
[0031] When the self-moving device contacts the right boundary, the self-moving device is controlled to perform a left arc backward turn at the contact position until it is determined that the slope information is the preset fixed slope information.
[0032] Optionally, controlling the self-moving device to execute a corresponding preset control strategy according to the positive or negative condition of the slope information includes:
[0033] When the slope information is a negative number, the self-moving device is controlled to turn right and move forward, and the body position of the self-moving device is controlled to move forward and exceed the turning position;
[0034] After performing a right arc forward turn at a completion position beyond the turning position, determining whether the slope information is the preset fixed slope information;
[0035] When the slope information is not the preset fixed slope information, controlling the self-moving device to rotate and determining the size of the rotation angle;
[0036] When the value of the rotation angle does not exceed the first preset angle value, the mobile device is controlled to perform a right arc backward turn until it is determined that the slope information is the preset fixed slope information.
[0037] Optionally, the method further includes:
[0038] Acquiring an area image corresponding to the boundary through a preset sensor in the mobile device;
[0039] Converting the regional image into a target image of a preset viewing angle according to a preset transformation algorithm;
[0040] Boundary information corresponding to the boundary is obtained from the target image; the boundary information is used for the self-moving device to walk along the boundary.
[0041] To achieve the above-mentioned purpose, a self-moving device is also provided, including a controller and a memory, wherein the memory stores a program for the self-moving device to walk along the edge, and the controller controls the self-moving device to walk along the edge program to control execution to implement the steps of the above-mentioned method for walking along the edge of the self-moving device.
[0042] In order to achieve the above-mentioned purpose, a computer-readable storage medium is also provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method of walking along the edge of a mobile device are implemented.
[0043] The method for a self-moving device to walk along the edge provided by the present invention comprises: when a preset sensor in the self-moving device identifies a boundary, controlling the self-moving device to walk along the boundary, and obtaining the slope information between the self-moving device and the boundary; when the slope information is not the preset fixed slope information, controlling the self-moving device to execute the corresponding preset control strategy according to the positive and negative conditions of the slope information, so that when the self-moving device and the boundary are in a parallel state, the self-moving device is controlled to continue to walk along the boundary. In this way, the self-moving device can be controlled to walk along the boundary first, and the relationship between the slope information between the self-moving device and the boundary and the preset slope information is detected. Then, when the slope information between the self-moving device and the boundary is not the preset slope information, the body state of the self-moving device is adjusted by the preset control strategy, so that the self-moving device can continue to walk along the boundary in a straight line. In this way, the body state of the self-moving device can be adjusted in real time according to different boundary conditions during the self-moving device walking along the boundary, so as to ensure the normal straight line walking along the boundary of the self-moving device, and thus ensure the overall working effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0045] Figure 1 It is a flow chart of an embodiment of a method for moving a mobile device along a sidewalk according to the present invention.
[0046] Figure 2 It is a schematic diagram of an embodiment of a method for a self-moving device to walk along a side of a vehicle according to the present invention.
[0047] Figure 3 It is a schematic diagram of an embodiment of a method for a self-moving device to walk along a side of a vehicle according to the present invention.
[0048] Figure 4 It is a schematic diagram of an embodiment of a method for a self-moving device to walk along a side of a vehicle according to the present invention.
[0049] Figure 5 It is a schematic diagram of an embodiment of a method for a self-moving device to walk along a side of a vehicle according to the present invention.
[0050] Figure 6 It is a schematic diagram of an embodiment of a method for a self-moving device to walk along a side of a vehicle according to the present invention.
[0051] Figure 7 It is a schematic block diagram of an embodiment of a mobile device of the present invention. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] like Figure 1 As shown, a regional working method of a self-moving device provided by an embodiment of the present invention can be applied to a controller in the self-moving device, wherein the controller can also be understood as an MCU (microcontrollerUnit) or other devices with the same function, and the method comprises the following steps:
[0054] S10, when a preset sensor in the self-moving device recognizes a boundary, controlling the self-moving device to move along the boundary, and acquiring slope information between the self-moving device and the boundary.
[0055] Understandably, the preset sensor may refer to an image sensor, which may be installed at the front position of the self-moving device and may cover the visual angle required during the forward movement of the self-moving device, wherein the preset sensor may identify the image at the boundary through a specific preset change algorithm; the boundary is the edge where the enclosed working area is located, which may be an obstacle, such as a wall, steps, etc., and is mainly used to separate it from other non-working areas; the self-moving device may be a functional robot used in a courtyard, which may be a snowplow in a snow removal scene, or a lawn mower in a lawn mowing scene; the slope information refers to the body angle of the self-moving device relative to the boundary, wherein the difference in this information will result in different positions or orientations relative to the boundary.
[0056] S20, when the slope information is not the preset fixed slope information, the self-moving device is controlled to execute a corresponding preset control strategy according to the positive or negative condition of the slope information, so as to control the self-moving device to continue walking along the edge of the boundary when the self-moving device is in a parallel state with the boundary.
[0057] Understandably, the preset fixed slope information can be used for comparison with the slope information, which can be a value of 0 or close to 0. When the value is 0, the self-moving device and the boundary are in a parallel state, and when the value is close to 0, the self-moving device and the boundary are approximately parallel. The main purpose of the preset control strategy is to adjust the self-moving device to a strategy that can walk in a straight line on the boundary. Specifically, the slope information of the self-moving device in different states can be confirmed to adjust the body state of the self-moving device.
[0058] In some embodiments, controlling the self-moving device to walk along the border includes:
[0059] determining a distance between the self-moving device and the boundary;
[0060] When the distance is greater than or equal to a preset distance threshold, the self-moving device is controlled to move in a traction direction corresponding to the boundary, and when the self-moving device is parallel to the boundary, the self-moving device is controlled to move along the boundary.
[0061] Understandably, the preset sensor can first capture the optical image of the environment, and convert the light image into an electrical signal that is proportional to the light image, wherein the conversion process is realized based on the photoelectric conversion function of the photoelectric device, and the image sensor divides the light image on its light-receiving surface into many small units, and converts these small units into usable electrical signals; finally, the processor inside the mobile device will process and analyze the electrical signal, wherein, if the mobile device uses a monocular camera, then the image processing algorithm can be used to extract the feature points in the image, and then the distance between the mobile device and the boundary can be calculated by the triangulation principle, which is based on the position change of the feature points in the image. and the parameters of the camera to calculate the distance. If a binocular camera is used for distance measurement, the images captured by the left and right cameras are matched to obtain the parallax value of the object in the image, and then the distance between the robot and the boundary is calculated through known parameter relationships, such as the distance between the two cameras and their focal lengths. The preset distance threshold refers to the preset judgment distance between the self-moving device and the boundary, where, at this distance, the self-moving device is equivalent to needing to approach the boundary before it can walk along the boundary in a straight line. The traction direction refers to the direction in which the self-moving device is guided to move, which is equivalent to a position point on the boundary.
[0062] This embodiment uses a preset sensor to obtain the distance information between the self-moving device and the boundary in real time, so that the self-moving device can accurately determine its own position. After determining its own position, the self-moving device is controlled to move toward the boundary, and the relationship between the self-moving device and the boundary is adjusted. When the self-moving device and the boundary are in a parallel state, the self-moving device can move along the edge of the boundary, thereby improving the overall effect of the self-moving device walking along the edge.
[0063] In some embodiments, the controlling the self-moving device to move in a traction direction corresponding to the boundary, and when the self-moving device is parallel to the boundary, controlling the self-moving device to move along the boundary, includes:
[0064] determining at least one of the pulling directions from the boundaries;
[0065] Controlling the self-moving device to move toward the traction direction;
[0066] When it is determined that the angle formed by the direction line segment of the self-moving device toward the boundary and the traction direction line segment is equal to the preset angle, it is determined that the self-moving device is parallel to the boundary, and the self-moving device is controlled to move in a straight line along the boundary.
[0067] Understandably, there are many position points on the boundary, and thus there are many pulling directions on the boundary. Specifically, taking the position of the preset sensor in the self-moving device close to the boundary as the starting point, the position of the boundary is reached along a straight line, wherein the position of the boundary can be considered as the pulling direction; the direction line segment of the self-moving device toward the boundary can refer to a straight line from the position of the preset sensor close to the boundary to a position point of the boundary, wherein the position point corresponding to the pulling direction at the position point of the boundary is not the same position point, and the direction line segment is on the same parallel line as the body state of the self-moving device; the preset angle can refer to 0 degrees or an angle close to 0 degrees (at this angle, the self-moving device and the boundary can be considered to be approximately parallel);
[0068] This embodiment determines the traction direction and controls the self-moving device to move in this direction, so that the self-moving device can approach the boundary more quickly and maintain a suitable angle with it. Once it is determined that the angle between the self-moving device and the boundary is equal to the preset angle, it is determined that the self-moving device and the boundary are in a parallel state. At this time, the self-moving device is controlled to move in a straight line along the boundary, which can effectively avoid the problem of going out of the boundary, ensure complete coverage of the working area, and improve the overall effect of the self-moving device walking along the edge.
[0069] In some embodiments, Figure 2 As shown, before determining that the angle formed by the direction of the self-moving device toward the boundary and the pulling direction is equal to the preset angle, it includes:
[0070] determining a first angle according to boundary information of the boundary;
[0071] Determine a second angle according to the distance between the self-moving device and the boundary and the visual blind spot distance of the self-moving device;
[0072] Determine a third angle according to the second angle and the pulling direction line segment;
[0073] The angle formed between the direction line segment of the self-moving device toward the boundary and the pulling direction line segment is determined according to the first angle and the third angle.
[0074] Understandably, the boundary information may refer to the shape information and position information of the boundary; the first angle may refer to the angle formed by the boundary and the perpendicular line segment of the line segment in the direction of the self-mobile device ABCD toward the boundary. Specifically, a point H is taken on the line segment in the direction of the self-mobile device ABCD toward the boundary (the position of the point is exactly the visual blind spot distance of the preset sensor on the self-mobile device ABCD), and the line segment to the boundary is determined from the point, and the angle formed by the boundary and the line segment HI is taken as the first angle ∠JIH; the visual blind spot distance may refer to the recognition obstacle of the preset sensor of the self-mobile device ABCD at this distance (this distance can be determined by calibration); the second angle may refer to the angle formed by the line segment HA related to the visual blind spot distance and the line of the self-mobile device toward the boundary. Specifically, a point H is taken on the line segment in the direction of the self-mobile device ABCD toward the boundary, and the line segment HI to the boundary is determined from the point, and the angle formed by the line segment and the visual blind spot distance HA is taken as the second angle ∠H IA; the third angle may refer to the angle formed by the traction direction line segment and the boundary line. Specifically, the length of the target line segment is calculated by determining the visual blind spot distance HA and the second angle ∠H IA, and the third angle ∠I JA is calculated by the length of the target line segment IA and the length of the traction direction line segment AJ; the angle formed by the direction line segment AK from the mobile device ABCD toward the boundary and the traction direction line segment AJ is equal to the first angle ∠JI H+the third angle ∠I JA-90 degrees;
[0075] In this embodiment, each angle is determined by each line segment that is related to the self-moving device and the boundary. The corresponding angle can be calculated for each angle, and then an angle of the self-moving device relative to the boundary is obtained. The angle is also the angle for the self-moving device to walk in a straight line along the edge.
[0076] In some embodiments, after determining the angle formed by the self-moving device toward the boundary and the pulling direction according to the first angle and the third angle, the method further includes:
[0077] Determining the angular velocity of the self-moving device according to the angle formed between the direction line segment of the self-moving device toward the boundary and the pulling direction line segment;
[0078] The linear velocity of the self-moving device is determined according to the angular velocity of the self-moving device; the linear velocity is the speed at which the self-moving device moves in a straight line along the boundary.
[0079] Specifically, the angular velocity of the mobile device is calculated by the motion control algorithm, specifically, each adjustment ratio in the PID is obtained, and the mobile device is adjusted to the angular velocity corresponding to the target angle based on the adjustment ratio; the minimum linear velocity is determined by the determined maximum angular velocity and the minimum turning radius, and the linear velocity is determined by the turning linear velocity and the maximum linear velocity. The specific formula is v1=wmax*rmin, v2=v1+(1-abs(w) / wmax)*(v3-v1), wherein v1 is the minimum linear velocity (obtained by v=w / r), wmax is the maximum angular velocity, rmin is the minimum turning radius, v2 is the linear velocity, abs(w) is the absolute value of the angular velocity, and v3 is the maximum linear velocity. The main purpose of the above formula is to determine the linear velocity corresponding to the current angular velocity through a linear proportional relationship. The linear proportional relationship is to determine the proportional relationship between the angular velocity and the maximum angular velocity, and the maximum angular velocity already has a corresponding linear velocity, so the linear velocity corresponding to the angular velocity can be obtained;
[0080] In this embodiment, the angular velocity is determined based on the angle change between the self-moving device and the boundary, and the linear velocity is further determined, which not only improves the accuracy and real-time performance of the motion control of the self-moving device, but also enhances the adaptability and flexibility of the self-moving device in complex environments.
[0081] In some embodiments, Figure 4 and Figure 5 As shown, the controlling the self-moving device to execute the corresponding preset control strategy according to the positive or negative situation of the slope information includes:
[0082] When the slope information is a positive number, controlling the self-mobile device to turn left and move forward, and determining whether the slope information is the preset fixed slope information;
[0083] When the slope information is not the preset fixed slope information, determining a distance between the self-moving device and the boundary;
[0084] When the distance is less than a preset threshold distance, the self-moving device is controlled to advance to the boundary and then retreat from the boundary, and after the self-moving device completes retreating, the self-moving device is controlled to execute a preset turning strategy.
[0085] It can be understood that the slope information is positive, which is equivalent to the boundary information falling into the preset sensor coordinate system (such as Figure 3 At the positive coordinate position in the camera coordinate system shown in FIG. 1 , the tilt direction of the boundary is away from the self-moving device, wherein the preset sensor generates a fixed coordinate system relative to the self-moving device, such as taking the upper left of the self-moving device as the positive coordinate system; the preset turning strategy includes controlling the self-moving device to use forward turning and backward turning in different scenarios;
[0086] Specifically, when it is determined that the slope information is a positive number (that is, not equal to the preset fixed slope information), the self-mobile device is controlled to make a left turn toward the boundary, and then it is determined whether the slope information is the preset fixed slope information. When the slope information is the preset fixed slope information, the self-mobile device is controlled to walk normally along the boundary. When the slope information is not the preset fixed slope information, the distance between the self-mobile device and the boundary is determined. When the self-mobile device approaches the boundary, the self-mobile device is controlled to move straight toward the boundary first, and it is determined that the self-mobile device touches the boundary. Then, the self-mobile device is controlled to retreat until it retreats to a preset distance threshold or the rear of the self-mobile device touches the boundary, and the self-mobile device is controlled to start executing the turning strategy.
[0087] This embodiment can adjust the action of the self-moving device according to the real-time slope information in a specified scenario, and use multiple different actions to adjust the body state of the self-moving device in real time to ensure that the self-moving device can walk along the edge normally.
[0088] In some embodiments, the controlling the self-moving device to advance to the boundary and then retreat from the boundary, and after the self-moving device has retreated, controlling the self-moving device to execute a preset turning strategy includes:
[0089] Control the mobile device to retreat from the boundary to a target position by a preset distance threshold according to the boundary information of the boundary;
[0090] After controlling the mobile device to make a left arc forward turn at the target position, determining whether the slope information is the preset fixed slope information;
[0091] When the slope information is not the preset fixed slope information, determining whether the self-moving device touches the right boundary;
[0092] When the self-moving device contacts the right boundary, the self-moving device is controlled to perform a left arc backward turn at the contact position until it is determined that the slope information is the preset fixed slope information.
[0093] It can be understood that the right boundary refers to the boundary where the self-moving device is located on the right side relative to the fuselage position during the turning process;
[0094] Specifically, the self-mobile device is controlled to perform a backward action. After retreating a preset distance threshold, it is determined that the self-mobile device touches the boundary (equivalent to the target position) or the self-mobile device reaches a preset position (equivalent to the target position), the angular velocity of the self-mobile device to make a left arc forward turn, and the self-mobile device is controlled to make a left arc forward turn at the target position according to the angular velocity, and it is determined whether the slope information is the preset fixed slope information. When the slope information is the preset fixed slope information, the self-mobile device is controlled to walk normally along the boundary. When the slope information is not the preset fixed slope information, it is determined whether the self-mobile device touches the right boundary. When the self-mobile device does not touch the right boundary, the self-mobile device is continued to be controlled to perform a left arc forward turn until the slope information is determined to be the preset fixed slope information. When the self-mobile device touches the right boundary, the self-mobile device is controlled to perform a left arc backward turn at the contact position, and the determination is continued. Whether the slope information is the preset fixed slope information. When the slope information is the preset fixed slope information, the self-moving device is controlled to walk normally along the boundary. When the slope information is not the preset fixed slope information, it is determined whether the self-moving device touches the rear boundary. When the self-moving device does not touch the rear boundary, the self-moving device is continued to be controlled to perform a left arc backward turn until it touches the right boundary. When the self-moving device touches the rear boundary, the self-moving device is continued to be controlled to perform a left arc forward turn until it is finally determined that the slope information is the preset fixed slope information and the loop process is terminated (the loop process is the process mentioned above to determine whether the slope information is the preset fixed slope information, and the process required to process when the slope information is not the preset fixed slope information); wherein, the rear boundary refers to the boundary where the self-moving device is located relative to the rear of the fuselage during the turning process, and it is also the boundary adjacent to the right boundary. The rear boundary and the right boundary are both located in the same boundary;
[0095] This embodiment can avoid the problem of the mobile device going out of the boundary and missing the working area along the edge through the above-mentioned actions.
[0096] In some embodiments, Figure 5 and Figure 6 As shown, the controlling the self-moving device to execute the corresponding preset control strategy according to the positive or negative situation of the slope information includes:
[0097] When the slope information is a negative number, the self-moving device is controlled to turn right and move forward, and the body position of the self-moving device is controlled to move forward and exceed the turning position;
[0098] After performing a right arc forward turn at a completion position beyond the turning position, determining whether the slope information is the preset fixed slope information;
[0099] When the slope information is not the preset fixed slope information, controlling the self-moving device to rotate and determining the size of the rotation angle;
[0100] When the value of the rotation angle does not exceed the first preset angle value, the mobile device is controlled to perform a right arc backward turn until it is determined that the slope information is the preset fixed slope information.
[0101] Understandably, the slope information being negative is equivalent to the boundary information falling into the preset sensor coordinate system (such as Figure 4 At the negative coordinate position in the camera coordinate system shown in FIG. 1 , the tilt direction of the boundary is toward the self-moving device;
[0102] Specifically, when it is determined that the slope information is a negative number (that is, not equal to the preset fixed slope information), the self-mobile device is controlled to turn right and move forward to a completion position beyond the corner position (if the self-mobile device does not move forward for a certain distance, the body of the self-mobile device will touch the right boundary when making an arc turn), and the self-mobile device is controlled to perform a right arc forward turn at the completion position, and it is determined whether the slope information is the preset fixed slope information. When the slope information is the preset fixed slope information, the self-mobile device is controlled to walk normally along the boundary. When the slope information is not the preset fixed slope information, the self-mobile device is controlled to perform a rotation operation at a rotation angle. When the size of the rotation angle is less than the first preset angle value, the self-mobile device is controlled to continue to perform a right arc forward turn until the slope information is determined to be the preset fixed slope information. When the size of the rotation angle is equal to or greater than the first preset angle value, the self-mobile device is controlled to perform a right arc backward turn, and it is determined whether the slope information is the preset fixed slope information. When the slope information is the preset fixed slope information, the self-mobile device is controlled to walk normally along the boundary. When the slope information is not the preset fixed slope information, determine whether the rotation angle of the self-moving device exceeds the second preset angle value or recognizes a rear obstacle. When the rotation angle of the self-moving device does not exceed the second preset angle value or recognizes a rear obstacle, continue to determine whether the slope information is the preset fixed slope information. When the rotation angle of the self-moving device exceeds the second preset angle value or recognizes a rear obstacle, continue to control the self-moving device to perform a rear arc forward turn, until it is finally determined that the slope information is the preset fixed slope information and then terminate the loop process (the loop process is the above-mentioned determination of whether the slope information is the preset fixed slope information, and the process required to process the slope information when it is not the preset fixed slope information); wherein, the first preset angle value is less than the second preset angle value. When the self-moving device performs the first rotation, it is determined that the slope information is not the preset fixed slope information. At this time, it is necessary to control the self-moving device to rotate at a larger angle or determine that there is an obstacle behind the self-moving device (it is necessary to continue to perform a right arc backward turn) to ensure that the slope is the preset fixed slope information.
[0103] This embodiment can avoid the problem of the mobile device going out of the boundary and missing the working area along the edge through the above-mentioned actions.
[0104] In some embodiments, the method further comprises:
[0105] Acquiring an area image corresponding to the boundary through a preset sensor in the mobile device;
[0106] Converting the regional image into a target image of a preset viewing angle according to a preset transformation algorithm;
[0107] Boundary information corresponding to the boundary is obtained from the target image; the boundary information is used for the self-moving device to walk along the boundary.
[0108] Understandably, the regional image may refer to an image acquired from a preset sensor-camera, and the acquisition method may be to form the regional image by shooting the boundary at intervals; the preset transformation algorithm may refer to an IPM inverse transformation method, which may transform the regional image into a target image of a BEV perspective, which is a perspective of viewing an object or scene from above; the boundary information may refer to the shape information and position information of the boundary, and may also refer to the length of the boundary, etc.;
[0109] Specifically, the IPM matrix is obtained through the camera internal parameters and camera posture, and the mask corresponding to the regional image segmentation is obtained. The mask is converted into a BEV view, and the boundary information is obtained from the BEV view in combination with pixel calibration. Among them, the IPM matrix of each camera is fixed after calibration, and the boundary position is also fixed after conversion. When fitting a straight line, it is only necessary to fit the pixels in a certain axis direction of the boundary, find the boundary points along the arrow direction, and then obtain the boundary information through the boundary points;
[0110] In this embodiment, the boundary information can be clearly seen through the generated target image, and the mobile device can walk along the edge accurately based on the boundary information.
[0111] It should be noted that the present invention is not limited to Figures 2 to 6 The direction of the middle boundary and the processing methods of the boundaries at the left, right, top and bottom positions can be considered the same.
[0112] The present invention provides a method for a self-moving device to walk along the edge, belonging to the technical field of self-moving device walking. When a preset sensor in the self-moving device identifies a boundary, the self-moving device is controlled to walk along the boundary, and the slope information between the self-moving device and the boundary is obtained; when the slope information is not the preset fixed slope information, the self-moving device is controlled to execute the corresponding preset control strategy according to the positive and negative conditions of the slope information, so that when the self-moving device and the boundary are in a parallel state, the self-moving device is controlled to continue to walk along the boundary. In this way, the self-moving device can be controlled to walk along the boundary first, and the relationship between the slope information between the self-moving device and the boundary and the preset slope information is detected. Then, when the slope information between the self-moving device and the boundary is not the preset slope information, the body state of the self-moving device is adjusted by the preset control strategy, so that the self-moving device can continue to walk along the boundary in a straight line. In this way, the body state of the self-moving device can be adjusted in real time according to different boundary conditions during the self-moving device walking along the boundary, so as to ensure the normal straight line walking along the boundary of the self-moving device, and thus ensure the overall working effect.
[0113] It should be understood that the order of execution of the steps in the above embodiment does not necessarily 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 embodiment of the present invention.
[0114] like Figure 7 As shown, a self-moving device is also provided, including a controller and a memory, wherein the memory stores a program for the self-moving device to walk along the edge, and the controller controls the self-moving device to walk along the edge program to control execution to implement the steps of the above-mentioned method for walking along the edge of the self-moving device.
[0115] The execution function of the controller corresponds one-to-one to the method for walking along the edge of the self-moving device in the above embodiment. For the specific definition of the controller, please refer to the definition of the method for walking along the edge of the self-moving device above, which will not be repeated here. The execution process of each sub-module in the above controller can refer to the definition of the method for walking along the edge of the self-moving device above, which will not be repeated here. It can be implemented in whole or in part by software, hardware and a combination thereof. Each sub-module can be embedded in or independent of the controller in hardware form, or it can be stored in the memory of the controller in software form, so that the controller can call and execute the operations corresponding to each of the above sub-modules.
[0116] In one embodiment, the present invention also provides one or more readable storage media storing computer-readable instructions, and the readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage media; the readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors implement the steps of the method for a self-moving device to walk along an edge described in the above embodiment.
[0117] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods.
[0118] Any reference to storage, databases, or other media may include nonvolatile and / or volatile memory. Nonvolatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0119] Those skilled in the art 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. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the self-mobile device is divided into different functional units or modules to complete all or part of the functions described above.
[0120] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those 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 invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for a self-moving device to walk along the edge, characterized in that: The method comprises: When a preset sensor in the self-moving device recognizes a boundary, the self-moving device is controlled to move along the boundary, and slope information between the self-moving device and the boundary is obtained; The controlling the self-moving device to walk along the border includes: determining a distance between the self-moving device and the boundary; When the distance is greater than or equal to a preset distance threshold, the self-moving device is controlled to move in a traction direction corresponding to the boundary, and when the self-moving device is parallel to the boundary, the self-moving device is controlled to move along the boundary; The step of controlling the self-moving device to move in a traction direction corresponding to the boundary, and controlling the self-moving device to move along the boundary when the self-moving device is parallel to the boundary, includes: determining at least one of the pulling directions from the boundaries; Controlling the self-moving device to move toward the traction direction; When it is determined that the angle formed by the direction line segment of the self-moving device toward the boundary and the traction direction line segment is equal to the preset angle, it is determined that the self-moving device is in a parallel state with the boundary, and the self-moving device is controlled to move in a straight line along the boundary; Before determining that the angle formed by the direction of the self-moving device toward the boundary and the pulling direction is equal to the preset angle, the method includes: determining a first angle according to boundary information of the boundary; Determine a second angle according to the distance between the self-moving device and the boundary and the visual blind spot distance of the self-moving device; Determine a third angle according to the second angle and the pulling direction line segment; Determine the angle formed by the direction line segment of the self-moving device toward the boundary and the pulling direction line segment according to the first angle and the third angle; When the slope information is not the preset fixed slope information, the self-moving device is controlled to execute the corresponding preset control strategy according to the positive or negative condition of the slope information, so as to control the self-moving device to continue walking along the edge of the boundary when the self-moving device is in a parallel state with the boundary.
2. The method for walking along the edge of a self-moving device according to claim 1, characterized in that: After determining the angle formed by the self-moving device toward the boundary and the pulling direction according to the first angle and the third angle, the method further includes: Determining the angular velocity of the self-moving device according to the angle formed between the direction line segment of the self-moving device toward the boundary and the pulling direction line segment; The linear velocity of the self-moving device is determined according to the angular velocity of the self-moving device; the linear velocity is the speed at which the self-moving device moves in a straight line along the boundary.
3. The method for walking along the edge of a self-moving device according to claim 1, characterized in that: The controlling the self-moving device to execute a corresponding preset control strategy according to the positive or negative condition of the slope information includes: When the slope information is a positive number, controlling the self-mobile device to turn left and move forward, and determining whether the slope information is the preset fixed slope information; When the slope information is not the preset fixed slope information, determining a distance between the self-moving device and the boundary; When the distance is less than a preset threshold distance, the self-moving device is controlled to advance to the boundary and then retreat from the boundary, and after the self-moving device completes retreating, the self-moving device is controlled to execute a preset turning strategy.
4. The method for walking along the edge of a self-moving device according to claim 3, characterized in that: The controlling the self-moving device to advance to the boundary and then retreat from the boundary, and after the self-moving device has retreated, controlling the self-moving device to execute a preset turning strategy, includes: Control the mobile device to retreat from the boundary to a target position by a preset distance threshold according to the boundary information of the boundary; After controlling the mobile device to make a left arc forward turn at the target position, determining whether the slope information is the preset fixed slope information; When the slope information is not the preset fixed slope information, determining whether the self-moving device touches the right boundary; When the self-moving device contacts the right boundary, the self-moving device is controlled to perform a left arc backward turn at the contact position until it is determined that the slope information is the preset fixed slope information.
5. The method for walking along the edge of a self-moving device according to claim 1, characterized in that: The controlling the self-moving device to execute a corresponding preset control strategy according to the positive or negative condition of the slope information includes: When the slope information is a negative number, the self-moving device is controlled to turn right and move forward, and the body position of the self-moving device is controlled to move forward and exceed the turning position; After performing a right arc forward turn at a completion position beyond the turning position, determining whether the slope information is the preset fixed slope information; When the slope information is not the preset fixed slope information, controlling the self-moving device to rotate and determining the size of the rotation angle; When the value of the rotation angle does not exceed the first preset angle value, the mobile device is controlled to perform a right arc backward turn until it is determined that the slope information is the preset fixed slope information.
6. The method for walking along the edge of a self-moving device according to claim 1, characterized in that: The method further comprises: Acquiring an area image corresponding to the boundary through a preset sensor in the mobile device; Converting the regional image into a target image of a preset viewing angle according to a preset transformation algorithm; Boundary information corresponding to the boundary is obtained from the target image; the boundary information is used for the self-moving device to walk along the boundary.
7. A self-propelled device, characterized in that: The device comprises a controller and a memory, wherein the memory stores a program for the self-moving device to walk along the edge, and the controller controls the program for the self-moving device to walk along the edge to control the steps of the method for the self-moving device to walk along the edge as described in any one of claims 1 to 6.
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 for walking along the edge of a self-moving device as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Control method of self-moving robot and self-moving robot system
CN111941418A