Pedestrian target following method, device, electronic device and readable storage medium
The three-base station positioning method is used to calculate the following distance and angle, select the main target and switch the following mode, which solves the problem of the following robot being unable to turn and follow under special working conditions, and improves the following accuracy and flexibility.
Patent Information
- Application Number
- CN202210548791.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-20
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-05-20
AI Technical Summary
Existing following robots cannot effectively turn to follow pedestrian targets under special working conditions, such as narrow passages, resulting in low following flexibility.
The three-base station positioning method is used to determine the following distance and angle. The following distance and angle are calculated through the auxiliary positioning point and the main positioning point. The main target is selected, and the following mode is switched according to the following angle. The four driving wheels are flexibly used to achieve positioning and turning without blind spots. time to follow.
It improves the following accuracy and flexibility of the following robot under special working conditions, and can switch the following mode in narrow passages to complete related social production activities.
Smart Images

Figure CN114928813B
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics, and in particular to a pedestrian target following method, device, electronic device and readable storage medium. Background Art
[0002] With the rapid development of intelligent technology, the field of robotics has also made great progress. Among them, following robots that can assist pedestrians in completing relevant social production activities have broad application prospects in the service industry, warehousing industry and fast-moving consumer goods industry. At present, following robots usually determine the relative position between themselves and pedestrians through sensor positioning, Bluetooth triangulation positioning and laser positioning technologies, and then assist pedestrians in completing relevant social production activities. However, when encountering some special working conditions, following robots cannot complete the work effectively. For example, in a warehouse channel with only one entrance and exit, when a following robot is needed to complete tasks such as loading and unloading, the following robot cannot turn around in the channel and follow to complete the corresponding work. Therefore, the current following robot has low flexibility in following pedestrian targets. Summary of the invention
[0003] The main purpose of the present application is to provide a pedestrian target following method, device, electronic device and readable storage medium, aiming to solve the technical problem of low flexibility of following robots in following pedestrian targets in the prior art.
[0004] To achieve the above objectives, the present application provides a pedestrian target following method, which is applied to a following robot. The pedestrian target following method comprises:
[0005] Get at least one pedestrian target in the current detection frame;
[0006] Determining a following distance for following each of the pedestrian targets according to a first distance between the auxiliary positioning point and each of the pedestrian targets, wherein the auxiliary positioning point is a center point of an auxiliary positioning base station in a three-base station positioning method;
[0007] Acquire a second distance between the main positioning point and each of the pedestrian targets, and determine a following angle for following each of the pedestrian targets according to the first distance and the second distance, wherein the main positioning point is the center point of the main positioning base station in the three-base station positioning method;
[0008] Selecting a pedestrian main target from the pedestrian targets according to the following distances and the following angles;
[0009] Determining a current following mode of the pedestrian main target according to the following main angle corresponding to the pedestrian main target;
[0010] Whether to switch the current following mode is determined by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames.
[0011] Optionally, the step of determining whether to switch the current following mode by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames includes:
[0012] If the current following mode is the forward following mode, determining whether the following main angle is greater than a preset switching angle threshold within a preset number of detection frames;
[0013] If both are greater than, switching the current following mode to a reverse following mode;
[0014] If the current following mode is the reverse following mode, determining whether the following main angle is less than the preset switching angle threshold within a preset number of detection frames;
[0015] If both are smaller than, the current following mode is switched to the forward following mode.
[0016] Optionally, the auxiliary positioning point includes a first auxiliary positioning point and a second auxiliary positioning point.
[0017] The step of determining the following distance of each pedestrian target according to the first distance between the auxiliary positioning point and each pedestrian target comprises:
[0018] Acquire a third distance between the first auxiliary positioning point and the second auxiliary positioning point;
[0019] A following distance for following each of the pedestrian targets is calculated based on the first distance between the first auxiliary positioning point and each of the pedestrian targets, the first distance between the second auxiliary positioning point and each of the pedestrian targets, and the third distance.
[0020] Optionally, the step of selecting a pedestrian main target from the pedestrian targets according to the following distances and the following angles includes:
[0021] Selecting at least one pedestrian secondary target from each of the pedestrian targets according to the correspondence between each of the following distances and the preset following range;
[0022] By comparing the following angles of the pedestrian secondary targets, the pedestrian primary target is obtained.
[0023] Optionally, after the step of determining whether to switch the current following mode by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames, the pedestrian target following method includes:
[0024] Determining whether the longitudinal following distance of the pedestrian main target is greater than a preset longitudinal following distance threshold;
[0025] If yes, generating a first adjustment command, and adjusting the longitudinal following distance to the preset longitudinal following distance threshold through the first adjustment command;
[0026] If not, a second adjustment command is generated, and the longitudinal following distance is adjusted to the preset longitudinal following distance threshold through the second adjustment command.
[0027] Optionally, after the step of determining whether to switch the current following mode by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames, the pedestrian target following method further includes:
[0028] According to a preset angle mapping table, query the lateral following angle corresponding to the following main angle;
[0029] The pedestrian primary target is followed according to the lateral following angle.
[0030] Optionally, before the step of querying the lateral following angle corresponding to the following main angle according to the preset angle mapping table, the pedestrian target following method further includes:
[0031] Obtaining the following main angles corresponding to different lateral positions of the test pedestrian target and the lateral following angles corresponding to different lateral positions of the test pedestrian target;
[0032] A preset angle mapping table is established according to a one-to-one correspondence between each of the main following angles and each of the lateral following angles.
[0033] To achieve the above-mentioned purpose, the present application further provides a pedestrian target following device, which is applied to a following robot. The pedestrian target following device comprises:
[0034] An acquisition module, used to acquire at least one pedestrian target in the current detection frame;
[0035] A distance determination module, used to determine the following distance of each pedestrian target according to the first distance between the auxiliary positioning point and each pedestrian target, wherein the auxiliary positioning point is the center point of the auxiliary positioning base station in the three-base station positioning method;
[0036] An angle determination module, used to obtain a second distance between the main positioning point and each of the pedestrian targets, and determine a following angle for following each of the pedestrian targets according to the first distance and the second distance, wherein the main positioning point is the center point of the main positioning base station in the three-base station positioning method;
[0037] A selection module, configured to select a pedestrian main target from the pedestrian targets according to the following distances and the following angles;
[0038] A judgment module, used for judging a current following mode of following the pedestrian main target according to a following main angle corresponding to the pedestrian main target;
[0039] The switching module is used to determine whether to switch the current following mode by detecting whether the following main angle meets the preset switching condition within a preset number of detection frames.
[0040] Optionally, the switching module is further used for:
[0041] If the current following mode is the forward following mode, determining whether the following main angle is greater than a preset switching angle threshold within a preset number of detection frames;
[0042] If both are greater than, switching the current following mode to a reverse following mode;
[0043] If the current following mode is the reverse following mode, determining whether the following main angle is less than the preset switching angle threshold within a preset number of detection frames;
[0044] If both are smaller than, the current following mode is switched to the forward following mode.
[0045] Optionally, the auxiliary positioning point includes a first auxiliary positioning point and a second auxiliary positioning point, and the distance determination module is further used to:
[0046] Acquire a third distance between the first auxiliary positioning point and the second auxiliary positioning point;
[0047] A following distance for following each of the pedestrian targets is calculated based on the first distance between the first auxiliary positioning point and each of the pedestrian targets, the first distance between the second auxiliary positioning point and each of the pedestrian targets, and the third distance.
[0048] Optionally, the selection module is further used for:
[0049] Selecting at least one pedestrian secondary target from each of the pedestrian targets according to the correspondence between each of the following distances and the preset following range;
[0050] By comparing the following angles of the pedestrian secondary targets, the pedestrian primary target is obtained.
[0051] Optionally, the pedestrian target following device is further used for:
[0052] Determining whether the longitudinal following distance of the pedestrian main target is greater than a preset longitudinal following distance threshold;
[0053] If yes, generating a first adjustment command, and adjusting the longitudinal following distance to the preset longitudinal following distance threshold through the first adjustment command;
[0054] If not, a second adjustment command is generated, and the longitudinal following distance is adjusted to the preset longitudinal following distance threshold through the second adjustment command.
[0055] Optionally, the pedestrian target following device is further used for:
[0056] According to a preset angle mapping table, query the lateral following angle corresponding to the following main angle;
[0057] The pedestrian primary target is followed according to the lateral following angle.
[0058] Optionally, the pedestrian target following device is further used for:
[0059] Obtaining the following main angles corresponding to different lateral positions of the test pedestrian target and the lateral following angles corresponding to different lateral positions of the test pedestrian target;
[0060] A preset angle mapping table is established according to a one-to-one correspondence between each of the main following angles and each of the lateral following angles.
[0061] The present application also provides an electronic device, which includes: a memory, a processor, and a program of the pedestrian target following method stored in the memory and executable on the processor. When the program of the pedestrian target following method is executed by the processor, the steps of the pedestrian target following method as described above can be implemented.
[0062] The present application also provides a computer-readable storage medium, on which is stored a program for implementing the pedestrian target following method. When the program of the pedestrian target following method is executed by a processor, the steps of the pedestrian target following method as described above are implemented.
[0063] The present application also provides a computer program product, including a computer program, which implements the steps of the pedestrian target following method as described above when executed by a processor.
[0064] The present application provides a pedestrian target following method, device, electronic device and readable storage medium, that is, obtaining at least one pedestrian target in a current detection frame; determining a following distance for following each pedestrian target based on a first distance between an auxiliary positioning point and each of the pedestrian targets, wherein the auxiliary positioning point is the center point of an auxiliary positioning base station in a three-base station positioning method; obtaining a second distance between a main positioning point and each of the pedestrian targets, and determining a following angle for following each of the pedestrian targets based on the first distance and the second distance, wherein the main positioning point is the center point of a main positioning base station in the three-base station positioning method; selecting a pedestrian main target from each of the pedestrian targets based on each of the following distances and each of the following angles; judging a current following mode for following the pedestrian main target based on a following main angle corresponding to the pedestrian main target, and determining whether to switch the current following mode by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames. Since the auxiliary positioning point is used to represent the center point of the auxiliary positioning base station in the three-base station positioning method, and the main positioning point is used to represent the center point of the main positioning base station in the three-base station positioning method, the following robot can be positioned without blind spots, and the four driving wheels of the following robot can be flexibly used through the following angle, so that when the turning radius is too large, the rear axle wheels can be switched to steering wheels to continue to follow the pedestrian target. Therefore, when the following robot encounters a warehouse passage with only one entrance and exit and needs to operate under special working conditions, it can switch the current following mode to achieve the purpose of assisting pedestrians to complete related social production activities. Therefore, the technical defect of the following robot in the prior art that it is limited by the turning radius in some special working conditions and cannot turn to continue to follow the pedestrian target is overcome, thereby improving the accuracy of the following robot in following the pedestrian target. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0066] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0067] Figure 1 This is a flow chart of the first embodiment of the pedestrian target following method of the present application;
[0068] Figure 2 A schematic diagram of a three-base station positioning method in a preset coordinate system for the pedestrian target following method of this application;
[0069] Figure 3This is a flow chart of a second embodiment of the pedestrian target following method of the present application;
[0070] Figure 4 Schematic diagram of the device structure of the hardware operating environment involved in the pedestrian target following method in the embodiment of the present application.
[0071] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0072] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 belong to the scope of protection of the present invention.
[0073] Embodiment 1
[0074] First of all, it should be understood that the follower robot can assist pedestrians in completing relevant social production activities through positioning technology. However, when encountering some special working conditions, the follower robot cannot complete the work effectively. For example, when facing some narrow scenes between channels, if pedestrians need to load and unload goods between channels, the follower robot may not be able to transition from one channel to another due to the limitation of turning radius. Therefore, in order to improve the flexibility of the follower robot in some special working conditions, the robot's size or turning radius and other parameters are usually reduced during the design stage. However, the modification of parameters will lead to a decrease in the number of goods that the follower robot can carry at a time. Therefore, how to improve the flexibility of the follower robot while ensuring the carrying weight and quantity of the follower robot has become an urgent problem to be solved.
[0075] The present application embodiment provides a pedestrian target following method, which is applied to a following robot. In the first embodiment of the pedestrian target following method of the present application, referring to Figure 1 , the pedestrian target following method comprises:
[0076] Step S10, obtaining at least one pedestrian target in the current detection frame;
[0077] Step S20, determining a following distance for following each of the pedestrian targets according to a first distance between the auxiliary positioning point and each of the pedestrian targets, wherein the auxiliary positioning point is a center point of an auxiliary positioning base station in a three-base station positioning method;
[0078] In this embodiment, it should be noted that the follower robot is provided with a UWB (Ultra Wide Band) radio frequency signal directional base station, and the follower robot has four driving wheels, wherein each driving wheel can achieve 360° steering, and the current detection frame can be captured by the UWB (Ultra Wide Band) radio frequency signal directional base station set on the follower robot, and the pedestrian target is a pedestrian carrying a UWB tag. In actual application scenarios, there may be multiple staff members carrying UWB tags in the same working area, that is, there may be multiple pedestrian targets under the current detection frame.
[0079] In addition, it should be noted that the pedestrian target following method of the present application adopts a three-base station positioning method to determine the relative distance between the following robot and the pedestrian target, that is, three UWB base stations are arranged on the following robot, wherein the three UWB base stations are located on the same plane, and the relative distance between the following robot and the pedestrian target can be obtained by the relative distance between the center points of the three base stations and the pedestrian target respectively, wherein the auxiliary positioning point is the center point of the auxiliary positioning base station in the three-base station positioning method, and the following distance is used to characterize the relative distance of the following robot following the corresponding pedestrian target. In an implementable manner, the following distance can be the relative distance between the midpoint of the first auxiliary positioning point and the second auxiliary positioning point and the projection point of the pedestrian target on the three-base station plane.
[0080] As an example, steps S10 to S20 include: obtaining at least one pedestrian target in the current detection frame; determining the relative distance of following each pedestrian target based on the relative distance between the auxiliary positioning point and each pedestrian target, wherein the auxiliary positioning point is the center point of the auxiliary positioning base station in the three-base station positioning method.
[0081] The auxiliary positioning points include a first auxiliary positioning point and a second auxiliary positioning point, and the step of determining a following distance for following each of the pedestrian targets based on a first distance between the auxiliary positioning point and each of the pedestrian targets includes:
[0082] Step A10, obtaining a third distance between the first auxiliary positioning point and the second auxiliary positioning point;
[0083] Step A20, calculating a following distance for following each pedestrian target based on the first distance between the first auxiliary positioning point and each pedestrian target, the first distance between the second auxiliary positioning point and each pedestrian target, and the third distance.
[0084] In this embodiment, it should be noted that two of the three UWB base stations set up by the follow-up robot are auxiliary base stations, and the left and right can be distinguished according to the auxiliary base stations. The first auxiliary positioning point is used to characterize the center point of the first auxiliary positioning base station in the three-base station positioning method, and the second auxiliary positioning point is used to characterize the center point of the second auxiliary positioning base station in the three-base station positioning method. When the first auxiliary positioning base station is a left auxiliary base station, the second auxiliary positioning base station is a right auxiliary base station, and when the first auxiliary base station is a right auxiliary base station, the second auxiliary positioning base station is a left auxiliary base station. For example, in an implementable manner, when the head of the follow-up robot is facing a pedestrian target, the left auxiliary base station can be set as the first auxiliary positioning base station, and the right auxiliary base station can be set as the second auxiliary base station.
[0085] In addition, it should be noted that the third distance is used to characterize the relative distance between the left auxiliary base station and the right auxiliary base station, which can be 0.4m, 0.5m and 0.6m, etc. The third distance can be obtained by obtaining the coordinate values of the left auxiliary base station and the right auxiliary base station in the same coordinate system, and then obtaining it by calculating in a preset ratio. For example, assuming that the coordinates of the left auxiliary base station A are (1, 0) and the coordinates of the right auxiliary base station B are (-1, 0), then the third distance can be 0.2m.
[0086] As an example, steps A10 to A20 include: obtaining the relative distance between the first auxiliary positioning point and the second auxiliary positioning point; inputting the first distance between the first auxiliary positioning point and each of the pedestrian targets, the first distance between the second auxiliary positioning point and each of the pedestrian targets, and the third distance into a preset following distance calculation model in sequence, and calculating the following distance of each of the pedestrian targets, wherein the preset following distance calculation model is provided with a preset following distance calculation formula, and the preset following distance calculation formula is as follows:
[0087]
[0088] Wherein, L represents the following distance of each pedestrian target, L 1 is the first distance between the first auxiliary positioning point and each of the pedestrian targets, L 2 is the first distance between the second auxiliary positioning point and each of the pedestrian targets, L 3 To represent the relative distance between the first auxiliary positioning point and the second auxiliary positioning point, l is a constant, and l is used to characterize the vertical distance between the center point of the UWB base station of the pedestrian target and the projection point of the center point on the UWB base station plane, which can be 0.1m, 0.15m, 0.2m, etc.
[0089] Step S30, obtaining a second distance between the main positioning point and each of the pedestrian targets, and determining a following angle for following each of the pedestrian targets according to the first distance and the second distance, wherein the main positioning point is the center point of the main positioning base station in the three-base station positioning method;
[0090] In this embodiment, it should be noted that the main positioning point is the center point of the main positioning base station in the three-base station positioning method, the main positioning base station is the positioning base station among the three UWB base stations except the auxiliary positioning base station, the second distance is used to characterize the relative distance between the main positioning base station and each of the pedestrian targets, wherein the number of the second distances depends on the number of pedestrian targets in the current detection frame, and the following angle is used to characterize the relative angle at which the following robot follows the corresponding pedestrian target. In an implementable manner, the following angle can be the angle formed by the center point a of the main positioning base station, the center point b of the triangle formed by the three base station positioning points, and the projection point c of the center point of the UWB tag of the pedestrian target on the UWB base station plane.
[0091] As an example, step S30 includes: sequentially acquiring relative distances between the main positioning point and each of the pedestrian targets, and respectively determining associations between the relative distance between the pedestrian target and the main positioning point, the relative distance between the pedestrian target and the first auxiliary positioning point, and the relative distances between each of the pedestrian targets and the pedestrian target and the second auxiliary positioning point, wherein the associations include a first association, a second association, a third association, a fourth association, and a fifth association.
[0092] The first association relationship is used to characterize that the relative distance between the first auxiliary positioning point and the pedestrian target is not equal to the relative distance between the second auxiliary positioning point and the pedestrian target, and the square of the relative distance between the first auxiliary positioning point and the pedestrian target plus the square of the relative distance between the second auxiliary positioning point and the pedestrian target minus twice the square of the relative distance between the main positioning point and the pedestrian target is greater than zero. For example, assuming that the relative distance between the main positioning point and the pedestrian target is A 1 , the relative distance between the first auxiliary positioning point and the pedestrian target is A 2 , the relative distance between the second auxiliary positioning point and the pedestrian target is A 3 , then the first association is A 2 2 +A 3 2 -A 1 2 >0,A 2 ≠A 3 ,
[0093] The second association relationship is used to represent that the square of the relative distance between the first auxiliary positioning point and the pedestrian target plus the square of the relative distance between the second auxiliary positioning point and the pedestrian target minus twice the square of the relative distance between the main positioning point and the pedestrian target is equal to zero. For example, assuming that the relative distance between the main positioning point and the pedestrian target is A 4 , the relative distance between the first auxiliary positioning point and the pedestrian target is A 5 , the relative distance between the second auxiliary positioning point and the pedestrian target is A 6 , then the first association is A 5 2 +A 6 2 -A 4 2 =0,
[0094] The third association relationship is used to characterize that the relative distance between the first auxiliary positioning point and the pedestrian target is not equal to the relative distance between the second auxiliary positioning point and the pedestrian target, and the square of the relative distance between the first auxiliary positioning point and the pedestrian target plus the square of the relative distance between the second auxiliary positioning point and the pedestrian target minus twice the square of the relative distance between the main positioning point and the pedestrian target is less than zero. For example, assuming that the relative distance between the main positioning point and the pedestrian target is A 7 , the relative distance between the first auxiliary positioning point and the pedestrian target is A 8 , the relative distance between the second auxiliary positioning point and the pedestrian target is A 9 , then the first association is A 8 2 +A 9 2 -A 7 2 >0,A 8 ≠A 9 ,
[0095] The fourth association relationship is used to represent that the relative distance between the first auxiliary positioning point and the pedestrian target is equal to the relative distance between the second auxiliary positioning point and the pedestrian target, and the relative distance between the main positioning point and the pedestrian target is less than the relative distance between the first auxiliary positioning point and the pedestrian target. For example, assuming that the relative distance between the main positioning point and the pedestrian target is A 10 , the relative distance between the first auxiliary positioning point and the pedestrian target is A 11 , the relative distance between the second auxiliary positioning point and the pedestrian target is A 12 , then the first association is A 10 <A 11 =A 12 ,
[0096] The fifth association relationship is used to represent that the relative distance between the first auxiliary positioning point and the pedestrian target is equal to the relative distance between the second auxiliary positioning point and the pedestrian target, and the relative distance between the main positioning point and the pedestrian target is greater than the relative distance between the first auxiliary positioning point and the pedestrian target. For example, assuming that the relative distance between the main positioning point and the pedestrian target is A 13 , the relative distance between the first auxiliary positioning point and the pedestrian target is A 14 , the relative distance between the second auxiliary positioning point and the pedestrian target is A 15 , then the first association is A 13 >A 14 =A 15 ,
[0097] If the association relationship is the first association relationship, the following angle of the pedestrian target is calculated according to a preset first following angle calculation formula, wherein the preset first following angle calculation formula is as follows:
[0098] Wherein, α represents the following distance of each pedestrian target, L 1 is the first distance between the first auxiliary positioning point and each of the pedestrian targets, L 2 is the first distance between the second auxiliary positioning point and each of the pedestrian targets, L 3 represents the relative distance between the first auxiliary positioning point and the second auxiliary positioning point,
[0099] If the association relationship is the second association relationship, the following angle of the pedestrian target is calculated according to a preset second following angle calculation formula, wherein the preset second following angle calculation formula is as follows:
[0100]
[0101] Wherein, α represents the following distance of each pedestrian target,
[0102] If the association relationship is the third association relationship, the following angle of the pedestrian target is calculated according to a preset third following angle calculation formula, wherein the preset third following angle calculation formula is as follows:
[0103] Wherein, α represents the following distance of each pedestrian target, L 1 is the first distance between the first auxiliary positioning point and each of the pedestrian targets, L 2 is the first distance between the second auxiliary positioning point and each of the pedestrian targets, L 3 represents the relative distance between the first auxiliary positioning point and the second auxiliary positioning point,
[0104] If the association relationship is the fourth association relationship, the following angle of the pedestrian target is calculated according to a preset fourth following angle calculation formula, wherein the preset fourth following angle calculation formula is as follows:
[0105] α=0
[0106] α represents the following distance of each pedestrian target,
[0107] If the association relationship is the fifth association relationship, the following angle of the pedestrian target is calculated according to a preset fifth following angle calculation formula, wherein the preset fifth following angle calculation formula is as follows:
[0108] α=2π
[0109] α represents the following distance of each pedestrian target.
[0110] In one practicable manner, referring to Figure 2 , Figure 2 The schematic diagram of the three-base station positioning method in the preset coordinate system is shown in FIG. The preset coordinate system takes the midpoint of the first auxiliary positioning point and the second auxiliary positioning point as the origin, the direction of the main positioning point identification is the positive direction of the Y axis, and the direction of the second auxiliary point identification is the positive direction of the X axis. Among them, A is the first auxiliary positioning point, B is the second auxiliary positioning point, C is the main positioning point, △ABC is an equilateral triangle, H is the center point of △ABC, E is a pedestrian target carrying UWB, and D is the projection point of E on the △ABC plane. Then d 1 is the relative distance between the first auxiliary positioning point and the pedestrian target, d 2 is the relative distance between the second auxiliary positioning point and the pedestrian target, d 3 The relative distance between the main positioning point and the pedestrian target, d s is the distance between the first auxiliary positioning point and the second auxiliary positioning point, OD is the following distance, and α is ∠DHC, that is, the following angle.
[0111] Step S40, selecting a pedestrian main target from the pedestrian targets according to the following distances and the following angles;
[0112] In this embodiment, it should be noted that if there are multiple pedestrian targets in the current detection frame, a unique pedestrian target needs to be selected from the multiple pedestrian targets as the following target of the following robot. Therefore, the pedestrian main target is used to represent the only following pedestrian target of the following robot among the pedestrian targets.
[0113] As an example, step S40 includes: selecting a pedestrian target to be followed from the pedestrian targets according to the following distance and the following angle corresponding to following each pedestrian target.
[0114] The step of selecting a pedestrian main target from the pedestrian targets according to the following distances and the following angles includes:
[0115] Step B10, selecting at least one pedestrian secondary target from each of the pedestrian targets according to the correspondence between each of the following distances and the preset following range;
[0116] Step B20, obtaining the pedestrian primary target by comparing the following angles of the pedestrian secondary targets.
[0117] In this embodiment, it should be noted that the pedestrian secondary target is used to characterize the pedestrian target corresponding to the following distance within the preset following range, and the type of the corresponding relationship includes a first type of corresponding relationship and a second type of corresponding relationship. The first type of corresponding relationship is used to characterize that the following distance is within the preset following range, and the second type of corresponding relationship is used to characterize that the following distance is not within the following range. For example, assuming that the preset following range is set to an area with a radius of 0.8m, the following distance of the following pedestrian target X is 0.5m, and the following distance of the following pedestrian target Y is 0.9m, then the corresponding relationship between the following distance of the pedestrian target X and the preset following range is the first type of corresponding relationship, and the corresponding relationship between the following distance of the pedestrian target Y and the preset following range is the second type of corresponding relationship.
[0118] As an example, step B10 to step B20 include: determining the type of correspondence between each following distance and the preset following range; if the type of correspondence between the following distance and the preset following range is a first type of correspondence, the pedestrian target corresponding to the first type of correspondence is used as a pedestrian secondary target; if the type of correspondence between the following distance and the preset following range is a second type of correspondence, the pedestrian target corresponding to the second type of correspondence is not used as a pedestrian secondary target, wherein the pedestrian secondary target may be one or more; if there is one pedestrian secondary target, the pedestrian secondary target is used as a pedestrian main target; if there are multiple pedestrian secondary targets, the following angles of each pedestrian secondary target are compared one by one to obtain a minimum following angle, and the pedestrian secondary target corresponding to the minimum following angle is used as the pedestrian main target.
[0119] Step S50, determining a current following mode of the pedestrian main target according to the following main angle corresponding to the pedestrian main target;
[0120] Step S60, determining whether to switch the current following mode by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames;
[0121] In this embodiment, it should be noted that the following main angle is used to characterize the following angle of the pedestrian main target, and the current following mode includes a forward following mode and a reverse following mode, wherein the type of the current following mode is determined by the following main angle and a preset following angle threshold. In an implementable manner, the preset following angle threshold can be set to 180°. When the following main angle is less than 180°, that is, the pedestrian main target is in front of the main positioning point, the current following mode is the forward following mode.
[0122] As an example, steps S50 to S60 include: determining whether the following main angle is less than a preset following angle threshold; if the following main angle is less than the preset following angle threshold, following the pedestrian target in a forward following mode; if the following main angle is not less than the preset following angle threshold, following the pedestrian target in a reverse following mode; and determining whether to switch the current following mode by detecting whether the following main angle satisfies the preset switching conditions within a preset number of detection frames.
[0123] The step of determining whether to switch the current following mode by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames includes:
[0124] Step C10, if the current following mode is the forward following mode, determining whether the following main angle is greater than a preset switching angle threshold in a preset number of detection frames;
[0125] Step C20: if both are greater than, switching the current following mode to a reverse following mode;
[0126] Step C30, if the current following mode is the reverse following mode, determining whether the following main angle is less than the preset switching angle threshold in a preset number of detection frames;
[0127] Step C40: If both are less than , the current following mode is switched to a forward following mode.
[0128] In this embodiment, it should be noted that the forward following mode is used to characterize the following mode in which the following robot follows the pedestrian main target with the front axle as the steering wheel and the rear axle as the driving wheel. The forward following mode is used to characterize the following mode in which the following robot follows the pedestrian main target with the rear axle as the steering wheel and the front axle as the driving wheel. The preset switching condition is used to characterize the conditions corresponding to switching the forward following mode or the reverse following mode, and the preset switching angle threshold is set by the user.
[0129] As an example, step C10 to step C40 include: if the current following mode is the forward following mode, then determining whether the following main angle is greater than the preset switching angle threshold in a preset number of detection frames; if the following main angle is greater than the preset switching angle threshold in a preset number of detection frames, switching the current following mode to the reverse following mode; if the current following mode is the reverse following mode, then determining whether the following main angle is less than the preset switching angle threshold in a preset number of detection frames; if the following main angle is less than the preset switching angle threshold in a preset number of detection frames, switching the current following mode to the forward following mode.
[0130] After the step of determining whether to switch the current following mode by detecting whether the following main angle satisfies the preset switching condition in a preset number of detection frames, the pedestrian target following method includes:
[0131] Step D10, determining whether the longitudinal following distance of the pedestrian main target is greater than a preset longitudinal following distance threshold;
[0132] Step D20: If yes, generate a first adjustment command, and adjust the longitudinal following distance to the preset longitudinal following distance threshold through the first adjustment command;
[0133] Step D30: If not, generate a second adjustment command, and adjust the longitudinal following distance to the preset longitudinal following distance threshold through the second adjustment command.
[0134] In this embodiment, it should be noted that the longitudinal following distance is used to characterize the following distance of the following robot following the pedestrian target on the longitudinal straight line of the positioning base station. The preset longitudinal following distance is set by the user and is used to characterize the optimal distance for the following robot to assist the pedestrian main target. The first adjustment command and the second adjustment command are both subordinate to the adjustment command. The adjustment command is used to adjust the acceleration of the following robot to control the longitudinal following distance, wherein the first adjustment command is an acceleration reduction command for reducing the longitudinal following distance, and the second adjustment command is an acceleration increase command for increasing the longitudinal following distance, wherein the correlation formula between the longitudinal following distance and the acceleration is as follows:
[0135] L x =vt+0.5at 2
[0136] Among them, L x is the longitudinal following distance, v is the velocity, t is the detection period, and a is the acceleration.
[0137] As an example, step D10 to step D30 include: determining whether the longitudinal following distance of the pedestrian main target is greater than a preset longitudinal following distance threshold; if the longitudinal following distance is greater than the preset longitudinal following distance threshold, generating an acceleration decrease command, and adjusting the longitudinal following distance to the preset longitudinal following distance threshold through the acceleration decrease command; if the longitudinal following distance is not greater than the preset longitudinal following distance threshold, generating an acceleration increase command, and adjusting the longitudinal following distance to the preset longitudinal following distance threshold through the acceleration increase command.
[0138] The present application provides a pedestrian target following method, device, electronic device and readable storage medium, that is, obtaining at least one pedestrian target in a current detection frame; determining a following distance for following each pedestrian target based on a first distance between an auxiliary positioning point and each of the pedestrian targets, wherein the auxiliary positioning point is the center point of an auxiliary positioning base station in a three-base station positioning method; obtaining a second distance between a main positioning point and each of the pedestrian targets, and determining a following angle for following each of the pedestrian targets based on the first distance and the second distance, wherein the main positioning point is the center point of a main positioning base station in the three-base station positioning method; selecting a pedestrian main target from each of the pedestrian targets based on each of the following distances and each of the following angles; judging a current following mode for following the pedestrian main target based on a following main angle corresponding to the pedestrian main target, and determining whether to switch the current following mode by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames. Since the auxiliary positioning point is used to represent the center point of the auxiliary positioning base station in the three-base station positioning method, and the main positioning point is used to represent the center point of the main positioning base station in the three-base station positioning method, the following robot can be positioned without blind spots, and the four driving wheels of the following robot can be flexibly used through the following angle, so that when the turning radius is too large, the rear axle wheels can be switched to steering wheels to continue to follow the pedestrian target. Therefore, when the following robot encounters a warehouse passage with only one entrance and exit and needs to operate under special working conditions, it can switch the current following mode to achieve the purpose of assisting pedestrians to complete related social production activities. Therefore, the technical defect of the following robot in the prior art that it is limited by the turning radius in some special working conditions and cannot turn to continue to follow the pedestrian target is overcome, thereby improving the accuracy of the following robot in following the pedestrian target.
[0139] Embodiment 2
[0140] Further, refer to Figure 3In another embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above description and will not be described in detail later. On this basis, after the step of determining whether to switch the current following mode by detecting whether the following main angle satisfies the preset switching condition in a preset number of detection frames, the pedestrian target following method further includes:
[0141] Step E10, querying the lateral following angle corresponding to the following main angle according to a preset angle mapping table;
[0142] Step E20: follow the pedestrian main target according to the lateral following angle.
[0143] In this embodiment, it should be noted that the preset angle mapping table is used to store the mapping relationship between the following main angle and the lateral following angle, and the lateral following angle is used to represent the steering angle of the steering wheel of the following robot.
[0144] As an example, step E10 to step E20 include: using a preset angle mapping table as an index, querying the steering angle of the steering wheel corresponding to the following main angle; and following the pedestrian main target according to the steering angle.
[0145] Wherein, before the step of querying the lateral following angle corresponding to the following main angle according to the preset angle mapping table, the pedestrian target following method further includes:
[0146] Step F10, obtaining the main following angles corresponding to different lateral positions of the test pedestrian target and the lateral following angles corresponding to different lateral positions of the test pedestrian target;
[0147] Step F20 , establishing a preset angle mapping table according to the one-to-one correspondence between each of the main following angles and each of the lateral following angles.
[0148] In this embodiment, it should be noted that the test pedestrian target is used to characterize the pedestrian target for testing the correspondence between the main following angle and the lateral following distance, and the different lateral positions are used to characterize the change in the lateral position of the test pedestrian target at the same longitudinal following distance.
[0149] As an example, steps F10 to F20 include: obtaining the following main angles corresponding to the test pedestrian target at different lateral positions and the lateral following angles corresponding to the test pedestrian target at different lateral positions; and establishing a preset angle mapping table based on the one-to-one correspondence between each of the following main angles and each of the lateral following angles.
[0150] The embodiment of the present application provides a method for querying a lateral following angle, that is, according to a preset angle mapping table, querying the lateral following angle corresponding to the following main angle; and following the pedestrian main target according to the lateral following angle. Compared with the following method of following the pedestrian main target only by calculating the following main angle, the lateral following angle can more accurately reflect the angle required for the following robot to turn, thereby achieving the purpose of reducing the fluctuation of the following main angle and causing the following effect to deteriorate. The correspondence between the lateral following angle and the following main angle is accumulated through multiple tests, and can intuitively reflect the angle change of the following robot following the pedestrian main target carrying the UWB tag, so as to meet the following requirements of slow response at small angles and sensitive response at large angles, thereby improving the following effect of the following pedestrian main target.
[0151] Embodiment 3
[0152] The embodiment of the present application further provides a pedestrian target following device, which is applied to a following robot. The pedestrian target following device includes:
[0153] An acquisition module, used to acquire at least one pedestrian target in the current detection frame;
[0154] A distance determination module, used to determine the following distance of each pedestrian target according to the first distance between the auxiliary positioning point and each pedestrian target, wherein the auxiliary positioning point is the center point of the auxiliary positioning base station in the three-base station positioning method;
[0155] An angle determination module, used to obtain a second distance between the main positioning point and each of the pedestrian targets, and determine a following angle for following each of the pedestrian targets according to the first distance and the second distance, wherein the main positioning point is the center point of the main positioning base station in the three-base station positioning method;
[0156] A selection module, configured to select a pedestrian main target from the pedestrian targets according to the following distances and the following angles;
[0157] A judgment module, used for judging a current following mode of following the pedestrian main target according to a following main angle corresponding to the pedestrian main target;
[0158] The switching module is used to determine whether to switch the current following mode by detecting whether the following main angle meets the preset switching condition within a preset number of detection frames.
[0159] Optionally, the switching module is further used for:
[0160] If the current following mode is the forward following mode, determining whether the following main angle is greater than a preset switching angle threshold within a preset number of detection frames;
[0161] If both are greater than, switching the current following mode to a reverse following mode;
[0162] If the current following mode is the reverse following mode, determining whether the following main angle is less than the preset switching angle threshold within a preset number of detection frames;
[0163] If both are smaller than, the current following mode is switched to the forward following mode.
[0164] Optionally, the auxiliary positioning point includes a first auxiliary positioning point and a second auxiliary positioning point, and the distance determination module is further used to:
[0165] Acquire a third distance between the first auxiliary positioning point and the second auxiliary positioning point;
[0166] A following distance for following each of the pedestrian targets is calculated based on the first distance between the first auxiliary positioning point and each of the pedestrian targets, the first distance between the second auxiliary positioning point and each of the pedestrian targets, and the third distance.
[0167] Optionally, the selection module is further used for:
[0168] Selecting at least one pedestrian secondary target from each of the pedestrian targets according to the correspondence between each of the following distances and the preset following range;
[0169] By comparing the following angles of the pedestrian secondary targets, the pedestrian primary target is obtained.
[0170] Optionally, the pedestrian target following device is further used for:
[0171] Determining whether the longitudinal following distance of the pedestrian main target is greater than a preset longitudinal following distance threshold;
[0172] If yes, generating a first adjustment command, and adjusting the longitudinal following distance to the preset longitudinal following distance threshold through the first adjustment command;
[0173] If not, a second adjustment command is generated, and the longitudinal following distance is adjusted to the preset longitudinal following distance threshold through the second adjustment command.
[0174] Optionally, the pedestrian target following device is further used for:
[0175] According to a preset angle mapping table, query the lateral following angle corresponding to the following main angle;
[0176] The pedestrian primary target is followed according to the lateral following angle.
[0177] Optionally, the pedestrian target following device is further used for:
[0178] Obtaining the following main angles corresponding to different lateral positions of the test pedestrian target and the lateral following angles corresponding to different lateral positions of the test pedestrian target;
[0179] A preset angle mapping table is established according to a one-to-one correspondence between each of the main following angles and each of the lateral following angles.
[0180] The pedestrian target following device provided by the present invention adopts the pedestrian target following method in the above embodiment, and solves the technical problem that the following robot has low flexibility in following pedestrian targets. Compared with the prior art, the beneficial effects of the pedestrian target following device provided by the embodiment of the present invention are the same as the beneficial effects of the pedestrian target following method provided by the above embodiment, and other technical features in the pedestrian target following device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0181] Embodiment 4
[0182] An embodiment of the present invention provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the pedestrian target following method in the above-mentioned embodiment one.
[0183] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure. The electronic device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0184] like Figure 4 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage device into a random access memory (RAM). In the RAM, various programs and data required for the operation of the electronic device are also stored. The processing device, ROM, and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.
[0185] Typically, the following systems can be connected to the I / O interface: input devices including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and communication devices. The communication device can allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an electronic device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0186] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device, or installed from a ROM. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0187] The electronic device provided by the present invention adopts the pedestrian target following method in the above embodiment to solve the technical problem that the following robot has low flexibility in following pedestrian targets. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the present invention are the same as the beneficial effects of the pedestrian target following method provided by the above embodiment 1, and other technical features in the electronic device are the same as the features disclosed in the above embodiment method, which will not be described in detail here.
[0188] It should be understood that the various parts of the present disclosure can be implemented with hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0189] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
[0190] Embodiment 5
[0191] This embodiment provides a computer-readable storage medium having computer-readable program instructions stored thereon, and the computer-readable program instructions are used to execute the pedestrian target following method in the above-mentioned embodiment 1.
[0192] The computer-readable storage medium provided in the embodiment of the present invention may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0193] The computer-readable storage medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0194] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains at least one pedestrian target in the current detection frame; determines the following distance of each pedestrian target based on the first distance between the auxiliary positioning point and each pedestrian target, wherein the auxiliary positioning point is the center point of the auxiliary positioning base station in the three-base station positioning method; obtains the second distance between the main positioning point and each pedestrian target, and determines the following angle of each pedestrian target based on the first distance and the second distance, wherein the main positioning point is the center point of the main positioning base station in the three-base station positioning method; selects a pedestrian main target from each pedestrian target based on each following distance and each following angle; determines the current following mode of following the pedestrian main target based on the following main angle corresponding to the pedestrian main target; and determines whether to switch the current following mode by detecting whether the following main angle satisfies the preset switching condition within a preset number of detection frames.
[0195] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0196] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0197] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of the module does not limit the unit itself in some cases.
[0198] The computer-readable storage medium provided by the present invention stores computer-readable program instructions for executing the above-mentioned pedestrian target following method, which solves the technical problem that the following robot has low flexibility in following pedestrian targets. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present invention are the same as the beneficial effects of the pedestrian target following method provided by the above-mentioned embodiment, and are not described in detail here.
[0199] Embodiment 6
[0200] The present application also provides a computer program product, including a computer program, which implements the steps of the pedestrian target following method as described above when executed by a processor.
[0201] The computer program product provided by the present application solves the technical problem of low flexibility of the following robot in following pedestrian targets. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present invention are the same as the beneficial effects of the pedestrian target following method provided by the above embodiment, which will not be repeated here.
[0202] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A pedestrian target following method, It is characterized in that Applied to a following robot, the pedestrian target following method includes: Get at least one pedestrian target in the current detection frame; According to the first distance between the auxiliary positioning point and each of the pedestrian targets, the following distance of each of the pedestrian targets is determined, wherein the auxiliary positioning point is the center point of the auxiliary positioning base station in the three-base station positioning method; wherein the auxiliary positioning point includes a first auxiliary positioning point and a second auxiliary positioning point; the following distance is the relative distance between the midpoint of the first auxiliary positioning point and the second auxiliary positioning point and the projection point of the pedestrian target on the three-base station plane; Obtain a second distance between the main positioning point and each of the pedestrian targets, and determine a following angle for following each of the pedestrian targets based on the first distance and the second distance, wherein the main positioning point is the center point of the main positioning base station in the three-base station positioning method, and the following angle is the angle formed by the center point of the main positioning base station, the center point of the triangle formed by the three-base station positioning points, and the center point of the UWB tag of the pedestrian target on the UWB base station plane. Selecting a pedestrian main target from the pedestrian targets according to the following distances and the following angles; Determining a current following mode of following the pedestrian main target according to the following main angle corresponding to the pedestrian main target; Determining whether to switch the current following mode by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames; The step of determining the following distance of each pedestrian target according to the first distance between the auxiliary positioning point and each pedestrian target comprises: Acquire a third distance between the first auxiliary positioning point and the second auxiliary positioning point; Calculating a following distance for following each of the pedestrian targets according to a first distance between the first auxiliary positioning point and each of the pedestrian targets, a first distance between the second auxiliary positioning point and each of the pedestrian targets, and the third distance; The step of determining whether to switch the current following mode by detecting whether the following main angle satisfies a preset switching condition within a preset number of detection frames comprises: If the current following mode is the forward following mode, determining whether the following main angle is greater than a preset switching angle threshold within a preset number of detection frames; If both are greater than, switching the current following mode to a reverse following mode; If the current following mode is the reverse following mode, determining whether the following main angle is less than the preset switching angle threshold within a preset number of detection frames; If both are smaller than, the current following mode is switched to the forward following mode.
2. The pedestrian target following method as claimed in claim 1, It is characterized in that The step of selecting a pedestrian main target from the pedestrian targets according to the following distances and the following angles comprises: Selecting at least one pedestrian secondary target from each of the pedestrian targets according to the correspondence between each of the following distances and the preset following range; By comparing the following angles of the pedestrian secondary targets, the pedestrian primary target is obtained.
3. The pedestrian target following method as claimed in claim 1, It is characterized in that After the step of determining whether to switch the current following mode by detecting whether the following main angle satisfies the preset switching condition in a preset number of detection frames, the pedestrian target following method includes: Determining whether the longitudinal following distance of the pedestrian main target is greater than a preset longitudinal following distance threshold; If yes, generating a first adjustment command, and adjusting the longitudinal following distance to the preset longitudinal following distance threshold through the first adjustment command; If not, a second adjustment command is generated, and the longitudinal following distance is adjusted to the preset longitudinal following distance threshold through the second adjustment command.
4. The pedestrian target following method as claimed in claim 1, It is characterized in that After the step of determining whether to switch the current following mode by detecting whether the following main angle satisfies the preset switching condition in a preset number of detection frames, the pedestrian target following method further includes: According to a preset angle mapping table, query the lateral following angle corresponding to the following main angle; The pedestrian primary target is followed according to the lateral following angle.
5. The pedestrian target following method as claimed in claim 4, It is characterized in that Before the step of querying the lateral following angle corresponding to the following main angle according to the preset angle mapping table, the pedestrian target following method further includes: Obtaining the following main angles corresponding to different lateral positions of the test pedestrian target and the lateral following angles corresponding to different lateral positions of the test pedestrian target; A preset angle mapping table is established according to a one-to-one correspondence between each of the main following angles and each of the lateral following angles.
6. A pedestrian target following device, It is characterized in that Applied to a following robot, the pedestrian target following device comprises: An acquisition module, used to acquire at least one pedestrian target in the current detection frame; A distance determination module is used to determine the following distance of each pedestrian target based on the first distance between the auxiliary positioning point and each pedestrian target, wherein the auxiliary positioning point is the center point of the auxiliary positioning base station in the three-base station positioning method; the auxiliary positioning point includes a first auxiliary positioning point and a second auxiliary positioning point, and the following distance is the relative distance between the midpoint of the first auxiliary positioning point and the second auxiliary positioning point and the projection point of the pedestrian target on the three-base station plane; the distance determination module is also used to obtain the third distance between the first auxiliary positioning point and the second auxiliary positioning point; based on the first distance between the first auxiliary positioning point and each pedestrian target, the first distance between the second auxiliary positioning point and each pedestrian target, and the third distance, calculate the following distance of each pedestrian target; An angle determination module is used to obtain the second distance between the main positioning point and each of the pedestrian targets, and determine the following angle of each of the pedestrian targets according to the first distance and the second distance, wherein the main positioning point is the center point of the main positioning base station in the three-base station positioning method, and the following angle is the angle formed by the center point of the main positioning base station, the center point of the triangle formed by the three base station positioning points, and the center point of the UWB tag of the pedestrian target on the UWB base station plane. A selection module, configured to select a pedestrian main target from the pedestrian targets according to the following distances and the following angles; A judgment module, used for judging a current following mode of following the pedestrian main target according to a following main angle corresponding to the pedestrian main target; A switching module is used to determine whether to switch the current following mode by detecting whether the following main angle satisfies the preset switching condition within a preset number of detection frames. The switching module is also used to determine whether the following main angle is greater than a preset switching angle threshold within a preset number of detection frames if the current following mode is a forward following mode; if both are greater, the current following mode is switched to a reverse following mode; if the current following mode is a reverse following mode, determine whether the following main angle is less than the preset switching angle threshold within a preset number of detection frames; if both are less, the current following mode is switched to a forward following mode.
7. An electronic device, It is characterized in that The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps of the pedestrian target following method according to any one of claims 1 to 5.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a program for implementing the pedestrian target following method, and the program for implementing the pedestrian target following method is executed by a processor to implement the steps of the pedestrian target following method as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Pedestrian following system and method based on UWB and laser radar hybrid positioning
CN107765220A
Target following control method and device for speed difference slip steering vehicle
CN113022555A
Robot following system and method based on UWB
CN113282085A
Following system of mining rescue following robot
CN113696198A
UWB positioning module and intelligent following mobile device
CN209590639U
