A control method and system for a pet toy
By acquiring real-time pet location information and obstacle distance, combined with predictive offset and obstacle avoidance direction, and dynamically integrating control commands, the problem of short-lived interaction and complex calculations in traditional pet toys is solved. This enables dynamic closed-loop interaction and flexible escape of pet toys, enhancing the fun and safety of pet play.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHANGAN UNIV
- Filing Date
- 2026-04-22
- Publication Date
- 2026-07-10
AI Technical Summary
Traditional pet toys have short interaction time, simple behavior patterns, and lack environmental awareness, making it impossible to form a dynamic closed-loop interaction between pets and toys. In addition, traditional path planning algorithms have high computational complexity and delayed motion response.
By acquiring the pet's location information in real time, calculating the escape direction and superimposing a predictive offset direction, and combining obstacle distance weights to generate an obstacle avoidance direction vector, dynamic fusion of the escape direction and obstacle avoidance direction is achieved, and control commands are output.
It breaks through the operational limitations of traditional pet toys, constructs a dynamic closed-loop interaction, enhances the persistence and fun of pet play, reduces computational complexity, eliminates motion response delay, and enhances the flexibility and randomness of pet toys.
Smart Images

Figure CN122363302A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of pet toy control technology, and relates to a control method and system for pet toys. Background Technology
[0002] With the rapid growth of indoor pet ownership in cities, traditional pet toys, which usually rely on manual operation or follow fixed paths, have limitations such as short interaction time and monotonous behavior patterns, making it difficult to effectively satisfy pets' hunting instincts.
[0003] Chinese invention patent application CN118614419A discloses a smart pet toy that primarily uses sound or mechanical movement to attract pets, lacking integration with environmental perception capabilities. It cannot detect the pet's location in real time, making it difficult to form a closed-loop interaction of pet chasing and toy escaping. Pets easily lose interest after perceiving the repetitive, mechanical movement patterns.
[0004] Chinese invention patent application CN120685083A discloses a path planning method and a vehicle for a small car. It adopts the traditional A* path planning algorithm. In a dynamic interactive environment, when the position of obstacles or pets changes, the local map needs to be recalculated repeatedly, resulting in a computational complexity of up to O(N log N) and a delay in motion response. Summary of the Invention
[0005] In view of the shortcomings of the existing technology, the purpose of this invention is to provide a control method and system for pet toys.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: This invention provides a method for controlling a pet toy, comprising the following steps: acquiring pet location information; calculating the distance between the pet toy and the pet based on the pet location information and the location coordinates of the pet toy, and determining the escape direction of the pet toy; predicting the pet's movement trend based on the pet's current center coordinates and the center coordinates of the previous moment, wherein the pet's movement trend is based on the environmental distance information of the pet toy in a preset direction to obtain a predictive offset direction, and superimposing the escape direction with the predictive offset direction to obtain the escape direction vector of the pet toy; acquiring the obstacle distance of the pet toy, determining the distance weight of each direction based on the obstacle distance, and performing a weighted summation of the unit direction vectors of each direction based on the distance weight of each direction to obtain an obstacle avoidance direction vector; determining the escape direction weight and obstacle avoidance weight based on the distance between the pet toy and the pet, and the distance between the pet toy and the obstacle, respectively, and fusing the escape direction weight, obstacle avoidance weight, escape direction vector, and obstacle avoidance direction vector to output a control command.
[0007] Furthermore, it also includes determining the search center point based on the pet's momentum before it disappeared, when the pet's location information cannot be obtained. ;
[0008] in, The last known coordinates before the pet disappeared. For historical frames, The historical velocity vector of the pet in the i frames before it disappeared. For frame interval, This is the motion decay factor.
[0009] Further, based on the pet's current center coordinates and the previous center coordinates, the pet's movement trend is predicted. The pet's movement trend is based on the environmental distance information of the pet toy in a preset direction to obtain a predictive offset direction. The escape direction is superimposed with the predictive offset direction to obtain the pet toy's escape direction. This includes: calculating the pet's velocity vector based on the pet's current center coordinates and the previous center coordinates; determining the pet's movement direction based on the velocity vector; determining a left candidate offset direction or a right candidate offset direction in the direction perpendicular to the pet's movement direction; obtaining a first environmental distance of the pet toy in the preset left direction and a second environmental distance in the preset right direction; comparing the first environmental distance and the second environmental distance, and determining the predictive offset direction from the left candidate offset vector or the right candidate offset vector based on the comparison result; and superimposing the escape direction with the predictive offset direction to obtain the pet toy's escape direction.
[0010] Furthermore, the escape direction vector of the pet toy is... :
[0011] in, For vector normalization, Let be the escape direction vector of the pet toy. For predictive bias weighting coefficients, For predictive offset direction, For the amplitude of random disturbance, It is a zero-mean random vector.
[0012] Furthermore, the escape direction vector of the pet toy is :
[0013] in, The coordinates of the current position of the pet toy. The coordinates of the pet's current location. The distance between the pet toy and the pet.
[0014] Furthermore, the left candidate offset vector is :
[0015] The right candidate offset vector is :
[0016] in, This is the negative value of the component representing the direction of the pet's movement on the Y-axis. Let X represent the component of the pet's movement direction on the X-axis. Let Y be the component of the pet's movement direction on the Y-axis. It is the negative number of the component of the pet's movement direction on the X-axis.
[0017] Furthermore, the obstacle avoidance direction vector is :
[0018] in, The distance weights are in the left direction. Let be the unit direction vector to the left. The distance weights are for the forward direction. This is the unit direction vector in the preceding direction. The distance weight is in the right direction. This is the unit direction vector to the right.
[0019] Furthermore, the escape direction vector and obstacle avoidance direction vector are fused according to the direction weight and obstacle avoidance weight, and the output control command is as follows:
[0020] in, Let the motion vector of the pet toy be... The normalized escape direction weight coefficients. Let be the escape direction vector of the pet toy. These are the normalized obstacle avoidance direction weight coefficients. This is the obstacle avoidance direction vector;
[0021]
[0022] in, The unnormalized escape direction weighting coefficient. These are the unnormalized obstacle avoidance direction weight coefficients.
[0023] Furthermore, the unnormalized escape direction weighting coefficient for:
[0024] The unnormalized obstacle avoidance direction weight coefficient for:
[0025] in, The current escape intensity of the pet toy. Given the current multiple hazard levels of the obstacles, This is for obstacle avoidance margin.
[0026] This invention also provides a control system for a pet toy, comprising: an acquisition module for acquiring pet location information; an escape module for calculating the distance between the pet toy and the pet based on the pet location information and the location coordinates of the pet toy, and determining the escape direction of the pet toy; an escape module for predicting the movement trend of the pet based on the center coordinates of the pet at the current moment and the center coordinates at the previous moment, wherein the movement trend of the pet is based on the environmental distance information of the pet toy in a preset direction to obtain a predictive offset direction, and the escape direction is superimposed with the predictive offset direction to obtain the escape direction vector of the pet toy; an obstacle avoidance module for acquiring the obstacle distance of the pet toy, determining the distance weight of each direction based on the obstacle distance, and performing a weighted summation of the unit direction vectors of each direction based on the distance weight of each direction to obtain the obstacle avoidance direction vector; and a control module for determining the escape direction weight and obstacle avoidance weight based on the distance between the pet toy and the pet, and the distance between the pet toy and the obstacle, respectively, wherein the escape direction weight, obstacle avoidance weight, escape direction vector, and obstacle avoidance direction vector are fused together to output a control command.
[0027] Compared with the prior art, the present invention has the following beneficial technical effects: This invention discloses a control method for pet toys. It acquires the pet's location information in real time, determines the escape direction based on the distance between the pet and the toy, predicts the movement trend based on the pet's center coordinates at previous and subsequent moments, and constructs an escape direction vector by overlaying environmental distance information to obtain a predictive offset direction. An obstacle avoidance direction vector is generated based on obstacle distance calculation weights. The escape direction weights and obstacle avoidance weights are then dynamically matched to achieve dual-vector fusion and output control commands. On one hand, this method breaks the limitations of traditional pet toys that rely on manual operation and fixed paths, constructing a dynamic closed-loop interactive mechanism of pet chasing and pet toy escaping, which better aligns with the pet's hunting instincts and solves the problems of short interaction time, monotonous behavior patterns, and easy loss of interest in traditional toys. On the other hand, it eliminates the shortcomings of traditional A* path planning algorithms, such as repeated map recalculation and high computational complexity, reducing computational overhead and eliminating motion response delays in dynamic interaction scenarios. Combining pet movement trend prediction and environmental obstacle avoidance logic, it makes the pet toy's escape trajectory more random and flexible, preventing the pet from perceiving mechanically repetitive movement patterns, improving the pet's playtime and enjoyment, while also considering obstacle avoidance. Attached Figure Description
[0028] Figure 1 This is a flowchart of a control method for a pet toy according to the present invention; Figure 2 This is a schematic diagram of the escape direction and predictive deviation of the pet and pet toy in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the calculation of the obstacle avoidance direction vector in an embodiment of the present invention; Figure 4 This is a schematic diagram of weighted summation calculation in an embodiment of the present invention; Figure 5 This is a schematic diagram of a control method for a pet toy according to the present invention. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0030] Example 1 This invention provides a method for controlling a pet toy, such as... Figure 1 He Ru Figure 5As shown, the process includes the following steps: obtaining pet location information; calculating the distance between the pet toy and the pet based on the pet location information and the location coordinates of the pet toy, and determining the escape direction of the pet toy; predicting the pet's movement trend based on the pet's current center coordinates and the center coordinates of the previous moment, wherein the pet's movement trend is based on the environmental distance information of the pet toy in a preset direction to obtain a predictive offset direction, and superimposing the escape direction with the predictive offset direction to obtain the escape direction vector of the pet toy; obtaining the obstacle distance of the pet toy, determining the distance weight of each direction based on the obstacle distance, and performing a weighted summation of the unit direction vectors of each direction based on the distance weight of each direction to obtain the obstacle avoidance direction vector; determining the escape direction weight and obstacle avoidance weight based on the distance between the pet toy and the pet, and the distance between the pet toy and the obstacle, respectively, and fusing the escape direction weight, obstacle avoidance weight, escape direction vector, and obstacle avoidance direction vector to output a control command. In this embodiment, the pet is a cat.
[0031] First, obtain the pet's location information. If the pet is lost or enters a blind spot or is obstructed by furniture during the chase, determine the search center point based on the pet's momentum before it disappeared. .
[0032]
[0033] in, The last known coordinates before the pet disappeared. For historical frames, The historical velocity vector of the pet in the i frames before it disappeared. For frame interval, The motion decay factor is λ=0.6.
[0034] Then move the pet toys to the search center. Then, a 360° in-situ rotation scan is performed to re-lock onto the target. The distance between the pet toy's left, front, and right sides and the obstacle is measured. If the distance in any direction is less than the set value, that direction is marked as a high-risk zone to prevent the pet toy from colliding with the obstacle during its escape.
[0035] Based on the pet's location information and the location coordinates of the pet toy, the distance between the pet toy and the pet is calculated, and the escape direction of the pet toy is determined.
[0036] The escape direction vector of the pet toy is :
[0037] in, The coordinates of the current position of the pet toy. The coordinates of the pet's current location. The distance between the pet toy and the pet.
[0038] To enable the toy to anticipate and dynamically guide its movement, this invention introduces a predictive offset term in the escape direction calculation. For example... Figure 2 As shown, based on the pet's movement velocity vector V output by the target detection and tracking unit... c Calculate its unit direction vector.
[0039]
[0040] in, Let the pet's movement velocity vector be... Let be the magnitude of the pet's velocity vector.
[0041] Define two candidate offset vectors, left and right, in the direction perpendicular to the direction of the pet's movement.
[0042]
[0043]
[0044] in, This is the left candidate offset vector. This is the right candidate offset vector. This is the negative value of the component representing the direction of the pet's movement on the Y-axis. Let X represent the component of the pet's movement direction on the X-axis. Let Y be the component of the pet's movement direction on the Y-axis. It is the negative number of the component of the pet's movement direction on the X-axis.
[0045] Obtain a first environmental distance of the pet toy in a preset left direction and a second environmental distance in a preset right direction. Compare the first environmental distance with the second environmental distance, and determine the predicted offset direction from the left candidate offset vector or the right candidate offset vector based on the comparison result. The first environmental distance is d. L The second environmental distance is d. R When d L >d R +Δ, select left offset, when d R >d L +Δ, select right offset. When the difference between the two sides is small, randomly select the offset direction. It should be noted that the pet's acceleration change trend and historical offset records should be considered to avoid multiple consecutive offsets in the same direction, thereby maintaining movement diversity.
[0046] The escape direction is superimposed with the predicted offset direction to obtain the escape direction vector of the pet toy. The escape direction vector of the pet toy is... :
[0047] in, For vector normalization, Let be the escape direction vector of the pet toy. For predictive bias weighting coefficients, For predictive offset direction, For the amplitude of random disturbance, It is a zero-mean random vector.
[0048]
[0049] in, For predictive offset weights, To select the lateral offset direction vector, For the amplitude of random disturbance, It is a zero-mean random perturbation vector.
[0050] The escape direction of the pet toy is generally opposite to that of the pet, but it will produce slight lateral deviations and random disturbances according to the pet's movement trend, making the escape path present reasonable uncertainty and flexibility, thereby achieving a predictable yet elusive interactive effect.
[0051] Pet toys introduce pet distance d in escape speed control cat An adaptive adjustment mechanism is employed to balance the states that are difficult to capture and those that are approachable. The adjustment rules are as follows: When the distance d between the pet and the pet toy cat Greater than D far At that time, the pet toy reached its maximum speed v max Escape, maintaining the tension of the chase; When the distance between the pet and the pet toy is greater than D tease Less than D far At that time, the speed was ;
[0052] in, It is a piecewise linear or smooth function.
[0053] When the distance between the pet and the pet toy is less than D tease At this time, the pet toy slows down significantly or pauses briefly, creating a grabbing window. In this embodiment, D is the distance threshold for speed adjustment. close =0.20m, D tease =0.45m, D far =1.20m.
[0054] When a touch or capture signal is detected, a fake capture and escape action is triggered: the pet toy shakes slightly and then quickly moves to the side, simulating a capture and escape scenario.
[0055] Speed adjusted to:
[0056] in, These represent the maximum, middle, and minimum escape speeds of the pet toy. The distance between the pet and its toys.
[0057] Obstacle distance to pet toys, such as Figure 3 As shown, the distance weights in each direction are determined based on the distance to the obstacle, and the unit direction vectors in each direction are weighted and summed according to the distance weights in each direction to obtain the obstacle avoidance direction vector.
[0058] The obstacle avoidance direction vector is :
[0059] in, The distance weights are in the left direction. Let be the unit direction vector to the left. The distance weights are for the forward direction. This is the unit direction vector in the preceding direction. The distance weight is in the right direction. This is the unit direction vector to the right.
[0060] Based on the distance between the pet toy and the pet, and the distance between the pet toy and the obstacle, the escape direction weight and obstacle avoidance weight are determined respectively. The escape direction weight and obstacle avoidance weight are fused with the escape direction vector and obstacle avoidance direction vector to output control commands.
[0061] When the pet is away and the environment is open, pet toys should be geared towards escape (i.e., toys that allow the pet to run away). big, Small to maintain chasing tension; when obstacles are approaching or the environment is confined, pet toys should be biased towards obstacle avoidance (…). big, (Small), to prioritize safety; in the middle range, a continuous and smooth mapping is used to achieve weight transition, avoiding mechanical jitter caused by control jumps; For emergency proximity (any distance measurement is less than the emergency threshold D) meg ),make =1 (obstacle avoidance priority) and perform safety actions.
[0062] Specifically, two normalized sub-weight functions are introduced: the pet tendency weight W. cat (dcat )∈[0,1], with obstacle threat weight W obs (d obs ()∈[0,1]. Finally, calculate... , ,like Figure 4 , The normalized escape direction weight coefficients. This represents the normalized obstacle avoidance direction weighting coefficient.
[0063] Pet Tendency Weight: W cat (d cat The current escape intensity of the pet toy (representing the strength of the tendency to escape) is mapped using a linear or sigmoid method:
[0064] When d cat ≤D close At that time, W cat =0 (tendency not to escape) when d cat ≥D far At that time, W cat =1.
[0065] Obstacle Threat Weight: W obs (d obs The current obstacle's multi-hazard intensity (representing the intensity requiring obstacle avoidance / safety priority) is mapped using either inverse linear or inverse smooth mapping:
[0066] The threshold for starting attention to obstacles. Safety threshold.
[0067] When d obs ≥D crit At that time, W obs =0 (no obvious obstacle); when d obs ≤D min At that time, W obs =1 (highest obstacle threat). In this embodiment, D min The value is 0.10~0.12m, D crit =0.30m.
[0068] Fusion , To ensure that obstacle avoidance priority naturally takes precedence and to guarantee , ∈[0,1] and + ≈1, first calculate the unnormalized weights:
[0069]
[0070] To provide obstacle avoidance margin, a conservative coefficient is used in the weight calculation. ∈[0,1].
[0071] Then normalize:
[0072]
[0073] in, The unnormalized escape direction weighting coefficient. These are the unnormalized obstacle avoidance direction weight coefficients.
[0074] when When approaching 1 (obstacle very close), Magnified and normalized ≈1, obstacle avoidance is dominant; when Close to 0 and W cat When approaching 1 (the pet is far away and there are no obstacles), ≈1, prioritize escaping; In the intermediate range, the two transition smoothly to avoid abrupt changes in instructions.
[0075] If the ranging of any path is less than the emergency threshold D emg Immediately execute emergency obstacle avoidance maneuvers: =0, =1, and issue an emergency stop / reverse or in-situ rotation command until d obs >D safe_recover And continue T recover (Example: 0.3 s); then resume dynamic fusion, D safe_recover =0.12m, D emg =0.06m.
[0076] To prevent the weights from oscillating frequently due to sensor noise, W cat With W obs Use short-time exponential smoothing (EMA) or low-pass filtering:
[0077] For weighted smoothing filtering, The value is the filter coefficient, which is between 0.2 and 0.5, preferably 0.3. To address potential issues such as motor jamming, slippage, or entering dead zones in complex indoor home environments, a closed-loop monitoring mechanism based on motion coordination coefficients is implemented. Real-time acquisition of motor current I and actual displacement fed back by IMU Calculate the coordination coefficient Ω:
[0078] in, It is the theoretical displacement integral of the commanded velocity over the observation period.
[0079] when (Threshold is set to 0.2) and motor current Duration exceeding At that time, it was determined to be physically stuck. The following methods were used to free it: specifically, high-frequency vibration: the left and right motors alternately reversed at 5-15Hz to attempt to loosen the entanglement using mechanical vibration; forced backward movement: using maximum torque Perform a 1.5s backward movement; Random escape: Randomly generate a turning command with an angle greater than 90° from the original direction of movement, and rush out at full speed.
[0080] The escape direction vector and obstacle avoidance direction vector are fused based on the direction weight and obstacle avoidance weight, and the output control command is as follows:
[0081] in, Let the motion vector of the pet toy be... The normalized escape direction weight coefficients. Let be the escape direction vector of the pet toy. These are the normalized obstacle avoidance direction weight coefficients. This is the obstacle avoidance direction vector.
[0082] Example 2 The present invention discloses a control system for a pet toy, comprising: an acquisition module, an escape module, a runaway module, an obstacle avoidance module, and a control module.
[0083] The system comprises the following modules: Acquisition Module: Acquires pet location information; Escape Module: Calculates the distance between the pet toy and the pet based on the pet's location information and the toy's coordinates, determining the toy's escape direction; Escape Module: Predicts the pet's movement trend based on the pet's current and previous center coordinates. The pet's movement trend is based on the environmental distance information of the toy in a preset direction to obtain a predictive offset direction. The escape direction is superimposed with the predictive offset direction to obtain the toy's escape direction vector; Obstacle Avoidance Module: Acquires the obstacle distance of the toy, determines the distance weight for each direction based on the obstacle distance, and performs a weighted summation of the unit direction vectors for each direction based on the distance weights to obtain the obstacle avoidance direction vector; Control Module: Determines the escape direction weight and obstacle avoidance weight based on the distance between the toy and the pet, and the distance between the toy and the obstacle, respectively. The escape direction weight and obstacle avoidance weight are fused with the escape direction vector and obstacle avoidance direction vector to output control commands.
[0084] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
Claims
1. A method for controlling a pet toy, characterized in that, Includes the following steps: Get pet location information; Based on the pet's location information and the location coordinates of the pet toy, the distance between the pet toy and the pet is calculated, and the escape direction of the pet toy is determined. Based on the center coordinates of the pet at the current moment and the center coordinates at the previous moment, the movement trend of the pet is predicted. The movement trend of the pet is based on the environmental distance information of the pet toy in a preset direction to obtain a predictive offset direction. The escape direction is superimposed with the predictive offset direction to obtain the escape direction vector of the pet toy. Obtain the obstacle distance of the pet toy, determine the distance weight in each direction based on the obstacle distance, and perform a weighted summation of the unit direction vectors in each direction based on the distance weight in each direction to obtain the obstacle avoidance direction vector; Based on the distance between the pet toy and the pet, and the distance between the pet toy and the obstacle, the escape direction weight and obstacle avoidance weight are determined respectively. The escape direction weight and obstacle avoidance weight are fused with the escape direction vector and obstacle avoidance direction vector to output control commands.
2. The control method for pet toys according to claim 1, characterized in that: This also includes determining the search center point based on the pet's momentum before it disappeared, when the pet's location information cannot be obtained. ; in, The last known coordinates before the pet disappeared. For historical frames, The historical velocity vector of the pet in the i frames before it disappeared. For frame interval, This is the motion decay factor.
3. The control method for pet toys according to claim 1, characterized in that, Based on the pet's current center coordinates and the center coordinates of the previous moment, the pet's movement trend is predicted. This movement trend is based on a predictive offset direction obtained from the environmental distance information of the pet toy in a preset direction. The escape direction is then superimposed with the predictive offset direction to obtain the pet toy's escape direction, including: Calculate the pet's velocity vector based on the pet's current center coordinates and the center coordinates of the previous moment, and determine the pet's direction of movement based on the velocity vector; In the direction perpendicular to the direction of the pet's movement, determine the left candidate offset direction or the right candidate offset direction; Obtain the first environmental distance of the pet toy in the preset left direction and the second environmental distance in the preset right direction; The first environmental distance is compared with the second environmental distance, and the predictive offset direction is determined from the left candidate offset vector or the right candidate offset vector based on the comparison result; The escape direction is superimposed with the predicted offset direction to obtain the escape direction of the pet toy.
4. The control method for pet toys according to claim 3, characterized in that: The escape direction vector of the pet toy is : in, For vector normalization, Let be the escape direction vector of the pet toy. For predictive bias weighting coefficients, For predictive offset direction, For the amplitude of random disturbance, It is a zero-mean random vector.
5. The control method for pet toys according to claim 4, characterized in that: The escape direction vector of the pet toy is : in, The coordinates of the current position of the pet toy. The coordinates of the pet's current location. The distance between the pet toy and the pet.
6. The control method for pet toys according to claim 3, characterized in that: The left candidate offset vector is : The right candidate offset vector is : in, This is the opposite of the Y-axis component representing the direction of the pet's movement. Let X represent the component of the pet's movement direction on the X-axis. Let Y be the component of the pet's movement direction on the Y-axis. It is the negative number of the component of the pet's movement direction on the X-axis.
7. The method for controlling a pet toy according to claim 1, characterized in that: The obstacle avoidance direction vector is : in, The distance weights are in the left direction. Let be the unit direction vector to the left. The distance weights are for the forward direction. This is the unit direction vector in the preceding direction. The distance weight is in the right direction. This is the unit direction vector to the right.
8. The method for controlling a pet toy according to claim 7, characterized in that: The escape direction vector and obstacle avoidance direction vector are fused according to the direction weight and obstacle avoidance weight, and the output control command is as follows: in, Let the motion vector of the pet toy be... The normalized escape direction weight coefficients. Let be the escape direction vector of the pet toy. These are the normalized obstacle avoidance direction weight coefficients. This is the obstacle avoidance direction vector; in, The unnormalized escape direction weighting coefficient. These are the unnormalized obstacle avoidance direction weight coefficients.
9. The control method for a pet toy according to claim 8, characterized in that: The unnormalized escape direction weighting coefficient for: The unnormalized obstacle avoidance direction weight coefficient for: in, Given the current escape intensity of the pet toy, Given the current level of danger of obstacles, This is for obstacle avoidance margin.
10. A control system for a pet toy, characterized in that, include: Acquisition module: Used to obtain pet location information; Escape module: used to calculate the distance between the pet toy and the pet based on the pet's location information and the location coordinates of the pet toy, and to determine the escape direction of the pet toy; Escape Module: Used to predict the pet's movement trend based on the pet's current center coordinates and the center coordinates of the previous moment. The pet's movement trend is based on the environmental distance information of the pet toy in a preset direction to obtain a predictive offset direction. The escape direction is superimposed with the predictive offset direction to obtain the escape direction vector of the pet toy. Obstacle avoidance module: Used to obtain the distance to obstacles on pet toys, determine the distance weight in each direction based on the obstacle distance, and perform a weighted summation of the unit direction vectors in each direction based on the distance weight in each direction to obtain the obstacle avoidance direction vector; Control module: Used to determine the escape direction weight and obstacle avoidance weight based on the distance between the pet toy and the pet, and the distance between the pet toy and the obstacle, respectively. The escape direction weight and obstacle avoidance weight are fused with the escape direction vector and obstacle avoidance direction vector to output control commands.
Citation Information
Patent Citations
CN118614419A
CN120685083A