Robot motion method, device and electronic equipment

By generating and superimposing the follow path and obstacle avoidance path of the robot following the target, the problem of discontinuous obstacle avoidance and high requirements of the sensor system in the existing technology is solved, and the robot's rapid and accurate obstacle avoidance function is realized, reducing the sensor system Required, without map and location support.

CN113485362BActive Publication Date: 2024-12-03MIDEA GRP (SHANGHAI) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110878082.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2024-12-03
Estimated Expiration
2041-07-30

AI Technical Summary

Technical Problem

The pedestrian following function of existing mobile robots lacks effective obstacle avoidance capabilities when encountering obstacles, resulting in high requirements for sensor systems, discontinuous and unclear obstacle avoidance planning, and requires map and positioning support.

Method used

By generating the follow path of the robot following the target, measuring the distance and angle relationship between the robot and the obstacle, generating a potential field function based on these relationships, further generating an obstacle avoidance path, and superimposing the follow path and obstacle avoidance path to generate a walking path, controlling the robot Move according to the walking path to achieve rapid and accurate obstacle avoidance.

Benefits of technology

It realizes the rapid accuracy of the robot's obstacle avoidance function, the continuous clarity of obstacle avoidance planning, and the requirements for the sensor system are low, and map and positioning support are not required.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113485362B_ABST
    Figure CN113485362B_ABST
Patent Text Reader

Abstract

The present invention provides a robot movement method, device and electronic device. The method is used in a scene where a robot follows a target to move, and the scene includes at least one obstacle; the method includes: generating a following path for the robot to follow the target; measuring the distance and angle relationship between the robot and the obstacle; generating a potential field function based on the distance and angle relationship, and generating an obstacle avoidance path for the robot to avoid the obstacle based on the potential field function; generating a walking path for the robot based on the following path and the obstacle avoidance path; and controlling the robot to move according to the walking path. In this way, the robot's obstacle avoidance function can be realized quickly and accurately, the obstacle avoidance planning is continuous and clear, the requirements for the sensor system are low, and no map and positioning are required.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot control, and in particular to a robot motion method, device and electronic equipment. Background Art

[0002] Mobile robots generally have the function of following pedestrians, that is, they lock the position of pedestrians through vision and other technologies and always follow the pedestrians. Among them, the robot needs to have a visual detection system and a motion control system to achieve the pedestrian following function. When there is an obstacle between the robot and the pedestrian during the following movement, if the robot does not have the ability to identify the obstacle and actively avoid it, it will directly hit the obstacle, causing the following movement to stop, and even causing damage to the robot. Therefore, when the robot is doing pedestrian following, it should also have obstacle detection and intelligent obstacle avoidance functions.

[0003] However, the pedestrian following function of existing mobile robots is characterized by single-degree-of-freedom following, long distance of pedestrians, large visual FOV (Field Of View), and generally using UWB (Ultra Wide Band) positioning technology. It is necessary to measure the two boundary points of the obstacle, which places high demands on the robot's sensor system. It is necessary to add a transfer position for obstacle avoidance, and there is no mention of how to resume following the new target position after obstacle avoidance.

[0004] Therefore, the existing automatic obstacle avoidance methods for robots following pedestrians have the disadvantages of high requirements on the sensor system, the need for maps and positioning, and discontinuous and unclear obstacle avoidance planning. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a robot movement method, device and electronic device, which can quickly and accurately realize the robot's obstacle avoidance function, with continuous and clear obstacle avoidance planning, low requirements on the sensor system, and no need for maps and positioning.

[0006] In the first aspect, an embodiment of the present invention provides a robot movement method, which is applied to a scenario in which a robot follows a target to move, and the scene includes at least one obstacle; the method includes: generating a following path for the robot to follow the target; measuring the distance and angle relationship between the robot and the obstacle; generating a potential field function based on the distance and angle relationship, and generating an obstacle avoidance path for the robot to avoid the obstacle based on the potential field function; generating a walking path for the robot based on the following path and the obstacle avoidance path; and controlling the robot to move according to the walking path.

[0007] In a preferred embodiment of the present invention, the step of generating a following path for the robot to follow a target includes: continuously acquiring the coordinates of the target in the robot coordinate system during the movement of the robot; and generating a following path for the robot to follow the target based on the acquired coordinates in multiple robot coordinate systems.

[0008] In a preferred embodiment of the present invention, the step of continuously acquiring the coordinates of the target in the robot coordinate system during the movement of the robot includes: acquiring the coordinates of the target in the camera coordinate system through the camera module of the robot during the movement of the robot; performing coordinate conversion on the coordinates in the camera coordinate system to obtain the coordinates of the target in the robot coordinate system.

[0009] In a preferred embodiment of the present invention, the step of generating a following path for the robot to follow the target based on the coordinates in the acquired multiple robot coordinate systems includes: generating a following path for the robot to follow the target by the following formula: p1=pr(Xr,Yr)+p(X,Y)-Ds; wherein p1 is the following path, pr is the real-time path of the robot, and the coordinates are (Xr,Yr); p is the path of the target relative to the robot, and the coordinates are (X,Y); and Ds is the preset safety distance between the robot and the target.

[0010] In a preferred embodiment of the present invention, the method for measuring the distance between the robot and an obstacle comprises: measuring the shortest distance between the outer contour of the robot and the outer contour of the obstacle by an obstacle detection sensor of the robot as the distance between the robot and the obstacle.

[0011] In a preferred embodiment of the present invention, the above-mentioned angle relationship includes: the angle between the line of the shortest distance between the robot and the obstacle and the X-axis when the robot contacts the obstacle.

[0012] In a preferred embodiment of the present invention, the step of generating a potential field function based on the distance and angle relationship comprises: generating the potential field function by the following formula: Among them, f x 、f y and f rz is the potential field function in all directions; k x (d), k y (d), k rz (d) are all pre-set functions with d as the variable, which are used to characterize the strength of the potential field in each direction; d is the distance; θ is the angle between the line connecting the robot and the obstacle and the X-axis when the robot contacts the obstacle; d0 is the preset threshold of the obstacle avoidance distance from the robot to the obstacle.

[0013] In a preferred embodiment of the present invention, the step of generating an obstacle avoidance path for the robot to avoid obstacles based on the potential field function includes: generating the obstacle avoidance path by the following formula or, Among them, p2 is the obstacle avoidance path; The line representing the shortest distance between the robot's outer contour and the outer contour of the obstacle.

[0014] In a preferred embodiment of the present invention, the step of generating the walking path of the robot based on the following path and the obstacle avoidance path includes: superimposing the following path and the obstacle avoidance path to obtain the walking path of the robot.

[0015] In a preferred embodiment of the present invention, the step of controlling the robot to move according to the walking path includes: controlling the position loop and the speed loop of the robot to make the robot move according to the walking path.

[0016] In the second aspect, an embodiment of the present invention also provides a robot motion device, which is applied to a scenario in which a robot follows a target for movement, and the scene includes at least one obstacle; the device includes: a following path generation module, which is used to generate a following path for the robot to follow the target; an obstacle detection module, which is used to measure the distance and angle relationship between the robot and the obstacle; an obstacle avoidance path generation module, which is used to generate a potential field function based on the distance and angle relationship, and generate an obstacle avoidance path for the robot to avoid obstacles based on the potential field function; a walking path generation module, which is used to generate a walking path for the robot based on the following path and the obstacle avoidance path; and a robot motion module, which is used to control the robot to move according to the walking path.

[0017] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the above-mentioned robot motion method.

[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the steps of the above-mentioned robot motion method.

[0019] The embodiments of the present invention bring the following beneficial effects:

[0020] The embodiment of the present invention provides a robot motion method, device and electronic device, which first generates a following path for the robot to follow a target, then measures the distance and angle relationship between the robot and the obstacle, generates an obstacle avoidance path for the robot to avoid the obstacle based on the measurement results, and finally generates a walking path for the robot based on the following path and the obstacle avoidance path, and controls the robot to move according to the walking path. In this way, the robot's obstacle avoidance function can be realized quickly and accurately, the obstacle avoidance planning is continuous and clear, the requirements for the sensor system are low, and no map and positioning are required.

[0021] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0022] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0024] Figure 1 A flowchart of a robot motion method provided by an embodiment of the present invention;

[0025] Figure 2 A flowchart of another robot motion method provided by an embodiment of the present invention;

[0026] Figure 3 A schematic diagram of a robot following and obstacle avoidance system provided by an embodiment of the present invention;

[0027] Figure 4 A schematic diagram of a robot following and obstacle avoidance motion control principle provided by an embodiment of the present invention;

[0028] Figure 5 A schematic diagram of a robot obstacle detection and avoidance provided by an embodiment of the present invention;

[0029] Figure 6 A schematic diagram of a control principle provided by an embodiment of the present invention;

[0030] Figure 7 A schematic diagram of another control principle provided by an embodiment of the present invention;

[0031] Figure 8 A schematic diagram of another control principle provided by an embodiment of the present invention;

[0032] Fig. 9 A schematic diagram of another control principle provided by an embodiment of the present invention;

[0033] Fig.10 A schematic diagram of the structure of a robot motion device provided by an embodiment of the present invention;

[0034] Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0036] At present, the pedestrian following function of existing mobile robots is characterized by single-degree-of-freedom following, a long distance from the pedestrian, a large visual FOV (Field Of View), and generally uses UWB (Ultra Wide Band) positioning technology. It is necessary to measure the two boundary points of the obstacle, which places high demands on the robot's sensor system. It is necessary to add a transfer position for obstacle avoidance, and there is no mention of how to resume following the new target position after obstacle avoidance. Therefore, the existing robot's automatic obstacle avoidance method for pedestrian following has the disadvantages of high requirements on the sensor system, the need for maps and positioning, and discontinuous and unclear obstacle avoidance planning.

[0037] Based on this, the embodiments of the present invention provide a robot motion method, device and electronic device. The technology can be applied to a robot system, and specifically relates to a method for a service robot to automatically avoid obstacles when following pedestrians continuously and smoothly. The technology can be implemented using corresponding software and hardware. The embodiments of the present invention are described in detail below.

[0038] To facilitate understanding of this embodiment, a robot motion method disclosed in an embodiment of the present invention is first introduced in detail.

[0039] Embodiment 1:

[0040] This embodiment provides a robot motion method, which is applied to a scene where the robot follows a target and moves, and the scene includes at least one obstacle. Figure 1 A flow chart of a robot motion method is shown, the robot motion method comprises the following steps:

[0041] Step S102, generating a following path for the robot to follow the target.

[0042] The robot in this embodiment can be understood as a device with a target following function, such as various types of service robots. The target of this embodiment can be a person or an object. This embodiment will take a person as an example and will not be repeated hereafter. The following path is used for the robot to follow the target, which can be understood as the path that the robot takes to move toward the target. The following path does not consider whether there are obstacles in the path, that is, the robot will not avoid obstacles. If the robot follows the target along the following path, and there are obstacles in the following path, the robot is likely to collide with the obstacle. Therefore, the robot also needs to perform obstacle avoidance movements according to the position of the obstacle.

[0043] Step S104, measuring the distance and angle relationship between the robot and the obstacle.

[0044] The robot has a variety of built-in sensors, which can sense horizontal obstacles and measure the distance and angle between the robot and the obstacle. The above distance can be understood as the horizontal distance between the robot shell and the obstacle shell. When measuring, the above distance is generally expressed in the form of a vector in the coordinate system. Therefore, the angle between the above vector and each coordinate axis in the coordinate system can be determined as the angle relationship between the robot and the obstacle.

[0045] Step S106, generating a potential field function based on the relationship between the distance and the angle, and generating an obstacle avoidance path for the robot to avoid obstacles based on the potential field function.

[0046] Based on the above distance and angle relationship, a potential field function can be constructed. In this embodiment, the above distance and angle relationship can be used as the input of the potential field function, and the obstacle avoidance path can be used as the output of the potential field function. The obstacle avoidance path can refer to the path adjusted by the robot to avoid obstacles, that is, the robot can avoid obstacles by moving along the obstacle avoidance path.

[0047] Step S108: Generate a walking path for the robot based on the following path and the obstacle avoidance path.

[0048] The following path enables the robot to follow the target, and the obstacle avoidance path enables the robot to avoid obstacles. The walking path of the robot is generated based on the following path and the obstacle avoidance path. The walking path enables the robot to follow the target and avoid obstacles.

[0049] Step S110, controlling the robot to move according to the walking path.

[0050] The robot in this embodiment can be a head-fixed robot or a head-free moving robot. For a head-fixed robot, the robot chassis motion module can be controlled to make the robot move along the walking path. For a head-free moving robot, the chassis motion and the head motion module can be controlled to make the robot move along the walking path.

[0051] The embodiment of the present invention provides a robot motion method, which first generates a following path for the robot to follow a target, then measures the distance and angle relationship between the robot and the obstacle, generates an obstacle avoidance path for the robot to avoid the obstacle based on the measurement results, and finally generates a walking path for the robot based on the following path and the obstacle avoidance path, and controls the robot to move according to the walking path. In this way, the robot's obstacle avoidance function can be realized quickly and accurately, the obstacle avoidance planning is continuous and clear, the requirements for the sensor system are low, and no map and positioning are required.

[0052] Embodiment 2:

[0053] The embodiment provides another robot motion method, which is implemented on the basis of the above embodiment; this embodiment focuses on describing a specific implementation method for generating a following path for the robot to follow a target. Figure 2 The flowchart of another robot motion method shown in FIG. 1 is a flow chart of another robot motion method, and the robot motion method in this embodiment includes the following steps:

[0054] Step S202: During the movement of the robot, the coordinates of the target in the robot coordinate system are continuously acquired.

[0055] The solution provided in this embodiment can be used to realize the function of a robot following pedestrians visually in an indoor environment, involving visual detection technology, path planning technology, motion control technology and intelligent obstacle avoidance technology. Figure 3 A schematic diagram of a robot following and obstacle avoidance system is shown. The robot following and obstacle avoidance system of this embodiment may include at least the following modules: a visual detection module, a decision planning module, an obstacle detection module, an intelligent obstacle avoidance module, a motion synthesis module, and a motion control module.

[0056] like Figure 3 As shown, the visual detection module includes a camera group for detecting pedestrians. However, the coordinates collected by the camera group are coordinates in the camera coordinate system, not in the robot coordinate system. Therefore, coordinate conversion is required. For example, during the movement of the robot, the coordinates of the target in the camera coordinate system are obtained through the robot's camera module; the coordinates in the camera coordinate system are converted to obtain the coordinates of the target in the robot coordinate system.

[0057] The camera module detects the target pedestrian, locks and follows the target based on the pedestrian's features (such as face, body height and width, etc.), and continuously calculates the target's coordinates xyz in the camera coordinate system, where z represents the spatial distance between the target and the camera. It should be noted here that the z-axis in the camera coordinate system is horizontal and points straight ahead; the xy plane is the outer surface of the camera, and the camera is usually facing forward, so the xy plane is a plane perpendicular to the ground. In the robot coordinate system, the z-axis represents the height and is in the vertical direction, while the xy plane is a plane parallel to the ground.

[0058] Determine the transformation relationship between the camera coordinate system and the robot coordinate system, that is, the coordinates of the origin of the camera coordinate system in the robot coordinate system, which can be determined by design values ​​or calibrated by a special calibration method. With the above coordinate system transformation relationship, the conversion from the local coordinates of the lens to the global coordinates of the robot can be realized.

[0059] Step S204: generating a following path for the robot to follow the target based on the acquired coordinates in the plurality of robot coordinate systems.

[0060] like Figure 3 As shown in the figure, the decision-making planning module can have the following three functions: 1) control the start and stop of the pedestrian following function; 2) convert the coordinates xyz in the camera coordinate system output by the visual detection module into the coordinates XYZ in the robot coordinate system; 3) plan a smooth following path p1 based on the continuously generated XYZ coordinates to move towards the target pedestrian. Among them, the Z coordinate is not considered for planar motion. When the robot can move omnidirectionally, p1 contains coordinates X and Y. When the robot cannot move omnidirectionally, such as in differential drive mode, p1 contains coordinates X and Rz, and the rotation coordinate Rz is calculated from XY.

[0061] The following path of the robot following the target can be generated by the following formula: p1=pr(Xr,Yr)+p(X,Y)-Ds; p1 is the following path, pr is the real-time path of the robot, and the coordinates are (Xr,Yr); p is the path of the target relative to the robot, and the coordinates are (X,Y); Ds is the preset safety distance between the robot and the target.

[0062] The calculation method of the target following path p1 is as follows: In the decision-making planning module, the path of the target pedestrian relative to the robot in the robot coordinate system is recorded as p, and the coordinates of p are the above-mentioned XYZ. The above-mentioned path p is composed of a series of points, each of which has coordinates XYZ. The path in this embodiment is actually a point on the path that is updated in real time. It is not a regular curve, nor can it be represented by a certain function, but is directly represented by XYZ coordinates.

[0063] Taking the omnidirectional mobile robot as an example, the height is not considered, that is, only the XY coordinates are considered, and Z is ignored. Figure 4The schematic diagram of the robot following and obstacle avoidance motion control principle shown in the figure, the accumulated displacement on the robot's real-time path pr is recorded as XrYr, the robot's motion target path is recorded as pd, and the coordinates are XdYd, pd = pr + p, that is, pd (Xd, Yd) = pr (Xr, Yr) + p (X, Y). The time series of pd is constructed based on the time series of p, and XdYd is used as the set value input for the robot's motion. For non-omnidirectional mobile robots, the above XY coordinates are replaced by XRz, where Rz = arctan (Y / X), and the X coordinate is updated to Considering that there is a preset safety distance Ds between the robot and the target pedestrian, when the actual distance is less than Ds, the robot does not follow, and when the actual distance is greater than Ds, the robot follows. Therefore, the motion target value is modified to p1=pd-Ds=pr(Xr,Yr)+p(X,Y)-Ds.

[0064] Step S206, measuring the distance and angle relationship between the robot and the obstacle.

[0065] like Figure 3 As shown, the obstacle detection module includes an obstacle detection sensor, which can sense horizontal obstacles and measure the distance between the robot and the obstacle in real time. Specifically, it measures the shortest distance between the outer contour of the robot and the outer contour of the obstacle. For example, the shortest distance between the outer contour of the robot and the outer contour of the obstacle is measured by the obstacle detection sensor of the robot as the distance between the robot and the obstacle. The obstacle detection sensor can specifically be: 2D laser radar, multiple groups of infrared sensors in a ring layout, multiple groups of ultrasonic sensors in a ring layout, multiple groups of linear laser radar in a ring layout, etc.

[0066] Step S208, generating a potential field function based on the relationship between the distance and the angle, and generating an obstacle avoidance path for the robot to avoid obstacles based on the potential field function.

[0067] like Figure 3 As shown, the intelligent obstacle avoidance module can be used to construct a potential field function, where the angle relationship includes: the angle between the shortest distance between the robot and the obstacle and the X-axis when the robot contacts the obstacle. For example, the input is the obstacle distance obtained by the obstacle detection module, and the angle between the line connecting the robot and the obstacle and the X-axis when the robot contacts the obstacle, and the output is the path p2 adjusted by the robot to avoid the obstacle.

[0068] like Figure 4 As shown, for an omnidirectional mobile robot, p2 contains coordinates X and Y. For a non-omnidirectional mobile robot, p2 contains coordinates X and Rz. In particular, if the displacement in the X direction remains unaffected, the obstacle avoidance function can adjust only one degree of freedom, such as adjusting only the coordinate Y or the angle Rz. The potential field function can be generated by the following formula:

[0069]

[0070] Among them, f x 、f y and f rz is the potential field function in all directions; k x (d), k y (d), k rz (d) are all pre-set functions with d as the variable, which are used to characterize the strength of the potential field in each direction; d is the distance; θ is the angle between the shortest distance line between the robot and the obstacle and the X-axis when the robot contacts the obstacle; d0 is the preset threshold of the obstacle avoidance distance from the robot to the obstacle.

[0071] The calculation method of obstacle avoidance path p2 is as follows: First, define the obstacle detection model. Figure 5 The schematic diagram of a robot obstacle detection and avoidance is shown in FIG. The robot moves in the X-axis direction, the Z-axis is upward, and the Y-axis is defined as a right-hand system. When the robot detects an obstacle, the shortest distance between its outer contour and the outer contour of the obstacle is recorded as The direction is from the obstacle to the robot. The shortest distance changes in real time. The sensor detects once at each moment to determine location. The length of is d, The angle with the X-axis is denoted as θ. The component on the X-axis is rx=d*cosθ, and the component on the Y-axis is ry=d*sinθ.

[0072] The potential field function of this embodiment is also called the obstacle avoidance potential field function. The obstacle avoidance potential field function defines the real-time shortest distance between the robot and the obstacle. The impact on the robot's obstacle avoidance path p2 can be generated by the following formula or, Among them, p2 is the obstacle avoidance path; The line representing the shortest distance between the robot's outer contour and the outer contour of the obstacle.

[0073] Consider 2D obstacle avoidance, that is At the same time, if a potential field is produced on XY or XRz, then:

[0074]

[0075]

[0076] The specific form of the obstacle avoidance potential field function is as follows:

[0077] f x =k x(d)·(sgn(-cosθ)·d·cosθ+d0), |d·cosθ| <d0

[0078] f y =k y (d)·d·sinθ, |d·cosθ| <d0

[0079] f rz =k rz (d)·sinθ / d, |d·cosθ| <d0

[0080] Among them, k x (d),k y (d),k rz (d) is a function with d as the variable, which indicates the strength of the potential field in each direction.

[0081] Among them, d0 is the threshold of the obstacle avoidance distance from the robot to the obstacle, which is a predefined parameter. That is, if the obstacle distance d measured in real time is greater than this parameter d0, the obstacle avoidance function will not be started and normal following will be performed; if the obstacle distance d measured in real time is less than or equal to this parameter d0, the obstacle avoidance function will be started and the obstacle avoidance path p2 will be calculated using the potential field function.

[0082] k x (d),k y (d),k rz (d) is a function with d as the variable, which indicates the strength of the potential field in each direction. These functions need to be debugged in practice to determine the values. By taking some data from actual measurements, a curve is drawn to generate an obstacle avoidance path. According to the degree of deviation of the path from the obstacle, the obstacle avoidance path is determined based on the better obstacle avoidance effect, and then the values ​​of the above three functions are determined.

[0083] In particular, consider 1D obstacle avoidance, that is It only produces a potential field in the Y or Rz direction, but does not affect the X-direction movement displacement. The length d does not need to be measured and calculated, and the angle θ with the X-axis is:

[0084] p2=p2(Y)=f y (d)

[0085] p2=p2(Rz)=f rz (d)

[0086]

[0087] Step S210: generating a walking path of the robot based on the following path and the obstacle avoidance path.

[0088] like Figure 4As shown, the decision-making planning module outputs the target following path p1, the intelligent obstacle avoidance module outputs the obstacle avoidance path p2, and the motion synthesis module can superimpose the following path p1 and the obstacle avoidance path p2 to output the synthetic path p12 of the robot's walking. For example, the following path and the obstacle avoidance path are superimposed to obtain the robot's walking path.

[0089] The following path p1 and the obstacle avoidance path p2 are superimposed to generate the robot's motion target path p12 = p1 + p2, which is input into the motion control system to enable the robot to follow pedestrians and automatically avoid obstacles.

[0090] The above method provided by the embodiment of the present invention can detect the distance of obstacles, generate an obstacle avoidance path through a potential field function, and then superimpose it on an existing target path to output a synthetic path for movement to achieve obstacle avoidance.

[0091] In this method, when an obstacle is found, an obstacle avoidance path is automatically generated and superimposed on the following path, changing the original following path. The closer the distance, the greater the offset, so that the robot can walk around the obstacle. When bypassing the obstacle and moving away from it, the obstacle avoidance offset will automatically decrease until it disappears, and the robot returns to the normal following path and continues to follow the target person. Therefore, there is no need to measure the overall boundary point of the obstacle, only the local range needs to be measured to find the shortest distance within the range.

[0092] Accordingly, the sensor in this embodiment only needs to measure the approximate distance of the obstacle from the robot, and the accuracy and range requirements are not high. No map and positioning functions are required, only the sensor is used to achieve obstacle avoidance and obstacle crossing, follow the target path in real time, and automatically return to the latest target path after avoiding obstacles.

[0093] Step S212, controlling the robot to move according to the walking path.

[0094] like Figure 3 As shown, the motion control module can control the robot to move along the walking path, for example, controlling the position loop and speed loop of the robot to make the robot move along the walking path.

[0095] The motion control module can receive the position setting value and feedback value, and control the robot to move along the set walking path through the PID (Proportion Integration Differentiation) controller. For a robot with a fixed head, this motion control module refers to the robot chassis motion module. For a robot with a freely movable head, this motion control module includes chassis motion and head motion modules.

[0096] The motion control system for the chassis can include two loop controls: the position loop of the chassis body and the speed loop of the wheel drive. The setting value of the body position loop is p12, and the feedback value comes from the position measurement sensor. The setting value of the wheel speed loop comes from the controller output in the position loop, and the feedback value comes from the motor encoder.

[0097] like Figure 4 As shown in the figure, the motion control system is structurally divided into three parts: position loop controller, drive module and sensor position feedback module. The position loop controller includes an axis controller and a kinematic decomposition module. The axis controller is used to adjust the loop gain and is usually implemented by a PID controller. Kinematic decomposition is responsible for decomposing the vehicle body speed into wheel speed. Different drive modes have different kinematic models. The drive module refers to the wheel speed loop controller, and each wheel corresponds to one drive module. The sensor position feedback module includes two parts: sensor signal acquisition and kinematic synthesis. For the chassis, the sensor is the wheel motor encoder and the inertial navigation element on the vehicle body, and for the head, it is the motor encoder. Kinematic synthesis calculates and fuses the original sensor signal to obtain the vehicle body position and posture for position loop calculation.

[0098] Generally, the chassis of the service robot performs planar motion, and the body has 3 degrees of freedom. For the two-wheel differential drive structure, the body control degrees of freedom are reduced to 2. The robot head can have 0 degrees of freedom (no degrees of freedom), 1 degree of freedom (left and right rotation), or 2 degrees of freedom (left and right rotation + pitch rotation). For any combination of chassis and head, the visual following function can be realized by adopting the above control method, and active obstacle avoidance can be achieved at the same time. Among them, chassis: omnidirectional drive structure, two-wheel differential structure; head: 0 (no degrees of freedom), 1 degree of freedom (left and right rotation), 2 degrees of freedom (left and right rotation + pitch rotation), the following is divided into different examples for analysis.

[0099] Example 1: No head freedom + omnidirectional drive structure.

[0100] See also Figure 6 The schematic diagram of a control principle shown in the figure shows that the robot chassis and head are fixed and cannot move relative to each other. The chassis is an omnidirectional drive structure, such as a 3-wheel omnidirectional wheel or a 4-wheel Mecanum wheel. Its movement adopts a hybrid mode - the superposition of the following path and the obstacle avoidance path. Module 1 visually detects the pedestrian xyz, and module 21 converts xyz to the coordinates XYZ in the robot coordinate system. Planar motion only considers XY. Module 22 outputs the following path p1, which includes two degrees of freedom XY. In terms of obstacle avoidance, module 3 detects obstacles in front and calculates the shortest distance between the robot and the obstacle in real time. Module 4 uses 2D obstacle avoidance and calculates the obstacle avoidance path p2 based on the obstacle avoidance potential field function, which includes two degrees of freedom XY.

[0101] In the module 5 synthesizer, the X setting value of the following path p1 and the X setting value of the obstacle avoidance path p2 are superimposed and calculated, and the Y setting value of p1 and the Y setting value of p2 are also superimposed and calculated. The same processing method can be used for the setting value X. Regardless of whether the obstacle avoidance function is activated or not, the X and Y setting values ​​of the following direction are effective.

[0102] Module 6 motion control has two position loops, X-axis and Y-axis, which perform closed-loop control on the X and Y motion trajectories. 611 and 612 are the X-axis and Y-axis controllers respectively, which can be implemented using PID controllers. 613 performs kinematic decomposition to decompose the vehicle body speed into wheel speed. Common omnidirectional drive structures include 3-wheel omnidirectional wheel structures and 4-wheel Mecanum wheel structures. Their decomposition formulas are well known in the industry and are not repeated here. 621~624 are drive modules for 4 Mecanum wheels, which adopt speed loop control mode. 631 Sensor signal acquisition, including drive motor encoder and inertial navigation element on the vehicle body. 632 Kinematic synthesis, calculates the vehicle body position and posture based on the motor encoder value, and then performs data fusion with the inertial navigation element to obtain a more stable vehicle body position and posture. Module 7 is the robot body.

[0103] Example 2: No head freedom + double wheel differential structure.

[0104] See also Figure 7 The schematic diagram of another control principle shown is that the robot chassis and head are fixed and cannot make relative motion. The chassis is a two-wheel differential structure, and its motion adopts a hybrid mode - the superposition of the following path and the obstacle avoidance path.

[0105] Module 1 visually detects pedestrian xyz, and module 21 converts xyz to coordinates XYZ in the robot coordinate system. Planar motion only considers XY. Module 22 outputs the following path p1, which contains two degrees of freedom XRz. Rz is calculated from XY, Rz = arctan (Y / X), and the X coordinate is updated to In terms of obstacle avoidance, module 3 detects obstacles ahead and calculates the shortest distance between the robot and the obstacle in real time. Module 4 uses 2D obstacle avoidance and calculates the obstacle avoidance path p2 based on the obstacle avoidance potential field function, which includes two degrees of freedom XRz.

[0106] In the module 5 synthesizer, the X setting value of the following path p1 and the X setting value of the obstacle avoidance path p2 are superimposed and calculated, and the Rz setting value of p1 and the Rz setting value of p2 are also superimposed and calculated. The same processing method is used for the setting value X. Regardless of whether the obstacle avoidance function is activated or not, the X and Rz setting values ​​of the following direction are effective.

[0107] Module 6 motion control has two position loops, X-axis and Rz-axis, which perform closed-loop control on the X- and Rz-axis motion trajectories. 611 and 612 are the X-axis and Rz-axis controllers, respectively, which can be implemented using PID controllers. 613 performs kinematic decomposition to decompose the vehicle body speed into wheel speed. The decomposition formula of the two-wheel differential drive structure is well known in the industry and will not be repeated here. 621 to 624 are the drive modules of the four Mecanum wheels, which adopt the speed loop control mode. 631 sensor signal acquisition, including the drive motor encoder and the inertial navigation element on the vehicle body. 632 kinematic synthesis, calculates the vehicle body position and posture based on the motor encoder value, and then performs data fusion with the inertial navigation element to obtain a more stable vehicle body position and posture.

[0108] Example 3: One left and right rotational degree of freedom for the head + double-wheel differential structure.

[0109] See also Figure 8 The schematic diagram of another control principle shown in the figure shows that there is one degree of freedom between the robot chassis and the head, the head can rotate left and right, the chassis is a two-wheel differential structure, and its movement adopts a hybrid mode - the superposition of the following path and the obstacle avoidance path.

[0110] The head performs Rz rotation movement, which is a 1-DOF position closed-loop control. Module 1 visually detects pedestrian xyz, and module 21 converts xyz to coordinates XYZ in the robot coordinate system. Planar motion only considers XY. Module 22 outputs the follow path p1, which contains two degrees of freedom XRz. Rz is calculated from XY, Rz = arctan (Y / X), and the X coordinate is updated to Rz is the target follow value, i.e. the head loop setting value. The head loop includes: module 81 Rz axis controller, module 82 drive module, module 83 Rz motor angle feedback. Module 9 is the robot head.

[0111] As for the chassis, its control method is similar to that of Example 2, except that: 1) before the synthesizer of module 5, the Rz setting value is the sum of the Rz setting value of the following path p1 and the Rz setting value of the obstacle avoidance path p2; 2) in the synthesizer, similar to Examples 1 and 2, X and Rz are both superimposed and processed in the same way to output new X and Rz as the loop setting values ​​of the X axis and Rz axis.

[0112] In this example, the robot head can follow the pedestrian in real time. When the chassis moves, if there is no obstacle, the Rz angle will be adjusted in real time to follow the pedestrian; when encountering an obstacle, the Rz angle will be automatically adjusted to avoid the obstacle, while keeping the head facing the pedestrian and following the pedestrian. After the obstacle is passed, it will automatically return to the original Rz angle (most of the time it is 0) and continue to follow the movement.

[0113] Example 4: 1 head rotation left and right + 1 up and down rotation + double wheel differential structure.

[0114] See also Fig. 9 The schematic diagram of another control principle shown in the figure shows that there are two degrees of freedom between the robot chassis and the head. The head can rotate left and right and up and down. The chassis is a two-wheel differential structure, and its movement adopts a hybrid mode - the superposition of the following path and the obstacle avoidance path.

[0115] The head performs Ry and Rz rotational motions, which is a 2-DOF position closed-loop control. Module 1 visually detects pedestrian xyz, and module 21 converts xyz to coordinates XYZ in the robot coordinate system. In this example, 3D motion is considered. Module 22 outputs the following path p1, which contains two degrees of freedom XRyRz. Ry is calculated from XZ, Ry = arctan (X / Z); Rz is calculated from XY, Rz = arctan (Y / X), and the X coordinate is updated to Ry and Rz are target follow values, i.e., head loop set values. The head loop includes: module 81 Rz axis controller, module 82 drive module, module 83 Rz motor angle feedback, module 84 Ry axis controller, module 85 drive module, module 86 Ry motor angle feedback. Module 9 is the robot head.

[0116] In terms of chassis, its control method is similar to that in Example 3. In this example, the robot head can follow the pedestrian in real time, including adjusting the angle left and right and up and down. When the chassis moves, when there are no obstacles, the Rz angle will be adjusted in real time to follow the pedestrian; when encountering obstacles, the Rz angle will be automatically adjusted to avoid obstacles, while keeping the head facing the pedestrian and following the pedestrian. After the obstacle is passed, it will automatically return to the original Rz angle (most of the time it is 0) and continue to follow the movement.

[0117] Embodiment three:

[0118] Corresponding to the above method embodiment, the embodiment of the present invention provides a robot motion device, which is applied to a scene where the robot follows a target to move, and the scene includes at least one obstacle. Fig.10 A schematic diagram of the structure of a robot motion device is shown, the robot motion device comprises:

[0119] A following path generation module 1001 is used to generate a following path for the robot to follow a target;

[0120] The obstacle detection module 1002 is used to measure the distance and angle relationship between the robot and the obstacle;

[0121] The obstacle avoidance path generation module 1003 is used to generate a potential field function based on the distance and angle relationship, and to generate an obstacle avoidance path for the robot to avoid obstacles based on the potential field function;

[0122] A walking path generation module 1004, used to generate a walking path of the robot based on the following path and the obstacle avoidance path;

[0123] The robot movement module 1005 is used to control the robot to move according to the walking path.

[0124] The embodiment of the present invention provides a robot motion device, which first generates a following path for the robot to follow a target, then measures the distance and angle relationship between the robot and the obstacle, generates an obstacle avoidance path for the robot to avoid the obstacle based on the measurement results, and finally generates a walking path for the robot based on the following path and the obstacle avoidance path, and controls the robot to move according to the walking path. In this way, the robot's obstacle avoidance function can be realized quickly and accurately, the obstacle avoidance planning is continuous and clear, the requirements for the sensor system are low, and no map and positioning are required.

[0125] The following path generation module is used to continuously obtain the coordinates of the target in the robot coordinate system during the movement of the robot; and generate a following path for the robot to follow the target based on the obtained coordinates in multiple robot coordinate systems.

[0126] The above-mentioned following path generation module is used to obtain the coordinates of the target in the camera coordinate system through the robot's camera module during the movement of the robot; and to perform coordinate conversion on the coordinates in the camera coordinate system to obtain the coordinates of the target in the robot coordinate system.

[0127] The above-mentioned following path generation module is used to generate a following path for the robot to follow the target through the following formula: p1=pr(Xr,Yr)+p(X,Y)-Ds; wherein p1 is the following path, pr is the real-time path of the robot, and the coordinates are (Xr,Yr); p is the path of the target relative to the robot, and the coordinates are (X,Y); Ds is the preset safety distance between the robot and the target.

[0128] The obstacle detection module is used to measure the shortest distance between the outer contour of the robot and the outer contour of the obstacle through the obstacle detection sensor of the robot as the distance between the robot and the obstacle.

[0129] The above-mentioned angle relationship includes: the angle between the shortest distance line between the robot and the obstacle and the X-axis when the robot contacts the obstacle.

[0130] The above obstacle avoidance path generation module is used to generate a potential field function through the following formula:

[0131]

[0132] Among them, f x 、f y and f rz is the potential field function in all directions; kx (d), k y (d), k rz (d) are all pre-set functions with d as the variable, which are used to characterize the strength of the potential field in each direction; d is the distance; θ is the angle between the line connecting the robot and the obstacle and the X-axis when the robot contacts the obstacle; d0 is the preset threshold of the obstacle avoidance distance from the robot to the obstacle.

[0133] The above obstacle avoidance path generation module is used to generate an obstacle avoidance path through the following formula or, Among them, p2 is the obstacle avoidance path; The line representing the shortest distance between the robot's outer contour and the outer contour of the obstacle.

[0134] The walking path generation module is used to superimpose the following path and the obstacle avoidance path to obtain the walking path of the robot.

[0135] The robot motion module is used to control the position loop and speed loop of the robot so that the robot moves according to the walking path.

[0136] The robot motion device provided in the embodiment of the present invention has the same implementation principle and technical effects as those in the aforementioned robot motion method embodiment. For the sake of brief description, for matters not mentioned in the robot motion device embodiment, reference may be made to the corresponding contents in the aforementioned robot motion method embodiment.

[0137] The embodiment of the present invention also provides an electronic device for executing the above robot motion method; see Fig.11 A structural schematic diagram of an electronic device is shown, which includes a memory 100 and a processor 101, wherein the memory 100 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 101 to implement the above-mentioned robot motion method.

[0138] Further, Fig.11 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 101 , the communication interface 103 and the memory 100 are connected via the bus 102 .

[0139] The memory 100 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0140] The processor 101 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 101. The above processor 101 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 100, and the processor 101 reads the information in the memory 100 and completes the steps of the method of the above embodiment in combination with its hardware.

[0141] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned robot motion method. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0142] The computer program products of the robot motion method, device and electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.

[0143] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and / or device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0144] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the term "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0145] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0146] In the description of the present invention, it should be noted that the terms “first”, “second” and “third” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0147] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A robot motion method, characterized in that: Applicable to a scenario where a robot follows a target, the scenario including at least one obstacle; the method comprising: generating a following path for the robot to follow the target; measuring the distance and angle relationship between the robot and the obstacle; generating a potential field function based on the distance and the angle relationship, and generating an obstacle avoidance path for the robot to avoid the obstacle based on the potential field function; Superimposing the following path and the obstacle avoidance path to obtain a walking path of the robot; Controlling the robot to move along the walking path; The angular relationship includes: the angle between the line connecting the shortest distance between the robot and the obstacle and the X-axis when the robot contacts the obstacle; the step of generating a potential field function based on the distance and the angular relationship includes: generating the potential field function using the following formula: Among them, f x 、f y and f rz is the potential field function in each direction; k x (d), k y (d), k rz (d) is a pre-set function with d as the variable, used to characterize the strength of the potential field in each direction; d is the distance; θ is the angle between the line connecting the shortest distance between the robot and the obstacle and the X-axis when the robot contacts the obstacle; d0 is the preset threshold value of the obstacle avoidance distance from the robot to the obstacle.

2. The method according to claim 1, characterized in that The step of generating a following path for the robot to follow the target comprises: During the movement of the robot, continuously acquiring the coordinates of the target in the robot coordinate system; A following path for the robot to follow the target is generated based on the acquired coordinates in the robot coordinate system.

3. The method according to claim 2, characterized in that During the movement of the robot, the step of continuously acquiring the coordinates of the target in the robot coordinate system includes: During the movement of the robot, the coordinates of the target in the camera coordinate system are acquired through the camera module of the robot; The coordinates in the camera coordinate system are transformed to obtain the coordinates of the target in the robot coordinate system.

4. The method according to claim 2, characterized in that The step of generating a following path for the robot to follow the target based on the acquired coordinates in the plurality of robot coordinate systems comprises: The following path of the robot following the target is generated by the following formula: p1=pr(Xr,Yr)+p(X,Y)-Ds; wherein p1 is the following path, pr is the real-time path of the robot, and the coordinates are (Xr,Yr); p is the path of the target relative to the robot, and the coordinates are (X,Y); Ds is the preset safety distance between the robot and the target.

5. The method according to claim 1, wherein The method for measuring the distance between the robot and the obstacle comprises: The shortest distance between the outer contour of the robot and the outer contour of the obstacle is measured by the obstacle detection sensor of the robot as the distance between the robot and the obstacle.

6. The method according to claim 1, characterized in that The step of generating an obstacle avoidance path for the robot to avoid the obstacle based on the potential field function comprises: Generate an obstacle avoidance path using the following formula or, Wherein, p2 is the obstacle avoidance path; The line representing the shortest distance between the outer contour of the robot and the outer contour of the obstacle.

7. The method according to claim 1, characterized in that The step of controlling the robot to move according to the walking path includes: The position loop and the speed loop of the robot are controlled so that the robot moves according to the walking path.

8. A robot motion device, characterized in that: Applicable to a scenario where a robot follows a target, wherein the scenario includes at least one obstacle; the device comprises: A following path generating module, configured to generate a following path for the robot to follow the target; An obstacle detection module, configured to measure the distance and angle between the robot and the obstacle; an obstacle avoidance path generating module, configured to generate a potential field function based on the relationship between the distance and the angle, and generate an obstacle avoidance path for the robot to avoid the obstacle based on the potential field function; A walking path generation module, configured to superimpose the following path and the obstacle avoidance path to obtain a walking path for the robot; A robot motion module, used to control the robot to move along the walking path; The angle relationship includes: the angle between the line connecting the shortest distance between the robot and the obstacle and the X-axis when the robot contacts the obstacle; the obstacle avoidance path generation module is used to generate a potential field function using the following formula: Among them, f x 、f y and f rz is the potential field function in each direction; k x (d), k y (d), k rz (d) is a pre-set function with d as the variable, used to characterize the strength of the potential field in each direction; d is the distance; θ is the angle between the line connecting the shortest distance between the robot and the obstacle and the X-axis when the robot contacts the obstacle; d0 is the preset threshold value of the obstacle avoidance distance from the robot to the obstacle.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the robot motion method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the steps of the robot motion method according to any one of claims 1 to 7.