Following path adjustment method for mobile robot and robot
By calculating the robot's movement data penalty value and adjusting the path, the problem of traditional mobile robots losing track of targets in complex environments is solved, achieving a more stable following effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN PUDU TECH CO LTD
- Filing Date
- 2025-11-28
- Publication Date
- 2026-07-31
AI Technical Summary
Traditional mobile robots are prone to losing their target during autonomous following due to frequent obstacle avoidance maneuvers, and existing obstacle avoidance methods cannot effectively maintain the accuracy and stability of following.
By acquiring the first movement data of the mobile robot and the second movement data of the target being followed, the robot calculates line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value, determines the target cost value, and adjusts the movement path according to these penalty values until the preset conditions are met, thus optimizing the robot's following path.
It improves the stability and accuracy of mobile robots in following targets in complex environments, avoids the problem of target loss due to obstacles, and achieves a more stable following effect.
Smart Images

Figure CN121209526B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a method for adjusting the following path of a mobile robot and the robot itself. Background Technology
[0002] With the rapid development of artificial intelligence, sensor technology, and robotics, mobile robots have been widely used in various fields such as smart warehousing, logistics and distribution, service guidance, security patrol, and home services. Among these, autonomous following is a crucial and highly challenging core function, requiring the robot to stably and safely follow a specific target (usually a pedestrian) within a certain distance, and to have the ability to autonomously avoid obstacles and navigate in dynamic and complex environments.
[0003] Traditional obstacle avoidance methods, which rely on sensors such as lidar and cameras to obtain obstacle information, can only deal with the current obstacle. This may lead to frequent obstacle avoidance maneuvers and cause the target to be lost. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, robot, computer-readable storage medium, and computer program product for adjusting the following path of a mobile robot that can improve following accuracy, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for adjusting the following path of a mobile robot, including:
[0006] Acquire the first movement data of the mobile robot and the second movement data of the target being followed;
[0007] Based on the first movement data and / or the second movement data, determine at least one of the following: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot.
[0008] The target cost is determined based on at least one of the following: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot.
[0009] The movement path of the mobile robot is adjusted according to the target value until the target value obtained based on the adjusted movement path meets the preset conditions.
[0010] Secondly, this application also provides a following path adjustment device for a mobile robot, comprising:
[0011] The mobile data acquisition module is used to acquire the first mobile data of the mobile robot and the second mobile data of the target being followed.
[0012] The penalty value determination module is used to determine at least one of the following based on the first movement data and / or the second movement data: line-of-sight penalty value, view penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot.
[0013] The cost value determination module is used to determine the target cost value based on at least one of the following: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot.
[0014] The movement path adjustment module is used to adjust the movement path of the mobile robot according to the target value until the target value obtained based on the adjusted movement path meets the preset conditions.
[0015] Thirdly, this application also provides a robot, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the following path adjustment method for the mobile robot provided in the first aspect.
[0016] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the following path adjustment method for the mobile robot provided in the first aspect.
[0017] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the following path adjustment method for the mobile robot provided in the first aspect.
[0018] The aforementioned method, apparatus, robot, computer-readable storage medium, and computer program product for adjusting the following path of a mobile robot determine at least one of the following penalty values: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value, based on first movement data of the mobile robot and / or second movement data of the following target. Based on these line-of-sight penalty values, viewpoint penalty value, velocity matching penalty value, and acceleration matching penalty value, a target cost value is determined. The movement path of the mobile robot is adjusted according to the target cost value until the target cost value obtained based on the adjusted movement path meets preset conditions. This optimizes the movement path of the mobile robot to maintain the visibility of the following target in the mobile robot's field of vision, preventing the following target from being lost even when obstructed by obstacles, thus improving the stability and accuracy of following. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application 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 related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is an application environment diagram of a mobile robot's following path adjustment method in one embodiment;
[0021] Figure 2 This is a flowchart illustrating a method for adjusting the following path of a mobile robot in one embodiment.
[0022] Figure 3 This is a flowchart illustrating the following path adjustment method for a mobile robot in another embodiment;
[0023] Figure 4 This is a structural block diagram of a following path adjustment device for a mobile robot in one embodiment;
[0024] Figure 5 This is a diagram of the internal structure of a robot in one embodiment. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0026] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0027] The mobile robot following path adjustment method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed on a cloud or other network server. Server 104 can obtain first movement data of the mobile robot and second movement data of the target being followed sent by terminal 102. Based on the first and / or second movement data, server 104 determines at least one of the following: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot. Based on at least one of these penalty values, server 104 determines the target cost value and adjusts the mobile robot's movement path according to the target cost value until the target cost value obtained based on the adjusted movement path meets a preset condition. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, robots, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, projection equipment, etc. Robots include, for example, home robots, cleaning robots, industrial robots, logistics and warehousing robots, security and inspection robots, film and media robots, medical and mobility assistance robots, etc., used in follow-up scenarios. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. It should be noted that the mobile robot following path adjustment method provided in this application embodiment is not limited to application scenarios where server 104 and terminal 102 interact, but is also applicable to application scenarios where server 104 or terminal 102 is alone, or server 104 interacts with server 104 or terminal 102 interacts with terminal 102.
[0028] In one exemplary embodiment, such as Figure 2 As shown, a method for adjusting the following path of a mobile robot is provided. Taking the application of this method to a robot as an example, the method includes the following steps 202 to 208. Wherein:
[0029] Step 202: Obtain the first movement data of the mobile robot and the second movement data of the target being followed.
[0030] Mobile robots, through their own power systems and intelligent control systems, can move autonomously or semi-autonomously in their environment to perform specific tasks. The target being followed refers to the object the mobile robot follows. The target can be a person, animal, or object, such as a vehicle or work equipment. In practical applications, the mobile robot can move along a pre-planned path to follow the target. During the movement, it can acquire initial movement data from the mobile robot and second movement data from the target at preset intervals.
[0031] It should be noted that the second movement data of the target being followed is usually predicted by the mobile robot. The mobile robot acquires the initial movement data of the target being followed through its own sensors, and performs predictive processing based on the initial movement data to obtain the second movement data. The first movement data can also be acquired through the sensors installed on the robot itself. These sensors include, for example, vision sensors, LiDAR, velocity sensors, angle sensors, pressure sensors, accelerometers, positioning sensors, and ranging sensors. Vision sensors include monocular cameras, stereo vision cameras, or depth cameras, and are typically mounted on the "head" of the mobile robot to ensure a good visual range. LiDAR can include 2D or 3D LiDAR. Positioning sensors include, for example, UWB (Ultra Wide Band), Wi-Fi, or Bluetooth. Ranging sensors include, for example, ultrasonic sensors and infrared sensors. In short, the mobile robot can perceive its own movement through its own sensors and acquire its first movement data in real time. The first and second movement data are usually movement data from the same moment or the same period of time. For example, the first movement data includes the first movement position, the first movement speed, the first movement acceleration, the first movement distance, and the movement trajectory, etc., while the second movement data includes the second movement position, the second movement speed, the second movement acceleration, and the second movement distance, etc. The first movement position and the second movement position are the positions of the robot and the target being followed at the same moment, respectively; the first movement speed and the second movement speed are the movement speeds of the robot and the target being followed at the same moment, respectively; the first movement acceleration and the second movement acceleration are the movement accelerations of the robot and the target being followed during the same time period, respectively; and the first movement distance and the second movement distance are the movement distances of the robot and the target being followed during the same time period, respectively.
[0032] Step 204: Based on the first motion data and / or the second motion data, determine at least one of the following for the mobile robot: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value.
[0033] Here, the penalty value refers to the value of a corresponding penalty item during the movement of the mobile robot. A penalty item refers to an item that imposes a penalty on the mobile robot. Penalty items may include at least one of the following: line-of-sight penalty, viewpoint penalty, velocity matching penalty, acceleration matching penalty, curvature smoothing penalty, or acceleration smoothing penalty. Each penalty item corresponds to a specific penalty value. It is easy to understand that for each penalty item, a pre-set calculation method for the penalty value is available. Based on the first movement data and / or the second movement data, and the calculation method for the penalty item, the penalty value corresponding to each penalty item can be calculated.
[0034] The line-of-sight penalty value refers to the penalty for obstructing the line of sight between the mobile robot and the target. The more obstructed the line of sight, the greater the penalty value. Obstruction can be represented, for example, by the perpendicular distance between the line connecting the robot and the target and the obstacle. The closer this perpendicular distance, the more likely or severe the obstruction. The viewing angle penalty value refers to the penalty for the mobile robot's viewing distance. This distance can be represented, for example, by the distance between the robot's and the target's movement trajectories. For instance, if the robot's viewing distance exceeds a preset safe distance, a viewing angle penalty is applied to ensure it stays within that safe distance. The greater the deviation from the preset safe distance, the greater the penalty. In other words, if the robot's viewing distance is within the safe distance, it has a good viewing angle for observing the target. The speed matching penalty value refers to the penalty for matching the mobile robot's speed with the target's speed. The matching degree between the speed of a mobile robot and the speed of the target being followed can be characterized by the consistency of their speeds. The more consistent the speeds of the two robots are, the better the match, and the smaller the speed matching penalty value. Conversely, the less consistent the speeds, the larger the penalty value. The speed matching penalty value helps control the movement speed of the robot and the target to be as consistent as possible. The acceleration matching penalty value refers to the penalty for synchronizing the acceleration of the robot with that of the target. The higher the consistency between the accelerations of the robot and the target, the better the match, and the smaller the acceleration matching penalty value. Conversely, the lower the consistency, the less consistent the accelerations, and the larger the penalty value. The acceleration matching penalty value helps control the acceleration of the robot and the target to be as consistent as possible.
[0035] The curvature smoothing penalty value refers to the penalty value for the curvature smoothness of the mobile robot's motion trajectory. The greater the curvature smoothness of the mobile robot's motion trajectory, the smaller the curvature smoothing penalty value; conversely, the smaller the curvature smoothness of the mobile robot's motion trajectory, the larger the curvature smoothing penalty value. In other words, the curvature smoothing penalty value is used to constrain the smoothness of the mobile robot's motion trajectory, aiming to make the curvature of the mobile robot's motion trajectory smoother. The acceleration smoothing penalty value refers to the penalty value for the acceleration smoothness of the mobile robot during movement. Similar to the curvature smoothing penalty value, generally, the better the acceleration smoothness of the mobile robot during movement, the smaller the acceleration smoothing penalty value; conversely, the worse the acceleration smoothness, the larger the acceleration smoothing penalty value. The acceleration smoothing penalty value can be used to constrain the acceleration smoothness of the mobile robot during movement. In practical application scenarios, the line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, and acceleration matching penalty value of the mobile robot can be determined based on the first movement data and the second movement data, respectively. The curvature smoothing penalty value and the acceleration smoothing penalty value of the mobile robot are determined based on the first movement data.
[0036] For example, a line-of-sight penalty value can be determined based on the distance between the line-of-sight distance of the mobile robot's first moving position and the distance between the line-of-sight distance of the followed target's second moving position and the nearest obstacle. A safe viewing distance penalty value can be determined based on the distance between the mobile robot's first moving position and the followed target's second moving position. A speed matching penalty value can be determined based on the difference between the mobile robot's first moving speed and the followed target's second moving speed. An acceleration matching penalty value can be determined based on the difference between the mobile robot's first moving acceleration and the followed target's second moving acceleration. An acceleration smoothing penalty value can be determined based on the changes in the mobile robot's first moving acceleration at different times. A curvature smoothing penalty value can be determined based on the changes in curvature corresponding to different trajectory segments in the mobile robot's movement trajectory.
[0037] In some examples, the line-of-sight penalty value can be determined based on the distance between the line of sight of the mobile robot at its first moving position and the second moving position of the target, and the number of obstacles between the mobile robot and the target. For example, the line-of-sight penalty value can be determined based on the average distance between the line of sight of the first and second moving positions and the number of obstacles between the mobile robot and the target. Regarding the viewpoint penalty value, the viewpoint range of the mobile robot can be determined, and the viewpoint penalty value can be determined based on the distance between the mobile robot and the target and the viewpoint range. For example, if the distance between the mobile robot and the target exceeds the viewpoint range, the viewpoint penalty value is determined to be greater than zero; if the distance between the mobile robot and the target does not exceed the viewpoint range, the viewpoint penalty value is determined to be zero. Regarding the speed matching penalty value, the speed matching penalty value of the mobile robot can be determined based on the absolute difference between the first and second moving speeds. The absolute difference can be characterized by its absolute value. For example, the speed matching penalty value of the mobile robot can be determined based on the absolute value of the difference between the first and second moving speeds. For example, the sum of the absolute values of the difference between the first and second moving speeds at each time point can be used as the speed matching penalty value of the mobile robot for the corresponding time period. Similarly, the acceleration matching penalty value of the mobile robot can be determined based on the absolute difference between the first and second moving accelerations. For example, the sum of the absolute values of the differences between the first and second moving accelerations at each time point can be used as the acceleration matching penalty value of the mobile robot for the corresponding time period.
[0038] Step 206: Determine the target cost value based on at least one of the following: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot.
[0039] The process involves selecting at least one of the following penalty items—line-of-sight penalty, viewpoint penalty, velocity matching penalty, acceleration matching penalty, curvature smoothing penalty, or acceleration smoothing penalty—based on the scene type of the following scenario. A corresponding penalty value is then determined, and the target cost is determined based on the penalty value corresponding to the selected penalty item. For example, the target cost can be obtained by weighted summing at least two of the determined line-of-sight penalty, viewpoint penalty, velocity matching penalty, acceleration matching penalty, curvature smoothing penalty, or acceleration smoothing penalty values. Alternatively, any one of the determined line-of-sight penalty, viewpoint penalty, velocity matching penalty, acceleration matching penalty, curvature smoothing penalty, or acceleration smoothing penalty values can be used as the target cost. The target cost represents the total penalty value on the current movement path of the mobile robot. A larger target cost indicates a greater penalty and a less favorable outcome for the mobile robot's movement path compared to the preset conditions. The preset conditions refer to the conditions under which the mobile robot can stably follow the target. In other words, if the mobile robot's movement path meets the preset conditions, it means that the mobile robot can stably follow the target. For example, the preset conditions can be characterized by the target cost value of the mobile robot. For instance, if the target cost value is less than a preset cost threshold, it means that the mobile robot's movement path meets the preset conditions; if the target cost value is greater than or equal to the preset cost threshold, it means that the mobile robot's movement path does not meet the preset conditions.
[0040] In practical applications, if the selected penalty items include two or more, the penalty values corresponding to the selected mobile robot's penalty items can be weighted and summed according to the pre-set weighted weights of the penalty items to obtain the target cost value. For example, the target cost value can be obtained by weighting and summing the line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, and acceleration smoothing penalty value. Different weighting weights can be set according to different scenarios. The range of weighting weights is not limited; in other words, the weighting weight can be 0, 1, or a value greater than 1. If the weighting weight is 0, it means that the corresponding penalty item can be ignored. For example, the base weights of each penalty item can be pre-set. Depending on the scenario type of the following scenario, the base weights of each penalty item can be adjusted to obtain the adjusted target weights, and then the corresponding penalty items can be weighted based on the target weights. For example, based on the target weight, at least two of the following penalties for the mobile robot—the line-of-sight penalty, the viewpoint penalty, the velocity matching penalty, the acceleration matching penalty, the curvature smoothing penalty, or the acceleration smoothing penalty—are weighted and summed to obtain the target cost.
[0041] Step 208: Adjust the mobile robot's movement path according to the target value until the target value obtained based on the adjusted movement path meets the preset conditions.
[0042] After determining the target cost value, if the target cost value does not meet a preset condition, the mobile robot's movement path is adjusted according to the target cost value until the target cost value obtained based on the adjusted movement path meets the preset condition. The preset condition, for example, is that the target cost value is less than a cost threshold. If the target cost value meets the preset condition, the mobile robot can continue moving along its current path without adjusting its movement path.
[0043] For example, if the target value does not meet the preset conditions, the mobile robot's position, speed, or acceleration can be adjusted to change the movement path until the target value obtained based on the adjusted path meets the preset conditions. By repeatedly performing the above movement path adjustment process, it can be ensured that the movement path meets the preset conditions throughout the entire movement process of the mobile robot, thereby achieving stable following of the target by the mobile robot.
[0044] The aforementioned method for adjusting the following path of a mobile robot determines at least one of the following penalty values: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value, based on the first movement data of the mobile robot and / or the second movement data of the target being followed. Then, based on at least one of these penalty values, a target cost value is determined. The mobile robot's movement path is adjusted according to the target cost value until the target cost value obtained based on the adjusted movement path meets a preset condition. This method optimizes the mobile robot's movement path to maintain the visibility of the target being followed within the mobile robot's field of vision, preventing the target from being lost even when obstructed by obstacles, thus improving the stability and accuracy of the following process.
[0045] In some embodiments, the first movement data includes a first movement position, and the second movement data includes a second movement position; the first movement position and the second movement position are movement positions at the same time; step 204, based on the first movement data and the second movement data, determines the line-of-sight penalty value of the mobile robot, including:
[0046] Determine a first distance between the line connecting the first and second moving positions and the nearest obstacle; determine a line-of-sight penalty value based on the first distance and an intensity penalty factor.
[0047] In practical applications, a mobile robot can determine its first moving position and the second moving position of the target it is following based on sensors. It can then determine the distance between the line connecting the first and second moving positions and various obstacles in its field of vision, identify the nearest obstacle, and determine the line-of-sight penalty value based on the first distance between this nearest obstacle and the line connecting the first and second moving positions, as well as an intensity penalty factor. The intensity penalty factor controls the penalty strength. This factor can be set according to the specific application scenario, for example, 0.3m or 0.4m. It's easy to understand that during the mobile robot's movement, any person or object other than the robot and the target can be considered an obstacle. The line connecting the first and second moving positions can be used to represent the line of sight between the robot and the target.
[0048] In one example, a line-of-sight penalty value can be determined by the ratio of the square of the first distance between the line connecting the first and second movement positions and the nearest obstacle to the square of an intensity penalty factor. This line-of-sight penalty value forces the line connecting the robot's first movement position and the target-following second movement position to avoid obstacles. For example, the line-of-sight penalty value... The calculation formula is shown in formula (1) below.
[0049] Formula (1)
[0050] Where, q i p represents the first move position obtained in the i-th iteration. i This represents the second move position obtained in the i-th iteration. Indicates the first moving position q i With the second moving position p i The vertical distance from the line connecting the two obstacles to the nearest obstacle (i.e., the first distance). This represents the intensity penalty factor. `exp()` represents the natural exponential function. `i` represents the frequency of acquiring movement data, with a minimum of 1 and a maximum of N, where N is a positive integer greater than 1. N can be set according to the actual application scenario. In simple terms, at preset intervals, the robot can acquire its first movement data and the target's second movement data once.
[0051] In an exemplary embodiment, a first distance between the line connecting the first and second moving positions and the nearest obstacle can be determined, the ratio of the first distance to the intensity penalty factor can be calculated, and the sum of the ratios of the first distance to the intensity penalty factor at each time point can be used as the line-of-sight penalty value of the mobile robot.
[0052] In this embodiment, the line-of-sight penalty value of the mobile robot can be accurately determined by the first distance and intensity penalty factor between the line connecting the first and second moving positions and the nearest obstacle.
[0053] In some embodiments, the first movement data includes a first movement position, and the second movement data includes a second movement position; the first movement position and the second movement position are movement positions at the same time; step 204, based on the first movement data and the second movement data, determines the viewpoint penalty value of the mobile robot, including:
[0054] Determine a second distance between the first and second moving positions; determine a viewpoint penalty value based on the second distance and a preset distance range; wherein the preset distance range is determined based on the movement speed of the target being followed.
[0055] The second distance characterizes the straight-line distance between the mobile robot and the target being followed. For example, a viewpoint penalty value can be determined based on whether the second distance exceeds a preset distance range. The greater the second distance exceeds the preset distance range, the larger the viewpoint penalty value; conversely, the smaller the second distance exceeds the preset distance range, the smaller the viewpoint penalty value. Both the upper and lower limits of the preset distance range are proportional to the movement speed of the target being followed.
[0056] In one example, the view penalty value of the mobile robot. The determination method is shown in the following formula (2).
[0057] Formula (2)
[0058] in, Indicates the first moving position q i Second moving position p i The second distance between them; v p The value represents the speed of movement of the target being followed. k represents the gain coefficient, which can be set empirically, for example, k = 1 or 2. l0 represents the minimum forward look-ahead distance, used to characterize the minimum distance at which the mobile robot can observe the target being followed from the front; for example, l0 = 0.5m. d For v-based p Adjusted forward sight distance. Desired target: In other words, the following distance (i.e., the second distance) of the mobile robot is constrained to... Within the preset distance range, the upper limit of the preset distance range is 1.2l. d The lower limit is 0.8l. dIf the distance exceeds the preset range, a viewpoint penalty is triggered. This ensures that the mobile robot's trajectory follows the target as closely as possible, maintaining the optimal tracking distance and preventing the target from being lost while avoiding getting too close. When the target is moving quickly, the mobile robot needs more space to perform obstacle avoidance maneuvers (such as navigating dynamic obstacles). Too narrow a constraint will limit the degree of freedom of the trajectory. It is important to note that a wider constraint band is a necessary safety margin when the target is moving quickly. This is because when the target moves fast, the mobile robot's speed also increases. If the preset distance range is too small, the second distance between the mobile robot and the target may exceed the preset range, increasing the viewpoint penalty value. A larger viewpoint penalty value will cause the second distance between the mobile robot and the target to decrease, which is detrimental to the mobile robot's autonomous obstacle avoidance during the following process.
[0059] In one example, if the second distance exceeds a preset distance range, a viewing angle penalty value can be determined based on the remaining distance length beyond the preset distance range and the preset distance range itself. For example, the ratio of the remaining distance length to the distance length corresponding to the preset distance range can be used as the viewing angle penalty value. If the second distance does not exceed the preset distance range, the viewing angle penalty value is zero.
[0060] In this embodiment, by determining the viewpoint penalty value based on the second distance between the mobile robot and the target being followed and a preset distance range, the accuracy of the viewpoint penalty value can be improved.
[0061] In some embodiments, the first movement data includes a first movement speed, and the second movement data includes a second movement speed; step 204, based on the first movement data and the second movement data, determines the speed matching penalty value of the mobile robot, including:
[0062] The speed matching penalty value of the mobile robot is determined based on the relative error between the first and second moving speeds.
[0063] The second moving speed is the predicted moving speed of the target being followed by the mobile robot. The first and second moving speeds are the moving speeds within the same time period.
[0064] For example, relative error can include the sum of squared differences, the sum of absolute differences, or the sum of all differences. For instance, the speed matching penalty value for a mobile robot can be determined based on the sum of squared differences between the first and second moving speeds at different time periods. For example, the speed matching penalty value for the mobile robot can be the sum of the squared ratios of the difference between the first and second moving speeds for each time period and the maximum value between the second moving speed and the minimum moving speed. The calculation formula is shown in formula (3) below.
[0065] Formula (3)
[0066] Among them, V i V represents the initial moving speed of the mobile robot. p V represents the second speed of movement while following the target; min This represents the minimum movement speed, which can be set according to the actual application scenario. For example, V min =0.1m / s (meters per second).
[0067] In one example, the speed matching penalty value for the mobile robot can be calculated as the sum of the absolute values of the differences between the first and second moving speeds at different time periods, or the sum of the squares of the absolute values of the differences.
[0068] In this embodiment, by determining the speed matching penalty value of the mobile robot based on the relative error between the first and second moving distances, the moving speed of the mobile robot can be accurately constrained to be as close as possible to the predicted moving speed of the target being followed, thereby achieving speed matching movement and avoiding the loss of the target being followed when there is occlusion.
[0069] In some embodiments, the first movement data includes a first movement acceleration, and the second movement data includes a second movement acceleration; step 204, based on the first movement data and the second movement data, determines the acceleration matching penalty value of the mobile robot, including:
[0070] The acceleration matching penalty value of the mobile robot is determined based on the relative error between the first and second moving accelerations.
[0071] The second movement acceleration is the predicted movement acceleration of the mobile robot as it follows the target. The first and second movement accelerations are movement accelerations occurring within the same time period.
[0072] For example, the velocity matching penalty value of the mobile robot can be determined based on the sum of squares, sum of absolute values, sum of squares, or sum of differences between the first and second movement accelerations at each time period. For instance, the acceleration matching penalty value of the mobile robot can be the sum of the squares of the ratios between the difference between the first and second movement accelerations at each time period and the ratio of the absolute value of the second movement acceleration to the maximum value between the minimum and maximum accelerations. The calculation formula is shown in formula (4) below.
[0073] Formula (4)
[0074] Among them, a iThis represents the first acceleration of the mobile robot; a p This represents the second acceleration as it follows the target; a min a represents the minimum acceleration. min It can be configured according to the actual application scenario, for example, a min =0.2m / s 2 (meters per second squared). It's easy to understand that the first acceleration can be determined based on the first velocity at different times, and the second acceleration can be determined based on the second velocity at different times. For example: , i=0,1,2,…,N-1.
[0075] In one example, the sum of the absolute values of the differences between the first and second moving accelerations at each time period, the sum of the squares of the absolute values of the differences, or the sum of the differences can be used as the acceleration matching penalty value for the mobile robot.
[0076] In this embodiment, by using the relative error between the first and second moving accelerations, the acceleration matching penalty value of the mobile robot can be accurately determined, aiming to keep the moving acceleration of the mobile robot as consistent as possible with the moving acceleration of the target during movement, and to avoid the situation where the target is lost when encountering obstacles.
[0077] In some embodiments, the first motion data includes a motion trajectory; step 204, determining the curvature smoothing penalty value of the mobile robot based on the first motion data, includes:
[0078] Obtain the curvature corresponding to different trajectory segments in the mobile robot's movement trajectory; determine the curvature smoothing penalty value based on the curvature changes of different trajectory segments.
[0079] The movement trajectory of a mobile robot can be divided into multiple trajectory segments. These segments can have the same or different lengths. The length of each segment can be set according to the specific application scenario.
[0080] For example, the curvature smoothing penalty value can be determined based on the curvature difference between different trajectory segments in the mobile robot's trajectory. For instance, the square of the sum of the absolute values of the curvature differences between different trajectory segments in the mobile robot's trajectory can be used as the curvature smoothing penalty value. Here, different trajectory segments can be adjacent or non-adjacent trajectory segments in the mobile trajectory. The calculation formula is shown in formula (5) below.
[0081] Formula (5)
[0082] Among them, K iLet represent the curvature of the i-th trajectory segment. The calculation formula can be obtained from formula (6).
[0083] Formula (6)
[0084] in, q represents the angle at which the i-th trajectory segment is formed; i This indicates the ending position of the i-th trajectory segment.
[0085] For example, the curvature smoothing penalty value can be determined based on the curvature difference between pairwise adjacent trajectory segments within a predetermined number of consecutive trajectory segments of the mobile robot. The predetermined number can be set according to the actual application scenario; for example, it can be 3, 4, or 5. For instance, the curvature smoothing penalty value can be the square of the sum of the curvature differences between pairwise adjacent trajectory segments within a predetermined number of consecutive trajectory segments, the square of the sum of the absolute values of the curvature differences, or the absolute value of the curvature differences. Alternatively, the curvature smoothing penalty value can also be determined based on the curvature difference between pairwise segments within a predetermined number of non-adjacent trajectory segments of the mobile robot.
[0086] Taking a preset quantity of 3 as an example, the square of the sum of the curvature differences between any two adjacent trajectory segments in three adjacent trajectory segments of the mobile robot's movement trajectory can be used as the curvature smoothing penalty value. The calculation formula is shown in formula (7) below.
[0087] Formula (7)
[0088] In this embodiment, by determining the curvature smoothing penalty value based on the curvature changes corresponding to different trajectory segments in the mobile robot's movement trajectory, the curvature smoothing penalty value can be accurately determined, thereby improving the stability and accuracy of target following.
[0089] In some embodiments, the first movement data includes a first movement acceleration; step 204, determining the acceleration smoothing penalty value of the mobile robot based on the first movement data, includes:
[0090] The first acceleration of the mobile robot at different moments during its movement is obtained, and the acceleration smoothing penalty value is determined based on the changes in the first acceleration at different moments.
[0091] The change in the first moving acceleration at different times can be characterized by the degree of change in the first moving acceleration. The greater the degree of change in the first moving acceleration, the greater the acceleration smoothing penalty value of the mobile robot; conversely, the smaller the degree of change in the first moving acceleration, the smaller the acceleration smoothing penalty value of the mobile robot. In other words, the acceleration smoothing penalty value aims to minimize the degree of change in the first moving acceleration of the mobile robot.
[0092] For example, the acceleration smoothing penalty value can be based on the sum of squares, the sum of acceleration rates of change, or the variance of acceleration rates of change of the first moving acceleration at adjacent moments during the movement of the mobile robot.
[0093] In some examples, the sum of the squares of the rates of change of the first movement acceleration of the mobile robot at adjacent time points can be used as the acceleration smoothing penalty value. The calculation formula is shown in formula (8) below.
[0094] Formula (8)
[0095] Among them, a i a represents the first acceleration of the mobile robot at time i; i+1 This represents the first acceleration of the mobile robot at time i+1; It represents the time difference between adjacent moments.
[0096] In this embodiment, by determining the acceleration smoothing penalty value based on the changes in the first moving acceleration of the mobile robot at different times during the movement, the accuracy of the acceleration smoothing penalty value can be improved.
[0097] In some embodiments, the above method further includes:
[0098] Determine the scene type of the following scene; if the following scene belongs to the first scene type, reduce the weights corresponding to the line-of-sight penalty value and the view penalty value, and increase the weights corresponding to the curvature smoothing penalty value and the acceleration smoothing penalty value; if the following scene belongs to the second scene type, increase the weights corresponding to the line-of-sight penalty value, the view penalty value, the velocity matching penalty value, and the acceleration matching penalty value; wherein, the following occlusion probability of the first scene type is less than the following occlusion probability of the second scene type.
[0099] The scenario type of a following scenario can be distinguished based on the following occlusion probability. For example, if the following occlusion probability in a following scenario is less than or equal to a probability threshold, then the following scenario is determined to belong to the first scenario type; if the following occlusion probability in a following scenario is greater than the probability threshold, then the following scenario is determined to belong to the second scenario type. The following occlusion probability is used to characterize the likelihood of occlusion during the following process by the mobile robot. It is easy to understand that the scenario type of a following scenario is not limited to two types; it can include three or more scenario types. The probability threshold can be set according to the actual application scenario. For example, the scenario types of a following scenario include the first scenario type, the second scenario type, and the third scenario type, where the following occlusion probability of the first scenario type is less than that of the second scenario type, and the following occlusion probability of the second scenario type is less than that of the third scenario type. The probability threshold includes a first probability threshold and a second probability threshold, where the first probability threshold is less than the second probability threshold. If the following occlusion probability of the following scene is less than or equal to the first probability threshold, the following scene is determined to belong to the first scene type. The weights corresponding to the line-of-sight penalty and viewpoint penalty can be reduced according to the first reduction degree, and the weights corresponding to the curvature smoothing penalty and acceleration smoothing penalty can be increased according to the first increase degree. If the following occlusion probability of the following scene is greater than the first probability threshold but less than the second probability threshold, the following scene is determined to belong to the second scene type. The weights corresponding to the line-of-sight penalty and viewpoint penalty can be reduced according to the second reduction degree, and the weights corresponding to the curvature smoothing penalty and acceleration smoothing penalty can be increased according to the second increase degree. Wherein, the first reduction degree is greater than the second reduction degree, and the first increase degree is greater than the second increase degree. If the following occlusion probability of the following scene is greater than or equal to the second probability threshold, the following scene is determined to belong to the third scene type. The weights corresponding to the line-of-sight penalty, viewpoint penalty, velocity matching penalty, and acceleration matching penalty can be increased. Simultaneously, the weights corresponding to the curvature smoothing penalty and acceleration smoothing penalty can be reduced. Alternatively, the weights corresponding to the curvature smoothing penalty and acceleration smoothing penalty can remain unchanged.
[0100] For example, if the probability of occlusion in a following scenario is less than or equal to a probability threshold, the following scenario belongs to the first scenario type. Then, based on the basic weights, the weights corresponding to the line-of-sight penalty and viewpoint penalty are reduced, while the weights corresponding to the curvature smoothing penalty and acceleration smoothing penalty are increased. It is easy to understand that in following scenarios with a low probability of occlusion, the focus on the penalty values corresponding to anti-occlusion penalty items can be reduced, while improving the smoothness of the following trajectory. That is, the weights corresponding to the line-of-sight penalty and viewpoint penalty can be reduced, while the weights corresponding to the curvature smoothing penalty and acceleration smoothing penalty are increased. This enables smooth following while ensuring the following target is not easily occluded by obstacles, thus improving the stability of target following. The first scenario type can be a scenario with open space, few obstacles, or easily predictable paths, such as a following scenario where a robot follows an inspection person carrying tools and equipment in a vast farmland, pasture, or photovoltaic power station, or a following scenario where a robot follows its owner to move items in a spacious living room or corridor. If the probability of occlusion in a following scenario exceeds a certain threshold, the scenario falls under the second scenario type. In this case, the weights of line-of-sight (LOS) penalties, viewpoint penalties, velocity matching penalties, and acceleration matching penalties are increased on top of the base weights. This is easily understood: for scenarios with a high probability of occlusion, it's necessary to increase the weights of the penalties related to anti-occlusion measures, i.e., increase the weights of LOS penalties, viewpoint penalties, velocity matching penalties, and acceleration matching penalties, to prevent the target from being lost due to occlusion. The second scenario type can be scenarios with confined spaces, numerous obstacles, or many unexpected situations, such as train stations, high-speed rail stations, or subway station halls during peak hours, shopping malls or centers with high passenger flow, or following scenarios at large exhibitions and conferences.
[0101] It should be noted that, in this embodiment, apart from adjusting the penalty value corresponding to the weight, the weights corresponding to other penalty values can remain unchanged or be adjusted. There are no specific restrictions here, and the choice can be made according to the actual application scenario.
[0102] In this embodiment, when the following scenario belongs to the first scenario type, the weights corresponding to the line-of-sight penalty and view penalty are reduced, while the weights corresponding to the curvature smoothing penalty and acceleration smoothing penalty are increased. This reduces the constraint on occlusion penalty terms (i.e., line-of-sight penalty and view penalty) in low-occlusion scenarios, strengthens the constraint on following smoothness, and improves following stability while avoiding occlusion. When the following scenario belongs to the second scenario type, the line-of-sight penalty, view penalty, velocity matching penalty, and acceleration matching penalty are increased. This strengthens the constraint on occlusion penalty terms in high-occlusion scenarios, maintaining a good tracking distance and tracking field of view, avoiding target loss under occlusion, and improving target following accuracy.
[0103] In some embodiments, if the variance of the moving speed or the variance of the moving distance between the mobile robot and the target being followed gradually increases, the weights corresponding to the line-of-sight penalty value and the view penalty value are increased.
[0104] The variance of movement speed refers to the mean of the sum of squares of the differences between the first movement speed of the mobile robot and the second movement speed of the target being followed. The variance of movement distance refers to the mean of the sum of squares of the differences between the first movement distance of the mobile robot and the second movement distance of the target being followed. The variance of movement speed is obtained by measuring the movement speeds of the mobile robot and the target being followed at multiple simultaneous moments, while the variance of movement distance is obtained by measuring the movement distances of the mobile robot and the target being followed over multiple time periods.
[0105] If the variance of the moving speed or the variance of the moving distance between the mobile robot and the target gradually increases, the weights corresponding to the line-of-sight penalty value and the view penalty value are increased. This strengthens the constraint on the occlusion penalty term, avoids the loss of the target due to occlusion, and improves the stability of target following.
[0106] In some embodiments, step 206, determining the target cost value based on at least one of the following: a line-of-sight penalty value, a viewpoint penalty value, a velocity matching penalty value, an acceleration matching penalty value, a curvature smoothing penalty value, or an acceleration smoothing penalty value of the mobile robot, includes:
[0107] The target cost is determined by weighted summation of at least two of the following: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot.
[0108] Alternatively, the target cost can be determined based on any one of the following: the mobile robot's line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value.
[0109] It's easy to understand that the penalty items can be selected based on the actual application scenario. If there are at least two penalty items, the penalty values corresponding to the at least two penalty items can be weighted and summed to obtain the target cost. If there is only one penalty item, the target cost can be determined based on the penalty value corresponding to that penalty item. The weighting factors for the weighted summation can be selected based on the actual application scenario. "At least two" can be, for example, two, three, four, five, or six items.
[0110] In one example, the selected penalty terms include line-of-sight penalty, viewpoint penalty, velocity matching penalty, acceleration matching penalty, curvature smoothing penalty, and acceleration smoothing penalty. The target cost can then be obtained by weighted summing of these penalty values for the corresponding mobile robot. For example, the target cost... The calculation formula is shown in formula (9) below.
[0111] Formula (9)
[0112] The weighted weights W1, W2, W3, W4, W5, and W6 can be adjusted according to the actual application scenario. It should be noted that any weighted weight can be 0, 1, or a value greater than 1.
[0113] In one example, if the selected penalty term includes any one of the following: line-of-sight penalty term, view penalty term, velocity matching penalty term, acceleration matching penalty term, curvature smoothing penalty term, or acceleration smoothing penalty term, then the penalty value corresponding to the selected penalty term can be used as the target cost.
[0114] In this embodiment, the target cost value is obtained by weighted summing at least two of the following: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, and acceleration smoothing penalty value of the mobile robot. Alternatively, the target cost value can be determined based on any one of the penalty values. This allows for determining the target cost value based on the penalty values corresponding to different numbers of penalty items, providing a method for determining the target cost value corresponding to different penalty items in different application scenarios. Simultaneously, it enables multi-faceted constraints on the mobile robot's following, improving the stability and accuracy of target following. Furthermore, by weighting each constraint item, adjustments to the weighting weights allow for flexible adaptation to target following in different application scenarios, increasing scenario adaptability.
[0115] In one exemplary embodiment, such as Figure 3 As shown, the method for adjusting the following path of a mobile robot includes the following steps 302 to 320.
[0116] Step 302: Obtain the first moving position of the mobile robot and the second moving position of the target being followed; wherein the first moving position and the second moving position are the moving positions at the same time.
[0117] Step 304: Determine the first distance between the line connecting the first and second moving positions and the nearest obstacle, and determine the line-of-sight penalty value based on the first distance and the intensity penalty factor.
[0118] Step 306: Determine the second distance between the first moving position and the second moving position, and determine the view penalty value based on the second distance and the preset distance range; wherein, the preset distance range is determined based on the movement speed of the target being followed.
[0119] Step 308: Obtain the first moving speed of the mobile robot and the second moving speed of the target being followed, and determine the speed matching penalty value of the mobile robot based on the relative error between the first moving speed and the second moving speed.
[0120] Step 310: Obtain the first moving acceleration of the mobile robot and the second moving acceleration of the target being followed, and determine the acceleration matching penalty value of the mobile robot based on the relative error between the first moving acceleration and the second moving acceleration.
[0121] Step 312: Obtain the curvature corresponding to different trajectory segments in the mobile robot's movement trajectory; determine the curvature smoothing penalty value based on the curvature changes of different trajectory segments.
[0122] Step 314: Obtain the acceleration at different times during the movement of the mobile robot, and determine the acceleration smoothing penalty value based on the changes in acceleration at different times.
[0123] Step 316: Determine the scene type of the following scene, adjust the basic weights according to the scene type, and obtain the adjusted target weights.
[0124] Step 318: Based on the target weight, the gaze penalty value, view penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value and acceleration smoothing penalty value of the mobile robot are weighted and summed to obtain the target cost value.
[0125] Step 320: If the target value does not meet the preset conditions, adjust the movement path of the mobile robot according to the target value until the target value obtained based on the adjusted movement path meets the preset conditions.
[0126] In the above embodiments, by simultaneously constraining the mobile robot's following gaze, viewpoint, speed synchronization, acceleration synchronization, and the smoothness of its movement trajectory and acceleration, and by making targeted adjustments to the weights according to the scene type, it is possible to actively optimize the following path to maintain the visibility of the following target in the mobile robot's field of vision, avoid the loss of the target when it is obscured by obstacles, maintain the consistency and smoothness of the following, avoid deviating from the movement trajectory of the following target, and improve the accuracy and stability of target following.
[0127] In one example, we will illustrate this by taking the robot following a pedestrian as an example, where the target of the follow is a pedestrian. In the cost function corresponding to the mobile robot's following path adjustment framework, the constraints (i.e., penalty terms) include (1) anti-occlusion view preservation constraints, (2) pedestrian motion synchronization constraints, and (3) dynamic smoothness constraints. The optimization variable is the mobile robot pose sequence Q={q1,q2,…,q N} and the time interval ΔT={Δt1,…,Δt N-1}.in:
[0128] (1) Anti-occlusion viewing angle preservation constraint
[0129] 1.1 Line of sight maintenance items (i.e., line of sight penalty items)
[0130] Forced movement of robot trajectory point q i With pedestrian position p i The lines should avoid obstacles, and the penalty value corresponding to the line-of-sight maintenance item (i.e., line-of-sight penalty value) should be applied. The calculation formula is as follows:
[0131]
[0132] 1.2 Viewpoint safety distance penalty (i.e., viewpoint penalty item)
[0133] Dynamically adjust forward viewing distance: The expected goal is This means that the following distance needs to be constrained within the range of the desired target. If it exceeds this range, a secondary penalty is triggered. This ensures that the mobile robot's trajectory follows the target as closely as possible, maintaining the optimal tracking distance and preventing the target from being lost while avoiding getting too close to it. The penalty value corresponding to the safe viewing distance penalty (i.e., the viewing penalty value) is... The calculation formula is as follows:
[0134]
[0135] (2) Pedestrian movement synchronization constraints
[0136] 2.1 Speed matching item (i.e., speed matching penalty item)
[0137] Constrain the linear velocity v of the mobile robot i The predicted speed of movement of the pedestrian, v p The relative error (i.e., the speed matching penalty value):
[0138]
[0139] This constraint function allows the machine's speed v to be controlled. i Maintain as close as possible to the pedestrian's predicted speed v pKeep close.
[0140] 2.2 Acceleration synchronization term (i.e., acceleration matching penalty term)
[0141] The penalty value corresponding to the acceleration synchronization term (i.e., the acceleration matching penalty value) is used to suppress trajectory jitter caused by rapid acceleration / deceleration of the robot. The calculation formula is shown below;
[0142]
[0143] Among them, a i The acceleration representing the robot's motion; a p This indicates the acceleration of a pedestrian's movement. , i=0,1,2,…,N-1.
[0144] (3) Dynamic smoothness constraint
[0145] 3.1 Curvature continuity penalty (i.e., curvature smoothness penalty term)
[0146] Used to prevent visual deviation caused by sharp turns. The penalty value corresponding to curvature continuity penalty (i.e., curvature smoothing penalty value). The calculation formula is shown below:
[0147]
[0148] Among them, K i Let represent the curvature of the i-th trajectory segment. This constraint aims to ensure that the trajectory maintains the continuity of curvature as much as possible during the following process.
[0149] 3.2 Acceleration smoothness constraint (i.e., acceleration smoothness penalty term)
[0150] The penalty value corresponding to the acceleration smoothness constraint (i.e., the acceleration smoothness penalty value). The calculation formula is shown below.
[0151]
[0152] Multi-objective optimization framework:
[0153] The total cost function integrates all constraint terms, i.e., a weighted sum of all constraint terms, to obtain the target cost. The calculation formula is as follows:
[0154]
[0155] weight w i (i=1,2,3,4,5,6) can be dynamically adjusted according to the scene type.
[0156] For example, in low-occlusion scenarios, w1 and w2 can be reduced, while w5 and w6 can be increased to optimize smoothness. In high-occlusion scenarios, w1 and w2 can be increased to maintain the optimal tracking distance and field of view, avoiding target loss, and w3 and w4 can be increased to enhance motion synchronization, that is, to achieve motion consistency between the robot and the pedestrian.
[0157] For example, through simulation experiments, it was tested that with an obstacle density of 1 obstacle / m², C... los Transforming line-of-sight visibility into a trajectory cost term reduces occlusion risk by 57%. Adapting weights w1 and w2 to pedestrian motion variance reduces trajectory deviation distance by 42%. Curvature continuity constraint C... curv Joint acceleration constraint C jerk While ensuring a stable field of vision, the trajectory length increase is controlled within 8%. This enables the robot to stably follow pedestrians and also allows for adaptation to different following scenarios by adjusting the weights of constraint terms.
[0158] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0159] Based on the same inventive concept, this application also provides a mobile robot following path adjustment device for implementing the mobile robot following path adjustment method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more mobile robot following path adjustment device embodiments provided below can be found in the limitations of the mobile robot following path adjustment method described above, and will not be repeated here.
[0160] In one exemplary embodiment, such as Figure 4As shown, a following path adjustment device 400 for a mobile robot is provided, including: a movement data acquisition module 402, a penalty value determination module 404, a cost value determination module 406, and a movement path adjustment module 408, wherein:
[0161] The mobile data acquisition module 402 is used to acquire the first mobile data of the mobile robot and the second mobile data of the target being followed.
[0162] The penalty value determination module 404 is used to determine at least one of the following penalty values for a mobile robot: line-of-sight penalty value, view penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value, based on the first movement data and / or the second movement data.
[0163] The cost value determination module 406 is used to determine the target cost value based on at least one of the following: line-of-sight penalty value, view penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot.
[0164] The movement path adjustment module 408 is used to adjust the movement path of the mobile robot according to the target value until the target value obtained based on the adjusted movement path meets the preset conditions.
[0165] In some embodiments, the first movement data includes a first movement position, and the second movement data includes a second movement position; the first movement position and the second movement position are movement positions at the same time; the penalty value determination module 404 is further configured to determine a first distance between the line connecting the first movement position and the second movement position and the nearest obstacle; and determine a line-of-sight penalty value based on the first distance and an intensity penalty factor.
[0166] In some embodiments, the first movement data includes a first movement position, and the second movement data includes a second movement position; the first movement position and the second movement position are movement positions at the same time; the penalty value determination module 404 is further configured to determine a second distance between the first movement position and the second movement position; and determine a viewpoint penalty value based on the second distance and a preset distance range; the preset distance range is determined based on the movement speed of the target being followed.
[0167] In some embodiments, the first movement data includes a first movement speed, and the second movement data includes a second movement speed; the penalty value determination module 404 is further configured to determine a speed matching penalty value for the mobile robot based on the relative error between the first movement speed and the second movement speed.
[0168] In some embodiments, the first movement data includes a first movement acceleration, and the second movement data includes a second movement acceleration; the penalty value determination module 404 is further configured to determine an acceleration matching penalty value for the mobile robot based on the relative error between the first movement acceleration and the second movement acceleration.
[0169] In some embodiments, the first movement data includes the movement trajectory; the penalty value determination module 404 is further configured to obtain the curvature corresponding to different trajectory segments of the mobile robot in the movement trajectory; and determine the curvature smoothing penalty value according to the curvature change of different trajectory segments.
[0170] In some embodiments, the penalty value determination module 404 is further configured to determine a curvature smoothing penalty value based on the curvature difference between two adjacent trajectory segments in a continuous preset number of trajectory segments of the mobile robot.
[0171] In some embodiments, the first movement data includes a first movement acceleration; the penalty value determination module 404 is further configured to acquire the first movement acceleration of the mobile robot at different times during the movement process, and determine an acceleration smoothing penalty value based on the changes in the first movement acceleration at different times.
[0172] In some embodiments, the above-mentioned device further includes a scene determination module, used to determine the scene type of the following scene; if the following scene belongs to a first scene type, the weights corresponding to the line-of-sight penalty value and the view penalty value are reduced, and the weights corresponding to the curvature smoothing penalty value and the acceleration smoothing penalty value are increased; if the following scene belongs to a second scene type, the weights corresponding to the line-of-sight penalty value, the view penalty value, the velocity matching penalty value, and the acceleration matching penalty value are increased; the following occlusion probability of the first scene type is less than the following occlusion probability of the second scene type.
[0173] In some embodiments, the cost determination module 406 is further configured to determine the target cost value by weighted summation of at least two of the following: the line-of-sight penalty value, the viewpoint penalty value, the velocity matching penalty value, the acceleration matching penalty value, the curvature smoothing penalty value, or the acceleration smoothing penalty value of the mobile robot; or, to determine the target cost value based on any one of the following: the line-of-sight penalty value, the viewpoint penalty value, the velocity matching penalty value, the acceleration matching penalty value, the curvature smoothing penalty value, or the acceleration smoothing penalty value of the mobile robot.
[0174] The modules in the aforementioned mobile robot's following path adjustment device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0175] In one exemplary embodiment, a robot is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the robot includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The robot's processor provides computational and control capabilities. The robot's memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The robot's database stores data related to the mobile robot's path-following adjustment method. The robot's I / O interfaces are used for exchanging information between the processor and external devices. The robot's communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for adjusting the mobile robot's path.
[0176] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the robot to which the present application is applied. A specific robot may include more or fewer parts than shown in the figure, or combine certain parts, or have different part arrangements.
[0177] In one exemplary embodiment, a robot is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above-described method embodiments.
[0178] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0179] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0180] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0181] Those skilled in the art will understand that 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 non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0182] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0183] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method of adjusting a following path of a mobile robot, characterized by, The method includes: Acquire the first movement data of the mobile robot and the second movement data of the target being followed; Based on the first movement data and the second movement data, the gaze penalty value of the mobile robot is determined; the first movement data includes a first movement position, and the second movement data includes a second movement position; the first movement position and the second movement position are the movement positions at the same time. The target cost is determined based on the line-of-sight penalty value of the mobile robot; The movement path of the mobile robot is adjusted according to the target value until the target value obtained based on the adjusted movement path meets the preset conditions. Determining the gaze penalty value of the mobile robot based on the first movement data and the second movement data includes: Determine a first distance between the line connecting the first and second moving positions and the nearest obstacle; The line-of-sight penalty value is determined based on the ratio of the square of the first distance to the square of the intensity penalty factor; wherein, the intensity penalty factor is used to control the penalty intensity, and the intensity penalty factor is set according to the actual application scenario; The line-of-sight penalty value The calculation formulas include: Where, q i p represents the first move position obtained in the i-th iteration. i This represents the second movement position obtained in the i-th iteration. Indicates the first moving position q i With the second moving position p i The first distance between the line connecting the two points and the nearest obstacle represents the first movement position q. i With the second moving position p i The vertical distance between the line connecting the two objects and the nearest obstacle. The value represents the intensity penalty factor, exp() represents the natural exponential function, and i represents the frequency of mobile data acquisition. i is at least 1 and at most N, where N is a positive integer greater than 1.
2. The method according to claim 1, characterized in that, The method further includes: Based on the first movement data and / or the second movement data, at least one of the following is determined for the mobile robot: viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value; the viewpoint penalty value refers to the viewpoint distance penalty value of the mobile robot, and the greater the viewpoint distance of the mobile robot exceeds the preset safe distance range, the larger the viewpoint penalty value. The target cost value is determined based on at least one of the following: the viewpoint penalty value, the velocity matching penalty value, the acceleration matching penalty value, the curvature smoothing penalty value, or the acceleration smoothing penalty value of the mobile robot.
3. The method according to claim 2, characterized in that, Based on the first movement data and the second movement data, the viewpoint penalty value of the mobile robot is determined, including: Determine a second distance between the first moving position and the second moving position; A viewpoint penalty value is determined based on the second distance and a preset distance range; the preset distance range is determined based on the movement speed of the target being followed.
4. The method according to claim 2, characterized in that, The first movement data includes a first movement speed, and the second movement data includes a second movement speed; based on the first movement data and the second movement data, determining the speed matching penalty value of the mobile robot includes: The speed matching penalty value of the mobile robot is determined based on the relative error between the first moving speed and the second moving speed.
5. The method according to claim 2, characterized in that, The first movement data includes a first movement acceleration, and the second movement data includes a second movement acceleration; based on the first movement data and the second movement data, determining the acceleration matching penalty value of the mobile robot includes: The acceleration matching penalty value of the mobile robot is determined based on the relative error between the first and second moving accelerations.
6. The method according to claim 2, characterized in that, The first movement data includes the movement trajectory; determining the curvature smoothing penalty value of the mobile robot based on the first movement data includes: Obtain the curvature of the mobile robot corresponding to different trajectory segments in the movement trajectory; determine the curvature smoothing penalty value based on the curvature changes of the different trajectory segments.
7. The method according to claim 2, characterized in that, The first movement data includes a first movement acceleration; determining the acceleration smoothing penalty value of the mobile robot based on the first movement data includes: The first acceleration of the mobile robot at different times during its movement is obtained, and the acceleration smoothing penalty value is determined based on the changes in the first acceleration at different times. The acceleration smoothing penalty value The calculation formulas include: Among them, a i a represents the first acceleration of the mobile robot at time i; i+1 This represents the first acceleration of the mobile robot at time i+1; It represents the time difference between adjacent moments.
8. The method according to claim 2, characterized in that, The method further includes: Determine the scene type to follow; If the following scene belongs to the first scene type, reduce the weights corresponding to the line-of-sight penalty value and the view penalty value, and increase the weights corresponding to the curvature smoothing penalty value and the acceleration smoothing penalty value; If the following scene belongs to the second scene type, increase the weights corresponding to the line-of-sight penalty value, the view penalty value, the speed matching penalty value, and the acceleration matching penalty value; the following occlusion probability of the first scene type is less than the following occlusion probability of the second scene type.
9. The method according to claim 2, characterized in that, The target cost is determined based on at least one of the following: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot, including: The target cost is determined by weighted summation of at least two of the following: line-of-sight penalty value, viewpoint penalty value, velocity matching penalty value, acceleration matching penalty value, curvature smoothing penalty value, or acceleration smoothing penalty value of the mobile robot. Alternatively, the target cost value can be determined based on any one of the following: the line-of-sight penalty value, the viewpoint penalty value, the velocity matching penalty value, the acceleration matching penalty value, the curvature smoothing penalty value, or the acceleration smoothing penalty value of the mobile robot.
10. A robot comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.