ROS-based PID formation control method and system for multiple intelligent unmanned vehicles, and application
By designing a multi-intelligent unmanned vehicle PID formation control method on the ROS platform, the problems of insufficient formation control flexibility and poor migration of multi-scene applications in the existing technology are solved, and efficient formation control and static object tracking are realized in Gazebo scenarios.
Patent Information
- Application Number
- CN202411898676.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-03-28
AI Technical Summary
The existing multi-agent system has problems such as insufficient flexibility in formation control and collaborative tracking and poor migration of multi-scenario applications.
Based on the ROS platform, a multi-intelligent unmanned vehicle PID formation control method is designed, and a high-simulation environment is established in the Gazebo scenario, and aggregation and decentralized formation control of multi-intelligent unmanned vehicles are realized, as well as collaborative tracking of static objects are achieved by establishing a high-simulation environment in the Gazebo scenario, using the PID control law.
It realizes efficient multi-intelligent unmanned vehicle fleet control and static object tracking in complex environments, improving the flexibility of fleet control and the migration of multi-scene applications.
Smart Images

Figure CN119717490A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multi-intelligent unmanned vehicle formation control, and in particular to a ROS-based multi-intelligent unmanned vehicle PID formation control method, system and application. Background Art
[0002] A multi-agent system (MAS) consists of agents and environments, and agents can be divided into two types: passive agents, agents with simple goals, and cognitive agents. The agent environment is complex and diverse, including virtual, discrete, and continuous scenes, but the collaborative control of multi-agents is more widely used. For example, in military applications, agents represented by drones, unmanned vehicles, and unmanned surface vessels are usually studied based on the problem of multi-agent collaborative tracking when performing military combat reconnaissance and strike missions. With the rapid development of autonomous driving technology, smart transportation and high-tech military strikes have also become important issues that need to be urgently solved in multi-agent systems (MAS).
[0003] Multi-agent formation control is a research issue that has attracted much attention. Classic control methods include leader-follower-based, virtual structure-based, artificial potential field-based, behavior-based and path-following-based schemes. Among them, the leader-follower-based formation control method is traditional and efficient, with a simple and easy-to-implement control structure, that is, all members in the formation are designated as leaders or followers. The leader navigates along a predetermined or set route to control the movement trend of the entire formation, and the followers follow the leader based on their distance and azimuth information relative to the leader to achieve formation control; the virtual structure-based formation control method aims to treat all members of the formation as a whole in a unified manner, that is, first determine the kinematic and dynamic characteristics of the virtual structure, derive the characteristics of the virtual target point in the system structure, and design a control law to enable the robot to track the target point to control the formation. This method is convenient for standardizing formation behavior and maintaining formation, but lacks flexibility due to the constraints of specific physical structure; the formation control method based on path following is suitable for complex environments with limited communication. The mainstream approach is to decompose the formation control task, obtain spatial path following and time coordination synchronization tasks respectively, and designate a navigator or virtual navigator as a reference standard for information synchronization for the synchronization information, thereby assisting the formation to achieve collaborative control.
[0004] In addition, in recent years, multi-agent tracking control has also involved a lot of research, mainly focusing on the tracking control of mobile robots, such as studying the stability of mobile robot feedback tracking control systems, or designing time-varying point stabilization controllers to successfully achieve path following. Theoretical engineering research on multi-agent tracking control has also yielded many results: for example, Tanner et al. analyzed and proved how to stably control the cluster motion of multi-agents under static structures. [1], and further verified the feasibility of stably controlling the motion of multi-agent clusters under dynamic structures; another study [2] designed a multi-agent target tracking algorithm based on K-dominant formation, that is, assuming that the target moves in a perturbed dynamic motion, and designed a K-cover formation control method for each non-holonomic agent to improve the tracking quality. Secondly, Li Zhongkui et al. [3] A distributed tracking method is proposed to solve linear multi-agent systems where the leader has unknown bounded input conditions. GPKladis [4] The tracking control of UAV groups under communication delay is described and its stability is verified. [5] A multi-robot formation tracking control algorithm based on a unicycle structure is designed, and a collaborative controller design method is proposed, which forces a group of N unicycle-type mobile robots with limited sensing range to perform the required formation tracking and ensure that there is no collision between the robots. Related research on the consistency tracking problem of multi-agent systems also designs an iterative learning control algorithm to meet the time optimal strategy [6] .
[0005] With the rapid development of autonomous driving technology, smart transportation and high-tech military strikes have become important issues that need to be urgently addressed in multi-agent systems (MAS). Summary of the invention
[0006] Therefore, the present invention proposes a ROS-based multi-intelligent unmanned vehicle PID formation control method, system and application, establishes a complex high-simulation Gazebo scene based on the ROS (Robot Operating System) platform, and designs a PID control method different from the traditional formation control method to realize the concentrated / distributed formation control of multi-intelligent unmanned vehicles and the collaborative tracking of static objects.
[0007] According to one aspect of the present invention, a multi-intelligent unmanned vehicle PID formation control method based on ROS is proposed, and the method comprises the following steps:
[0008] Obtaining real-time movement speed, expected movement speed, real-time position and expected position of multiple unmanned vehicles of the first type and the second type;
[0009] Calculate the speed deviation between the real-time motion speed and the expected motion speed, and the position deviation between the real-time position and the expected position;
[0010] Calculating and obtaining a first set of rotational torques of the first type of multiple unmanned vehicles based on speed deviations, position deviations and a first control law corresponding to the first type of multiple unmanned vehicles; and controlling the first type of multiple unmanned vehicles to reach a desired position at a desired movement speed based on the first set of rotational torques;
[0011] A second set of torques for the multiple unmanned vehicles of the second type are calculated based on the speed deviations, position deviations and second control laws corresponding to the multiple unmanned vehicles of the second type; and based on the second set of torques, the multiple unmanned vehicles of the second type are controlled to reach the desired position at the desired movement speed.
[0012] Furthermore, the first control law is:
[0013]
[0014] Where, τ represents a torque in the first group of torques; K p ,K v and K i represent the proportional parameter, differential parameter and integral parameter respectively; Indicates position deviation, Indicates speed deviation; is the integral term based on the position error term integrated over time t and velocity v, and
[0015]
[0016] goal x(σ) represents the x-axis coordinate of the expected position at time t, current x(σ) Indicates the x-axis coordinate of the real-time position, goal y(σ) Indicates the y-axis coordinate of the desired position, current y(σ) Indicates the y-axis coordinate of the real-time position; σ indicates the unit change of the position deviation function;
[0017] The second control law is:
[0018]
[0019] Wherein, U(t) represents one of the torques in the second group of torques; K p2 , K d2 and K i2 They represent proportional parameter, differential parameter and integral parameter respectively; E(t) represents position deviation or speed deviation; Indicates the change in position error or speed error; when E(T) is the position deviation, its expression is:
[0020]
[0021] goal(X, T) is the x-axis coordinate of the desired position, current(X, T) is the x-axis coordinate of the current position at time T, goal(y, T) is the y-axis coordinate of the desired position, and current(y, T) is the y-axis coordinate of the current position at time T;
[0022] When E(T) is the speed deviation, its expression is:
[0023] E(T)=goal(v,T)-current(v,T)
[0024] goal(v,T) represents the expected movement speed at time T; current(v,T) represents the current movement speed at time T.
[0025] Furthermore, the first type of unmanned vehicle is a Turtlebot2 robot car; the second type of unmanned vehicle is a Turtlebot3 robot car.
[0026] Furthermore, the motion equation corresponding to the Turtlebot2 or Turtlebot3 robot car is:
[0027]
[0028] Among them, u l and u r is the speed of the left and right wheels, x, y represents the position coordinates of the Turtlebot2 robot car, represents the angular velocity; L represents the distance between the two wheels of the trolley; r represents the wheel radius; θ represents the rotation angle of the machine trolley.
[0029] According to another aspect of the present invention, a multi-intelligent unmanned vehicle PID formation control system based on ROS is proposed, the system comprising:
[0030] a data acquisition module configured to acquire real-time motion speed, expected motion speed, real-time position, and expected position of a plurality of unmanned vehicles of the first type and the second type;
[0031] A deviation calculation module, configured to calculate a speed deviation between a real-time motion speed and a desired motion speed, and a position deviation between a real-time position and a desired position;
[0032] a torque calculation module configured to calculate a first set of rotational torques for the plurality of unmanned vehicles of the first type based on speed deviations, position deviations and a first control law corresponding to the plurality of unmanned vehicles of the first type; and to calculate a second set of rotational torques for the plurality of unmanned vehicles of the second type based on speed deviations, position deviations and a second control law corresponding to the plurality of unmanned vehicles of the second type;
[0033] A control module is configured to control multiple unmanned vehicles of a first type to reach a desired position at a desired speed based on a first set of rotational torques; and to control multiple unmanned vehicles of a second type to reach a desired position at a desired speed based on a second set of rotational torques.
[0034] Furthermore, the first control law in the torque calculation module is:
[0035]
[0036] Where, τ represents a torque in the first group of torques; K p ,K v and K i represent the proportional parameter, differential parameter and integral parameter respectively; Indicates position deviation, Indicates speed deviation; is the integral term based on the position error term integrated over time t and velocity v, and
[0037]
[0038] goal x(σ) represents the x-axis coordinate of the expected position at time t, current x(σ) Indicates the x-axis coordinate of the real-time position, goal y(σ) Indicates the y-axis coordinate of the desired position, current y(σ) Indicates the y-axis coordinate of the real-time position; σ indicates the unit change of the position deviation function;
[0039] The second control law is:
[0040]
[0041] Wherein, U(t) represents one of the torques in the second group of torques; K p2 , K d2 and K i2 They represent proportional parameter, differential parameter and integral parameter respectively; E(t) represents position deviation or speed deviation; Indicates the change in position error or speed error; when E(T) is the position deviation, its expression is:
[0042]
[0043] goal(X, T) is the x-axis coordinate of the desired position, current(X, T) is the x-axis coordinate of the current position at time T, goal(y, T) is the y-axis coordinate of the desired position, and current(y, T) is the y-axis coordinate of the current position at time T;
[0044] When E(T) is the speed deviation, its expression is:
[0045] E(T)=goal(v,T)-current(v,T)goal(v,T) represents the expected movement speed at time T; current(v,T) represents the current movement speed at time T.
[0046] Furthermore, the first type of unmanned vehicle is a Turtlebot2 robot car; the second type of unmanned vehicle is a Turtlebot3 robot car.
[0047] Furthermore, the motion equation corresponding to the Turtlebot2 or Turtlebot3 robot car is:
[0048]
[0049] Among them, u l and u r is the speed of the left and right wheels, x, y represents the position coordinates of the Turtlebot2 robot car, represents the angular velocity; L represents the distance between the two wheels of the trolley; r represents the wheel radius; θ represents the rotation angle of the machine trolley.
[0050] According to another aspect of the present invention, an application of a multi-intelligent unmanned vehicle PID formation control method based on ROS is proposed, and the application includes:
[0051] The following simulation environment is established based on the ROS platform: 4 Turtlebot3 robots are placed in a quadrilateral array on the left side of the football field, and a static red ball is placed in the center of the lawn; 3 Turtlebot2 robots are placed in an isosceles triangle array on the right side of the football field;
[0052] The tracking target is set to be a static red ball or a scattered Coke bottle, and based on the ROS-based multi-intelligent unmanned vehicle PID formation control method described in any one of claims 1 to 4, four Turtlebot3 robot cars and three Turtlebot2 robot cars are controlled to enter the central circular area where the static red ball is located in the scene in an initial quadrilateral array or isosceles triangle formation;
[0053] Reposition the initial positions of the four Turtlebot3 robot cars, and based on the ROS-based multi-intelligent unmanned vehicle PID formation control method described in any one of claims 1-4, control the four Turtlebot3 robot cars to disperse from the gathering area to the coke bottles at four different positions in the stone pile area, and control the three Turtlebot2 robot cars to run to three different building areas on the left and right sides of the football field, including white stone piles, red, yellow and blue mechanical equipment and green pine trees; realize gathering or decentralized formation control and collaborative tracking of static objects.
[0054] The beneficial technical effects of the present invention are:
[0055] The present invention focuses on the formation control and cooperative tracking of multiple intelligent unmanned vehicles. It innovatively builds a complex simulation scene of multiple intelligent unmanned vehicles Gazebo based on the ROS platform, designs PID motion control laws for two different robot cars, and successfully applies the PID method to complex formation and object tracking tasks for the first time. Specifically, the beneficial results and innovations of the present invention are as follows:
[0056] The present invention creates a Playground static Gazebo environment by itself, conducts in-depth research on the mechanical operation principles of Turtlebot2 and Turtlebot3, and innovatively designs PID motion control laws suitable for the two robot cars in combination with the path-following formation control method. The multi-intelligent unmanned vehicle PID control Python script is run in the form of a ROS node based on the Launch file. It not only successfully controls multiple unmanned vehicles to arrive at the target area in the form of a formation in the Gazebo environment to complete the tracking task, but also has more flexibility in migrating simulation algorithms to actual applications and more ROS system integration than traditional formation control methods.
[0057] Different from the concentrated PID formation control, the present invention also comprehensively considers the scenario of decentralized PID formation control, that is, firstly updating the initial position of the multi-intelligent unmanned vehicles and adjusting the motion PID parameters of each intelligent body, and successfully realizing the collaborative tracking of multiple static targets (such as 4 Coke bottles, pine trees, stone pestles, and park sports equipment) distributed in different areas of the Playground scene by 4 Turtlebot3Waffle robot cars and 3 Turtlebot2 robot cars. It also further verifies the scene application diversity and generalization and universality of the PID formation control method, and improves the limitations of traditional formation control and object tracking methods that are only applicable to specific scenarios.
[0058] In summary, the present invention has designed and successfully verified the PID formation control and collaborative tracking algorithm based on the highly simulated ROS complex environment. It is not only logically rigorous and has strong generalization ability at the theoretical level, but also has high engineering application value. That is, the code scripts used in the simulation scenario can be directly migrated to drive the multi-intelligent Turtlebot2 and Turtlebot3 physical vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The present invention can be better understood by referring to the description given below in conjunction with the accompanying drawings, which together with the following detailed description are included in this specification and form a part of this specification, and are used to further illustrate the preferred embodiments of the present invention and explain the principles and advantages of the present invention.
[0060] Figure 1 This is a flow chart of a ROS-based multi-intelligent unmanned vehicle PID formation control method described in an embodiment of the present invention.
[0061] Figure 2 This is the Turtlebot2 unmanned vehicle model in an embodiment of the present invention.
[0062] Figure 3 Schematic diagram of a simplified differential drive model of an unmanned vehicle in an embodiment of the present invention.
[0063] Figure 4 Schematic diagram of the underlying control structure of the Turtlebot2 unmanned vehicle in an embodiment of the present invention.
[0064] Figure 5 This is the Turtlebot3 unmanned vehicle model in the embodiment of the present invention.
[0065] Figure 6 This is a PID control block diagram of the position and speed of the Turtlebot3 unmanned vehicle in an embodiment of the present invention.
[0066] Figure 7 Schematic diagram of a static Gazebo scene in a Playground in an embodiment of the present invention.
[0067] Figure 8 This is a diagram showing the effect of PID clustered formation control of multiple intelligent vehicles in the Playground scene in an embodiment of the present invention.
[0068] Fig. 9 This is a diagram showing the effect of PID distributed formation control of multiple intelligent Turtlebot3 Waffle cars in the Playground scene in an embodiment of the present invention.
[0069] Fig.10 This is a diagram showing the effect of PID distributed formation control of multiple intelligent Turtlebot2 vehicles in the Playground scene in an embodiment of the present invention. DETAILED DESCRIPTION
[0070] In order to enable those skilled in the art to better understand the scheme of the present invention, exemplary implementations or embodiments of the present invention will be described below in conjunction with the accompanying drawings. Obviously, the described implementations or embodiments are only implementations or embodiments of a part of the present invention, not all of them. Based on the implementations or embodiments of the present invention, all other implementations or embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present invention.
[0071] The embodiment of the present invention proposes a multi-intelligent unmanned vehicle PID formation control method based on ROS, such as Figure 1As shown, the method comprises the following steps:
[0072] S1, obtaining the real-time movement speed, expected movement speed, real-time position and expected position of multiple unmanned vehicles of the first type and the second type;
[0073] S2, calculating the speed deviation between the real-time motion speed and the expected motion speed, and the position deviation between the real-time position and the expected position;
[0074] S3, calculating and obtaining a first set of rotational torques of the first type of multiple unmanned vehicles based on the speed deviations, position deviations and the first control law corresponding to the first type of multiple unmanned vehicles; calculating and obtaining a second set of rotational torques of the second type of multiple unmanned vehicles based on the speed deviations, position deviations and the second control law corresponding to the second type of multiple unmanned vehicles;
[0075] S4. Based on the first set of rotational torques, control multiple unmanned vehicles of the first type to reach the desired position at the desired movement speed; based on the second set of rotational torques, control multiple unmanned vehicles of the second type to reach the desired position at the desired movement speed.
[0076] According to an embodiment of the present invention, the first type of unmanned vehicle is a Turtlebot2 robot car; the second type of unmanned vehicle is a Turtlebot3 robot car. The Turtlebot2 robot operation development platform is designed by WillowGarage and is the second generation product of the Turtlebot series. It is inexpensive, easy to operate, and highly scalable.
[0077] like Figure 2 As shown in the figure, the main hardware of Turtlebot2 includes Yujin Kobuki series mobile base, 2200mAh battery and detachable mechanical structure module, and is equipped with Kinect visual sensor and dual-core computing notebook. Based on ROS (Robot Operating System) robot operating system, Turtlebot2 can realize basic operating functions such as 3D map navigation and following target objects.
[0078] Turtlebot2 is a differential drive robot with two main wheels of equal radius, each connected to its own motor. To construct a simple constraint model caused by differential drive, assume that the distance between the two wheels is L and the wheel radius is r, as follows: Figure 3 As shown, when the robot moves according to its observations, the equation of motion is:
[0079]
[0080]
[0081] Among them, u l and u r is the speed of the left and right wheels, x, y is the position coordinates of the robot, is the angular velocity; θ represents the rotation angle of the robot car.
[0082] Given the underlying operating principle of Turtlebot2, if you want to make Turtlebot2 run to a specific position in the Playground simulation scene, you need to write a PID control-related script in the ROS package. The underlying control structure of Turtlebot2 is as follows: Figure 4 As shown, the desired position and speed of Turtlebot2 are input to different PID controllers as inputs. Using these inputs and feedback from the system, the controller can generate a force output signal (in the form of motor torque) applied to the system and control the robot to travel along a path to a specific position point.
[0083] In the PID control process, if the exact running speed of Turtlebot2 is set, the output is its position, and the error between the target position and the actual position is calculated, and this error is converted into the voltage of the motor, and finally the Turtlebot2 robot is driven to the target position. The control law of the PID controller is shown as follows:
[0084]
[0085] In the above formula, τ represents the torque, is the position deviation, is the speed deviation, is the integral term based on the position error term of time t and velocity v, where goal x(σ) is the x-coordinate of the expected position at time t, current x(σ) is the x coordinate of the current position, goal y(σ) is the y coordinate of the desired position, currenty (σ) is the y coordinate of the current position, K p ,K v and K i Represent the proportional, differential and integral parameters in the control law respectively. From the control law, we can see that the role of the integral component in the PID controller is to make the steady-state error in the PD control system zero, while the role of the differential component is to suppress the response, which is similar to friction. The desired term is received and subtracted from the actual position and speed to generate position and speed errors, and the calculated torque is input into the Turtlebot2 module to get the actual position and speed of the system.
[0086] Turtlebot3 is the third generation of Turtlebot series products. Figure 5 As shown in the figure, Turtlebot3 has three different types: Burger, Waffle, and Waffle_pi. All three types of robots are two-wheeled robots with differential constraints, so the underlying operating principles are similar. Figure 3 The TurtleBot2 differential drive minimalist model shown is similar.
[0087] However, the control of Turtlebot3 is completely different from that of Turtlebot2. That is, the positions and speeds of the two cars, Waffle and Waffle_pi, in Turtlebot3 are controlled by the following Figure 6 The PID control shown requires adjustment of relevant parameters separately.
[0088] In the code implementation, the PID control of position and speed follows the control law shown below, where K p2 , K d2 and K i2 They represent the proportional parameter, differential parameter and integral parameter in PID control respectively. E(t) can represent the error between the current position and the expected position of Turtlebot3, or the error between the current speed and the expected speed. Indicates the change in position error or speed error:
[0089]
[0090] When E(T) is the position deviation, its expression is:
[0091]
[0092] goal(X, T) is the x-axis coordinate of the desired position, current(X, T) is the x-axis coordinate of the current position at time T, goal(y, τ) is the y-axis coordinate of the desired position, and current(y, T) is the y-axis coordinate of the current position at time T;
[0093] When E(T) is the speed deviation, its expression is:
[0094] E(T)=goal(V,T)-current(V,T) (8)
[0095] goal(v,T) represents the expected movement speed at time T; current(v,T) represents the current movement speed at time T.
[0096] Another embodiment of the present invention provides a multi-intelligent unmanned vehicle PID formation control system based on ROS, the system comprising:
[0097] A data acquisition module, configured to acquire real-time motion speed, expected motion speed, real-time position and expected position of a plurality of unmanned vehicles of a first type and a second type; the first type of unmanned vehicle is a Turtlebot2 robot car; the second type of unmanned vehicle is a Turtlebot3 robot car;
[0098] A deviation calculation module, configured to calculate a speed deviation between a real-time motion speed and a desired motion speed, and a position deviation between a real-time position and a desired position;
[0099] a torque calculation module configured to calculate a first set of rotational torques for the plurality of unmanned vehicles of the first type based on speed deviations, position deviations and a first control law corresponding to the plurality of unmanned vehicles of the first type; and to calculate a second set of rotational torques for the plurality of unmanned vehicles of the second type based on speed deviations, position deviations and a second control law corresponding to the plurality of unmanned vehicles of the second type;
[0100] A control module is configured to control multiple unmanned vehicles of a first type to reach a desired position at a desired speed based on a first set of rotational torques; and to control multiple unmanned vehicles of a second type to reach a desired position at a desired speed based on a second set of rotational torques.
[0101] Among them, the first control law in the torque calculation module is:
[0102]
[0103] Where, τ represents a torque in the first group of torques; K p ,K v and K i represent the proportional parameter, differential parameter and integral parameter respectively; Indicates position deviation, Indicates speed deviation; is the integral term based on the position error term integrated over time t and velocity v, and
[0104]
[0105] goal x(σ) represents the x-axis coordinate of the expected position at time t, current x(σ) Indicates the x-axis coordinate of the real-time position, goal y(σ) Indicates the y-axis coordinate of the desired position, current y(σ) Indicates the y-axis coordinate of the real-time position; σ indicates the unit change of the position deviation function;
[0106] The second control law is:
[0107]
[0108] Wherein, U(t) represents one of the torques in the second group of torques; K p2 , K d2 and K i2 They represent proportional parameter, differential parameter and integral parameter respectively; E(t) represents position deviation or speed deviation; Indicates the change in position error or speed error; when E(T) is the position deviation, its expression is:
[0109]
[0110] goal(X, T) is the x-axis coordinate of the desired position, current(X, T) is the x-axis coordinate of the current position at time T, goal(y, T) is the y-axis coordinate of the desired position, and current(y, T) is the y-axis coordinate of the current position at time T;
[0111] When E(T) is the speed deviation, its expression is:
[0112] E(T)=goal(V,T)-current(V,T)
[0113] goal(v,T) represents the expected movement speed at time T; current(v,T) represents the current movement speed at time T.
[0114] Another embodiment of the present invention provides an application of a multi-intelligent unmanned vehicle PID formation control method based on ROS, and the application includes the following steps:
[0115] First, the following simulation environment is established based on the ROS platform: 4 Turtlebot3 robot cars are placed in a quadrilateral array on the left side of the football field, and a static red ball is placed in the center of the lawn; 3 Turtlebot2 robot cars are arranged in an isosceles triangle array on the right side of the football field; Specifically, the PlaygroundGazebo simulation environment is established by yourself, such as Figure 7 As shown in the figure, four Turtlebot3Waffle robots are placed in a quadrilateral array on the left side of the football field, while a static red ball (position coordinates are (5,0)) is placed in the center of the lawn, and three Turtlebot2 robots are placed in an isosceles triangle array on the right side of the football field.
[0116] Then, the tracking target is set to be a static red ball or a scattered Coke bottle. Based on the ROS-based multi-intelligent unmanned vehicle PID formation control method described in the above embodiment, four Turtlebot3 robots and three Turtlebot2 robots are controlled to form an initial quadrilateral array or isosceles triangle formation to enter the central circular area where the static red ball is located in the scene; the initial positions of the four Turtlebot3 robots are repositioned, and based on the ROS-based multi-intelligent unmanned vehicle PID formation control method described in the above embodiment, the four Turtlebot3 robots are controlled to disperse from the gathering area to the Coke bottles at four different positions in the stone pile area, and the three Turtlebot2 robots are controlled to run to three different building areas on the left and right sides of the football field, including white stone piles, red, yellow and blue mechanical equipment and green pine trees; aggregated or dispersed formation control and collaborative tracking of static objects are realized.
[0117] Specifically, based on the static Gazebo scene, the tracking targets are set as static red balls, scattered Coke bottles, etc., and then two tasks related to multi-agent formation control are designed: (1) PID is used to control four Turtlebot3Waffle robot cars and three Turtlebot2 intelligent robots to enter the central circular area where the red ball is located in the Playground scene in an initial specific rectangular or isosceles triangle formation; (2) The initial positions of the four Turtlebot3Waffles are relocated, and PID is used to control the four Turtlebot3Waffles to disperse from the gathering area to the Coke bottles at four different locations in the stone pile area, while the three Turtlebot2s are controlled by PID and obstacle avoidance algorithms to run to three different building areas on the left and right sides of the football field, including white stone piles, red, yellow and blue mechanical equipment, and green pine trees.
[0118] In different areas of the Playground simulation scene, multi-agent clustered and distributed formation control experiments are carried out respectively. The current positions of the multi-agent cars in the two scenes are obtained based on Gazebo. p And track the location of the target object T p According to the acquired position information of multiple intelligent unmanned vehicles, the Python motion control scripts of multiple vehicles are run simultaneously through ROS nodes based on the Launch file, the PID parameters of the intelligent bodies are adjusted, and the clustered / distributed formation control and the coordinated tracking of static objects are successfully realized.
[0119] The present invention innovatively applies the traditional PID control method in the Gazebo multi-agent scenario of the ROS platform, which not only efficiently realizes the clustered / distributed formation control and collaborative tracking tasks, but also breaks through the limitations of the classic formation control methods (such as Leader-Follower, path following methods) that lack flexibility and have poor multi-scenario application portability.
[0120] The process of completing two tasks related to multi-agent formation control is as follows.
[0121] The first task in the Playground scene is: multi-agent clustered PID formation control, that is, using PID to control 4 Turtlebot3 Waffle robot cars and 3 Turtlebot2 intelligent robots to enter the central circular area where the red ball is located in the Playground scene in an initial specific rectangular or isosceles triangle formation. Based on the above research on the operation principle and PID control of Turtlebot2 and Turtlebot3 robot cars, in the actual simulation environment, it is necessary to adjust the PID parameters of multiple robot cars separately to achieve the effect of successfully transforming the 7 robots from the initial scattered state to the central area gathering, such as Figure 8 After careful adjustment, the PID control parameters that can ensure that the four Turtlebot3s can reach the central gathering area are shown in Table 1.
[0122] Table 1 PID control parameters of 4 TB3 in task 1
[0123] TB3 Number Initial position coordinates End position coordinates Position PID parameters Angle PID parameters No. 1 (1,-1,0) (4.8,-0.5,45) (1,0.01,0.05) (1,0.03,0.05) No. 2 (-1,-1,0) (4.3,-0.3,45) (1,0.01,0.05) (1,0.03,0.05) No.3 (1,1,0) (4.8,0.5,-45) (1,0.01,0.05) (1,0.03,0.05) No. 4 (-1,1,0) (4.3,0.3,-45) (1,0.02,0.05) (1,0.03,0.05)
[0124] When executing PID control on the ROS platform, it is known that the position of the red ball in the Gazebo scene is (5,0). Therefore, it is necessary to write PID control Python scripts for each car separately, such as tb3_pid1.py, tb3_pid2.py, tb3_pid3.py, tb3_pid4.py, and call each Python file as a node in the turtlebot3_pid.launch file to achieve the formation control effect of multiple intelligent unmanned vehicles running together to a specific location.
[0125] In addition, the present invention adopts a formation control method based on path following in this scenario and combines it with a PID control script to make the three Turtlebot2 robot cars reach the central area where the red ball is located along a specific straight path in coordination. The control parameters of the multi-agent are shown in Table 2. The formation control based on path following mainly decomposes the formation control into spatial path following and time coordination synchronization tasks. This method is combined with PID control and applied to the three Turtlebot2s respectively, that is, driving them to reach the central area along their respective routes in the same time and space.
[0126] Table 2
[0127]
[0128] As can be seen from Table 2, the I integral parameters of the three cars are all 0, which means that the combination of PD (proportional and differential) control can make Turtlebot2 run in a straight line. In general control, the role of integration is to eliminate the residual error of the automatic control system, while the output of the controller in differential control is proportional to the differential of the input error signal (i.e., the error change rate), and can further predict the trend of error change. Therefore, the proportional + differential PD controller can eliminate the control effect of suppressing the error in advance to avoid excessive overshoot of the controlled quantity.
[0129] Different from the clustered PID formation control, the second scene task of Playground is the decentralized PID formation control, which is to relocate the initial positions of the four Turtlebot3 Waffles and use the obstacle avoidance PID algorithm to control the four Turtlebot3Waffles to disperse from the clustered area to the coke bottles at four different locations in the stone pile area, while the three Turtlebot2s are controlled by PID and obstacle avoidance algorithms to run to three different building areas on the left and right sides of the football field, including white stone piles, red, yellow and blue mechanical equipment and green pine trees. The focus of this task is to verify the efficiency, feasibility and flexible migration of the PID control Python execution script in Task 1 again, and to achieve the collaborative tracking of the four Turtlebot3 Waffles from the relocated quadrilateral array to the dispersed and stationary coke bottles, such as Fig. 9 The main PID control parameters of the four robot cars are shown in Table 3.
[0130] Table 3 PID control parameters of 4 TB3 in task 2
[0131] TB3 Number Initial position coordinates End position coordinates Position PID parameters Angle PID parameters No. 1 (-2,1,0) (-4,3,60) (1,0.02,0.05) (1,0.01,0.03) No. 2 (-8,2,90) (-7,4.6,60) (0.8,0.02,0.03) (0.9,0.02,0.05) No.3 (-8,1,0) (-6,2.8,0) (0.08,0.02,0.03) (1,0.03,0.05) No. 4 (-2,2,90) (-4,5,-45) (1,0.01,0.05) (1,0.02,0.05)
[0132] Task 2 of Playground Scene 1 involves distributed fixed-point tracking, which uses PID to control three Turtlebot2s gathered in the central area to run to the vicinity of three landmarks. In view of the existence of obstacles, this link can also detect obstacles based on the information obtained by the 360° laser detection of the car on the basis of Turtlebot2PID control and perform obstacle avoidance guidance operations. For this task, multiple groups of related PID parameters were tried (Table 4), and the final simulation results of three groups are shown as follows: Fig.10As shown in the screen recording of the whole process, it can be found that the initial movement direction of car No. 1 is relatively correct, and it moves directly to the target point, while cars No. 2 and No. 3 are in a confused state when they start running the launch file, that is, they keep circling in the gathering center area, and then drive to the landmarks on the left and right sides respectively. However, the three different sets of PID parameters will also cause the three Turtlebot2s to present different termination states and positions, such as car No. 3 stopping at the feet of pedestrians and unable to reach the green pine tree, or the PID controller of car No. 3 cannot make the car stay still under the green pine tree, but leaves directly. In addition, car No. 2 may also drive to the red and blue mechanical equipment after rotating more circles under different PID parameters, but the three sets of parameters can finally successfully make cars No. 1 and No. 2 stay stably at the target building.
[0133] Table 4 PID control parameters of three groups of TB2 in task 2
[0134] TB2 car number The first set of PID parameters The second set of PID parameters The third set of PID parameters No. 1 (3,0,0.05) (3,0,0.05) (3,0,0.05) No. 2 (3,0.1,0.05) (4,0.01,0.05) (3,0.01,0.05) No.3 (3,0,0.05) (3,0.01,0.03) (3,0.02,0.03)
[0135] In summary, the present invention uses Turtlebot3 Waffle and Turtlebot2 to form a multi-intelligent unmanned vehicle system, successfully grasps the mechanical operation principles of the two different vehicles, and designs PID control laws respectively, combined with the path following formation control algorithm to achieve the task of multi-agents accurately reaching the specified position in the Gazebo environment, and then embeds the PID control script of each vehicle as a node in the ROS Launch file to achieve the PID formation control of multi-intelligent unmanned vehicles, that is, both types of vehicles can maintain a stable formation (such as a rectangle, an isosceles triangle) to reach the area or position point where the static tracking target is located. The scenario of the present invention mainly designs two different tasks: (1) multi-agent aggregated PID formation control collaborative tracking; (2) multi-agent distributed PID formation control collaborative tracking; and this series of tasks proves that the PID control law designed in the present invention can be successfully applied to the ROS platform, and can be flexibly migrated to the aggregated or distributed formation control Gazebo scene, laying a solid foundation for further expansion to more complex multi-agent tasks.
[0136] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments are contemplated within the scope of the invention thus described. The disclosure of the present invention is intended to be illustrative rather than restrictive of the scope of the invention, which is defined by the appended claims.
[0137] The documents cited in the present invention are as follows:
[0138] [1]Tanner H G,Jadbabaie A,Pappas G J.Stable flocking of mobileagents,Part I:Fixed topology[C] / / 42nd IEEE International Conference onDecision and Control(IEEE Cat.No.03CH37475).IEEE,2003,2:2010-2015.
[0139] [2]Shao Q.,Hu J.K-coverage Formation for Target Tracking UsingNonholonomic Agents[J].Joumal ofControl Engineering&Technology,2011.
[0140] [3]Li Z,Liu X,Ren W,et al.Distributed tracking control for linearmultiagent systems with aleader of bounded unknown input[J].IEEE TransactionsonAutomatic Control,2012,58(2):518-523.
[0141] [4]Kladis G P.Stabilisation and tracking for swarm-based UAV missionssubject totime-delay[M] / / Applications ofMathematics and Informatics inScience and Engineering.Springer,Cham,2014:265-288.
[0142] [5]Do K D.Formation tracking control ofunicycle-type mobile robots[C] / / Proceedings 2007 ieeeinternational conference on robotics andautomation.IEEE,2007:2391-2396.
[0143] [6]Yang S.,Xu J.X.,Huang D.,Tan Y.Optimal iterative learning controldesign for multi-agentsystems consensus tracking[J].Systems&Control Letters,2014,69(2):80-89。
Claims
1. A multi-intelligent unmanned vehicle PID formation control method based on ROS, characterized in that: The following steps are involved: Obtaining real-time movement speed, expected movement speed, real-time position and expected position of multiple unmanned vehicles of the first type and the second type; Calculate the speed deviation between the real-time motion speed and the expected motion speed, and the position deviation between the real-time position and the expected position; Obtaining a first set of rotational torques of the first type of multiple unmanned vehicles based on speed deviations, position deviations and a first control law corresponding to the first type of multiple unmanned vehicles; Controlling a plurality of unmanned vehicles of the first type to reach a desired position at a desired movement speed based on the first set of rotational torques; A second set of torques for the multiple unmanned vehicles of the second type are calculated based on the speed deviations, position deviations and second control laws corresponding to the multiple unmanned vehicles of the second type; and the multiple unmanned vehicles of the second type are controlled to reach the desired position at the desired movement speed based on the second set of torques.
2. According to the ROS-based multi-intelligent unmanned vehicle PID formation control method of claim 1, it is characterized in that: The first control law is: Where, τ represents a torque in the first group of torques; K p , K v and K i represent the proportional parameter, differential parameter and integral parameter respectively; Indicates position deviation, Indicates speed deviation; is the integral term based on the position error term integrated over time t and velocity v, and goal x(σ) represents the x-axis coordinate of the expected position at time t, current x(σ) Indicates the x-axis coordinate of the real-time position, goal y(σ) Indicates the y-axis coordinate of the desired position, current y(σ) Indicates the y-axis coordinate of the real-time position; σ indicates the unit change of the position deviation function; The second control law is: Wherein, U(t) represents one of the torques in the second group of torques; K p2 , K d2 and K i2 They represent proportional parameter, differential parameter and integral parameter respectively; E(t) represents position deviation or speed deviation; E(t) represents the change of position error or speed error; when E(τ) is position deviation, its expression is: goal(x, T) is the x-axis coordinate of the desired position, current(X, T) is the x-axis coordinate of the current position at time T, goal(y, τ) is the y-axis coordinate of the desired position, and current(y, τ) is the y-axis coordinate of the current position at time T; When E(τ) is the speed deviation, its expression is: E(τ)=goal(V,T)-current(V,T) goal(v, T) represents the expected speed of the car at time T; current(v, T) represents the current speed of the car at time T.
3. According to the ROS-based multi-intelligent unmanned vehicle PID formation control method of claim 2, it is characterized in that: The first type of unmanned vehicle is the Turtlebot2 robot car; the second type of unmanned vehicle is the Turtlebot3 robot car.
4. According to the ROS-based multi-intelligent unmanned vehicle PID formation control method of claim 3, it is characterized in that: The motion equation corresponding to the Turtlebot2 or Turtlebot3 robot car is: Among them, u1 and u r is the speed of the left and right wheels, x and y represent the position coordinates of the Turtlebot2 robot car, represents the angular velocity; L represents the distance between the two wheels of the trolley; r represents the wheel radius; θ represents the rotation angle of the machine trolley.
5. A multi-intelligent unmanned vehicle PID formation control system based on ROS, characterized in that: include: a data acquisition module configured to acquire real-time motion speed, expected motion speed, real-time position, and expected position of a plurality of unmanned vehicles of the first type and the second type; A deviation calculation module, configured to calculate a speed deviation between a real-time motion speed and a desired motion speed, and a position deviation between a real-time position and a desired position; a torque calculation module configured to calculate and obtain a first set of rotational torques of the first type of multiple unmanned vehicles based on speed deviations, position deviations and a first control law corresponding to the first type of multiple unmanned vehicles; Obtaining a second set of rotational torques of the plurality of unmanned vehicles of the second type based on speed deviations, position deviations and the second control law corresponding to the plurality of unmanned vehicles of the second type; A control module is configured to control a plurality of unmanned vehicles of a first type to reach a desired position at a desired speed based on a first set of rotational torques; and to control a plurality of unmanned vehicles of a second type to reach a desired position at a desired speed based on a second set of rotational torques.
6. The ROS-based multi-intelligent unmanned vehicle PID formation control system according to claim 5 is characterized in that: The first control law in the torque calculation module is: Where, τ represents a torque in the first group of torques; K p , K v and K i represent the proportional parameter, differential parameter and integral parameter respectively; Indicates position deviation, Indicates speed deviation; is the integral term based on the position error term integrated over time t and velocity v, and goal x(σ) represents the x-axis coordinate of the expected position at time t, current x(σ) Indicates the x-axis coordinate of the real-time position, goal y(σ) Indicates the y-axis coordinate of the desired position, current y(σ) Indicates the y-axis coordinate of the real-time position; σ indicates the unit change of the position deviation function; The second control law is: Wherein, U(t) represents one of the torques in the second group of torques; K p2 , K d2 and K i2 They represent proportional parameter, differential parameter and integral parameter respectively; E(t) represents position deviation or speed deviation; Indicates the change in position error or speed error; when E(T) is the position deviation, its expression is: goal(x, T) is the x-axis coordinate of the desired position, current(x, T) is the x-axis coordinate of the current position at time T, goal(y, T) is the y-axis coordinate of the desired position, and current(y, T) is the y-axis coordinate of the current position at time T; When E(T) is the speed deviation, its expression is: E(T)=goal(v,T)-current(V,T) goal(v, T) represents the expected movement speed at time T; current(v, T) represents the current movement speed at time T.
7. The ROS-based multi-intelligent unmanned vehicle PID formation control system according to claim 6 is characterized in that: The first type of unmanned vehicle is the Turtlebot2 robot car; the second type of unmanned vehicle is the Turtlebot3 robot car.
8. The ROS-based multi-intelligent unmanned vehicle PID formation control system according to claim 7 is characterized in that: The motion equation corresponding to the Turtlebot2 or Turtlebot3 robot car is: Among them, u l and u r is the speed of the left and right wheels, x, y represents the position coordinates of the Turtlebot2 robot car, represents the angular velocity; L represents the distance between the two wheels of the trolley; r represents the wheel radius; θ represents the rotation angle of the machine trolley.
9. An application of a multi-intelligent unmanned vehicle PID formation control method based on ROS, characterized in that: include: The following simulation environment is established based on the ROS platform: 4 Turtlebot3 robots are placed in a quadrilateral array on the left side of the football field, and a static red ball is placed in the center of the lawn; 3 Turtlebot2 robots are placed in an isosceles triangle array on the right side of the football field; The tracking target is set to be a static red ball or a scattered Coke bottle, and based on the ROS-based multi-intelligent unmanned vehicle PID formation control method described in any one of claims 1 to 4, four Turtlebot3 robot cars and three Turtlebot2 robot cars are controlled to enter the central circular area where the static red ball is located in the scene in an initial quadrilateral array or isosceles triangle formation; Reposition the initial positions of the four Turtlebot3 robot cars, and based on the ROS-based multi-intelligent unmanned vehicle PID formation control method described in any one of claims 1-4, control the four Turtlebot3 robot cars to disperse from the gathering area to the coke bottles at four different positions in the stone pile area, and control the three Turtlebot2 robot cars to run to three different building areas on the left and right sides of the football field, including white stone piles, red, yellow and blue mechanical equipment and green pine trees; realize gathering or decentralized formation control and collaborative tracking of static objects.