Method and device for preventing robot from leaving boundary along edge and computer equipment

By constructing and expanding the boundary map, the robot can accurately follow the taught trajectory in the boundaryless scene, solving the safety and accuracy issues of robot operations in the boundaryless scene and improving the reliability and practicality of the operation.

CN120802943APending Publication Date: 2025-10-17LION (SHENZHEN) ROBOT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510964297.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

In borderless scenarios, when the robot operates along the edge, it is difficult to accurately follow the taught trajectory. It is easy to invade the expanding obstacle area and trigger collision protection or deviate from the predetermined path into an unknown area, resulting in safety and accuracy problems.

Method used

By constructing the first boundary map and performing expansion processing, a second boundary map is generated, the preset teaching trajectory is maintained unchanged, and the robot is controlled to run in the second boundary map to ensure that the robot does not go out of bounds along the edge.

Benefits of technology

The robot can operate in a borderless scene by precisely following the taught trajectory, avoiding collisions, sudden stops, and path deviations, improving operation accuracy and reliability, lowering the operating threshold, and enhancing practicality and generalization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120802943A_ABST
    Figure CN120802943A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for preventing a robot from leaving a boundary along the edge and computer equipment, and the method comprises the following steps: controlling the robot to operate along the edge according to a preset teaching track, and constructing a first boundary map; performing expansion processing on position points on a boundary in the first boundary map to obtain an expanded boundary, and generating a second boundary map according to the expanded boundary; and a preset teaching track is kept unchanged, and the robot is controlled to continuously run along the edge in the second boundary map according to the teaching track. By constructing the expanded second boundary map, the original teaching track is embedded in the safety area, so that the robot is always located on the inner side of the expanded boundary when running along the original track, and the precise fitting operation of the robot on the physical boundary is realized on the premise of ensuring that the robot does not go out of the boundary.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of robots, in particular to a method and device for preventing a robot from going out of a boundary along an edge and a computer device. BACKGROUND

[0002] In the robot application of an outdoor open scene (such as a lawn, a square, a farmland and the like), a traditional SLAM mapping method faces significant challenges. Due to the lack of structural features, a laser or vision-based SLAM system is difficult to construct an effective environment representation. For this reason, the industry generally adopts a "boundary teaching" method, that is, a robot is remotely controlled to walk along the edge of a working scene for once to teach the boundary of a map, and a boundary map is generated through the boundary. Although this method solves the problem of mapping in a featureless scene, it causes a new operation bottleneck.

[0003] In order to guarantee navigation safety, the system needs to generate a cost map by performing inflation processing on an obstacle region, which causes the actual obstacle boundary to expand to a free region. When the robot performs an edge operation task (such as lawn mowing or site cleaning), the predetermined working track of the robot is completely coincident with the taught boundary. At this time, the robot faces a double dilemma: 1) if the robot moves strictly along the taught path, it will intrude into the inflated obstacle region to trigger a collision protection mechanism to cause an emergency stop; 2) if the robot avoids the inflated region, it will deviate from the predetermined path to enter an unknown region to cause a positioning loss or an abnormal escape behavior. This contradiction makes the robot unable to perform the most critical boundary operation function, which seriously restricts the practicability of the robot.

[0004] Therefore, there is an urgent need for a method that allows the robot to accurately operate along the taught boundary in a boundaryless scene under the premise of safety, and eliminates unnecessary shutdown and path deviation. SUMMARY

[0005] In view of the above problems of the prior art, the technical problem to be solved by the present application is to provide a method and device for preventing a robot from going out of a boundary along an edge and a computer device, which can guarantee that the robot accurately operates along a taught track in a boundaryless scene.

[0006] To solve the above technical problem, one technical scheme adopted by the present application is to provide a method for preventing a robot from going out of a boundary along an edge, comprising the following steps:

[0007] controlling the robot to run along an edge according to a preset taught track to construct a first boundary map;

[0008] performing inflation processing on a position point on the boundary in the first boundary map to obtain an extended boundary and generating a second boundary map according to the extended boundary;

[0009] maintaining the preset taught track unchanged and controlling the robot to continue running along the edge in the second boundary map according to the taught track.

[0010] Further, in the step of controlling the robot to run along the boundary according to the preset teaching trajectory to build the first boundary map, the following sub-steps are included:

[0011] The robot is controlled to run along the boundary according to the preset teaching trajectory for one round, and the position points of the robot are collected in real time to build the first boundary point set;

[0012] The position points in the first boundary point set are connected in sequence to form a boundary;

[0013] According to the boundary, the corresponding cost values of the grids in the map are set to form the first boundary map, wherein the cost values of the grids outside the boundary are set as unknown, the cost values of the grids inside the boundary are set as free, and the cost values of the grids passing through the boundary are set as obstacle.

[0014] Further, in the step of controlling the robot to run along the boundary according to the preset teaching trajectory for one round, and collecting the position points of the robot in real time to build the first boundary point set, the following sub-steps are included:

[0015] The first boundary point set is initialized;

[0016] The robot is controlled to run along the boundary according to the preset teaching trajectory, and the obtained starting position point is taken as the first position point in the first boundary point set;

[0017] The current position point of the robot is obtained in real time, and the distance between the current position point and the previous position point is calculated;

[0018] It is judged whether the distance between the current position point and the previous position point is greater than or equal to a set threshold value, if the distance between the current position point and the previous position point is greater than or equal to the set threshold value, the current position point is added to the first boundary point set, otherwise, it is discarded, until the robot completes one round of running.

[0019] Further, in the step of performing inflation processing on the position points on the boundary in the first boundary map to obtain an extended boundary and generating a second boundary map according to the extended boundary, the following sub-steps are included:

[0020] Each position point in the first boundary point set is subjected to rectangular inflation to obtain a plurality of rectangular vertices:

[0021] All the rectangular vertices are traversed, and the vertices with the cost value of unknown are screened out to form a second boundary point set;

[0022] The points in the second boundary point set are connected in sequence to form a closed extended boundary, and a second boundary map is built based on the extended boundary.

[0023] Further, in the step of performing rectangular expansion on each position point in the first boundary point set, the position point in the first boundary point set is performed rectangular expansion by the following steps:

[0024] Taking the direction of the line between the current position point and the next adjacent position point in the first boundary point set as the length direction of the rectangle, taking the current position point as the center point, taking the distance between the current position point and the next adjacent position point as the length of the rectangle, and taking a width greater than or equal to the diameter of the outer envelope circle of the robot as the width of the rectangle, the four vertices of the rectangle are generated by rectangular expansion.

[0025] Further, in the step of performing rectangular expansion on each position point in the first boundary point set, the position point in the first boundary point set is performed rectangular expansion by the following steps:

[0026] When the last position point in the first boundary point set is processed, the next adjacent position point thereof is the first position point in the first boundary point set.

[0027] Further, in the step of constructing the second boundary map based on the expanded boundary, specifically comprising:

[0028] The cost value of the grid outside the expanded boundary is set as unknown, the cost value of the grid inside the expanded boundary is set as free, and the cost value of the grid passing through the expanded boundary is set as obstacle, thereby forming the second boundary map.

[0029] To solve the above technical problems, another technical solution adopted by the present application is to provide a device for preventing a robot from going out of boundary along an edge, comprising:

[0030] A map construction module is configured to control the robot to run along an edge according to a preset teaching trajectory, and to construct a first boundary map;

[0031] A boundary expansion module is configured to perform expansion processing on a position point on the boundary in the first boundary map, to obtain an expanded boundary, and to generate a second boundary map according to the expanded boundary;

[0032] A running module is configured to maintain the preset teaching trajectory unchanged, and to control the robot to continue running along the edge in the second boundary map according to the teaching trajectory.

[0033] To solve the above technical problems, another technical solution adopted by the present application is to provide a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for preventing a robot from going out of boundary along an edge when executing the computer program.

[0034] To solve the above technical problems, the present application adopts another technical solution: a computer readable storage medium, which stores a computer program, the computer program is executed by a processor to implement the steps of the method for preventing a robot from going out of a boundary.

[0035] The method, device and computer equipment for preventing a robot from going out of a boundary have at least the following beneficial effects: the present application embeds the original teaching trajectory in a safe area by constructing an expanded second boundary map, so that the robot always stays inside the expanded boundary when running along the original trajectory, avoiding collision and emergency stop caused by intrusion into the expanded obstacle area, and without deviating from the trajectory into the unknown area, fundamentally solving the contradiction between safety and precision, and realizing accurate fitting operation of the physical boundary on the premise of ensuring that the robot does not go out of the boundary; by maintaining the preset teaching trajectory unchanged, the robot can strictly fit the physical boundary to perform the operation, avoiding operation omission or repetition caused by path deviation, greatly improving the precision and scene coverage rate of the operation, and ensuring the reliability of the operation along the boundary; the expansion processing expands a sufficient distance in the boundary normal direction with the robot outer envelope circle diameter as the reference, avoiding the emergency stop mechanism, eliminating abnormal interruption, and improving the continuous operation capability; the present application does not need to change the original boundary teaching operation process, only needs to add a map expansion processing step after teaching, does not need additional hardware or complex parameter debugging, can be seamlessly integrated into the existing robot system, significantly reduces the operation threshold, and improves the practicality and generalization ability of the robot in the unstructured scene. BRIEF DESCRIPTION OF DRAWINGS

[0036] The accompanying drawings, which are included to provide a further understanding of the application and constitute a part of this application, illustrate certain illustrative embodiments of the application and together with the description serve to explain the application. In the drawings:

[0037] Figure 1 Flowchart of the method for preventing a robot from going out of a boundary according to an embodiment of the present application.

[0038] Figure 2 For Figure 1 Flowchart of step S100.

[0039] Figure 3 For Figure 1 Flowchart of step S200.

[0040] Figure 4 Structure block diagram of the device for preventing a robot from going out of a boundary according to an embodiment of the present application. DETAILED DESCRIPTION

[0041] The present application will be further described below with reference to the accompanying drawings.

[0042] Please refer to Figure 1A flow chart of an embodiment of the method for preventing a robot from going out of a boundary along an edge of the present application. The embodiment specifically comprises the following steps:

[0043] S100, constructing a first boundary map.

[0044] Specifically, the robot is controlled to run along an edge according to a preset teaching trajectory to construct a first boundary map.

[0045] Please refer to Figure 2 The step S100 comprises the following sub-steps:

[0046] S110, constructing a first boundary point set.

[0047] Specifically, the robot is controlled to run along an edge according to a preset teaching trajectory for one round, and the position points of the robot are collected in real time to construct a first boundary point set. The specific method for constructing the first boundary point set is as follows: initializing the first boundary point set, initializing the first boundary point set as an empty set; controlling the robot to run along an edge according to a preset teaching trajectory and taking the starting position point obtained as the first position point in the first boundary point set; obtaining the current position point of the robot in real time and calculating the distance between the current position point and the last position point; in order to prevent too many repeated points from being added, judging whether the distance between the current position point and the last position point is greater than or equal to a set threshold value, if the distance between the current position point and the last position point is greater than or equal to the set threshold value, the current position point is added to the first boundary point set, otherwise, it is discarded, until the robot completes one round of running.

[0048] S120, forming a boundary.

[0049] Specifically, the position points in the first boundary point set are connected in sequence to form a boundary. The boundary divides the map into three areas: an internal free area, a boundary and an external area.

[0050] S130, forming a first boundary map.

[0051] Specifically, the map is discretized into a grid matrix with a resolution of r, and the corresponding cost values of the grids in the map are set according to the boundary to form a first boundary map. Wherein, the cost value of the grid outside the boundary is set as unknown, which is displayed in gray on the map, the cost value of the grid inside the boundary is set as free, which is displayed in white on the map, and the cost value of the grid through which the boundary passes is set as obstacle, which is displayed in black on the map.

[0052] S200, constructing a second boundary map.

[0053] Specifically, the position points on the boundary in the first boundary map are dilated to obtain an expanded boundary, and a second boundary map is generated according to the expanded boundary. Please refer to Figure 3The step S200 includes the following sub-steps.

[0054] S210, dilate the boundary.

[0055] Specifically, each position point in the first boundary point set is dilated to a rectangle to obtain a plurality of rectangular vertices. The method of dilating the position point in the first boundary point set to a rectangle is as follows: taking the direction of the line between the current position point and the next adjacent position point in the first boundary point set as the length direction of the rectangle, taking the current position point as the center point, taking the distance between the current position point and the next adjacent position point as the length of the rectangle, and taking the diameter of the outer envelope circle of the robot as the width of the rectangle to dilate the rectangle to generate four vertices of the rectangle. In this embodiment, the diameter of the outer envelope circle of the robot is taken as the width of the rectangle. It should be noted that when the last position point of the first boundary point set is processed, the next adjacent position point thereof is the first position point in the first boundary point set.

[0056] The above operation is equivalent to expanding outward by a distance at least equal to the radius of the robot in the normal direction of the boundary point (i.e., the direction perpendicular to the tangent), thereby ensuring that the robot will not go out of the boundary even if it runs along the preset teaching trajectory.

[0057] S220, construct a second boundary point set.

[0058] Specifically, all the rectangular vertices are traversed to filter out the vertices with a cost value of unknown to form the second boundary point set. In this embodiment, only the rectangular vertices located in the external region of the original boundary (i.e., the unknown region marked in the original map) are retained. Since only the external vertices are retained and connected in the original order, the expanded boundary retains the features of the original boundary in shape, but is expanded outward as a whole.

[0059] S230, form a second boundary map.

[0060] Specifically, the points in the second boundary point set are sequentially connected to form a closed expanded boundary, and a second boundary map is constructed based on the expanded boundary. In the specific operation, the cost value of the grid outside the expanded boundary is set to unknown, the grid inside the expanded boundary is set to free, and the grid passed by the expanded boundary is set to obstacle, so as to form the second boundary map.

[0061] S300, run along the boundary.

[0062] Specifically, the preset teaching trajectory is maintained unchanged, and the robot is controlled to continue running along the boundary in the second boundary map according to the teaching trajectory.

[0063] Referring to Figure 4 , a structural block diagram of an embodiment of the device for preventing robot from running out of boundary along edge. The device for preventing robot from running out of boundary along edge of the embodiment is used to realize the method for preventing robot from running out of boundary along edge as described in the above embodiment. Specifically, the device for preventing robot from running out of boundary along edge of the embodiment comprises a boundary map construction module 100, a boundary inflation module 200 and a running module 300. Wherein:

[0064] The boundary map construction module 100 is used to control the robot to run along the edge according to the preset teaching trajectory, and construct a first boundary map. Specifically, the boundary map construction module 100 is used to control the robot to run along the edge for one round according to the preset teaching trajectory, collect the position points of the robot in real time, and construct a first boundary point set; connect the position points in the first boundary point set in sequence to form a boundary; set the corresponding cost value of the grid in the map according to the boundary to form a first boundary map, wherein the cost value of the grid outside the boundary is set as unknown, the cost value of the grid inside the boundary is set as free, and the cost value of the grid passing through the boundary is set as obstacle. When constructing the first boundary point set, the boundary map construction module 100 is used to initialize the first boundary point set; control the robot to run along the edge according to the preset teaching trajectory and take the obtained starting position point as the first position point in the first boundary point set; obtain the current position point of the robot in real time and calculate the distance between the current position point and the last position point; judge whether the distance between the current position point and the last position point is greater than or equal to the set threshold value, if the distance between the current position point and the last position point is greater than or equal to the set threshold value, the current position point is added to the first boundary point set, otherwise, it is discarded, until the robot completes one round of running.

[0065] The boundary inflation module 200 is used to perform inflation processing on the position points on the boundary in the first boundary map to obtain an extended boundary and generate a second boundary map according to the extended boundary. Specifically, the boundary inflation module 200 is used to perform rectangular inflation on each position point in the first boundary point set to obtain a plurality of rectangular vertices: traverse all the rectangular vertices, filter out the vertices with the cost value of unknown to form a second boundary point set; connect the points in the second boundary point set in sequence to form a closed extended boundary, and construct a second boundary map based on the extended boundary. When performing rectangular inflation on the position points in the first boundary point set, the boundary inflation module 200 is used to take the direction of the line between the current position point and the next adjacent position point in the first boundary point set as the length direction of the rectangle, take the current position point as the center point, take the distance between the current position point and the next adjacent position point as the length of the rectangle, and take a width greater than or equal to the diameter of the outer envelope of the robot as the width of the rectangle to perform rectangular inflation to generate four vertices of the rectangle.

[0066] The running module 300 is used for maintaining the preset teaching trajectory unchanged, and controlling the robot to continue to run along the edge in the second boundary map according to the teaching trajectory.

[0067] The application further discloses a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method for preventing the robot from running out of the boundary when executing the computer program.

[0068] The application further discloses a computer readable storage medium, which stores a computer program, and the computer program implements the steps of the method for preventing the robot from running out of the boundary when being executed by a processor.

[0069] The application embeds the original teaching trajectory in the safe area by constructing the second boundary map after expansion, so that the robot always runs within the expanded boundary when running along the original trajectory, avoids collision and emergency stop caused by invading the expanded obstacle area, and fundamentally solves the contradiction between safety and precision. On the premise of ensuring that the robot body does not run out of the boundary, the application realizes accurate operation of the physical boundary. By maintaining the preset teaching trajectory unchanged, the robot can strictly adhere to the physical boundary to perform the operation, avoids operation omission or repetition caused by path deviation, greatly improves the precision and scene coverage of the operation, and guarantees the reliability of the edge operation. The expansion processing takes the diameter of the robot outer envelope circle as the benchmark, expands a sufficient distance in the boundary normal direction, avoids the emergency stop mechanism, eliminates abnormal interruption, and improves the continuous operation capability. The application does not need to change the original boundary teaching operation process, only needs to add the map expansion processing step after teaching, does not need additional hardware or complex parameter debugging, can be seamlessly integrated into the existing robot system, significantly reduces the operation threshold, and improves the practicality and generalization capability of the robot in the unstructured scene.

[0070] The above merely expresses the preferred embodiments of the application, which are described in detail and specifically, but should not be understood as limiting the scope of the patent. It should be noted that, for those skilled in the art, some modifications and improvements can be made without departing from the concept of the application, and these all belong to the protection scope of the application. Therefore, the protection scope of the patent of the application should be subject to the appended claims.

Claims

1. A method for preventing a robot from going out of bounds along an edge, characterized in that: The following steps are involved: Control the robot to run along the edge according to the preset teaching trajectory to build a first boundary map; performing expansion processing on the position points on the boundary of the first boundary map to obtain an expanded boundary and generating a second boundary map based on the expanded boundary; Maintaining the preset teaching trajectory unchanged, the robot is controlled to continue running along the edge in the second boundary map according to the teaching trajectory.

2. The method for preventing a robot from going out of bounds along an edge according to claim 1, wherein: The step of controlling the robot to run along the edge according to the preset teaching trajectory and constructing the first boundary map includes the following sub-steps: Control the robot to run along the edge for one circle according to the preset teaching trajectory, collect the robot's position points in real time, and construct the first boundary point set; sequentially connecting the position points in the first boundary point set to form a boundary; According to the boundary, corresponding cost values ​​are set for the grids in the map to form a first boundary map, wherein the cost values ​​of the grids outside the boundary are set to unknown, the cost values ​​of the grids inside the boundary are set to free, and the cost values ​​of the grids passed by the boundary are set to obstacle.

3. The method for preventing a robot from going out of bounds along an edge according to claim 2, wherein: The step of controlling the robot to run along the edge for one cycle according to the preset teaching trajectory, collecting the robot's position points in real time, and constructing the first boundary point set includes the following sub-steps: Initialize the first boundary point set; Control the robot to run along the edge according to the preset teaching trajectory and use the obtained starting position point as the first position point in the first boundary point set; Get the robot's current position in real time and calculate the distance between the current position and the previous position; Determine whether the distance between the current position point and the previous position point is greater than or equal to the set threshold. If the distance between the current position point and the previous position point is greater than or equal to the set threshold, the current position point is added to the first boundary point set; otherwise, it is discarded until the robot completes one cycle.

4. The method for preventing a robot from going out of bounds along an edge according to claim 2, wherein: The step of performing dilation processing on the position points on the boundary of the first boundary map to obtain an expanded boundary and generating a second boundary map based on the expanded boundary includes the following sub-steps: Rectangular expansion is performed on each position point in the first boundary point set to obtain several rectangular vertices: Traverse all the vertices of the rectangle and filter out the vertices with unknown cost values ​​to form the second boundary point set; The points in the second boundary point set are sequentially connected to form a closed extended boundary, and a second boundary map is constructed based on the extended boundary.

5. The method for preventing a robot from going out of bounds along an edge according to claim 4, wherein: In the step of performing rectangular expansion on each position point in the first boundary point set, rectangular expansion is performed on the position points in the first boundary point set by the following steps: The direction of the line between the current position point and the next adjacent position point in the first boundary point set is used as the length direction of the rectangle, the current position point is used as the center point, the distance between the current position point and the next adjacent position point is used as the length of the rectangle, and the width of the rectangle is greater than or equal to the diameter of the robot's outer envelope circle as the width of the rectangle. The rectangle is expanded to generate the four vertices of the rectangle.

6. The method for preventing a robot from going out of bounds along an edge according to claim 5, wherein: The step of performing rectangular expansion on each position point in the first boundary point set further includes: When processing the last position point of the first boundary point set, its next adjacent position point is the first position point in the first boundary point set.

7. The method for preventing a robot from going out of bounds along an edge according to claim 4, wherein: The step of constructing a second boundary map based on the extended boundary specifically includes: The cost values ​​of the grids outside the extended boundary are set to unknown, the cost values ​​of the grids within the extended boundary are set to free, and the cost values ​​of the grids through which the extended boundary passes are set to obstacle, thereby forming a second boundary map.

8. A device for preventing a robot from going out of bounds along an edge, characterized in that: include: A boundary map construction module is used to control the robot to run along the edge according to a preset teaching trajectory to construct a first boundary map; a boundary expansion module, configured to perform expansion processing on the position points on the boundary in the first boundary map to obtain an expanded boundary and generate a second boundary map based on the expanded boundary; The operation module is used to maintain the preset teaching trajectory unchanged and control the robot to continue running along the edge in the second boundary map according to the teaching trajectory.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for preventing a robot from going out of bounds along an edge as claimed in any one of claims 1 to 7 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 for causing a robot to go out of bounds along an edge as claimed in any one of claims 1 to 7 are implemented.