Control method, system, robot, and storage medium
By acquiring the contour information of the target object or region, the robot's posture is adjusted to move parallel or nearly parallel to the target line segment, thus solving the collision problem during robot cleaning and achieving optimized edge cleaning effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YUNJING INTELLIGENCE (SHENZHEN) CO LTD
- Filing Date
- 2022-09-09
- Publication Date
- 2026-06-23
AI Technical Summary
During the cleaning process, the robot may collide with the target object or area, resulting in poor cleaning effect along the edge.
By acquiring the contour information of the target object or region through sensors, the first contour is determined, and the robot's posture is adjusted to move parallel or nearly parallel to the target line segment to avoid collisions.
The robot's edge cleaning path has been optimized to avoid collisions and ensure thorough cleaning.
Smart Images

Figure CN115437379B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot control technology, and in particular to a control method, system, robot, and storage medium. Background Technology
[0002] With the continuous progress and development of society, robots are being used more and more widely in people's daily production and life. Some mobile robots need to move along edges. For example, some household robot vacuum cleaners need to move along edges and avoid obstacles when cleaning in order to thoroughly clean the room.
[0003] Currently, robots may collide with the target object during the cleaning process, resulting in poor edge cleaning performance. Summary of the Invention
[0004] This application provides a control method, system, robot, and storage medium to improve the cleaning effect of the robot.
[0005] In a first aspect, embodiments of this application provide a control method, including:
[0006] The first contour is determined based on the contour information of the target object or target area to be edged;
[0007] The robot's current posture is adjusted to the target posture based on the first contour;
[0008] Control the robot to displace relative to the target object or target area in the target posture.
[0009] Secondly, this application also provides a robot control system, including a robot, sensors mounted on the robot, and a controller, wherein the controller is used to execute the steps of the robot control method described above.
[0010] Thirdly, this application also provides a robot, the robot comprising:
[0011] Obstacle detection module;
[0012] Mobile module; and
[0013] The control device includes an obstacle detection module and a movement module, both of which are connected to the control device. The control device includes a memory, a processor, and a robot control program stored in the memory and executable on the processor. When the robot control program is executed by the processor, it implements the steps of the robot control method described above.
[0014] Fourthly, this application also provides a computer-readable storage medium storing a robot control program, which, when executed by a processor, implements the steps of the robot control method described above.
[0015] Compared to existing technologies, the control method provided in this application determines a first contour based on the contour information of the target object or target area to be cleaned along the edge; adjusts the robot's current posture to a target posture based on the first contour; and controls the robot to displace relative to the target object or target area in the target posture. When the robot displaces in the target posture, a better edge-cleaning path can be planned based on the contour information of the obstacle or the target area, avoiding collisions with the target object or target area, thus achieving a better edge-cleaning path and a more effective edge-cleaning behavior.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating the control method provided in the embodiments of this application;
[0019] Figure 2 A flowchart illustrating the sub-steps of the control method provided in this application's embodiments;
[0020] Figure 3 A flowchart illustrating another sub-step of the control method provided in the embodiments of this application;
[0021] Figure 4 A flowchart illustrating another sub-step of the control method provided in the embodiments of this application;
[0022] Figure 5 A flowchart illustrating another sub-step of the control method provided in the embodiments of this application;
[0023] Figure 6 A schematic diagram of a specific region in the control method provided in the embodiments of this application;
[0024] Figure 7 A flowchart illustrating another sub-step of the control method provided in the embodiments of this application;
[0025] Figure 8 This is a schematic block diagram of the structure of a robot provided in an embodiment of this application. Detailed Implementation
[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0027] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0028] It should be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0029] It should be understood that, in order to clearly describe the technical solutions of the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish the same or similar items with essentially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and the terms "first" and "second" are not necessarily different.
[0030] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0031] The inventors of this application have discovered that when a robot is cleaning a target object, it may collide with the target object or travel outside the target area. The robot is unable to plan a better edge path based on the contour information of the obstacle or the contour information of the target area, thus failing to achieve a better edge cleaning effect.
[0032] In some scenarios, such as restricted areas or base station areas, the relationship between the robot and these areas is constantly monitored. If the robot intrudes into such an area, or if the distance between the robot and the edges of these areas reaches a pre-set value, a reaction event can be triggered in the restricted area or base station area, and then the control method provided in the following embodiments can be executed. For cleaning specific areas, an externally guided robot can navigate to the specific area for cleaning, and then the control method provided in the following embodiments can be executed. Of course, the application of the control method provided in the embodiments of this application is not limited to the above scenarios.
[0033] In view of this, see Figure 1 , Figure 1 This is a flowchart illustrating a control method provided in an embodiment of the present application. The control method is applied to a robot and includes steps S100-S300.
[0034] Step S100: Determine the first contour based on the contour information of the target object or target area to be edged.
[0035] Multiple sensors, such as vision sensors or lidar, can be deployed on the robot. As the robot moves, the vision sensors or lidar can detect the contour information of the target object or target area. This contour information can include the length of the edges, the distance of the robot from the edges, and so on. Once the contour information of the edges is obtained, the first contour can be derived.
[0036] Understandably, within a room, regardless of the distance between the robot and the target object or area to be traced, visual sensors or LiDAR can typically acquire the initial outline of the target object or area. Furthermore, robots usually have a built-in map of the room, so once the detector scans the target object or area, it can extract the global outline information of the target object or area from the built-in map.
[0037] In addition, the target object may include obstacles such as walls and beds; the target area may include the target area, or a specific area or base station area, and the specific area may include the cleaning area, etc.
[0038] It's worth noting that when the distance between the robot and the target object or area to be cleaned is large, no adjustment to the robot's direction and / or position is needed. For example, when the robot is cleaning the middle of an area. Generally, a reaction event is triggered when the distance between the robot and the target object or area to be cleaned is small (this distance can be set according to the actual situation), for example, when the robot is cleaning along the edge and the small distance might affect the robot's movement. In this case, the robot's movement direction and / or position need to be adjusted. For example, if the robot touches a wall while moving along the edge, then the robot's movement direction and position need to be adjusted.
[0039] Step S200: Adjust the robot's current posture to the target posture according to the first contour.
[0040] Once the initial contour is determined, the robot's angular velocity and linear velocity can be adjusted to make the robot move according to the target posture.
[0041] Further, see Figure 2 As shown, Figure 2 A flowchart illustrating the sub-steps of the control method provided in this application embodiment; adjusting the robot's current posture to a target posture based on the first contour may include:
[0042] S201. Determine the target line segment in the first contour that is at a preset distance from the robot.
[0043] The preset distance can be set manually. Preferably, in this embodiment, the edge in the first contour that is closest to the robot can be determined as the target line segment.
[0044] It should be emphasized that the target line segment is the edge with the closest distance between the robot and the first contour, while the first contour is in most cases an irregular polygonal region.
[0045] Of course, in some special scenarios, the first contour may be a circular or semi-circular area. When the first contour is a circular or semi-circular area, the arc edge closest to the robot can be represented as a line segment, thus obtaining the edge with the closest distance between the robot and the first contour.
[0046] One way to represent an arc-shaped edge as a line segment is to take two points that are relatively close to each other on the arc-shaped edge and connect the two points to obtain the line segment. The specific selection of the two points can be set according to the size of the robot; for example, the distance between the two points can be equal to the length or radius of the robot.
[0047] S202. Determine the target posture of the robot based on the target line segment, wherein the target posture includes the robot's running direction being parallel or nearly parallel to the target line segment.
[0048] It is understood that a target line segment is an edge of the first contour of a target object or target area. When the robot contacts or collides with this target line segment, it is equivalent to colliding with the edge of the target object or target area. This may seriously affect cleaning efficiency and reduce cleaning effect. Therefore, in this embodiment, to avoid colliding with the target object or target area, the robot can move along the edge, that is, along the target line segment, and determine the robot's target posture, that is, move parallel or nearly parallel to the target line segment. This can avoid contact or collision with the target object or target area.
[0049] The target posture includes the direction of movement and the distance between the target line segment and the target line segment. This distance can be set in advance. Therefore, once the direction of movement of the robot is determined, the target posture of the robot is basically determined.
[0050] S203. Adjust the robot's running direction so that the robot's current posture becomes the target posture.
[0051] By changing the robot's direction of movement to be parallel or nearly parallel to the target line segment, the robot's current posture becomes the target posture.
[0052] Step S300: Control the robot to move relative to the target object or target area in the target posture.
[0053] After adjusting the robot to the target posture, so that the robot is parallel or nearly parallel to the target line segment, driving the robot to move relative to the target object or target area can ensure that the robot will not collide with the target object or target area.
[0054] Further, step S300 includes: detecting the angle difference between the robot's movement direction and the straight line where the target posture is located, adjusting the angle difference to make the robot move closer to the first contour, and making the angle difference tend to a first preset threshold.
[0055] In this embodiment, the first preset threshold can be zero or close to zero.
[0056] In practice, during operation, uneven ground or curved edges of the target object may cause an angular difference between the robot's direction of travel and the target line segment (the angle difference between a ray drawn from the robot's origin towards the direction of travel and the straight line containing the target line segment). To ensure the robot moves parallel to or nearly parallel to the target line segment, its angular velocity can be adjusted to reduce the angle to a first preset threshold, thus changing the robot's direction of travel. When the angular difference is less than or equal to the first preset threshold, it indicates that the robot can move parallel to or nearly parallel to the target line segment.
[0057] The above solution allows for continuous adjustment of the robot's direction of motion during operation, ensuring that the robot remains parallel or nearly parallel to the target line segment, thus avoiding collisions with the target object or target area.
[0058] Furthermore, when cleaning along edges, the robot needs to maintain a certain distance from the target line segment to avoid collisions, and this distance needs to be very small to ensure thorough cleaning. However, as the robot moves, uneven ground can cause it to become non-parallel to the target line segment, leading to a gradual increase in the distance between them. In this embodiment, continuously adjusting the angle difference allows the robot to gradually approach the target line segment, ensuring that the distance between the robot and the target line segment meets the requirements and achieving thorough cleaning.
[0059] Furthermore, in one embodiment of this application, see... Figure 3 As shown, Figure 3 A flowchart illustrating another sub-step of the control method provided in this application embodiment. Step S300 may further include:
[0060] Step S301: Obtain the linear velocity and angular velocity of the robot during operation.
[0061] Step S302: When there is a corner at the end of the target line segment, obtain the corner angle at the end of the target line segment.
[0062] Step S303: If the corner angle is greater than the second preset threshold, adjust the linear velocity to the first preset threshold and adjust the direction of the robot so that the robot maintains the target posture and passes through the corner at the end of the target line segment.
[0063] Radar or sensors mounted on the robot can detect whether there is a corner ahead of the target line segment, and the angle of the corner. When the corner angle is greater than a second preset threshold, it means that the angle between the current target line segment and the next adjacent target line segment is large. At this time, the robot can adjust its linear velocity to zero or close to zero to stop its movement. Then, the robot's angular velocity is adjusted to change its direction, enabling the robot to pass through the corner.
[0064] Further, see Figure 4 As shown, Figure 4 A flowchart illustrating another sub-step of the control method provided in this application embodiment. After adjusting the robot's orientation to maintain the target posture and pass through the corner at the end of the target line segment, the control method further includes:
[0065] Step S3031: Obtain the next target line segment in the first contour.
[0066] Step S3032: Adjust the robot's running direction according to the next target line segment, so that the robot's current target posture is adjusted to the next target posture; wherein, the next target posture is when the robot's movement direction is parallel or nearly parallel to the next target line segment.
[0067] Step S3033: Drive the robot to move according to the next target posture.
[0068] After identifying the next target line segment adjacent to the current target line segment, the robot's angular velocity is adjusted to change its direction of movement, thus aligning the robot's current target posture with the target posture corresponding to the next target line segment. This ensures that the robot remains parallel to the other target line segments of the first contour, even after turning.
[0069] In another embodiment of this application, see Figure 5 As shown, Figure 5 A flowchart illustrating another sub-step of the control method provided in this application embodiment; step S300 may further include:
[0070] Step S304: Obtain the linear velocity and angular velocity of the robot during operation.
[0071] Step S305: When there is a corner at the end of the target posture, obtain the corner angle at the end of the target posture.
[0072] Step S306: If the corner angle is less than the second preset threshold, maintain or adjust the robot's angular velocity and linear velocity so that the robot passes through the target posture endpoint and moves according to the next target posture.
[0073] When the corner angle is less than the second preset threshold, it indicates that the angle between the current target line segment and the next adjacent target line segment is small. In this case, the robot can maintain its original speed and adjust its angular velocity to pass the current corner. Of course, it can also appropriately adjust, for example, by reducing the linear velocity and angular velocity, to pass the current corner.
[0074] See Figure 6 As shown, Figure 6 This is a schematic diagram of a specific region in the control method provided in this application. In this diagram, an inflection point is formed at the connection point of every two adjacent target line segments. Figure 3 The diagram includes inflection points P0, P1, P2, P3, and P4. Each pair of adjacent target line segments forms a corresponding corner at the inflection point. For inflection points P2 and P4, the corner angles are relatively large. When the robot passes through these inflection points, it can stop first, adjust its running direction, and then move on.
[0075] Further, adjusting the robot's angular velocity and linear velocity to enable the robot to pass through the target pose endpoint may include:
[0076] By reducing the linear velocity of the robot, the position of the robot is adjusted; while adjusting the position of the robot, the angular velocity of the robot is changed, and the direction of motion of the robot is appropriately adjusted so that the robot passes through the corner at the end of the target posture.
[0077] The specific amount to reduce the linear or angular velocity can be set according to the actual situation, as long as it ensures that the robot can pass through the current corner.
[0078] For example, a first angle threshold can be preset, and this first angle threshold is less than a second preset threshold. Within the range of the first angle threshold to the second preset threshold, the linear velocity and angular velocity can be appropriately reduced. If the corner angle is less than the first angle threshold, the robot's linear velocity can be kept constant as it passes the current corner.
[0079] Furthermore, when adjusting the robot's direction of motion to allow the robot to pass through a corner at the target pose endpoint, the control method may further include:
[0080] As the robot passes the corner, it is driven to move closer to the next target line segment adjacent to the current target line segment. This ensures that the robot gradually approaches the target line segment with a very small distance between them.
[0081] The edge behavior in the above scheme can be implemented based on the first contour line that has not undergone expansion or contraction.
[0082] Furthermore, in this embodiment of the application, the control method includes, based on the contour information of the target object or target region to be edged, the following:
[0083] The edges of the target object or target area to be edged are expanded or shrunken, and combined with the contour information, a first contour is obtained.
[0084] In the above solutions, expansion or contraction can better ensure that the robot cleans the entire area along the edge.
[0085] Further, see Figure 7 As shown, Figure 7 A flowchart illustrating another sub-step of the control method provided in this application embodiment. Adjusting the robot's current posture to a target posture based on the first contour may include:
[0086] Step S204: Determine the edge type of the target object or target area to be edged based on the contour information.
[0087] Step S205: Based on the edge type, expand or shrink the edge of the target object or target area to be edged, and combine it with the contour information to obtain the first contour.
[0088] Step S206: Determine the target line segment in the first contour that is at a preset distance from the robot.
[0089] Step S207: Determine the target posture of the robot based on the target line segment, wherein the target posture includes the robot's running direction being parallel or nearly parallel to the target line segment; adjust the robot's running direction so that the robot's current posture becomes the target posture.
[0090] The contour information can include the specific type of the current contour, such as whether it is the first contour of an obstacle or the first contour of a restricted area. After expanding or shrinking the edges of the target object or target area, the first contour can be determined by combining the side lengths and the distance between the target object and the robot in the contour information.
[0091] Furthermore, in this embodiment, the target line segment can be a side of the first contour. To ensure the robot is as parallel as possible to the target line segment of the first contour, the robot's running direction is parallel to or nearly parallel to the target line segment. Once the robot's movement direction is determined, the robot's target posture is also determined. Subsequent steps at this point can refer to the above description.
[0092] The inventors of this application have discovered that different processing methods are required for different types of target objects or target areas. Therefore, in the embodiments of this application, based on the edge type, the edges of the target object or target area to be edged are expanded or contracted, including:
[0093] When the edge type is a specific range, the edge of the specific range is expanded by a first preset distance along a direction away from the specific range. The direction away from the specific range may include a direction away from the center position or center point of the specific range.
[0094] The specific range includes restricted areas and obstacles. Obstacles can be walls, etc.; while restricted areas can be pre-set manually.
[0095] Furthermore, the first preset distance includes: the sum of a first distance between the center point of the robot and the peripheral edge of the robot, and a preset first edge distance. Wherein, the first edge distance is the distance between the peripheral edge of the robot and the edge of the specific range that is a preset distance from the robot.
[0096] In another embodiment of this application, when the edge type is a specific region, the edge of the specific region is indented by a second preset distance along the direction toward the specific region; the direction toward the specific region may include the direction toward the center position or center point of the specific region.
[0097] A specific region can include a region consisting of a closed polygon, or it can include an open path.
[0098] The second preset distance includes the sum of the second distance between the center point of the robot and the peripheral edge of the robot and the preset second edge distance.
[0099] Wherein, the second edge distance is the distance between the periphery of the robot and the edge of the specific region that is a preset distance from the robot.
[0100] In the above, the first preset distance may include: the sum of a first distance between the robot's center point and the robot's peripheral edge, and a pre-set first edge-along distance; the second preset distance may include: the sum of a second distance between the robot's center point and the robot's peripheral edge, and a pre-set second edge-along distance. This is to ensure that the robot can move along the edge. Because when the robot is moving normally, even when it is far from a specific range, it can still detect the edge of that specific range and generate a first contour. The first preset distance or the second preset distance can limit the distance between the robot and the specific range, ensuring that the robot is relatively close to the first contour and moves along the edge.
[0101] Furthermore, in one embodiment of this application, when the two endpoints of the first contour do not coincide, either endpoint is determined as the endpoint; when the robot moves to the endpoint, the robot's edge-following behavior ends.
[0102] If the target area is an edge path, and the beginning and end of the edge path are not connected, then the edge path can be considered a single path. The robot can start from any point along the edge and move to the end point of the edge path.
[0103] For example, taking a restricted area as an example, the method of this application embodiment is as follows:
[0104] 1) First, the user needs to mark the restricted areas on the global map. A restricted area is generally a polygonal area.
[0105] 2) After the sensors on the robot detect the outline information of the restricted area, the polygonal region is extracted from the map built into the robot, and the edges of the polygon are expanded outward (for example, the length of the robot's radius is expanded) to obtain the first outline.
[0106] 3) The distance between the robot and the first outline of the restricted area. If the distance is less than the preset value, or if the robot partially enters the restricted area, obtain the target line segment that is at the preset distance from the robot.
[0107] 4) Because the robot's direction of motion needs to be adjusted so that it is parallel or nearly parallel to the target line segment, the target posture can be determined at this point.
[0108] 5) Adjust the robot's direction of motion to align its current posture with the target posture, and move relative to the target line segment. During the movement, the angle difference between the robot's direction of motion and the target line segment can be detected in real time, and the magnitude of the angle difference can be adjusted to keep the robot parallel to the target line segment and to maintain the distance between the robot and the target line segment.
[0109] 6) When the robot moves to the corner between the current target line segment and the next target line segment, adjust the robot's linear velocity and angular velocity according to the size of the corner so that the robot can pass through the corner and move along the next target line segment according to the next target posture.
[0110] In one embodiment of this application, a robot control system is also provided, including a robot, sensors mounted on the robot, and a controller, wherein the controller is used to execute the steps of the robot control method provided in the above embodiments.
[0111] In one embodiment of this application, a robot is also provided, the robot including: an obstacle detection module; a movement module; and a control device, the obstacle detection module and the movement module being connected to the control device, the control device including: a memory, a processor, and a robot control program stored in the memory and executable on the processor, the robot control program being executed by the processor to implement the steps of the robot control method provided in the above embodiments.
[0112] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the above-described device and each module can be referred to the corresponding processes in the aforementioned control method embodiments, and will not be repeated here.
[0113] like Figure 8 As shown, Figure 8 This is a schematic block diagram of the structure of a robot provided in an embodiment of this application.
[0114] like Figure 8As shown, the robot may include: a processor 1001, such as a CPU, a memory 1002, and a communication bus 1003. The communication bus 1003 is used to establish communication between these components. The memory 1002 may be a high-speed RAM or a stable, non-volatile memory, such as a disk drive. Optionally, the memory 1002 may also be a storage device independent of the aforementioned processor 1001.
[0115] Those skilled in the art will understand that Figure 1 The structure of the robot shown does not constitute a limitation on the robot and may include more or fewer parts than shown, or combine certain parts, or have different arrangements of parts.
[0116] like Figure 8 As shown, the memory 1002, which serves as a computer storage medium, may include a program that implements the control method described in the above embodiments.
[0117] exist Figure 1 In the robot shown, the processor 1001 can be used to call the program storing the control method in the memory 1002 that implements the control method in the above embodiments, and execute the program-related steps of the control method in the embodiments of this application.
[0118] It should be noted that the execution subject of the robot control method proposed in this application embodiment can be either the robot's control device or the robot itself. Optionally, the robot's control device can be set on the robot or set independently of the robot. When the robot's control device is set independently of the robot, it can communicate with the robot. The following will describe various embodiments of the robot control method using the robot as the execution subject as an example. Optionally, the robot generally refers to a mobile device that can move autonomously according to a preset control program, and can be composed of a wheel system, a drive part of the drive wheel system, and a platform mounted on the wheel system for carrying other functions.
[0119] In one embodiment, the processor 1001 is configured to run a computer program stored in a memory to perform the following steps:
[0120] Based on the contour information of the target object or target area to be traversed, a first contour is determined; based on the first contour, the current posture of the robot is adjusted to the target posture; the robot is controlled to displace relative to the target object or target area in the target posture.
[0121] In one embodiment, when the processor 1001 adjusts the robot's current pose to a target pose based on the first contour, it is configured to:
[0122] Identify a target line segment in the first contour that is at a preset distance from the robot; determine the target posture of the robot based on the target line segment, wherein the target posture includes the robot's running direction being parallel to or nearly parallel to the target line segment; adjust the robot's running direction so that the robot's current posture becomes the target posture.
[0123] In one embodiment, the processor 1001, in implementing the control of the robot to displace relative to the target object or target region in the target posture, includes:
[0124] The angle difference between the robot's movement direction and the line where the target posture is located is detected, the angle difference is adjusted to make the robot move closer to the first contour, and the angle difference tends to a first preset threshold.
[0125] In one embodiment, the processor 1001, in implementing the control of the robot to displace relative to the target object or target region in the target posture, further includes:
[0126] The linear velocity and angular velocity of the robot during operation are obtained; when there is a corner at the end of the target line segment, the corner angle at the end of the target line segment is obtained; if the corner angle is greater than a second preset threshold, the linear velocity is adjusted to a first preset threshold, and the direction of the robot is adjusted so that the robot maintains the target posture and passes through the corner at the end of the target line segment.
[0127] In one embodiment, after adjusting the robot's orientation to maintain the target posture and pass through the corner at the end of the target line segment, the processor 1001 is configured to:
[0128] Obtain the next target line segment in the first contour;
[0129] Based on the next target line segment, the robot's running direction is adjusted so that the robot's current target posture is adjusted to the next target posture; wherein, the next target posture is when the robot's movement direction is parallel to or nearly parallel to the next target line segment;
[0130] Drive the robot to move according to the next target posture.
[0131] In one embodiment, when the processor 1001 implements the control of the robot to displace relative to the target object or target region in the target posture, it is configured to:
[0132] The linear velocity and angular velocity of the robot during operation are obtained; when there is a corner at the end of the target posture, the corner angle at the end of the target posture is obtained; if the corner angle is less than a second preset threshold, the angular velocity and linear velocity of the robot are maintained or adjusted so that the robot passes through the end of the target posture and moves according to the next target posture.
[0133] In one embodiment, when the processor 1001 adjusts the angular velocity and linear velocity of the robot to enable the robot to pass the target posture endpoint, it is configured to:
[0134] The robot's position is adjusted by reducing its linear velocity; simultaneously, the robot's direction of motion is adjusted by reducing its angular velocity, so that the robot passes through the corner at the target posture endpoint.
[0135] In one embodiment, when the processor 1001 adjusts the robot's direction of motion to allow the robot to pass through the corner at the target pose endpoint, it performs the following:
[0136] When the robot passes the corner, it is driven to move closer to the next target line segment adjacent to the current target line segment.
[0137] In one embodiment, the processor 1001 determines a first contour based on the contour information of the target object or target region to be edged, for the purpose of:
[0138] The edge of the target object or target area to be traversed is expanded or shrunken, and combined with the contour information, a first contour is obtained; the current posture of the robot is adjusted to the target posture according to the first contour; the robot is controlled to displace relative to the target object or target area with the target posture.
[0139] In one embodiment, when the processor 1001 adjusts the robot's current pose to a target pose based on the first contour, it is configured to:
[0140] Based on the contour information, determine the edge type of the target object or target area to be traversed; based on the edge type, expand or shrink the edge of the target object or target area to be traversed to obtain a first contour; determine a target line segment in the first contour that is at a preset distance from the robot; determine the target posture of the robot based on the target line segment, wherein the target posture includes the robot's running direction being parallel or nearly parallel to the target line segment; adjust the robot's running direction so that the robot's current posture becomes the target posture.
[0141] In one embodiment, when the processor 1001 performs the expansion or contraction processing on the edge of the target object or target region to be followed based on the edge type, it is configured to:
[0142] When the edge type is a specific range, the edge of the specific range is expanded by a first preset distance along a direction away from the specific range; wherein, the specific range includes forbidden areas and obstacles.
[0143] In one embodiment, when the processor 1001 implements the control method, it further includes: the first preset distance includes: the sum of the first distance between the center point of the robot and the peripheral edge of the robot and the first edge distance preset; wherein, the first edge distance is the distance between the peripheral edge of the robot and the edge of the specific range that is at a preset distance from the robot.
[0144] In one embodiment, when the processor 1001 performs the expansion or contraction processing on the edge of the target object or target region to be followed based on the edge type, it is configured to:
[0145] When the edge type is a specific region, the edge of the specific region is indented by a second preset distance along the direction towards the specific region.
[0146] In one embodiment, when the processor 1001 implements the control method, it further includes: the second preset distance includes: the second distance between the center point of the robot and the peripheral edge of the robot, and the sum of the second edge distance preset; wherein, the second edge distance is the distance between the peripheral edge of the robot and the edge of the specific area that is a preset distance from the robot.
[0147] In one embodiment, the processor 1001, when implementing the control method, is used to implement:
[0148] When the two endpoints of the first contour do not coincide, either endpoint is determined as the endpoint; when the robot moves to the endpoint, the robot's edge-following behavior ends.
[0149] The embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions, and the processor 1001 executing the program instructions to implement any of the control methods provided in the embodiments of this application.
[0150] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, SmartMedia Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device.
[0151] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A control method applied to a robot, characterized by, The method comprises the following steps: determining the edge type of the target object or target area according to the contour information of the target object or target area to be followed; when the edge type is a specific range, expanding the edge of the specific range by a first preset distance in a direction away from the specific range to obtain a first contour, wherein the specific range includes a forbidden area and an obstacle; the first preset distance comprises a first distance between the center point of the robot and the edge of the robot, and a first following distance preset in advance; when the edge type is a specific area, the edge of the specific area is inwardly retracted by a second preset distance in a direction towards the specific area to obtain a first contour; the second preset distance comprises a second distance between the center point of the robot and the edge of the robot, and a second following distance preset in advance; determining the target pose of the robot according to the target line segment in the first contour with a preset distance from the robot, wherein the target pose comprises the running direction of the robot being parallel or close to parallel to the target line segment; detecting the angle difference between the running direction of the robot and the straight line where the target pose is located, adjusting the angle difference to make the robot approach the first contour, and making the angle difference tend to a first preset threshold.
2. The control method according to claim 1, characterized by, The method further comprises the following steps: obtaining the linear velocity and angular velocity of the robot when running; when there is a corner at the end point of the target line segment, obtaining the corner angle at the end point of the target line segment; if the corner angle is greater than a second preset threshold, adjusting the linear velocity to a first preset threshold, and adjusting the direction of the robot to make the robot maintain the target pose and pass through the corner at the end point of the target line segment.
3. The control method according to claim 2, characterized by, The method further comprises the following steps: obtaining the next target line segment in the first contour; adjusting the running direction of the robot according to the next target line segment, so that the current target pose of the robot is adjusted to a next target pose; wherein the next target pose is parallel or close to parallel to the next target line segment; driving the robot to move according to the next target pose.
4. The control method according to claim 1, characterized by, The method further comprises the following steps: obtaining the linear velocity and angular velocity of the robot when running; when there is a corner at the end point of the target pose, obtaining the corner angle at the end point of the target pose; If the corner angle is less than the second preset threshold, maintain or adjust the robot's angular velocity and linear velocity so that the robot passes through the target posture endpoint and moves according to the next target posture.
5. The control method according to claim 4, characterized by Adjusting the robot's angular velocity and linear velocity to enable the robot to pass the target pose endpoint includes: The robot's position is adjusted by reducing its linear velocity; While adjusting the robot's position, the robot's angular velocity is reduced, and the robot's direction of motion is adjusted so that the robot passes through the corner at the target posture endpoint.
6. The control method according to claim 5, characterized by Adjusting the robot's direction of motion to allow the robot to pass through the corner at the target pose endpoint includes: When the robot passes the corner, it is driven to move closer to the next target line segment adjacent to the current target line segment.
7. The control method according to claim 1, characterized by, The step of determining the first contour based on the contour information of the target object or target area to be edged includes: The edges of the target object or target area to be edged are expanded or shrunken, and combined with the contour information, a first contour is obtained.
8. The control method according to claim 7, characterized by, The step of adjusting the robot's current pose to a target pose based on the first contour includes: Identify a target line segment in the first contour that is at a preset distance from the robot; Based on the target line segment, the target posture of the robot is determined, wherein the target posture includes the robot's running direction being parallel or nearly parallel to the target line segment; Adjust the robot's running direction so that the robot's current posture becomes the target posture.
9. The control method according to claim 1, characterized by, The method further includes: When the two endpoints of the first contour do not coincide, either endpoint is determined as the end point; When the robot reaches the endpoint, its edge-following behavior ends.
10. A control system of a robot characterized by, The system includes a robot, sensors mounted on the robot, and a controller, the controller being used to perform the steps of the robot control method as described in any one of claims 1 to 9.
11. A robot, characterized in that The robot includes: Obstacle detection module; Mobile module; and A control device, wherein the obstacle detection module and the movement module are both connected to the control device, the control device comprising: a memory, a processor, and a robot control program stored in the memory and executable on the processor, wherein the robot control program, when executed by the processor, implements the steps of the robot control method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a robot control program, which, when executed by a processor, implements the steps of the robot control method as described in any one of claims 1 to 9.