Path tracking method, path tracking device, self-moving device, and storage medium

By acquiring pose and velocity information in each control cycle of the self-moving device, performing local path sampling and trajectory generation, and determining the optimal trajectory to control the device's movement, the problem of the self-moving device deviating from the planned path is solved, and high-precision path tracking is achieved.

CN116501039BActive Publication Date: 2026-03-17ECOFLOW INC
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-24
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing self-moving devices are prone to deviating from the planned path during motion control, resulting in low tracking accuracy.

Method used

By acquiring the pose and velocity information of the self-moving device in each control cycle, sampling based on the local path, generating multiple first trajectories, and determining the second trajectory based on the trajectory score, the device movement is controlled to improve tracking accuracy.

Benefits of technology

It reduces the possibility of the self-moving device deviating from the planned path and improves the path tracking accuracy. The measured average tracking deviation is about 0.03m, and the maximum deviation does not exceed 0.05m.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116501039B_ABST
    Figure CN116501039B_ABST
Patent Text Reader

Abstract

The application discloses a path tracking method, a path tracking device, a self-moving device and a computer storage medium. The path tracking method comprises the following steps: in each control period, acquiring pose information, current speed information and a local path when the self-moving device moves along a pre-planned path; determining sampling speed information according to the current speed information and preset sampling parameters; sampling based on the local path to obtain a sampling space, wherein each position point in the sampling space carries a corresponding score; the score represents the deviation degree of the position point from the local path; generating a plurality of first trajectories based on the pose information and the sampling speed information; mapping the first trajectories into the sampling space to obtain the scores corresponding to the first trajectories; determining a second trajectory from the plurality of first trajectories according to the scores corresponding to the first trajectories; and controlling the self-moving device to move according to the sampling speed information corresponding to the second trajectory. The path tracking method can improve the path tracking accuracy of the self-moving device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of motion control technology, and in particular relates to a path tracking method, a path tracking device, a self-moving device, and a computer-readable storage medium. Background Technology

[0002] The process of controlling a self-moving device to reach a target location can be divided into two stages: path planning and motion control. The path planning stage involves planning a collision-free path to the target point from the self-moving device's current location. The motion control stage generates motion commands based on this planned path to control the self-moving device to move along the planned path, thus enabling it to reach the target point.

[0003] However, most current motion control algorithms are prone to the problem of the self-moving device deviating from the planned path, resulting in low tracking accuracy of the self-moving device on the planned path during movement. Summary of the Invention

[0004] This application provides a path tracking method, a path tracking device, a self-moving device, and a computer-readable storage medium, which reduces the possibility of the self-moving device deviating from the planned path and improves the tracking accuracy of the planned path.

[0005] Firstly, this application provides a path tracing method, including:

[0006] In each control cycle, the pose information, current velocity information, and local path of the self-moving device as it moves along the pre-planned path are acquired;

[0007] Based on the current speed information and the preset sampling parameters, determine the sampling speed information;

[0008] Sampling is performed based on the local path to obtain the sampling space, where each location point carries a corresponding score; the score represents the degree of deviation of the location point from the local path.

[0009] Multiple first trajectories are generated based on pose information and sampling velocity information;

[0010] The first trajectory is mapped to the sampling space to obtain the score corresponding to the first trajectory;

[0011] Based on the score corresponding to the first trajectory, determine the second trajectory from multiple first trajectories;

[0012] The movement of the self-moving device is controlled based on the sampling speed information corresponding to the second trajectory.

[0013] Secondly, this application provides a path tracking device, comprising:

[0014] The acquisition module is used to acquire the pose information, current speed information and local path of the self-moving device as it moves along the pre-planned path in each control cycle;

[0015] The first determining module is used to determine the sampling speed information based on the current speed information and the preset sampling parameters;

[0016] The sampling module is used to sample based on the local path to obtain a sampling space, where each location point in the sampling space carries a corresponding score; the score represents the degree of deviation of the location point from the local path.

[0017] The generation module is used to generate multiple first trajectories based on pose information and sampling velocity information;

[0018] The mapping module is used to map the first trajectory to the sampling space to obtain the score corresponding to the first trajectory;

[0019] The second determining module is used to determine the second trajectory from multiple first trajectories based on the score corresponding to the first trajectory;

[0020] The control module is used to control the movement of the self-moving device based on the sampling speed information corresponding to the second trajectory.

[0021] Thirdly, this application provides a self-moving device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the method described in the first aspect.

[0022] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described in the first aspect above.

[0023] Fifthly, this application provides a computer program product comprising a computer program that, when executed by one or more processors, implements the steps of the method described in the first aspect.

[0024] The beneficial effects of this application compared to related technologies are as follows: Within each control cycle controlling the self-moving device to move along a pre-planned path, the pose information, current velocity information, and local path of the self-moving device can be acquired. Specifically, based on the current velocity information and pre-set sampling parameters, the corresponding sampling velocity information can be determined; sampling the local path yields the corresponding sampling space, where each position point carries a corresponding score, which characterizes the degree of deviation of the corresponding position point from the local path; through the combination of pose information and sampling velocity information, multiple first trajectories can be generated. As mentioned above, the score is used to characterize the degree of deviation of the position point from the local path; correspondingly, the score corresponding to each first trajectory reflects the degree of deviation of that first trajectory from the local path. Therefore, based on the score corresponding to the first trajectory, the first trajectory with the smallest deviation from the local path can be determined from multiple first trajectories, i.e., the second trajectory can be determined; it can be understood that this second trajectory is the tracking path with the highest tracking accuracy when the self-moving device tracks the local path. Controlling the movement of the self-moving device based on the sampling velocity information corresponding to the second trajectory with the highest tracking accuracy can reduce the possibility of the self-moving device deviating from the pre-planned path, thereby improving the path tracking accuracy.

[0025] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or related technologies 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.

[0027] Figure 1 This is a flowchart illustrating the path tracing method provided in an embodiment of this application;

[0028] Figure 2 This is a partial path diagram provided in an embodiment of this application;

[0029] Figure 3 This is a flowchart of the sampling rate information determination steps provided in the embodiments of this application;

[0030] Figure 4 This is a flowchart of the sampling space construction method provided in the embodiments of this application;

[0031] Figure 5 This is a flowchart of the first trajectory generation method provided in the embodiments of this application;

[0032] Figure 6 This is a schematic diagram of the trajectories of multiple first trajectories provided in the embodiments of this application;

[0033] Figure 7 This is a flowchart of the method for marking impassable trajectories provided in the embodiments of this application;

[0034] Figure 8 This is a flowchart of the second trajectory determination method provided in the embodiments of this application;

[0035] Figure 9 This is a schematic diagram of a local path with inflection points provided in an embodiment of this application;

[0036] Figure 10 This is a schematic diagram of the operating interface of the lawnmower robot tracking a pre-planned path, provided in an embodiment of this application.

[0037] Figure 11 This is a schematic diagram of the path tracking device provided in the embodiments of this application;

[0038] Figure 12 This is a schematic diagram of the structure of the self-moving device provided in the embodiments of this application. Detailed Implementation

[0039] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0040] In related technologies, when self-moving devices track planned paths based on control algorithms, the low accuracy of these algorithms often causes the devices to deviate from the planned path. In other words, current self-moving devices suffer from low tracking accuracy during the process of tracking planned paths.

[0041] To address the aforementioned issues, this application proposes a path tracking method that can improve the tracking accuracy of self-moving devices for planned paths.

[0042] It is understood that the path tracking method provided in this application can be applied not only to self-moving devices, but also to other electronic devices capable of controlling self-moving devices, such as mobile phones, tablets, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other electronic devices. This application does not impose any limitations on the specific type of electronic device. Specifically, a communication connection channel can be established between the electronic device and the self-moving device, through which the electronic device can control the self-moving device.

[0043] The aforementioned self-moving device can be a device that includes self-movement assistance functionality. This self-movement assistance functionality can be implemented through an in-vehicle terminal, and the corresponding self-moving device can be a vehicle equipped with that in-vehicle terminal. The self-moving device can also be a semi-self-moving device or a fully autonomous device. Examples include lawnmowers, sweepers, or other robots with navigation capabilities.

[0044] For ease of explanation, the following will use a self-moving device as the execution subject of the various embodiments, and illustrate the path tracking method proposed in this application through specific embodiments.

[0045] Figure 1 A schematic flowchart of the path tracing method provided in this application is shown. The path tracing method includes:

[0046] Step 110: In each control cycle, acquire the pose information, current speed information, and local path of the self-moving device as it moves along the pre-planned path.

[0047] A pre-planned path refers to a path that has been planned in advance. Pre-planned paths can be planned automatically by the mobile device based on a pre-built work area, or by other electronic devices. Since path tracking is a continuous process, to achieve higher accuracy in tracking the pre-planned path, the entire tracking process can be divided into multiple control cycles based on the user's data acquisition range, and the tracking path within each control cycle can be refined to improve the tracking accuracy of the planned path.

[0048] Within each control cycle, the self-moving device can acquire its pose information using an inertial measurement unit or positioning module, and its current velocity information using a velocity sensor. The local path represents the pre-planned path to be tracked within the data acquisition range of the self-moving device, i.e., the path the self-moving device will track within the current control cycle.

[0049] For example only, see Figure 2 A schematic diagram of a local path is shown. Figure 2 In the diagram, point A is the starting point of the pre-planned path, and point B is the ending point of the pre-planned path. That is, the pre-planned path is the path between point A and point B. The triangle represents the self-moving device, and the location of the self-moving device is point a. The box represents the data collection range of the self-moving device. Correspondingly, the path between point a and point b is a local path in the pre-planned path, that is, point b is the ending point of the local path.

[0050] Step 120: Determine the sampling speed information based on the current speed information and the preset sampling parameters.

[0051] Based on the current speed information, the sampling range of the speed information can be determined. Within the sampling range, the sampling range can be discretized with preset sampling parameters to obtain the corresponding sampling speed information.

[0052] Step 130: Sampling is performed based on local paths to obtain the sampling space.

[0053] The map containing the local path is cropped based on preset range parameters to obtain a local map. For example, if the preset range parameter is 2m*2m, the local map containing the local path will be 2m*2m in size. The local map can be a raster map. The sampling space represents the distance between each location point in the local map and the path points on the local path, i.e., the degree of deviation. This degree of deviation can be represented by setting weights or scores. Each location point in the sampling space carries a corresponding score; the score represents the degree of deviation between the location point and the local path. The sampling space can be a two-dimensional space, representing each location point and its corresponding score, or it can be a three-dimensional space, depending on the actual extended functions.

[0054] Step 140: Generate multiple first trajectories based on pose information and sampling velocity information.

[0055] Pose information represents the location and / or attitude information of the self-moving device. The attitude information can be understood as the direction of movement of the self-moving device.

[0056] The sampling velocity information represents the possible movement speed of the mobile device during its movement. In some embodiments, the sampling velocity information may include sampling linear velocity and sampling angular velocity.

[0057] Therefore, the self-moving device can predict multiple first trajectories with different directions based on the self-moving device's pose information and different sampling speed information.

[0058] Step 150: Map the first trajectory to the sampling space to obtain the score corresponding to the first trajectory.

[0059] As described above, each location point in the sampling space carries a corresponding score. Therefore, the self-moving device can map the first trajectory into the sampling space to determine the corresponding score. This score reflects the degree of deviation between the first trajectory and the local path, facilitating the further determination of the tracking path with the smallest deviation.

[0060] Step 160: Determine the second trajectory from multiple first trajectories based on the score corresponding to the first trajectory.

[0061] The score corresponding to each first trajectory indicates the degree of deviation between the first trajectory and the planned path. A higher score indicates a greater degree of deviation, and correspondingly, a lower tracking accuracy of the first path. Based on this, the first trajectory corresponding to the minimum score can be determined as the second trajectory. Conversely, a higher score indicates a lower degree of deviation, and correspondingly, a higher tracking accuracy of the first path. Based on this, the first trajectory corresponding to the maximum score can be determined as the second trajectory.

[0062] Step 170: Control the movement of the self-moving device according to the sampling speed information corresponding to the second trajectory.

[0063] The second trajectory can be considered as the trajectory closest to the local path determined from multiple first trajectories. Therefore, the self-moving device can control its movement based on the velocity sampling information corresponding to the second trajectory, enabling it to track the local path with high accuracy.

[0064] In this embodiment, the self-moving device can be divided into multiple control cycles to pre-track the planned path. Within each control cycle, the self-moving device can determine sampling speed information based on the current speed information and preset sampling parameters, and generate multiple first trajectories based on this sampling speed information and pose information, thus obtaining multiple selectable tracking paths. To determine the second trajectory from the multiple first trajectories and obtain the optimal tracking path, the self-moving device can sample the pre-planned path to be tracked within the current control cycle, i.e., sample the local path, obtaining a sampling space that can be used to evaluate the deviation between the first trajectory and the local path. The self-moving device can then map the first trajectory into this sampling space to determine the score corresponding to the first trajectory. Since this score reflects the deviation between the first trajectory and the local path, the self-moving device can determine the second trajectory from the multiple first trajectories based on this score, obtaining the tracking path with the highest tracking accuracy. Finally, the self-moving device controls its own movement according to the sampling speed information corresponding to the second trajectory, enabling it to track the local path with high accuracy.

[0065] In some embodiments, the current velocity information includes the current linear velocity and the current angular velocity, the sampled velocity information includes the sampled linear velocity and the sampled angular velocity, and the sampling parameters include the linear velocity sampling interval and the angular velocity sampling interval. Based on this, the sampled velocity information can be obtained through... Figure 3 The steps shown are defined, and these steps specifically include:

[0066] Step 310: Obtain the current linear velocity and current angular velocity.

[0067] The current linear velocity and current angular velocity of the self-moving device can be acquired through corresponding types of sensors. For example, the current linear velocity and current angular velocity of the self-moving device can be acquired through motion sensors such as accelerometers, inertial sensors, and gyroscopes.

[0068] Step 320: Obtain the linear velocity sampling interval and the angular velocity sampling interval.

[0069] The linear velocity sampling interval and angular velocity sampling interval can be determined by dividing the sampling range by the number of samples. The sampling range can be determined based on a preset acceleration; that is, the maximum and minimum velocity information can be determined by the acceleration and the current velocity information. Based on the maximum and minimum velocity information and the number of samples, the linear velocity sampling interval and angular velocity sampling interval can be determined. Of course, the linear velocity sampling interval and angular velocity sampling interval can also be set according to the actual scenario.

[0070] Step 330: Based on the current linear velocity and the linear velocity sampling interval, obtain multiple sampled linear velocities.

[0071] After obtaining the current linear velocity, the self-moving device can determine the linear velocity sampling range by combining the current position information and the set acceleration. For example, the linear velocity sampling range can be [V-at, V+at], where v is the current linear velocity, a is the preset linear acceleration, and t is the control period.

[0072] The linear velocity sampling range is discretized based on the linear velocity sampling interval to obtain at least two sampled linear velocities.

[0073] As an example only, assume the linear velocity sampling range is V0~V1, and the linear velocity sampling interval is... So through Discretizing V0 to V1 yields the corresponding sampling linear velocities: V0, V0+ V0+ , ..., V1, where V0=V-at, V1=V+at, V represents the current linear velocity, a represents the preset linear acceleration, and t is the control period.

[0074] As can be seen from the above examples, the number of sampled linear velocities is directly proportional to the linear velocity sampling range and inversely proportional to the linear velocity sampling interval. In other words, when the linear velocity sampling interval remains constant, a larger linear velocity sampling range results in more sampled linear velocities; conversely, when the linear velocity sampling range remains constant, a larger linear velocity sampling interval results in fewer sampled linear velocities. Therefore, the self-moving device can rationally set the velocity sampling interval based on the relationship between the number of sampled linear velocities and the linear velocity sampling range and interval, respectively, to improve the accuracy of path sampling.

[0075] Step 340: Based on the current angular velocity and the angular velocity sampling interval, obtain multiple sampled angular velocities.

[0076] Similar to step 330, after obtaining the current angular velocity, the self-moving device can determine the angular velocity sampling range by combining the current angular velocity with the set acceleration, and can discretize the angular velocity sampling range based on the angular velocity sampling interval to obtain at least two sampled angular velocities. For the specific process of determining the sampled angular velocity, please refer to the above process of determining the sampled linear velocity, which will not be repeated here.

[0077] As an example only, assume the angular velocity sampling range is W0~W1, and the linear velocity sampling interval is... So through Discretizing W0 to W1 yields the corresponding sampled angular velocities: W, W0+ W0+ , , …,W1。 Where W0=W-bt,W1=W+bt,W represents the current angular velocity, b is the preset angular acceleration, and t is the control period.

[0078] In this embodiment, the self-moving device discretizes the linear velocity sampling range by adjusting the linear velocity sampling interval to obtain at least two sampled linear velocities; similarly, the self-moving device discretizes the angular velocity sampling range by adjusting the angular velocity sampling interval to obtain at least two sampled angular velocities. In other words, by finely sampling the linear and angular velocities, the self-moving device can generate trajectory predictions corresponding to the subsequent linear and angular velocities.

[0079] In some embodiments, Figure 4 A flowchart illustrating the sampling space construction method is shown. Specifically, the sampling space construction method includes:

[0080] Step 410: Determine the sampling starting point in the local path based on the pose information.

[0081] The sampling space is used to evaluate the deviation of the first trajectory from the local path. Therefore, the sampling space should be constructed based on the local path. The sampling starting point can be determined from the local path based on the pose information of the self-moving device. For example, the path point in the local path closest to the pose information can be determined as the sampling starting point. Alternatively, the starting point of the local path can be used as the sampling starting point.

[0082] Step 420: Based on the sampling starting point, assign a corresponding number value to each path point in the local path to obtain the first node.

[0083] After determining the sampling starting point, each path point in the local path can be numbered based on this sampling starting point, that is, each path point is assigned a corresponding number value to obtain the first node.

[0084] As an example only, one way to number path points is to take the opposite direction of the local path as the main direction, start from the end point of the local path, and assign corresponding number values ​​to each path point on the local path in an incremental manner to obtain the first node with number values.

[0085] Step 430: Perform a diffusion operation on each first node based on the preset adjacency matrix to obtain the second node.

[0086] To ensure the sampling space can accurately evaluate the deviation of each first trajectory from the local path, the self-moving device can refine the space where the local path is located, i.e., fill the space with more points. Specifically, the self-moving device can use the first node as a base and expand outwards to the surrounding areas according to a preset adjacency matrix to obtain second nodes. The adjacency matrix can be set to a four-adjacency matrix, an eight-adjacency matrix, or other adjacency matrices; this setting can be determined according to actual needs and is not limited in this application.

[0087] Step 440: Based on the number value of the first node and the preset score increment, obtain the number value of the second node.

[0088] After obtaining the second node, in order to use the second node to characterize its deviation from the local path, the self-moving device can assign a corresponding number value to the second node; specifically, the number value can be determined based on the number value of the first node and a preset score increment.

[0089] The score increment can be a fixed value or a value determined by a preset function. When using a preset function to determine the score increment, no restrictions are placed on the type of function. As an example, the function determining the score increment can be a linear function: y = ax + b, where a and b are constants, x is the number of the first node, and y is the score increment. The function determining the score increment can also be a non-linear function: y = ax + b. 2 , where a is a constant, x is the number of the first node, and y is the score increment.

[0090] Step 450: Determine whether the number of times the diffusion operation is performed is greater than or equal to a preset threshold number.

[0091] The diffusion operation corresponds to steps 430 to 440 above. The preset threshold number of times is related to the resolution of the sampling space and can be used to limit the maximum range of diffusion for the two types of nodes. As an example, assuming the maximum distance of the self-moving device from the local path is set to 1m and the sampling space resolution is 0.01m, then the threshold number of times can be set to 100 times. That is, after steps 430 to 440 are executed 100 times, a sampling space with a resolution of 0.01m can be obtained.

[0092] In other words, after determining the resolution of the sampling space to be constructed, the self-moving device can determine the threshold number of operations corresponding to that resolution. Accordingly, after each diffusion operation, the self-moving device can compare the current number of diffusion operations with the corresponding threshold number to determine whether the sampling space formed by the two types of nodes obtained so far meets the corresponding resolution requirements.

[0093] Step 460: If it is determined that the number of times the diffusion operation is performed is less than the preset threshold, the second node is taken as the new first node, and the process returns to step 430 and subsequent steps.

[0094] When the number of diffusion operations is less than the threshold, it is considered that the resolution of the sampling space formed by the first and second nodes has not yet met the requirements, and further diffusion operations are needed. Based on this, the second node can be used as the new first node, and the process returns to the steps corresponding to the aforementioned diffusion operations, i.e., it returns to step 430 and its subsequent steps.

[0095] Step 470: If it is determined that the number of times the diffusion operation is performed is greater than or equal to a preset threshold, the sampling space is determined based on the currently obtained first node and second node.

[0096] When the number of diffusion operations is greater than or equal to the threshold, it is considered that the resolution of the sampling space formed by the first and second nodes has met the requirements, and the diffusion operation can be stopped.

[0097] In this embodiment, the self-moving device, centered on a local path, repeatedly performs a diffusion operation on the first node within a preset deviation distance until the number of diffusion operations is greater than or equal to a threshold, thereby obtaining a sampling space constructed by the first node and the second node. The resolution of this sampling space meets the corresponding requirements.

[0098] In some embodiments, for the obtained sampling space, each node can be defined as a location point in the sampling space, and the corresponding number value of each node can be defined as a score characterizing the deviation of the sampled path point from the local path. Assuming that the numbering rule in step 420 is used to assign a corresponding number value to each node, then the larger the number value, the farther the node is from the local path, i.e., the greater the deviation of the node from the local path; the smaller the number value, the closer the node is to the local path, i.e., the smaller the deviation of the node from the local path. Subsequently, each first trajectory can be scored based on the score of each location point to accurately determine the deviation of the first trajectory from the local path.

[0099] In some embodiments, the node number can also be understood as the degree of deviation of each point in the sampling space from the end point of the local path. The higher the number value, the further the point is from the end point of the local path.

[0100] In some embodiments, Figure 5 A flowchart of a first trajectory generation method is shown. Specifically, the first trajectory generation method includes:

[0101] Step 510: Combine the sampling linear velocity and sampling angular velocity one-to-one to obtain multiple velocity combinations.

[0102] For each sampled linear velocity, the self-moving device can combine it with each sampled angular velocity to obtain the corresponding velocity combination. Through this combination method, multiple velocity combinations can be obtained by combining the sampled linear velocity with the sampled angular velocity one by one.

[0103] As an example only, assuming there are 4 sampled linear velocities and 3 sampled angular velocities, then 12 velocity combinations can be obtained.

[0104] Step 520: Based on the pose information and each velocity combination, generate the first trajectory corresponding to each velocity combination.

[0105] Based on the obtained pose information, the self-moving device can generate different movement trajectories by using different speed combinations. Therefore, for each speed combination, the corresponding movement trajectory, i.e., the first trajectory, can be generated based on the pose information.

[0106] In this embodiment, the self-moving device combines the sampled linear velocity and sampled angular velocity to obtain multiple velocity combinations. For each velocity combination, the self-moving device can combine it with pose information to generate a first trajectory, i.e., generate an optional tracking path. That is, the self-moving device can generate multiple first trajectories based on multiple linear velocity combinations, resulting in multiple optional tracking paths. As an example only, the generated multiple first trajectories are as follows... Figure 6 As shown. Figure 6 Each first trajectory in the model is equivalent to an optional tracking path.

[0107] In some embodiments, the generation of the first trajectory is related to the chassis structure of the self-moving device. Different chassis structures correspond to different motion models; and different motion models determine the shape of the first trajectory that can be generated by a combination of velocity and pose information.

[0108] For each speed combination, the self-moving device can calculate the position information of N trajectory points within the control cycle based on the corresponding motion model and pose information. Among the N trajectory points, the time interval between two adjacent trajectory points can be fixed. The first trajectory corresponding to the speed combination is obtained by fitting these N trajectory points.

[0109] As an example only, a motion model for a self-moving device can be as follows:

[0110]

[0111]

[0112]

[0113] Where v represents the sampling linear velocity, w represents the sampling angular velocity, and t is the previous moment. X represents the time interval between two adjacent moments, X and Y represent the position information of the self-moving device at the current moment, and Th represents the direction of movement of the self-moving device at the current moment. and This refers to the location information of the mobile device at the previous moment. This represents the direction of motion of the self-moving device at the previous moment.

[0114] In some embodiments, in order to accurately evaluate the degree of deviation of the first trajectory from the local path based on the aforementioned sampling space, each trajectory point corresponding to the first trajectory can be mapped to the sampling space first, and the position point corresponding to each trajectory point can be determined. For ease of description, the position point corresponding to each trajectory point can be denoted as the target position point. Then, the score corresponding to each target position point is determined. The score of each target position point is the score corresponding to the corresponding trajectory point. Finally, the scores corresponding to each target position point are summed to obtain the score corresponding to the first trajectory.

[0115] As an example, for a first trajectory consisting of n trajectory points, we can first map these n trajectory points to the sampling space, determine the target position point corresponding to each trajectory point, and obtain n target position points; then determine the score carried by each target position point, and obtain n scores; finally, we can sum the n scores to obtain the total score, which is the score corresponding to the first trajectory.

[0116] In some embodiments, for each trajectory point, after it is mapped to the sampling space, the nearest location point can be determined as the target trajectory point based on the distance between the trajectory point and each of its neighboring location points; alternatively, the sampling space can be rasterized first, and then the score corresponding to each raster can be determined based on the location point; when determining the score corresponding to the trajectory point, the target raster corresponding to the trajectory point can be determined, and the score corresponding to the target raster can be determined as the score corresponding to the trajectory point.

[0117] In some embodiments, to improve the reliability of the path tracing method and avoid identifying an impassable first trajectory as a second trajectory, see [reference needed]. Figure 7 The following steps can be used to mark impassable tracks from multiple first tracks:

[0118] Step 710: Determine whether the trajectory points on the first trajectory are outside the sampling space range.

[0119] The sampling space is constructed based on local paths, and its range covers a certain area on both sides of the local paths. Therefore, it is possible to determine whether the first trajectory is passable by judging whether the trajectory points on the first trajectory are outside the sampling space.

[0120] Step 720: If the trajectory points on the first trajectory are determined to be outside the sampling space, then the first trajectory is marked as an impassable trajectory.

[0121] If any point on the first trajectory falls outside the sampling space, it indicates that the first trajectory will cause the self-moving device to deviate significantly from the local path, which is detrimental to the self-moving device's high-precision tracking of the local path. Based on this, the self-moving device can mark the first trajectory as an impassable trajectory, so as to facilitate the subsequent determination of a traversable second trajectory from the first trajectory, thereby improving the reliability of path tracking.

[0122] It is understandable that if all the trajectory points on the first trajectory are within the sampling space, it means that there is no impassable first trajectory. In this case, there is no need to make any markings, and the self-moving device can directly execute the aforementioned step 160 to determine the second trajectory from multiple first trajectories.

[0123] In some embodiments, the trajectory points on the first trajectory may also fall on obstacles, making the first trajectory impassable. Therefore, the self-moving device can also determine whether the first trajectory is impassable by determining whether the trajectory points on the first trajectory fall on obstacles; specifically, if the trajectory points on the first trajectory fall on obstacles, the first trajectory can be marked as an impassable trajectory.

[0124] In some embodiments, after marking the impassable first trajectory, refer to Figure 8 A reliable second trajectory can be determined through the following steps:

[0125] Step 810: Delete the impassable trajectories from the first trajectory to obtain multiple third trajectories.

[0126] For the first track marked as impassable, the self-moving device can delete it, leaving multiple remaining first tracks as trajectories. For ease of description, the remaining first tracks can be referred to as the third tracks.

[0127] Step 820: Determine the third trajectory with the smallest score as the second trajectory.

[0128] After obtaining the third trajectory, the second trajectory with the lowest deviation from the local path can be determined from multiple third trajectories based on the score. This second trajectory is also the tracking path with the highest tracking accuracy. According to the node numbering rule in step 420, the smaller the score, the closer the location point is to the local path. Therefore, it can be considered that the third trajectory with the smallest score has the lowest deviation from the local path; that is, the third trajectory with the smallest score is the tracking path with the highest tracking accuracy, and can be identified as the second trajectory.

[0129] In some embodiments, the position information of each trajectory point on the second trajectory is known. Accordingly, when the self-moving device tracks a local path based on the second trajectory, it can first calculate the control amount required to move to each trajectory point, and then control its own movement based on the control amount, so as to further improve the tracking accuracy of the self-moving device.

[0130] In some embodiments, for complex terrain, there are inevitably curves between turning points in the local path. During the process of tracking curves, a large linear velocity is not conducive to the self-moving device achieving high-precision tracking of the curves.

[0131] Specifically, the self-moving device can calculate the angular difference in orientation between two adjacent path points in a local path. When the angular difference exceeds a preset difference threshold, it can be considered that there is an inflection point in the local path. The difference threshold can be a fixed value, such as 60°; or it can be determined according to the specific application scenario of the self-moving device. For application scenarios with high tracking accuracy requirements, the difference threshold can be smaller; for application scenarios with low accuracy requirements, the difference threshold can be set larger.

[0132] When an inflection point is identified in a local path, in order to improve the tracking accuracy of the curve corresponding to that inflection point, the self-moving device will decelerate or even have a linear velocity close to 0 (rotate in place) when turning at the inflection point. According to steps 310-340, the first trajectory is generated based on pose information and sampling velocity information. That is to say, the smaller the sampling velocity information, the fewer the trajectory points of the generated first trajectory will be. In some cases, the trajectory points of the first trajectory may be dense, resulting in a short length of the generated first trajectory or a small number of generated first trajectories, which is not conducive to the path tracking of the self-moving device.

[0133] The maximum sampling linear velocity for navigating a curve can be set according to the degree of curvature. This allows the self-moving device to move towards the inflection point at the maximum sampling linear velocity, ensuring that the linear velocity of the self-moving device does not decrease to 0. After reaching the inflection point, the self-moving device can rotate in place to the path to be moved. This ensures that a first trajectory is generated during the movement of the self-moving device, and path tracking is performed based on the optimal first trajectory to guarantee the accuracy of path following. Actual measurements show an accuracy of less than ±3cm.

[0134] To further improve the tracking efficiency of local paths with inflection points, the self-moving device can limit the sampling linear velocity only to the trajectory points corresponding to the inflection points. See also... Figure 9In the diagram, points a to c represent inflection points. However, not all parts of this local path are inflection points. For smooth local paths, the corresponding sampling linear velocity is not limited. In other words, once an inflection point is identified in a local path, the self-moving device can perform path tracking based on the maximum sampling linear velocity of the curve to ensure tracking efficiency for that local path.

[0135] In some embodiments, the self-moving device may track a pre-planned path at a lower speed under certain circumstances. If the control cycle is not changed, the first trajectory generated by the self-moving device will be relatively short, with a high density of trajectory points. Consequently, the second trajectory will also have a high density of trajectory points, which will reduce the accuracy of the final generated control quantity. To solve this problem, in this scenario, the self-moving device can limit the length of the first trajectory to a preset length threshold. Specifically, after each control cycle, the duration of the control cycle can be adjusted based on whether the current tracking speed is less than the preset speed threshold. When the tracking speed is less than the preset speed threshold, the duration of the control cycle can be increased to ensure that the generated first trajectory reaches the preset length threshold, thereby guaranteeing the accuracy of the final generated control quantity.

[0136] To illustrate the effects of implementing the above embodiments, please refer to... Figure 10 , Figure 10 The diagram shows the interface of a lawnmower robot tracking a pre-planned path in a practical application.

[0137] Figure 10 In the diagram, the strip-shaped region is the sampling space. If the sampling space uses a linear function to determine the score increment when performing the diffusion operation, then the cross-section of the sampling space AA is "V" shaped; if the sampling space uses a nonlinear function to determine the score increment when performing the diffusion operation, then the cross-section of the sampling space AA is "U" shaped.

[0138] Figure 10 In the sampling space, the darker colored paths are partial pre-planned paths. Among them, the path from point a to point b is the pre-planned path that has been tracked, point b is the current position of the lawnmower robot, the path from point b to point c is a local path, and the path from point c to point d is the pre-planned path to be tracked in the subsequent control cycle.

[0139] Figure 10In the diagram, the light-colored fan-shaped scattering points between points b and c represent the projections of the generated first trajectories into the sampling space. This projection shows that the multiple first trajectories effectively refine the finite regions on either side of the local path; therefore, the second trajectory determined based on the first / third trajectories deviates relatively little from the local path. In this case, the self-moving device controls its movement based on this second trajectory, enabling it to track the local path with high accuracy.

[0140] The actual test results in the scenario show that the average tracking deviation of the self-moving device for the pre-planned path is approximately 0.03m, with a maximum tracking deviation not exceeding 0.05m. Clearly, compared to traditional tracking methods in related technologies, the path tracking method of this application significantly improves tracking accuracy. Furthermore, by incorporating the detection of the curvature of curves, this application enables the self-moving device to improve the tracking accuracy of curves in the pre-planned path based on linear velocity control. For low-speed tracking scenarios, the self-moving device can also automatically adjust the duration of the control cycle to ensure the accuracy of the control quantity generated based on the second trajectory, thereby improving the tracking effect in low-speed tracking scenarios.

[0141] Corresponding to the path tracing method in the above embodiments, Figure 11 A structural block diagram of the path tracking device 1 provided in an embodiment of this application is shown. It should be noted that... Figure 11 Only the parts relevant to the embodiments of this application are shown.

[0142] Reference Figure 11 The path tracking device 1 includes:

[0143] The acquisition module 11 is used to acquire the pose information, current speed information and local path of the self-moving device when it moves along the pre-planned path in each control cycle;

[0144] The first determining module 12 is used to determine the sampling speed information based on the current speed information and the preset sampling parameters;

[0145] The sampling module 13 is used to sample based on the local path to obtain a sampling space, wherein each location point in the sampling space carries a corresponding score; the score represents the degree of deviation of the location point from the local path;

[0146] Generation module 14 is used to generate multiple first trajectories based on pose information and sampling velocity information;

[0147] Mapping module 15 is used to map the first trajectory to the sampling space to obtain the score corresponding to the first trajectory;

[0148] The second determining module 16 is used to determine the second trajectory from multiple first trajectories based on the score corresponding to the first trajectory;

[0149] The control module 17 is used to control the movement of the self-moving device according to the sampling speed information corresponding to the second trajectory.

[0150] Optionally, the current velocity information includes the current linear velocity and the current angular velocity, the sampled velocity information includes the sampled linear velocity and the sampled angular velocity, and the sampling parameters include the linear velocity sampling interval and the angular velocity sampling interval. The aforementioned first determining module 12 may include:

[0151] The first acquisition unit is used to acquire the current linear velocity and the current angular velocity;

[0152] The second acquisition unit is used to acquire the linear velocity sampling interval and the angular velocity sampling interval;

[0153] The first sampling unit is used to obtain multiple sampled linear velocities based on the current linear velocity and the linear velocity sampling interval;

[0154] The second sampling unit is used to obtain multiple sampled angular velocities based on the current angular velocity and the angular velocity sampling interval.

[0155] Optionally, the generation module 14 may include:

[0156] The combination unit is used to combine the sampling linear velocity and the sampling angular velocity in a one-to-one correspondence to obtain multiple velocity combinations;

[0157] The generation unit is used to generate the first trajectory corresponding to each velocity combination based on the pose information and each velocity combination.

[0158] Optionally, the sampling module 13 may include:

[0159] The first determining unit is used to determine the sampling starting point in the local path based on the pose information;

[0160] The first numbering unit is used to assign a corresponding number value to each path point in the local path based on the sampling starting point, so as to obtain the first node;

[0161] A diffusion unit is used to perform a diffusion operation on each first node based on a preset adjacency matrix to obtain a second node;

[0162] The second numbering unit is used to obtain the numbering value of the second node based on the numbering value of the first node and a preset score increment;

[0163] The loop unit is used to take the second node as the new first node and return to the step of performing a diffusion operation on each first node based on a preset adjacency matrix to obtain the second node, until the number of diffusion operations is greater than or equal to a preset threshold number, and then the sampling space is determined based on the currently obtained first and second nodes.

[0164] Optionally, the path tracking device 1 may further include:

[0165] The marking module is used to mark the first trajectory as an impassable trajectory if the trajectory points on the first trajectory are outside the sampling space range.

[0166] Optionally, the second determining module 16 includes:

[0167] The filtering unit is used to delete impassable trajectories from the first trajectory to obtain multiple third trajectories;

[0168] The second determining unit is used to determine the third trajectory with the smallest score as the second trajectory.

[0169] Optionally, the path tracking device 1 may further include:

[0170] The setting unit is used to ensure that multiple sampled linear velocities are all less than a preset linear velocity threshold when there is an inflection point in the local path.

[0171] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0172] Figure 12 This is a schematic diagram of the physical layer structure of a self-moving device provided in an embodiment of this application. For example... Figure 12 As shown, the self-moving device 2 of this embodiment includes: at least one processor 20 ( Figure 12 (Only one is shown) a processor, a memory 21, and a computer program 22 stored in the memory 21 and executable on at least one processor 20. When the processor 20 executes the computer program 22, it implements the steps in any of the above-described path tracing method embodiments, for example... Figure 1 Steps 110-170 are shown.

[0173] The processor 20 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0174] In some embodiments, memory 21 may be an internal storage unit of the self-moving device 2, such as a hard disk or memory of the self-moving device 2. In other embodiments, memory 21 may also be an external storage device of the self-moving device 2, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the self-moving device 2.

[0175] Furthermore, the memory 21 may include both internal storage units and external storage devices of the self-moving device 2. The memory 21 is used to store operating devices, application programs, bootloaders, data, and other programs, such as program code for computer programs. The memory 21 can also be used to temporarily store data that has been output or will be output.

[0176] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the above device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0177] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0178] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0179] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographic device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, such as a USB flash drive, a portable hard drive, a magnetic disk, or an optical disk.

[0180] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0181] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software 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.

[0182] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units described above is only a logical functional division, and in actual implementation, there may be other division methods. 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; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0183] The units described above 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.

[0184] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A path tracking method characterized by, The method comprises the following steps: In each control cycle, acquiring pose information, current speed information and a local path of a mobile device when moving along a pre-planned path; Determining sampling speed information according to the current speed information and preset sampling parameters; Sampling based on the local path to obtain a sampling space, wherein each position point in the sampling space carries a corresponding score; the score represents the degree of deviation of the position point from the local path; Generating a plurality of first trajectories based on the pose information and the sampling speed information; Mapping the first trajectories into the sampling space to obtain scores corresponding to the first trajectories; Determining a second trajectory from the plurality of first trajectories according to the scores corresponding to the first trajectories; Controlling the motion of the mobile device according to the sampling speed information corresponding to the second trajectory; The sampling based on the local path to obtain a sampling space comprises the following steps: Determining a sampling starting point in the local path based on the pose information; Assigning a corresponding number value to each path point in the local path based on the sampling starting point to obtain first nodes; Performing a diffusion operation on each first node based on a preset adjacency matrix to obtain second nodes; Obtaining the number value of the second node based on the number value of the first node and a preset score increment; Taking the second node as a new first node and returning to perform the diffusion operation based on the preset adjacency matrix to obtain the second node until the number of times of performing the diffusion operation is greater than or equal to a preset number threshold, and determining the sampling space according to the currently obtained first node and second node.

2. The path tracking method of claim 1, wherein, The current speed information includes a current linear speed and a current angular speed, the sampling speed information includes a sampling linear speed and a sampling angular speed, the sampling parameters include a linear speed sampling interval and an angular speed sampling interval, and the determination of the sampling speed information according to the current speed information and the preset sampling parameters comprises the following steps: Obtaining the current linear speed and the current angular speed; Obtaining the linear speed sampling interval and the angular speed sampling interval; Obtaining a plurality of sampling linear speeds based on the current linear speed and the linear speed sampling interval; Obtaining a plurality of sampling angular speeds based on the current angular speed and the angular speed sampling interval.

3. The path tracking method of claim 2, wherein, The generation of a plurality of first trajectories based on the pose information and the sampling speed information comprises the following steps: Correspondingly combining the sampling linear speeds and the sampling angular speeds to obtain a plurality of speed combinations; Generating the first trajectory corresponding to each speed combination based on the pose information and each speed combination.

4. The path tracking method of claim 1, wherein, The method further comprises the following steps: If a trajectory point on the first trajectory is outside the range of the sampling space, marking the first trajectory as an impassable trajectory.

5. The path tracking method of claim 4, wherein, The determination of a second trajectory from a plurality of first trajectories according to the scores corresponding to the first trajectories comprises the following steps: Deleting the impassable trajectory from the first trajectories to obtain a plurality of third trajectories; Determining the third trajectory with the smallest score as the second trajectory.

6. The path tracking method of claim 2, wherein, When the local path has a turning point, each of the plurality of sampling linear velocities is less than a preset linear velocity threshold.

7. A path tracking device characterized by comprising: The method comprises the following steps: An acquisition module is configured to acquire, in each control cycle, pose information, current speed information, and a local path of a self-moving device when the self-moving device moves along a pre-planned path; A first determination module is configured to determine sampling speed information according to the current speed information and preset sampling parameters; A sampling module is configured to sample based on the local path to obtain a sampling space, wherein each position point in the sampling space carries a corresponding score value; the score value represents a deviation degree of the position point from the local path; A generation module is configured to generate a plurality of first trajectories based on the pose information and the sampling speed information; A mapping module is configured to map the first trajectories into the sampling space to obtain score values corresponding to the first trajectories; A second determination module is configured to determine a second trajectory from the plurality of first trajectories according to the score values corresponding to the first trajectories; A control module is configured to control movement of the self-moving device according to sampling speed information corresponding to the second trajectory. The sampling module comprises: A first determination unit is configured to determine a sampling starting point in the local path based on the pose information; A first numbering unit is configured to assign a corresponding number value to each path point in the local path based on the sampling starting point to obtain first nodes; A diffusion unit is configured to perform a diffusion operation on each first node based on a preset adjacency matrix to obtain second nodes; A second numbering unit is configured to obtain a number value of the second nodes based on the number value of the first nodes and a preset score increment; A loop unit is configured to take the second nodes as new first nodes and return to perform the diffusion operation on each first node based on the preset adjacency matrix to obtain second nodes until a number of times of performing the diffusion operation is greater than or equal to a preset number threshold, and then determine the sampling space according to the current first nodes and second nodes.

8. A self-moving device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the path tracking method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 8. The computer program is executed by the processor to implement the path tracking method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Dynamic path tracking method

    CN113625703A