Trolley path planning method and trolley
By combining an improved A* algorithm with real-time sensor data and user-defined strategies, the problem of high response delay of traditional toy car path planning algorithms to dynamic obstacles is solved, and real-time obstacle avoidance and user interaction support for the car in dynamic environments are achieved.
Patent Information
- Application Number
- CN202510683819.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-23
AI Technical Summary
The path planning algorithm of traditional toy cars cannot adapt to dynamic obstacles, has high response delay, and cannot combine user interaction and real-time sensor data, resulting in collision risks and inflexible path planning.
An improved A* algorithm is used in combination with real-time sensor data and user-defined strategies to update node cost values through the cost map, plan paths in real time, and support user-side remote control and status monitoring.
The car can avoid obstacles in real time in a dynamic environment, reduce its dependence on the initial map, improve the flexibility and applicability of path planning, and support user interaction and remote control.
Smart Images

Figure CN120685083A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent toys and the Internet of Things, and in particular to a trolley path planning method and a trolley. Background Art
[0002] Traditional toy car path planning algorithms (such as the classic A algorithm) are typically based on a static environment assumption and are unable to adapt to dynamic obstacles (such as moving pets and children's toys). They also have high response delays (>300ms) to dynamic obstacles, which can easily lead to collision risks. Furthermore, traditional path planning algorithms suffer from fixed cost functions that make them unsuitable for complex home environments (such as temporary obstacles) and prevent users from intervening in path planning via their mobile phones.
[0003] Although existing improvement schemes can improve search efficiency, such as improving the A* algorithm, they rely on preset environmental maps and are not combined with real-time sensor data; another example is ultrasonic obstacle avoidance technology, but it has the problem of separation of path planning and obstacle avoidance decision-making, and low efficiency; another example is the dynamic weighting method, but it still does not involve user interaction functions. Summary of the Invention
[0004] In view of this, it is necessary to provide a car path planning method and a car to integrate real-time sensor data and user-defined strategies with the car path planning, thereby realizing intelligent obstacle avoidance path planning that supports real-time remote control and status monitoring on the user side.
[0005] To achieve the above technical effects, in a first aspect, the present invention provides a vehicle path planning method, which is applied to a main control chip configured on a vehicle, wherein the vehicle is also equipped with a sensor module for detecting obstacles and monitoring the vehicle's motion state. The method comprises: Generate an initial path based on an improved A* algorithm according to a cost map sent by an external user terminal to the main control chip, wherein the cost map includes: an idle area composed of a plurality of nodes, a fixed obstacle area, and an electronic fence area; When the car is traveling along the initial path, the cost value of each node on the cost map is updated according to the sensor information sent by the sensor module and the electronic fence area modification information sent by the external user terminal; The planned path is updated based on the improved A* algorithm and the cost value.
[0006] In some embodiments of the present invention, the sensor information includes: static obstacle node information and dynamic obstacle node information; The static obstacle node information includes: the node occupied by the static obstacle and the confidence level; The dynamic obstacle node information includes: the node occupied by the dynamic obstacle and the confidence level.
[0007] In some embodiments of the present invention, updating the cost value of each node on the costmap according to the sensor information sent by the sensor module and / or the electronic fence area modification information sent by the external user terminal includes: The cost value of the nodes within the preset range is updated based on the sensor information and / or the cost value of the global node is updated based on the electronic fence area modification information.
[0008] In some embodiments of the present invention, updating the node cost value within a preset range based on the sensor information includes: Preprocessing the static obstacle node information and the dynamic obstacle node information; Based on the preset weights, the pre-processed static obstacle node information and dynamic obstacle node information are confidence-fused to obtain the cost value of the node occupied by the obstacle.
[0009] In some embodiments of the present invention, the updating of the planning path based on the improved A* algorithm and the cost value includes: Performing node expansion at the node where the car is currently located, during the node expansion process, eliminating nodes on the electronic fence area, nodes occupied by static obstacles, and nodes occupied by dynamic obstacles to obtain a number of valid nodes; Substituting the cost value of the node occupied by the obstacle and the cost value of the nodes within the electronic fence area into a preset cost formula to calculate the cost value of the plurality of valid nodes; Update the planned path based on the cost values of several valid nodes.
[0010] In some embodiments of the present invention, the trolley is further provided with a motor drive module for driving and braking the trolley, and the sensor information further includes: motion state information of the trolley; The method further comprises: When the motion state information exceeds a preset threshold, updating of the planned path is suspended, and a first control instruction is sent to the motor drive module of the car to brake the car.
[0011] In some embodiments of the present invention, the vehicle is further provided with an image acquisition module, and the method further comprises: When no sensor information is received from the sensor module within a preset time interval, a second control instruction is sent to the image acquisition module to start the image acquisition module; Acquiring environmental image data sent by the image acquisition module; Processing the environmental image data to identify whether there is an obstacle in the environmental image data and determine the position of the obstacle relative to the vehicle; The planned path is updated based on the position.
[0012] In a second aspect, the present invention further provides a vehicle comprising: Wireless communication module; Sensor module, used to detect obstacles and monitor the motion status of the car; A motor drive module, used to drive or stop the vehicle; A main control chip stores a program for implementing the vehicle path planning method described in any one of the above method items. The main control chip is connected to the external user terminal through the wireless communication module, and is electrically connected to the motor drive module and the sensor module. It is used to control the driving path of the vehicle according to the planned path generated by the program, and to send a first control instruction to the motor drive module to stop the vehicle when the motion state information exceeds a preset threshold.
[0013] In some embodiments of the present invention, the vehicle further comprises: Image acquisition module; The main control chip is also electrically connected to the image acquisition module, and is used to send a second control instruction to the image acquisition module to start the image acquisition module when no sensor information is received from the sensor module within a preset time interval, and at the same time call the program to update the planned path.
[0014] In some embodiments of the present invention, further comprising: An alarm module, electrically connected to the main control chip; A default path is also stored in the main control chip. The main control chip is also used to start the alarm module to sound an alarm when it detects that the driving current of the motor drive module is greater than a preset threshold. It is also used to call the default path to control the driving path of the car when it detects that the communication of the wireless communication module is interrupted.
[0015] The beneficial effects of the present invention are as follows: the present invention provides a method for path planning of a small vehicle, which first performs preliminary path planning based on the cost map sent by the external user terminal. When the small vehicle moves according to the initial planned path, the obstacle information obtained by the sensor module on the small vehicle and / or the electronic fence area re-divided when the user interacts with the user terminal are obtained in real time. Then, the improved A* planning algorithm is used to update the node cost value in real time in combination with the obstacle information and / or the electronic fence area, thereby completing the path update. This method effectively reduces the dependence of the path planning algorithm on the initial map, so that the small vehicle has the characteristics of adaptability during driving, and can update the path in real time in combination with environmental information to achieve effective obstacle avoidance. At the same time, the present invention also integrates the interaction between the user and the user terminal into the path planning process, thereby improving the flexibility and applicability of the entire path planning algorithm. The present invention successfully integrates real-time sensor data and user-defined strategies with the small vehicle path planning, thereby effectively realizing intelligent obstacle avoidance path planning that supports real-time remote control and status monitoring of the user terminal. BRIEF DESCRIPTION OF THE DRAWINGS In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A schematic diagram of a flow chart of an embodiment of a vehicle path planning method provided by the present invention; Figure 2 for Figure 1 A flow chart of an embodiment of step S103; Figure 3 This is a structural schematic diagram of an embodiment of the trolley provided by the present invention. DETAILED DESCRIPTION
[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0018] In the description of the embodiments of the present invention, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship between associated objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.
[0019] The terms "first," "second," and so on, used in the embodiments of the present invention are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, technical features designated as "first" or "second" may explicitly or implicitly include at least one such feature.
[0020] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0021] Before presenting the embodiments of the present invention, the following concepts are first explained: (1) Improved A* algorithm: The full name is the improved A-Star algorithm, also known as the sparse A-Star algorithm (SAS). This algorithm makes the planned trajectory converge quickly by accurately and effectively pruning states that do not meet the requirements, making it applicable to real-time planning.
[0022] (2) IMU (Inertial Measurement Unit): A device used to measure the three-axis attitude angle (or angular rate) and acceleration of an object.
[0023] The present invention provides a trolley path planning method and a trolley, which are described below respectively.
[0024] Figure 1 This is a flow chart of an embodiment of the path planning method provided by the present invention, which is applied to the main control chip installed on the car, such as Figure 1 As shown in Figure 2, the vehicle path planning method includes: S101 , generating an initial path based on an improved A* algorithm according to a cost map sent by an external user terminal to a main control chip.
[0025] The cost map includes: an idle area consisting of several nodes, a fixed obstacle area, and an electronic fence area.
[0026] S102: While the car is traveling along the initial path, the cost value of each node on the cost map is updated according to the sensor information sent by the sensor module and the electronic fence area modification information sent by the external user terminal.
[0027] In some embodiments of the present invention, the sensor information includes: static obstacle node information and dynamic obstacle node information; The static obstacle node information includes: the nodes occupied by the static obstacle and the confidence level; The dynamic obstacle node information includes: the node occupied by the dynamic obstacle and the confidence level.
[0028] Preferably, the sensor module installed on the car includes at least: an ultrasonic sensor and an infrared sensor, wherein the ultrasonic sensor detects the distance of static obstacles in the front, left and right directions at a frequency of 10Hz; the infrared sensor obtains the intensity of close-range (<30cm) dynamic obstacles (such as pets) at a frequency of 20Hz.
[0029] Specifically, in some embodiments of the present invention, step S102 includes: The cost value of the nodes within the preset range is updated based on the sensor information and / or the cost value of the global node is updated based on the electronic fence area modification information.
[0030] Furthermore, in some embodiments of the present invention, updating the node cost value within a preset range based on the sensor information includes: Preprocess the static obstacle node information and the dynamic obstacle node information.
[0031] Preferably, median filtering is performed on ultrasonic data (i.e., static obstacle node information), and dynamic threshold calibration is used for infrared data (i.e., dynamic obstacle node information), that is, the sensitivity is adjusted according to the ambient light.
[0032] Based on the preset weights, the pre-processed static obstacle node information and dynamic obstacle node information are confidence-fused to obtain the cost value of the node occupied by the obstacle.
[0033] Specifically, the confidence fusion formula is as follows: (1) In formula (1), represents the cost value of the node occupied by the obstacle, represents the confidence of static obstacles, Indicates the confidence level of dynamic obstacles.
[0034] S103. Update the planned path based on the improved A* algorithm and the cost value.
[0035] like Figure 2 In some embodiments of the present invention, step S103 includes: S201, performing node expansion at the node where the car is currently located. During the node expansion process, nodes in the electronic fence area, nodes occupied by static obstacles, and nodes occupied by dynamic obstacles are eliminated to obtain several valid nodes; S202: Substitute the cost values of the nodes occupied by the obstacle and the cost values of the nodes within the electronic fence area into a preset cost formula to calculate the cost values of several valid nodes.
[0036] Specifically, the cost formula is as follows: (2) In formula (2), represents the cost value, represents the actual cost value, represents the cost value of the node occupied by the obstacle, Indicates the angular velocity value of the inertial measurement unit, Indicates the geo-fence area cost value.
[0037] S203: Update the planned path based on the cost values of several valid nodes.
[0038] In addition, after valid nodes are expanded, priority queue management and path smoothing can be performed on the nodes, including: A minimum heap is used to maintain the nodes to be visited. The search is terminated when the queue is empty or the end point is found. Bezier curves are used to optimize turning points and limit the maximum curvature to avoid exceeding the minimum turning radius of the car.
[0039] Compared with the prior art, the present invention provides a method for car path planning. First, preliminary path planning is performed based on a cost map sent by an external user terminal. As the car moves along the initially planned path, obstacle information acquired by the car's sensor module and / or the electronic fence area re-divided when the user interacts with the user terminal are obtained in real time. Then, an improved A* planning algorithm is used to update the node cost value in real time in combination with the obstacle information and / or the electronic fence area, thereby completing the path update. This method effectively reduces the path planning algorithm's dependence on the initial map, allowing the car to adapt to changes during driving and update the path in real time in combination with environmental information to achieve effective obstacle avoidance. At the same time, the present invention also integrates the interaction between the user and the user terminal into the path planning process, thereby improving the flexibility and applicability of the entire path planning algorithm. The present invention successfully integrates real-time sensor data and user-defined strategies with the car's path planning, thereby effectively realizing intelligent obstacle avoidance path planning that supports real-time remote control and status monitoring of the user terminal.
[0040] The above steps only illustrate that the present invention can achieve automatic obstacle avoidance and user interaction. Considering the stability of the vehicle's operation, in some embodiments of the present invention, the vehicle is also equipped with a motor drive module for driving and braking the vehicle, and the sensor information also includes: the vehicle's motion state information.
[0041] Preferably, in the present invention, the sensor module further includes: an IMU. Accordingly, the motion state information of the car is the angular velocity and acceleration of the car measured by the IMU.
[0042] In some embodiments of the present invention, the trolley is further provided with a motor drive module for driving and braking the trolley, and the sensor information further includes: motion state information of the trolley; The method further includes: S104: When the motion state information exceeds a preset threshold, suspend updating the planned path and send a first control instruction to the motor drive module of the car to brake the car.
[0043] Furthermore, considering the stability of the car during actual driving, in order to avoid the failure of the sensor module resulting in the car being unable to automatically avoid obstacles, in some embodiments of the present invention, the car is further equipped with an image acquisition module, and the method further includes: S105, when no sensor information is received from the sensor module within a preset time interval, sending a second control instruction to the image acquisition module to start the image acquisition module; S106, acquiring environmental image data sent by the image acquisition module; S107: Process the environmental image data to identify whether there is an obstacle in the environmental image data and determine the position of the obstacle relative to the vehicle; S108: Update the planned path based on the position.
[0044] In summary, the triggering conditions and responses for updating the planned path of the present invention are shown in Table 1 below: Table 1 Trigger conditions and responses for updating planned paths
[0045] Furthermore, in order to further explain the implementation of the present invention, an example of a typical scenario process is further given in this embodiment: ①Static obstacle avoidance Ultrasonic detection of obstacles 30 cm ahead (obstacle_confidence=0.9); Update the local cost map (obstacle node cost = 10.0 × (1-0.9) = 1.0); Replan and generate a detour path (steering angle 25°); Motor differential speed control enables smooth steering.
[0046] ②Dynamic obstacles (pet movement) Infrared sensors detect sudden lateral obstacles; Confidence fusion result obstacle_confidence = 0.3 (low confidence safe area); The dynamic adjustment cost is 10.0×(1-0.3)=7.0; The path immediately turns left to avoid the obstacle, and an alarm message is pushed to the mobile phone APP via MQTT.
[0047] ③User sets up electronic fence The mobile phone APP draws a polygonal restricted area and sends it to the car; Global cost map updated (fixed cost of restricted area nodes +5.0); Full path replanning to avoid restricted areas; The updated path track is displayed on the APP interface.
[0048] like Figure 3 In a second aspect, the present invention further provides a trolley 30, comprising: Wireless communication module 310; Sensor module 320, used to detect obstacles and monitor the motion status of the vehicle; The motor drive module 330 is used to drive or stop the vehicle; The main control chip 340 stores a program for implementing the vehicle path planning method of any one of the above-mentioned method items. The main control chip 340 is connected to the external user terminal through the wireless communication module 310, and is electrically connected to the motor drive module 330 and the sensor module 320. It is used to control the driving path of the vehicle 30 according to the planned path generated by the program, and to send a first control instruction to the motor drive module 330 to stop the vehicle 30 when the motion state information exceeds a preset threshold.
[0049] In some embodiments of the present invention, the cart 30 further comprises: Image acquisition module 350; The main control chip 340 is also electrically connected to the image acquisition module 350, and is used to send a second control instruction to the image acquisition module 320 to start the image acquisition module 320 when no sensor information is received from the sensor module 320 within a preset time interval, and at the same time call the program to update the planned path.
[0050] In some embodiments of the present invention, the cart 30 further comprises: The alarm module 360 is electrically connected to the main control chip 340; A default path is also stored in the main control chip 340. The main control chip 340 is also used to start the alarm module 360 to sound an alarm when it detects that the driving current of the motor drive module 330 is greater than a preset threshold, and to call the default path to control the driving path of the car when it detects that the communication of the wireless communication module 310 is interrupted.
[0051] In summary, the vehicle provided by the present invention has an abnormal situation handling mechanism, as shown in Table 2 below: Table 2 Abnormal situation handling mechanism
[0052] The above is a detailed introduction to a trolley path planning method and a trolley provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A vehicle path planning method, applied to a main control chip configured on a vehicle, wherein the vehicle is also equipped with a sensor module for detecting obstacles and monitoring the vehicle's motion state, the method comprising: Generate an initial path based on an improved A* algorithm according to a cost map sent by an external user terminal to the main control chip, wherein the cost map includes: an idle area composed of a plurality of nodes, a fixed obstacle area, and an electronic fence area; When the car is traveling along the initial path, the cost value of each node on the cost map is updated according to the sensor information sent by the sensor module and the electronic fence area modification information sent by the external user terminal; The planned path is updated based on the improved A* algorithm and the cost value.
2. The vehicle path planning method according to claim 1, characterized in that: The sensor information includes: static obstacle node information and dynamic obstacle node information; The static obstacle node information includes: the node occupied by the static obstacle and the confidence level; The dynamic obstacle node information includes: the node occupied by the dynamic obstacle and the confidence level.
3. The vehicle path planning method according to claim 2, characterized in that: The updating of the cost value of each node on the cost map according to the sensor information sent by the sensor module and / or the electronic fence area modification information sent by the external user terminal includes: The cost value of the nodes within the preset range is updated based on the sensor information and / or the cost value of the global node is updated based on the electronic fence area modification information.
4. The vehicle path planning method according to claim 3, characterized in that: The updating of the node cost value within a preset range based on the sensor information includes: Preprocessing the static obstacle node information and the dynamic obstacle node information; Based on the preset weights, the pre-processed static obstacle node information and dynamic obstacle node information are confidence-fused to obtain the cost value of the node occupied by the obstacle.
5. The vehicle path planning method according to any one of claim 4, characterized in that: The updated planning path based on the improved A* algorithm and the cost value includes: Performing node expansion at the node where the car is currently located, during the node expansion process, eliminating nodes on the electronic fence area, nodes occupied by static obstacles, and nodes occupied by dynamic obstacles to obtain a number of valid nodes; Substituting the cost value of the node occupied by the obstacle and the cost value of the nodes within the electronic fence area into a preset cost formula to calculate the cost value of the plurality of valid nodes; Update the planned path based on the cost values of several valid nodes.
6. The vehicle path planning method according to claim 1, characterized in that: The trolley is also equipped with a motor drive module for driving and braking the trolley, and the sensor information also includes: motion state information of the trolley; The method further comprises: When the motion state information exceeds a preset threshold, updating of the planned path is suspended, and a first control instruction is sent to the motor drive module of the car to brake the car.
7. The vehicle path planning method according to claim 1, wherein the vehicle is further provided with an image acquisition module, characterized in that: The method further comprises: When no sensor information is received from the sensor module within a preset time interval, a second control instruction is sent to the image acquisition module to start the image acquisition module; Acquiring environmental image data sent by the image acquisition module; Processing the environmental image data to identify whether there is an obstacle in the environmental image data and determine the position of the obstacle relative to the vehicle; The planned path is updated based on the position.
8. A small car, characterized in that: include: Wireless communication module; Sensor module, used to detect obstacles and monitor the motion status of the car; A motor drive module, used to drive or stop the vehicle; A main control chip stores a program for implementing the vehicle path planning method according to any one of claims 1 to 7. The main control chip is connected to the external user terminal through the wireless communication module, and is electrically connected to the motor drive module and the sensor module. It is used to control the driving path of the vehicle according to the planned path generated by the program, and to send a first control instruction to the motor drive module to stop the vehicle when the motion state information exceeds a preset threshold.
9. A trolley according to claim 8, characterized in that: The trolley also includes: Image acquisition module; The main control chip is also electrically connected to the image acquisition module, and is used to send a second control instruction to the image acquisition module to start the image acquisition module when no sensor information is received from the sensor module within a preset time interval, and at the same time call the program to update the planned path.
10. A trolley according to claim 8, characterized in that: Also includes: An alarm module, electrically connected to the main control chip; A default path is also stored in the main control chip. The main control chip is also used to start the alarm module to sound an alarm when it detects that the driving current of the motor drive module is greater than a preset threshold. It is also used to call the default path to control the driving path of the car when it detects that the communication of the wireless communication module is interrupted.
Citation Information
Cited By
A control method and system for a pet toy
CN122363302A