Robot moving path control method, device and equipment and storage medium
By acquiring the robot's yaw angle, position, and environmental information, the robot is controlled to move diagonally and rotate to the path direction, solving the problem of poor motion performance in narrow paths, achieving efficient escape from narrow paths, and improving the robot's flexibility and mobility.
Patent Information
- Application Number
- CN202610051085.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, robots have poor mobility in narrow paths and cannot effectively escape narrow paths, resulting in road blockage and affecting mobility efficiency.
By acquiring the robot's yaw angle, position information, global path information, and environmental information, when a narrow path is determined, the robot is controlled to move backward along the diagonal direction, and the distance value of the obstacle is collected. If it is greater than the threshold, the robot rotates to the path direction to escape the narrow path.
This improves the robot's flexibility and mobility, ensuring it can quickly escape narrow paths, avoid prolonged confinement, and enhance the accuracy and safety of path planning.
Smart Images

Figure CN121918565A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot mobility technology, and in particular to a robot mobility path control method, apparatus, device, and storage medium. Background Technology
[0002] During navigation, robots need to travel back and forth along complex paths. Current technologies typically only allow for fixed movement patterns, or involve adjusting angles by rotating at the starting and ending points. Alternatively, robots often use a forward and backward Ackerman model for movement. However, the forward and backward Ackerman model has poor performance in turning or confined spaces. For example, a forward and backward Ackerman chassis often cannot turn around on narrow paths, causing road blockages and failing to meet the movement requirements in complex paths, thus affecting mobility. Summary of the Invention
[0003] This application provides a robot movement path control method, apparatus, device, and storage medium. When the robot is determined to be on a narrow path by acquiring yaw angle, position information, global path information, and environmental information, it can promptly leave the narrow path, thereby improving the robot's flexibility and movement efficiency.
[0004] In a first aspect, embodiments of this application provide a robot movement path control method, including: Obtain the robot's current yaw angle, position information, preset global path information, and environmental information; If it is determined, based on the yaw angle, the position information, the global path information, and the environmental information, that the robot has advanced into the first narrow path and the next path point is located behind the robot, then the diagonal movement direction is determined based on the environmental information and the position information. Control the robot to move backward along the oblique movement direction; During the backward movement of the robot along the oblique direction, a first distance value is collected between the robot and the obstacle on the side of the first narrow path closest to the robot; If the first distance value is greater than a preset threshold, the path direction of the subsequent path is determined based on the global path information; Control the robot to rotate to the path direction.
[0005] Secondly, embodiments of this application provide a robot movement path control device, comprising: The acquisition unit is used to acquire the robot's current yaw angle, position information, preset global path information, and environmental information. The first determining unit is configured to determine the diagonal movement direction based on the environment information and the position information if it is determined that the robot has moved forward into the first narrow path based on the yaw angle, the position information, the global path information and the environment information, and the next path point is located behind the robot. The first control unit is used to control the robot to move backward along the oblique movement direction; The acquisition unit is used to acquire a first distance value between the robot and the obstacle on the side of the first narrow path closest to the robot during the robot's backward movement along the oblique direction of movement; The second determining unit is used to determine the path direction of the subsequent path based on the global path information if the first distance value is greater than a preset threshold. The second control unit is used to control the robot to rotate to the path direction.
[0006] Thirdly, embodiments of this application provide a terminal device, the terminal device including at least one processor, a communication interface and a memory, the communication interface being used to send and / or receive data, the memory being used to store a computer program, and the at least one processor being used to call the computer program stored in the memory to implement any of the methods of the first aspect of this application.
[0007] Fourthly, embodiments of this application provide an electronic device including a processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device executes the instructions as in any of the methods of the first aspect of this application.
[0008] Fifthly, embodiments of this application provide a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform some or all of the steps described in any method of the first aspect of this application.
[0009] Sixthly, embodiments of this application provide a computer program operable to cause a computer to perform some or all of the steps described in any method of the first aspect of this application. This computer program may be a software installation package.
[0010] As can be seen, the embodiments of this application include: acquiring the robot's current yaw angle, position information, preset global path information, and environmental information; if it is determined based on the yaw angle, position information, global path information, and environmental information that the robot has moved forward into a first narrow path, and the next path point is located behind the robot, then determining the diagonal movement direction based on the environmental information and position information; controlling the robot to move backward along the diagonal movement direction; during the robot's backward movement along the diagonal movement direction, acquiring a first distance value between the robot and the obstacle on the side of the first narrow path closest to the robot; if the first distance value is greater than a preset threshold, then determining the path direction of the subsequent path based on the global path information; and controlling the robot to rotate to the path direction. In this application, based on the acquired yaw angle, position information, global path information, and environmental information, it is determined that the robot is in a narrow path, accurately identifying the robot entering a narrow area, and timely controlling the robot's movement according to the determined diagonal movement direction, so that the robot moves out of the narrow environment, improving the robot's flexibility and high passability, thereby improving movement efficiency. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A schematic diagram of a robot module provided in an embodiment of this application; Figure 2 A flowchart illustrating a robot movement path control method provided in an embodiment of this application; Figure 3 This application provides a schematic diagram of a robot moving through a narrow path. Figure 4 A flowchart illustrating another robot movement path control method provided in this application embodiment; Figure 5 This application provides a schematic diagram of a robot moving to a narrow path. Figure 6 A flowchart illustrating another robot movement path control method provided in an embodiment of this application; Figure 7 A functional unit block diagram of a robot movement path control device provided in this application embodiment; Figure 8 A functional unit block diagram of another robot movement path control device provided in an embodiment of this application. Detailed Implementation
[0013] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0014] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0015] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0016] In this application, "robot" refers to a self-propelled device that autonomously moves to its location and performs corresponding tasks, such as a lawnmower robot used for mowing.
[0017] In one possible example, the robot can communicate with a terminal device, which can be a smartphone, tablet, laptop, desktop computer, wearable device, head-mounted device, or vehicle-mounted terminal, etc., with a control application (i.e., an application client) installed. It should be understood that when the application client runs on the terminal device, it can interact with the robot. The terminal device includes a display module, which can intuitively display information and data, and collect user operations. This allows for interaction with the robot through the terminal device's display module, facilitating remote robot control and improving the user experience.
[0018] In one possible example, please combine Figure 1 , Figure 1 This application provides a schematic diagram of a robot module, as shown in the embodiment of the present application. Figure 1As shown, the robot includes a walking module 12, a control module 13, and a mowing module 14. The control module 13 is connected to both the walking module 12 and the mowing module 14 to control them. The mowing module 14 is used to perform mowing operations. The walking module 12 includes four wheels, each with independent drive and steering capabilities; that is, the robot in this application supports a four-wheel, four-turn walking mode.
[0019] Understandably, the robot can also integrate a display module 11, through which information and data can be displayed intuitively, and interaction between the user and the robot can be realized.
[0020] Specifically, the control module 13 includes a processor 131, a robot communication module 132, a memory 133, and a program 134. The number of processors 131 can be set according to actual needs. The processors 131 are connected to the memory 133 and the robot communication module 132 via an internal communication bus.
[0021] The program 134 is stored in the memory 133 and is configured to be executed by the processor 131. The program 134 includes instructions for performing any step in the method embodiments described below. It is understood that the number of programs 134 can be set according to actual needs, and no specific limitation is made here.
[0022] The processor 131 may be, for example, a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, units, and circuits described in conjunction with the disclosure of this application. The processor 131 may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc. The communication unit may be a robot communication module 132, a transceiver, a transceiver circuit, etc., and the storage unit may be a memory 133.
[0023] Memory 133 can be volatile memory or non-volatile memory, or may include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DRRAM).
[0024] Please refer to the following: Figure 2 , Figure 2 This is a flowchart illustrating a robot movement path control method provided in an embodiment of this application, as shown below. Figure 2 As shown, a robot movement path control method includes: S201: Obtain the robot's current yaw angle, position information, preset global path information, and environmental information.
[0025] When the robot starts, it acquires a pre-established global coordinate system. For example, a global coordinate system is established with a preset fixed position as the origin, east as the positive X-axis, and north as the positive Y-axis. The robot's path planning typically determines the global path within the global coordinate system using a global path planning algorithm. This involves identifying multiple global path points the robot will traverse, and then, based on these global path points and constraints such as obstacle constraints, kinematic model constraints, velocity constraints, and acceleration constraints, further determining the robot's movement path using a local path planning algorithm. The global path planning algorithm can be, for example, Digkstra's algorithm or A* algorithm, etc., without limitation. The coordinates of each path point within the global path are determined using the global coordinate system, thus unifying the description of each path point within the global path for easier subsequent calculations and control. It is understood that the global coordinate system can also be established based on other immovable landmarks, or a world coordinate system can be used; this is not restricted here. The robot's front is equipped with environmental sensors, including a vision camera and a LiDAR. Environmental sensors are installed on the robot. By collecting information about the physical area where the robot is located through these sensors, the robot's position can be determined.
[0026] When the robot moves, it acquires its current yaw angle, position information, preset global path information, and environmental information. The yaw angle represents the angle between the robot's front end at the current path point and the reference direction. For example, if the positive X-axis in the global coordinate system is taken as the reference direction, when the yaw angle is zero degrees, the robot's front end is facing the positive X-axis in the global coordinate system. The position information includes the robot's real-time coordinates within the global path.
[0027] S202, if it is determined from the yaw angle, the position information, the global path information and the environmental information that the robot has moved forward into the first narrow path and the next path point is located behind the robot, then the diagonal movement direction is determined from the environmental information and the position information.
[0028] The process involves collecting yaw angle, position information, global path information, and environmental information. Based on these data, it determines whether the robot has entered the first narrow path and whether the next path point is behind the robot. If the robot has entered the first narrow path and the next path point is behind it, the diagonal movement direction is determined based on the environmental and position information. Using the collected information to determine whether the robot is on a narrow path improves the accuracy of the determination.
[0029] S203, control the robot to move backward along the oblique movement direction.
[0030] After determining the diagonal movement direction, the robot is controlled to move backward along that direction. This allows the robot to move out of the first narrow path, improving movement efficiency.
[0031] S204, during the process of the robot moving backward along the oblique direction, a first distance value is collected between the robot and the obstacle on the side of the first narrow path closest to the robot.
[0032] During the process of the robot moving backward along the diagonal direction, a first distance value between the robot and the obstacle on the side closest to the robot is collected, so as to determine whether the robot has left the narrow area based on the first distance value.
[0033] S205, if the first distance value is greater than a preset threshold, then the path direction of the subsequent path is determined according to the global path information.
[0034] If the first distance value is greater than a preset threshold, it is determined that the robot has left the narrow area. The preset threshold can be set according to actual needs, such as being greater than half the length of the robot body; the specific preset is not limited here. The path direction of the subsequent path is determined based on the global path information to provide data support for subsequent robot steering control.
[0035] S206, control the robot to rotate to the path direction.
[0036] After determining the path direction, the robot is controlled to rotate to the path direction.
[0037] As can be seen in this example, based on the collected yaw angle, position information, preset global path information and environmental information, when it is determined that the robot is in the first narrow path, the robot is controlled to move out of the first narrow path in the diagonal direction, which improves the robot's flexibility, avoids the robot being stuck in the narrow path for a long time, and improves the movement efficiency.
[0038] In one possible example, if it is determined, based on the yaw angle, the position information, the global path information, and the environmental information, that the robot has advanced into the first narrow path, and the next path point is located behind the robot, then determining the diagonal movement direction based on the environmental information and the position information includes: determining whether the robot has advanced into the first narrow path based on the yaw angle, the environmental information, and the position information; if the robot has advanced into the first narrow path, determining the next path point based on the position information and the global path information; determining a first angle between the robot and the next path point based on the position information and the position information of the next path point; if the absolute value of the difference between the first angle and the yaw angle is greater than a preset threshold, determining that the next path point is located behind the robot; and when it is determined that the robot has advanced into the first narrow path and the next path point is located behind the robot, determining the diagonal movement direction based on the environmental information and the position information.
[0039] The step of determining whether the robot has advanced into the first narrow path based on the yaw angle, the environmental information, and the position information includes: constructing a local cost map based on the environmental information and the position information; performing polygon fitting on all contour points of obstacles on both sides of the first narrow path in the local cost map to obtain fitted polygons of obstacles on both sides of the first narrow path; if the distance between obstacles on both sides of the robot is less than or equal to a preset value based on the fitted polygons, and the robot's forward direction is determined to be the direction of entering the first narrow path based on the yaw angle, then it is determined that the robot has advanced into the first narrow path.
[0040] In a specific example, the robot's position is determined based on its yaw angle, environmental information, and location information. The environmental information includes 3D point cloud data collected by environmental sensors. A local cost map is constructed based on this 3D point cloud data, and the robot's position within the local cost map is determined based on the location information. After constructing the local cost map, obstacles on both sides of the first narrow path are identified, and their contour points are determined. Next, polygon fitting is performed on all contour points of the obstacles on both sides of the first narrow path. The collected contour points can be preprocessed, for example, by using the Douglas-Peucker algorithm in the OpenCV database or the Ramer-Douglas-Peucker (RDP) algorithm to thin them out, retaining key inflection points and removing redundant points to improve data processing efficiency. Then, the fitted polygons of the obstacles on both sides of the first narrow path are obtained based on the preprocessed contour points. Finally, the distances from the robot to each side of the fitted polygon are calculated based on the robot's position in the local cost map and the fitted polygons, determining the two closest sides to the robot, and thus calculating the distance between these two closest sides. If the distance value is less than the preset value, and the robot is judged to be heading towards the narrow path based on the yaw angle, then it is determined that the robot has moved forward and entered the first narrow path.
[0041] As can be seen, a local cost map is constructed based on the collected information, and then fitted polygons of obstacles on both sides of the first narrow path are generated based on the local cost map, thereby determining whether the robot has entered the narrow path and improving the accuracy of the determination result.
[0042] If the robot has entered the first narrow path, the next path point is determined based on its position and global path information. Specifically, the next path point associated with the position in the global path information is searched based on the position information. After determining the next path point, a first angle between the robot and the next path point is determined based on the position and the next path point. The first angle represents the angle between the direction from the robot's current position in the global coordinate system to the next path point and the reference direction. After determining the first angle, the difference between the first angle and the yaw angle is calculated. If this difference is greater than a preset threshold, the next path point is determined to be behind the robot. For example, if the yaw angle is 90 degrees and the first angle is 260 degrees in the global coordinate system, the absolute value of the difference between the yaw angle and the first angle is 170. If the preset threshold is 150, and the difference is greater than the preset threshold, the next path point is determined to be behind the robot. When it is determined that the robot has entered the first narrow path and the next path point is behind the robot, the diagonal movement direction is determined based on environmental and position information.
[0043] As can be seen in this example, the next path point is quickly determined to be behind the robot based on the first included angle and the yaw angle, improving both the efficiency and accuracy of the determination. Furthermore, the rapid determination of the diagonal movement direction enhances the efficiency and safety of escaping narrow paths.
[0044] In one possible example, please combine Figure 3 , Figure 3 This application provides a schematic diagram of a robot moving through a narrow path, as shown in the embodiment of the present application. Figure 3 As shown, the first narrow path includes a first obstacle 3011 and a second obstacle 3012 on both sides. Determining the diagonal movement direction based on the environmental information and the position information includes: if the environmental information and the position information determine that the first obstacle 3011 has a first extension length behind the robot and the second obstacle 3012 has a second extension length behind the robot; if the first extension length is less than the second extension length, then the endpoint position information of the first endpoint 3013 of the first obstacle 3011 is obtained, and the first endpoint 3013 is located behind the robot; the diagonal movement direction is determined based on the endpoint position information and the position information.
[0045] In a specific example, the first narrow path includes a first obstacle 3011 and a second obstacle 3012 on both sides. When it is determined that the robot has moved into the first narrow path and the next path point is behind the robot, the first extension length of the first obstacle 3011 behind the robot and the second extension length of the second obstacle 3012 behind the robot are determined based on environmental and positional information. Specifically, the position of the robot's rear is determined, and the first extension length of the first obstacle 3011 along the rearward direction of the robot from a position flush with the robot's rear is calculated, as well as the second extension length of the second obstacle 3012 along the rearward direction of the robot from a position flush with the robot's rear is calculated. The magnitudes of the first and second extension lengths are compared. If the first extension length is less than the second extension length, it indicates that the endpoint of the first obstacle 3011 is closer to the robot's rear. Therefore, the endpoint position information of the first endpoint 3013 behind the robot is obtained, and then the diagonal movement direction is determined based on the position information of the first endpoint 3013 and the corresponding position information of the robot, improving the robot's exit efficiency. Similarly, if the first extension length is greater than the second extension length, the endpoint position information of the second endpoint of the second obstacle 3012 located behind the robot is obtained, and then the diagonal movement direction is determined based on the endpoint position information and the corresponding position information of the robot. If the first extension length is equal to the second extension length, an obstacle closer to the next path point can be selected from the first obstacle 3011 and the second obstacle 3012, and the diagonal movement direction is determined based on the endpoint of the obstacle closer to the next path point and the corresponding position information of the robot. Specifically, after obtaining the position information of the first endpoint 3013, a circle is drawn with the first endpoint 3013 as the center and a radius greater than or equal to half the width of the robot body. The diagonal movement direction is determined based on the real-time coordinate position in the robot's position information and the tangent of the outer diameter of the circle.
[0046] As can be seen in this example, the diagonal movement direction is determined based on the obstacle on the shorter side of the narrow path, thereby improving the efficiency of escaping the narrow path.
[0047] In one possible example, before determining the diagonal movement direction based on the environmental information and the location information, the process includes: determining a second distance value between the robot and the exit of the first narrow path based on the environmental information and the location information; if the second distance value is greater than or equal to a preset distance value, controlling the robot to reverse by a third distance value, the third distance value being less than the second distance value; after the robot reverses by the third distance value, performing the step of determining the diagonal movement direction based on the environmental information and the location information.
[0048] In a specific example, before determining the diagonal movement direction based on environmental and location information, a second distance value is determined from the robot's distance to the exit of the first narrow path, based on the environmental and location information. It is then determined whether this second distance value is greater than or equal to a preset distance value, which can be set according to actual needs and is not restricted here. If the second distance value is greater than or equal to the preset distance value, it indicates that the robot is located deep within the narrow path, and the robot is then controlled to reverse a third distance value, which is less than the second distance value. After the robot reverses a third distance value, the step of determining the diagonal movement direction based on environmental and location information is executed.
[0049] As can be seen in this example, when the robot is deep in a narrow path, it can first move backward by the third distance value, and then move backward along the diagonal direction to avoid the robot being too deep in the narrow path, which would restrict diagonal movement and improve movement efficiency.
[0050] In one possible example, after controlling the robot to rotate to the path direction, the method further includes: acquiring the robot's real-time pose; and performing path planning based on the global path information, the real-time pose, and the Ackerman motion model.
[0051] In a specific example, after controlling the robot to rotate and face the path direction, the robot's real-time pose is acquired, including its real-time yaw angle and real-time position. Based on the global path information and real-time position, it is determined whether the robot is within the global path. If so, the robot's movement is controlled using the Ackerman motion model. If, based on the global path information and real-time position, the robot is determined not to be within the preset global path, it is considered to have deviated from the path. Then, path planning is performed based on the real-time pose, the next path point, and the Ackerman motion model to determine a homing path so that the robot returns to the global path. Finally, the robot's movement is controlled using the Ackerman motion model, ensuring a continuous motion path and reducing the complexity of path planning.
[0052] As can be seen in this example, after the robot leaves the narrow path, the Ackerman motion model is used to control the robot's movement, which simplifies the control and improves the real-time performance of the control.
[0053] Please combine Figure 3 and Figure 4 , Figure 4 A flowchart illustrating another robot movement path control method provided in this application embodiment is shown below. Figure 3 and Figure 4 As shown, this method also includes: S401, based on the acquired yaw angle, position information, global path information and environmental information, determine whether the robot has moved forward into the first narrow path and whether the next path point is located behind the robot.
[0054] After the robot starts, it uses its environmental sensors to collect information about the physical area where it is located, thereby obtaining yaw angle, position information, global path information, and environmental information. Based on the acquired yaw angle, position information, global path information, and environmental information, it determines whether the robot has moved forward into the first narrow path and whether the next path point is located behind the robot. If the determination result is yes, that is, it is determined that the robot has moved forward into the first narrow path and the next path point is located behind the robot, indicating that the robot needs to escape from the first narrow path, and step S402 can be executed to further determine the diagonal movement direction to escape the narrow path. If the determination result is no, that is, it is determined that the robot has not moved forward into the first narrow path, or the next path point is not located behind the robot, step S408 can be executed.
[0055] S402, determine the oblique movement direction based on environmental and location information.
[0056] If it is determined that the robot has entered the first narrow path and the next path point is behind the robot, then the diagonal movement direction is determined based on environmental and positional information. This provides data support for subsequently determining how to exit the narrow path.
[0057] S403 controls the robot to move backward along the diagonal direction.
[0058] In this process, after determining the diagonal movement direction, the robot is controlled to move backward along that direction, enabling it to... Figure 3 From position 302, the vehicle exits the narrow path diagonally and reaches position 303. This improves efficiency in reaching steerable areas, thereby increasing movement efficiency.
[0059] S404, during the process of the robot moving backward along the diagonal direction, a first distance value is collected between the robot and the obstacle on the side of the first narrow path closest to the robot.
[0060] In particular, during the process of the robot moving backward along the diagonal direction, the first distance value between the robot and the obstacle on the side closest to the robot in the first narrow path is collected in real time, so as to determine whether the robot has left the narrow path in a timely manner, thereby improving the accuracy of control.
[0061] S405, determine whether the first distance value is greater than the preset threshold.
[0062] After obtaining the first distance value, it is determined whether the first distance value is greater than a preset threshold. The preset threshold is set according to actual needs and is not restricted here. For example, the preset threshold is greater than half the length of the robot body to enable the robot to turn and improve safety. If the determination result is yes, that is, the first distance value is greater than the preset threshold, then step S406 can be executed. If the determination result is no, that is, the first distance value is less than or equal to the preset threshold, then step S404 is repeated.
[0063] S406, determine the path direction of subsequent paths based on global path information.
[0064] In this process, after determining that the first distance value is greater than a preset threshold, the path direction of the subsequent path is determined based on the global path information, thereby making the robot control more intelligent.
[0065] S407 controls the robot to rotate to the path direction.
[0066] After determining the path direction, the robot is controlled to rotate to the path direction.
[0067] S408, switch to Ackerman mode.
[0068] After determining the direction of the turning path, switch to Ackerman mode for motion planning.
[0069] S409 uses Ackerman pattern to plan a path, obtains the planned path, and controls the robot's movement according to the planned path.
[0070] The Ackerman mode primarily utilizes the Ackerman motion model for motion planning, obtaining a planned path and controlling the robot's movement accordingly. Specifically, after the robot leaves a narrow path, its real-time pose is acquired, and path planning is performed based on global path information, real-time pose, and the Ackerman motion model to simplify control and improve its real-time performance.
[0071] In one possible example, please combine Figure 5 , Figure 5 This illustration shows a robot moving to a narrow path, as provided in an embodiment of this application. Figure 5As shown, after acquiring the robot's current yaw angle, position information, preset global path information, and environmental information, the method further includes: if the next path point is determined to be the endpoint based on the yaw angle, position information, global path information, and environmental information, and the endpoint is located within the second narrow path, then the robot's preset target posture and the robot's movement direction into the second narrow path within the global path information are acquired; if the absolute value of the second angle between the movement direction and the target posture is greater than the preset angle, then an adjustment point is determined based on the endpoint and the global path information, and the adjustment point is at a distance of the preset threshold from the obstacle 501 in the second narrow path; the robot is controlled to reach the adjustment point; when the robot reaches the adjustment point, the robot is controlled to adjust to the target posture; and the robot is controlled to move diagonally to the endpoint with the target posture.
[0072] In a specific example, if a robot needs to stop within a narrow path, the narrow path restricts its rotation, making it impossible to guarantee that the robot will be in the target pose when stopping. The target pose includes the robot's orientation relative to a reference direction in the global coordinate system, where the robot's length direction is perpendicular to the reference direction. For example, the target pose includes a lateral pose, where the robot's length direction is perpendicular to the reference direction, which can be the direction the narrow path extends. If the target pose cannot be reached, it will affect the robot's efficiency in moving out of the narrow path when used again later. After obtaining the robot's current yaw angle, position information, preset global path information, and environmental information, if the next path point is determined to be the endpoint based on the yaw angle, position information, global path information, and environmental information, and the endpoint is located within the second narrow path, it is determined that the robot is about to enter the narrow path and stop. Then, the robot's preset target pose at the endpoint is obtained. Specifically, the next path point is determined based on the position information and global path information, and the path point position information of the next path point is obtained. A local cost map is constructed based on the path point position information, environmental information, and the robot's position information. Then, based on the local cost map, it is determined whether the next path point is located within the second narrow path. If the next path point is the endpoint and is located within the second narrow path, a preset target posture is obtained. Then, the robot's movement direction into the second narrow path is obtained from the global path information. Next, the second angle between the movement direction and the length direction of the robot body within the target posture is calculated. If the absolute value of the second angle is greater than the preset angle, it means that after the robot enters the second narrow path in its current posture, the stopping posture will differ significantly from the target posture. Therefore, an adjustment point is determined based on the endpoint and global path information to improve the rationality of the determined adjustment point. The adjustment point represents the position point used to adjust the robot's posture. When determining the adjustment point, path points already traveled by the robot can be found in the global path information, and path points whose distance values from both sides of the obstacles 501 of the second narrow path are greater than a preset threshold are selected. That is, the distance value between this path point and the first side obstacle of the second narrow path is greater than the preset threshold, and the distance value between this path point and the second side obstacle of the second narrow path is greater than the preset threshold. Finally, this path point is set as the adjustment point. The robot is controlled to reach the adjustment point. When the robot reaches the adjustment point, it is controlled to adjust to the target posture. Finally, the robot is controlled to move diagonally to the endpoint in the target posture, without needing to turn at the endpoint.
[0073] As can be seen, in this example, controlling the robot to enter the second narrow path at an angle with the target posture and stop it does not require the robot to turn on the narrow path, which makes the robot's movement continuous, thereby improving the movement efficiency.
[0074] In one possible example, please combine Figure 5 and Figure 6 , Figure 6A flowchart illustrating another robot movement path control method provided in this application embodiment is shown below. Figure 5 and Figure 6 As shown, the method also includes: S601 determines whether the next waypoint is the destination and whether the destination is located within the second narrow path based on the yaw angle, position information, global path information and environmental information.
[0075] After the robot begins its movement, it determines whether the next path point is the endpoint and whether the endpoint is located within the second narrow path based on the acquired yaw angle, position information, preset global path information, and environmental information. If the determination is yes, i.e., the next path point is the endpoint and the endpoint is located within the second narrow path, then step S602 can be executed. If the determination is no, i.e., the next path point is not the endpoint, or the endpoint is not located within the second narrow path, then step S608 can be executed.
[0076] S602, Obtain the robot's preset target posture and global path information, and the direction of the robot's movement when entering the second narrow path.
[0077] Specifically, when the next path point is determined as the endpoint and the endpoint is located within the second narrow path, the robot's preset target posture is obtained, as well as the robot's motion direction into the second narrow path within the global path information is obtained.
[0078] S603, determine whether the second angle between the direction of motion and the target posture is greater than the preset angle.
[0079] Specifically, calculate the second angle between the direction of motion and the target posture, and determine whether the second angle is greater than a preset angle. If yes, that is, it is determined that the robot's current posture entering the second narrow path is significantly different from the target posture, then proceed to step S604. If no, that is, it is determined that the difference between the robot's current posture and the target posture is small, then proceed to step S6011.
[0080] S604, determine the adjustment point based on the destination and the path information leading to the destination within the global path information.
[0081] Among them, adjustment points are determined based on the path information leading to the endpoint within the endpoint and global path information, thereby improving the rationality of the determined adjustment points.
[0082] S605 controls the robot to reach the adjustment point.
[0083] After determining the adjustment point, the robot is controlled to reach the adjustment point to adjust its posture.
[0084] S606 controls the robot to adjust to the target posture when it reaches the adjustment point.
[0085] When the robot reaches the adjustment point, it is controlled to adjust to the target posture.
[0086] S607 controls the robot to move diagonally to the target endpoint in the target posture.
[0087] Among them, the robot is controlled to move diagonally to the endpoint within the second narrow path in the target posture, without the need for the robot to turn in the narrow path, thus improving safety.
[0088] S608 controls the robot's movement to the endpoint using the Ackerman mode.
[0089] If the next path point is not the destination, or the destination is not located within the second narrow path, the robot is controlled to move to the destination using the Ackerman mode.
[0090] S609, switch to rotation mode.
[0091] When the robot reaches its destination, it switches to rotation mode.
[0092] The S6010 controls the robot to adjust to the target posture through its rotation mode.
[0093] Among them, the robot is controlled to adjust to the target posture through the rotation mode.
[0094] S6011 controls the robot's movement to the endpoint using Ackerman mode.
[0095] If the difference between the robot's current posture and the target posture is small, the robot is controlled to move to the endpoint through the Ackerman mode to improve the movement efficiency.
[0096] The above primarily describes the solutions of the embodiments of this application from the perspective of the method execution process. It is understood that, in order to achieve the above functions, the electronic device includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments provided herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0097] This application embodiment can divide the electronic device into functional units according to the above method example. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0098] When dividing functions into modules based on their respective functions, please refer to the following: Figure 7 , Figure 7 A functional unit block diagram of a robot movement path control device provided in this application embodiment is shown below. Figure 7 As shown, a robot movement path control device includes: The acquisition unit 701 is used to acquire the robot's current yaw angle, position information, preset global path information, and environmental information. The first determining unit 702 is configured to determine the diagonal movement direction based on the environment information and the position information if it is determined that the robot has moved forward into the first narrow path based on the yaw angle, the position information, the global path information and the environment information, and the next path point is located behind the robot. The first control unit 703 is used to control the robot to move backward along the oblique movement direction; The acquisition unit 704 is used to acquire a first distance value between the robot and the obstacle on the side of the first narrow path closest to the robot during the robot's backward movement along the oblique direction of movement; The second determining unit 705 is used to determine the path direction of the subsequent path based on the global path information if the first distance value is greater than a preset threshold. The second control unit 706 is used to control the robot to rotate to the path direction.
[0099] In one possible example, the first determining unit 702 is further configured to: determine whether the robot has moved forward into the first narrow path based on the yaw angle, the environmental information, and the position information; and if the robot has moved forward into the first narrow path, determine the next path point based on the position information and the global path information; and determine a first angle between the robot and the next path point based on the position information and the position information of the next path point; and if the absolute value of the difference between the first angle and the yaw angle is greater than a preset threshold, determine that the next path point is located behind the robot; and when it is determined that the robot has moved forward into the first narrow path and the next path point is located behind the robot, determine the oblique movement direction based on the environmental information and the position information.
[0100] In one possible example, the first determining unit 702 is further configured to: construct a local cost map based on the environmental information and the location information; and perform polygon fitting on all contour points of the obstacles on both sides of the first narrow path in the local cost map to obtain fitted polygons of the obstacles on both sides of the first narrow path; and if the distance between the obstacles on both sides of the robot is determined to be less than or equal to a preset value based on the fitted polygons, and the robot's forward direction is determined to be the direction of entering the first narrow path based on the yaw angle, then it is determined that the robot has moved forward and entered the first narrow path.
[0101] In one possible example, the first determining unit 702 is further configured to: if the first extension length of the first obstacle behind the robot and the second extension length of the second obstacle behind the robot are determined based on the environmental information and the position information; and if the first extension length is less than the second extension length, then obtain the endpoint position information of the first endpoint of the first obstacle, the first endpoint being located behind the robot; and determine the oblique movement direction based on the endpoint position information and the position information.
[0102] In one possible example, the device further includes a third determining unit, configured to: determine a second distance value between the robot and the exit of the first narrow path based on the environmental information and the position information; if the second distance value is greater than or equal to a preset distance value, control the robot to reverse by a third distance value, wherein the third distance value is less than the second distance value; and after the robot reverses by the third distance value, perform the step of determining the diagonal movement direction based on the environmental information and the position information.
[0103] In one possible example, the device further includes a processing unit for: acquiring the robot's real-time pose; and performing path planning based on the global path information, the real-time pose, and the Ackerman motion model.
[0104] In one possible example, the device further includes a fourth determining unit, configured to: if the next path point is determined to be the endpoint based on the yaw angle, the position information, the global path information, and the environmental information, and the endpoint is located within a second narrow path, then obtain the robot's preset target posture and the robot's movement direction into the second narrow path within the global path information; and if the absolute value of the second angle between the movement direction and the target posture is greater than a preset angle, then determine an adjustment point based on the endpoint and the global path information, wherein the distance between the adjustment point and an obstacle in the second narrow path is greater than a preset threshold; control the robot to reach the adjustment point; and when the robot reaches the adjustment point, control the robot to adjust to the target posture; and control the robot to move diagonally to the endpoint with the target posture.
[0105] When using integrated units, such as Figure 8 As shown, Figure 8 This is a functional unit block diagram of another robot movement path control device provided in an embodiment of this application. Figure 8 The robot movement path control device 80 includes a processing module 82 and a communication module 81. The processing module 82 controls and manages the actions of the robot movement path control device, for example, the steps of the acquisition unit 701, the first determination unit 702, the first control unit 703, the acquisition unit 704, the second determination unit 705, and the second control unit 706, and / or other processes for executing the techniques described herein. The communication module 81 supports interaction between the device and other devices. Figure 8 As shown, the robot movement path control device 80 may also include a storage module 83, which is used to store the program code and data of the robot movement path control device 80.
[0106] All relevant content for each scenario involved in the above method embodiments can be referenced from the functional descriptions of the corresponding functional modules, and will not be repeated here. All of the above devices can execute the above path adjustment method.
[0107] This application provides a terminal device, which includes at least one processor, a communication interface, and a memory. The communication interface is used to send and / or receive data, the memory is used to store computer programs, and the at least one processor is used to call the computer programs stored in the memory to implement the method described above.
[0108] This application provides an electronic device including a processor and a memory. The memory stores computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device performs the steps of the method described above.
[0109] This application provides a computer-readable storage medium storing a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform some or all of the steps described in the method described above.
[0110] This application provides a computer program operable to cause a computer to perform some or all of the steps described in the method above. The computer program may be a software installation package.
[0111] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0112] This application also provides a computer storage medium storing a computer program for electronic data interchange, which causes a computer to perform some or all of the steps of any of the methods described in the above method embodiments, wherein the computer includes an electronic device.
[0113] This application also provides a computer program product, which includes a computer program operable to cause a computer to perform some or all of the steps of any of the methods described in the above method embodiments.
[0114] The computer program product may be a software installation package, and the aforementioned computer includes electronic devices.
[0115] It should be understood that, in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0116] In the several embodiments provided in this application, it should be understood that the disclosed methods, apparatuses, and systems can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of units is merely a logical functional division, and other division methods may exist in actual implementation; for example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0117] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0118] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can be physically comprised separately, or two or more units can be integrated into one unit. The integrated unit described above can be implemented in hardware or in the form of hardware plus software functional units.
[0119] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute some steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0120] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can easily conceive of variations or substitutions without departing from the spirit and scope of the present invention, and various modifications and alterations can be made, including combinations of the different functions and implementation steps described above, as well as software and hardware implementation methods, all of which are within the protection scope of the present invention.
Claims
1. A robot movement path control method, characterized in that, include: Obtain the robot's current yaw angle, position information, preset global path information, and environmental information; If it is determined, based on the yaw angle, the position information, the global path information, and the environmental information, that the robot has advanced into the first narrow path and the next path point is located behind the robot, then the diagonal movement direction is determined based on the environmental information and the position information. Control the robot to move backward along the oblique movement direction; During the backward movement of the robot along the oblique direction, a first distance value is collected between the robot and the obstacle on the side of the first narrow path closest to the robot; If the first distance value is greater than a preset threshold, the path direction of the subsequent path is determined based on the global path information; Control the robot to rotate to the path direction.
2. The method according to claim 1, characterized in that, If, based on the yaw angle, the position information, the global path information, and the environmental information, it is determined that the robot has advanced into the first narrow path, and the next path point is located behind the robot, then determining the diagonal movement direction based on the environmental information and the position information includes: Based on the yaw angle, the environmental information, and the position information, it is determined whether the robot has moved forward into the first narrow path; If the robot has already entered the first narrow path, then the next path point is determined based on the position information and the global path information; The first angle between the robot and the next path point is determined based on the location information and the location information of the next path point; If the absolute value of the difference between the first included angle and the yaw angle is greater than a preset threshold, then the next path point is determined to be located behind the robot. When it is determined that the robot has moved forward into the first narrow path and the next path point is located behind the robot, the diagonal movement direction is determined based on the environmental information and the position information.
3. The method according to claim 2, characterized in that, The step of determining whether the robot has moved forward into the first narrow path based on the yaw angle, the environmental information, and the position information includes: A local cost map is constructed based on the environmental information and the location information; Perform polygon fitting on all contour points of the obstacles on both sides of the first narrow path in the local cost map to obtain the fitted polygons of the obstacles on both sides of the first narrow path. If the distance between the obstacles on both sides of the robot is less than or equal to a preset value as determined by the fitted polygon, and the robot is facing the direction of entering the first narrow path as determined by the yaw angle, then it is determined that the robot has moved forward and entered the first narrow path.
4. The method according to claim 3, characterized in that, The first narrow path includes a first obstacle and a second obstacle on both sides. Determining the oblique movement direction based on the environmental information and the position information includes: If, based on the environmental information and the location information, the first extension length of the first obstacle located behind the robot and the second extension length of the second obstacle located behind the robot are determined; If the first extension length is less than the second extension length, then the endpoint position information of the first endpoint of the first obstacle is obtained, and the first endpoint is located behind the robot; The oblique movement direction is determined based on the endpoint position information and the position information.
5. The method according to claim 3 or 4, characterized in that, Before determining the oblique movement direction based on the environmental information and the location information, the process includes: Based on the environmental information and the location information, a second distance value between the robot and the exit of the first narrow path is determined; If the second distance value is greater than or equal to a preset distance value, then the robot is controlled to move backward by a third distance value, wherein the third distance value is less than the second distance value; After the robot reverses by the third distance value, the step of determining the oblique movement direction based on the environmental information and the position information is performed.
6. The method according to any one of claims 1-4, characterized in that, After controlling the robot to rotate to the path direction, the method further includes: Obtain the real-time pose of the robot; Path planning is performed based on the global path information, the real-time pose, and the Ackerman motion model.
7. The method according to any one of claims 1-4, characterized in that, After obtaining the robot's current yaw angle, position information, preset global path information, and environmental information, the process also includes: If the next path point is determined to be the endpoint based on the yaw angle, the position information, the global path information, and the environment information, and the endpoint is located within the second narrow path, then the robot's preset target posture and the robot's movement direction into the second narrow path within the global path information are obtained. If the absolute value of the second angle between the direction of movement and the target posture is greater than the preset angle, then an adjustment point is determined based on the endpoint and the global path information, and the distance between the adjustment point and the obstacle in the second narrow path is greater than the preset threshold. Control the robot to reach the adjustment point; When the robot reaches the adjustment point, control the robot to adjust to the target posture; Control the robot to move diagonally to the endpoint in the target posture.
8. A robot movement path control device, characterized in that, include: The acquisition unit is used to acquire the robot's current yaw angle, position information, preset global path information, and environmental information. The first determining unit is configured to determine the diagonal movement direction based on the environment information and the position information if it is determined that the robot has moved forward into the first narrow path based on the yaw angle, the position information, the global path information and the environment information, and the next path point is located behind the robot. The first control unit is used to control the robot to move backward along the oblique movement direction; The acquisition unit is used to acquire a first distance value between the robot and the obstacle on the side of the first narrow path closest to the robot during the robot's backward movement along the oblique direction of movement; The second determining unit is used to determine the path direction of the subsequent path based on the global path information if the first distance value is greater than a preset threshold. The second control unit is used to control the robot to rotate to the path direction.
9. An electronic device, characterized in that, include: A processor and a memory, the memory being used to store computer program code, the computer program code including computer instructions, wherein, when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1 to 7.