Differentially-Driven Robots Moving in Formation—Leader–Follower Approach

: The paper is devoted to the leader–follower approach for multiple mobile robots control and its experimental veriﬁcation. The formation control of mobile robots is motivated by the concept of virtual leader tracking, which is enhanced by the collision avoidance between the robots proposed in our previous work. The effectiveness of this approach was veriﬁed through realisation of experiments with use of MTracker mobile robots. The OptiTrack vision system was used for robots localization. Software part with control algorithms and communication was prepared with use of the Robot Operating System.


Introduction
Mobile robots formation control has been widely investigated in recent years because of the benefits that are associated with the simultaneous use of multiple robots to perform tasks that were previously typically performed by a single robot. This a strategy is more efficient, flexible and allows for redundancy in comparison to single robot actions. Multiple robot cooperative systems can be used for different tasks such as the transportation of large objects [1], surveillance or wide area inspections [2], precision agriculture [3] and more. A comprehensive overview of possible applications, cooperative mobile robotics and methods for formation control can be found in references [3][4][5]. Other important aspects are related to the robustness of such systems in real operating conditions [6][7][8].
Some propositions focus on achieving desired formation deal with consensus problem are discussed in references [9,10]. In the paper [9] decentralized switched-system approach in case of nonholonomic mobile robots control is described, where each robot follows an attractive vector obtained with use of virtual isomorphic graph. The Authors considered new proposition of switching condition between two propositions of orientation vector, where the first corresponds to orientation w.r.t. total attractive vector and the second to orientation w.r.t. the heading consensus. The asymptotic stability has been addressed but well know problems regarding discontinuity of the control scheme still exist. On the other hand, in the paper [10] a finite time convergence is achieved which allows for faster convergence rate in stabilization of the posture. In this case the multiple nonholonomic mobile robots were modelled as high-order chained structure which allows for broadening the spectrum of applications considered. The Authors utilized a neighbour-based distributed high-order consensus algorithm with use of power integrator technique and additionally with use of recursive design method. Among other noteworthy suggestions considered by Researchers ensuring formation control while avoiding collisions between the robots or obstacles we can point out [11,12]. The Authors of [11] consider nonlinear synchronization controller that involves nonholonomic constraints of the robot in the synthesis of the controller, which is an advantage over the above mentioned consensus based approach. Here each robot tracks a time-varying trajectory, which indirectly defines the assumed formation. This solution is similar to the one presented in reference [13], but a different definition of trajectory was considered. The Authors of [11] have additionally carried out interesting experiments where the synchronization controller was checked during the disturbance. The research study [12] develops the controller with trajectory tracking task with use of suboptimal model predictive control in two variants. Both solve optimal control problem where cost function involve the dynamics model of robot. The terminal state penalty term utilizes a potential function. Unfortunately in comparison to [11], this paper research results were only supported by simulation studies. A large number of research concerning cooperative control of mobile robots formation uses potential functions. For example [14] where the controller synthesis is based on proposition of potential function that obtains the minimum value in the situation of achieving the desired formation, whereas for collision occurrence, the potential function goes to infinity. Proposed solutions ensure almost global asymptotic convergence of formation shape and orientation with guarantee that no collision appears. Another interesting solution considering the use of potential function is discussed in reference [15]. The Author considers formation control of mobile robots with nonholonomic constraints and utilizes linear feedback technique and collision avoidance appearing between agents. A potential function is used to determine a repulsive vector in the controller. This solution ensures rapid convergence of formation to desired trajectory thanks to a goal exchanged algorithm. Some important aspects in formation control concern practical matters and, for example [16] presents cooperative motion coordination for mobile robots using vision-based control. The Authors consider formation control in obstacle environment under sensing (in terms of visibility) and communication constraints. The solution allows for safe navigation of the formation with use of only the minimal information obtained from vision-based feedback. In the proposed solution, the velocity estimates was not exchanged between robots. This ensures proper behaviour of the controller in case of no communication between robots. Moreover, the on-board cameras used as localization sensors are assumed to deliver limited range of field-of-view. Thanks to these properties the controller has very strong practical features. Other propositions concerning some practical aspects of mobile robots formation control can be found in references [17,18]. In reference [17], vision-based control with on-board camera and absence of the feature depth information is presented. In the paper [18] formation control with lack of the orientation measurements is described. Instead of attitude measurements, the Authors used designed observer. Another general idea of leader-follower control is discussed in reference [19]. In this paper, control for heterogeneous underactuated vehicles network in planar case is proposed. This concept implies that the vehicles do not have to be identical and may have a different dynamic structure. This paper presents experimental verification of formation control technique for formation of differentially-driven robots for trajectory tracking purpose given in reference [20] where the stability of the system has been proven. The control algorithm utilizes leaderfollower approach and is based on the articles [21,22]. For inter-robot collision avoidance artificial potential functions concept from reference [23] is used with the implementation proposed in reference [24]. Experimental setup consists of four MTracker two-wheeled mobile platforms with on-board computer, Optitrack vision system used for robots pose measurement and additional PC computer running as Robot Operating System (ROS) master for all components of the system. According to authors' knowledge, this is the first experimental verification of this control method.
The article is organized into sections according to the following order. Section 2 introduces model of the group of mobile robots with virtual leader. Section 3 gives short description about artificial potential functions. Control algorithm is presented in Section 4. Section 5 describes experimental setup and obtained experimental results. Conclusions are written down in the last Section 6.

Model of the Multi-Robot System
The kinematic model of the i-th mobile platform R i is as follows: where q i [x i y i θ i ] T is the pose and variables x i , y i , θ i represent position and orientation coordinates of the robot with respect to a global coordinate frame; u i v i ω i T represents linear and angular velocity controls. Mobile platform R 1 is the leader of the formation. Robots R i , for i > 1,. . . , N − 1, follows their preceding agents R i−1 and are followed by agents R i+1 . Robot R N is the follower of the mobile platform R N−1 .
The implemented architecture of the system includes additional model of the robot R 0 , which acts as virtual leader for the robot R 1 . It means, the model of virtual robot R 0 is used to compute reference signals for the robot R 1 . Thus the reference trajectory is an admissible trajectory with respect to considered mobile robots model (1). Therefore robot R 1 is the physical leader in our experiments which tracks the reference trajectory. The input signals for the whole system are linear velocity v 0 and angular velocity ω 0 . Furthermore, it was assumed that the desired displacements between robots in the formation are large enough that, with zero position error, there is no risk of collision.

Collision Avoidance
Collision avoidance control module was implemented using artificial potential functions (APF). This approach was originally introduced in reference [23]. APF surrounds each mobile platform. To describe the collision avoidance region two terms are usedR j andr j , that are design parameters fulfilling conditionR j >r j (j is number of the robot with which the collision is analysed).R j denotes distance to the mobile platform when the AFP starts acting, whiler j is related to the size of the robot. Near the robot boundary at distancē r j value of the AFP increases to infinity and vanishes at distanceR j .
The following function is proposed [25]: that gives output in range 0, 1). The ranger j ≤ l ij <R j defines collision avoidance region. Distance between i-th and j-th mobile platforms is as follows: The above function is scaled within the range 0, ∞) using the following formula: Its spatial derivatives are used in collision avoidance control module. Figure 1 presents graph of V a as a function of distance l to the mobile platform forr = 1 m andR = 2 m.
Equation (3) fulfills conditions:V As shown in reference [26] it guarantees collision avoidance.

Control Algorithm
The goal of the formation control is to mimic motion of the virtual leader maintaining desired displacements between robots and avoiding collisions. It is equivalent to bringing the following quantities to zero: This means that the formation is designed in such a way that, when the robots are moving with zero errors, none of them is in the collision avoidance region of other robots.

Assumption 2.
If robot i gets into the collision avoidance region of any other mobile platform j, j = i its desired trajectory is temporarily frozen. If the robot leaves the avoidance area its desired coordinates are immediately updated. As long as the mobile platform remains in the avoidance region, its desired coordinates are periodically updated at certain discrete instants of time. The time period t u of this update process is relatively large in comparison to the main control loop sample time.
A detailed explanation of this assumption is given in reference [20]. Position and orientation errors expressed with respect to the local coordinate frame fixed to the robot is given by equation: Accordingly to given model of the robot in Equation (1) the non-holonomic constraint is given by formula:ẏ Using Equations (6) and (7) the error dynamics between robots R i−1 (the leader) and R i (the follower) can be expressed as follows: Position correction variables are introduced that consist of position error and collision avoidance components of control, computed using spatial derivatives of the APFs: V aij is function of coordinate variables x i and y i according to Equations (2) and (3).
To take into account collision avoidance, the error components in the original algorithm from [21] will be replaced by these position correction variables.
The position correction variables can be expressed in local coordinate frame fixed in the geometric center of the mobile platform: As shown in reference [24] gradient of the APF can be transformed to be expressed with respect to the local coordinate frame fixed to the i-th mobile robot: Equation (10) can be rewritten using (9) and (11) as follows: where each spatial derivative of the APF is transformed from the global to the local coordinate frame fixed to the robot. Correction variables expressed with respect to the local coordinate frame can be written in the following form: Trajectory tracking algorithm given in [21] extended with collision avoidance based on APF for N mobile platforms is given by equations: where k 1 , k 2 , k 3 are constant parameters fulfilling conditions k 1 > 0, k 2 > 0, k 3 > 0 and function sgn(•) is as follows: Regardless of the definition of (15) function for v i−1 replaced by zero in the controller of the i-th robot, it is proposed to keep second term in Equation (14) as k 2 E iy in order to avoid possible deadlock.

Assumption 4.
If the value of the linear velocity control is less then considered threshold v t , i.e., |v i | < v t (v t -positive constant design parameter), it is replaced by a scalar Substituting Equation (14) into (8) system error dynamics in the following form is obtained: Above equations can be transformed using (14) and taking into account Assumption 2 (in the collision avoidance region, linear velocity v i−1 and angular velocities ω i−1 in the i-th robot's controller are replaced by zero) error dynamics can be rewritten as follows: The paper [20] presents the same robot control algorithm applied to a formation with a different topology. The stability proof presented there remains valid with the proviso that the error components [p ix p iy p iθ ] T are defined as in this paper. This indirectly affects e ix , e iy , e iθ that are used to compose a Lyapunov-like function. In the stability analysis, the error dynamics (18) was used to derive the system stability condition.
The rule described in Assumption 4 pushes robot out of a state where the stability condition obtained in reference [20] would not be satisfied. This situation occurs when, during collision avoidance, E ix = 0 which results from the specific combination of e ix and the sum of the partial derivatives of the APF with respect to the variable e ix , according to the first Equation in (13). The state in which this situation occurs is non-attracting.

Experimental Verification
A laboratory setup was prepared for experimental verification of formation control algorithm described in Section 4. The experimental setup description is depicted in Section 5.1. The results obtained from the experiments are presented and later discussed in Section 5.2.

Experimental Setup
The laboratory experimental setup consists of OptiTrack vision system, MTracker mobile robots and additional PC computer. General scheme of the whole system setup is presented in Figure 3. The OptiTrack vision system includes 10 PRIME 17W cameras, a gigabit PoE network switch for their power supply and communication, and a PC computer with Motive software also connected to this switch. Motive software captures and processes data from cameras. Vision system is responsible for localization of the MTracker mobile robots with use of passive markers placed on the robots that form different so-called rigid bodies (see Figure 4). Based on these markers, the Motive software measures the pose of the robots and distributes these measurements' results over the local network. During the experiments, the VRPN (Virtual Reality Peripheral Network) protocol has been used to broadcast the measurement information from the vision system. The discussed hardware configuration of the OptiTrack system allows for measurements to be made with a frequency theoretically up to 360 Hz. However, the experiments were carried out at much lower frequencies as will be mentioned later. The arrangement of the cameras allows the robots localization in the available laboratory area of approximately 8 × 3 m.  MTracker robot (see Figure 4) is a small differentially-driven mobile platform with two wheels. It was developed in the Institute of Automatic Control and Robotics at Poznan University of Technology. The mobile platform has a unicycle kinematics which corresponds to the model in Equation (1). The wheels' base is b = 145 mm and wheels' radius is r = 25 mm. The system is based on DSP (TMS320F28335) low level controller responsible for controlling the motors directly connected with the wheels. This robot platform can be efficiently adopted for realization of experiments with multi-robot systems [27]. For high level control the on-board Intel NUC Mini PC computer has been utilized. Low level controller is connected to NUC computer via USB serial link based on FTDI chip with baud rate 921,600 bps. On-board computer works under Linux Ubuntu 20.04 with ROS Noetic distribution. Each MTracker robot uses the high-level software package with the implementation of the control algorithm. The only difference between the software package versions on each robot is the configuration setup which, for example, defines the number of the robot in the multiple robot formation during the experiments. This gives the ability to easily add more robots to the experimental setup.
In the implemented control system software, each robot has a separate collision avoidance module and a separate controller which makes each robot an independent autonomous unit. This implies that each robot must receive information about the position of all other robots from the vision system responsible for localization. The first robot R 1 uses the virtual leader trajectory generator subsystem which was earlier discussed and marked as R 0 . Each subsequent robot receives desired velocities of the platform from the preceding robot. A detailed block diagram of the control system architecture for three robots is shown in the Figure 5 and can be easily extended to include other robots in the experimental setup.
The additional desktop PC computer presented in Figure 3 described as Control Visualization also works under Linux Ubuntu with ROS. It works as a master computer running roscore nodes and publishing localization data from VRPN into the ROS network system. It is also used for remote launching of the experimental setup, supervision of the system, visualization and recording of the measurement data and control signals. Data exchange between the master computer and the multiple robots is carried out via a local wireless network using ROS topics and standard messages.
During the experiments robots localization measurements have been done with the frequency of 100 Hz, but the software loop rate in each robot was changed during the experiments. This involved conducting research related to performance of the control algorithm and the robustness of the system for lower frequencies of the control loop. , d Figure 5. Functional block scheme of the control system.

Experimental Results
Obtained results of the experiments are presented for the sampling frequency of the control loop at 10 Hz. The experimental verification was carried out with the use of four MTracker robots described in Section 5.1. The experiments were conducted for different robots initial conditions for two different reference trajectories, where the first scenario is marked as EX1 and the second as EX2. Both ware realized with the parameters of the controllers as k 1 = 0.25, k 2 = 1 and k 3 = 1. In the EX1 the trajectory was defined with use of 6th order polynomial continuous function. In the EX2, a circular reference trajectory was given. The spatial offset between successive robots tracking the leader was taken as d i−1,i x = 1 m and d i−1,i y = 0 m. The radius of the area occupied by the robot body wasr j = 0.2 m. At this distance potential function raise to infinity. For greater distances, it falls, reaching zero forR j = 0.6 m.
For safety reason the maximum angular velocity of the wheels was set to 16 rad/s. In the plots presenting variables evolution colors were used to distinguish different robots: red-R 1 , green-R 2 , blue-R 3 and magenta-R 4 . Black color in the last plot of the charts sequence denotes the distances between all robot pairs. Dashed green line shows the collision avoidance areaR j and dashed red line corresponds to radiusr j .
In the first graph, in Figure 6a, the xy-plot of the robots motion path is shown. In the next ones, time plots of selected signals are presented. The time duration of the experiment was around 27 s and it was related with the speed of the robots and the available laboratory area. Figure 6b,c show x and y position coordinates while Figure 6d orientation of the robots. In Figure 6e-g, the position and orientation errors are presented, respectively. Taking into account these plots one can see that all robots properly follow a trajectory within an assigned formation structure and position errors convergence close to zero.
In Figure 6h,i linear and angular velocity of the calculated control signals is plotted whereas in Figure 6j,k the angular velocities of the robot wheels are depicted. One can see that during the experiment velocities of the wheels reached fixed limit. Figure 6l shows 'freeze' signals which equals 1, indicate that the reference signals was frozen to avoid collision between robots.
During the transient state of the motion collision avoidance mechanism was activated what is presented by the 'freeze' signals plot. Freezing the reference signals can be easily observed as resulting in some chattering of the linear velocity and especially in wheels velocity signals. Collision avoidance behavior prevented the robots from coming closer than 0.5 m to each other (see Figure 6o). The threshold distance of 'freeze' signal activation was equal to the radius of the collision avoidance areaR j = 0.6 m (dashed green line). As robots get closer to each other, the distance collision avoidance blocks cause repulsion between robots. As all robots maintained a distance greater thanr j = 0.2 m (dashed red line) between each other, no collision occurred. Figure 6m shows signals: that represent activation of the procedure described in Assumption 4. The value of the threshold v t was set to 0.005 m/s. This procedure was activated twice during the experiment, for a short period of time. It temporarily disrupts the robot's motion, but prevents it from getting stuck. The collision avoidance component of the control is shown in Figure 6n. It is a norm of the sum of all collision avoidance vectors acting on the i-th robot: The signals are non-zero only if the robots are close enough to each other (at a distance less thanR j ). Figure 6o presents the situation when the robots reach their trajectories, the relative distances between them are close to desired value equal to ||[d i−1,i x d i−1,i y ] T || = 1 m. The green dashed line denotes the distance R i and red dashed line is the distance r i at which the collision would occur. As can be seen, the distances between all the robots remain safe during the experiment, reaching values only slightly smaller thanR j .
In addition, comparing Figure 6m, Figure 6n and Figure 6o, it is clear that collision avoidance and 'freeze' signals are activated only when the distance between robots is less thenR j .

Experiment EX2
In the EX2 desired circular trajectory was generated according to the equations with A = B = 0.5 m and ω = 0.4 rad/s. The results of the experiment are presented in the Figure 7. The individual graphs are arranged similarly as in the EX1. Because of closed circle shape of the trajectory the duration of EX2 is longer then in EX1. Figure 7a shows xy-plot of the robots movement. Figure 7b,c present x and y position coordinates and Figure 7d orientation of the robots. In Figure 7e-g position and orientation errors are depicted, respectively. Consistently, in Figure 7h,i linear and angular velocity control signals are plotted. Figure 7j,k show angular velocities of the wheels. One can see that after a period of about 10 s the transient state of each robot movement ends and the robots' formation starts to follow the trajectory precisely, what means that errors are close to zero.
For such robots, the initial conditions collision avoidance behavior has not been activated. This can be observed in Figure 7l-n where all signals are equal to zero all the time. Although the initial positions of the robots were quite far from desired, they did not approach each other at a distances at which the collision avoidance block would be activate. Consequently, the velocities are smoother compared to the EX1, although velocities of the wheels also reach the limit during the transient state. The setting time is slightly shorter. Figure 7o also confirms that no collision occurred during the EX2. The relative distances between robots are greater thanR j = 0.6 m (green dashed line). In the final stage, the assumed offsets are preserved as well.

Conclusions
According to our knowledge, this is the first time where the experimental results are considered for the control approach discussed in this paper. We focus on analysis and implementation of the control algorithm for differentially-driven mobile robots based on the leader-follower idea. Conducted experiments show applicable performance of this approach in the distributed system. The robots correctly achieve and move in the assumed formation following the reference trajectory. Implemented controller with collision avoidance strategy which is based on artificial potential functions effectively prevent collisions. The experiments were carried out with the use of four robots, but the prepared system setup allows us to increase the number of robots without the need to modify the developed control architecture. The authors plan to extend this approach to tracking the leader using the mobile robot's on-board sensor system instead of the OptiTrack vision system. Data Availability Statement: Not applicable.

Conflicts of Interest:
The authors declare no conflict of interest.