Intuitive Planning, Generation, and Tracking of Trajectory for WMR With Mobile Computing Device and Embedded System

With the intention of delivering an intuitive and simple platform to plan, generate, and track trajectories with a WMR, this paper presents a technological integration of hardware and software. This technological integration consists of a mobile computing device with an app developed by authors for the trajectory planning and a differential drive WMR that possesses an embedded system, in which a trajectory generation algorithm and a trajectory tracking control algorithm –both proposed by authors – are programmed. The mobile computing device wirelessly drives the WMR through the embedded system. The app is developed on the basis of the sketch approach, since it allows drawing sketches of the trajectory intuitively on the mobile device. Also, the app geometrically scales the sketch coordinates to match them with the real WMR workspace. For the trajectory generation, these scaled coordinates are wirelessly sent to the embedded system, where the trajectory generation algorithm joins them by using Bézier polynomials and concatenation of straight-lines. Hence, the tracking task is carried out with the control algorithm, which is proposed departing from the dynamic model of the WMR and whose asymptotic stability proof is performed with the Lyapunov method. Experimental results verify that the technological integration successfully plans, generates, and tracks trajectories, even when the WMR is far from the initial coordinate of the desired trajectory. These results, corroborate the good performance and robustness of the proposed control algorithm. Thus, the introduced technological integration is intuitive and simple since users only have to draw a sketch on the mobile device to carry out the trajectory tracking task.


I. INTRODUCTION
Initially manipulators and hybrid and mobile robots allowed the mechanical automatization of the industrial activities VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ [1]- [3]. Currently, with the Information and Communication Technologies and the Internet of Things, the robots have been provided with better autonomy, functionalities, and capabilities, allowing them better interaction with different entities and streamlining their decision-making [4]. Thus, it can be found robots that are controlled remotely [5], that receive and send information in real time [6], that are capable of making ''instantaneous'' decisions in different scenarios [7], etc., contributing to the industrial globalization and giving rise to the industry 4.0. In that direction, this paper is focused on delivering an intuitive and simple platform to wirelessly plan, generate, and track trajectories with a WMR. This is achieved by integrating a mobile computing device and a differential drive WMR dotted with an embedded system, through a trajectory planning app, a trajectory generation algorithm, and a trajectory tracking control algorithm. Literature dealing with the integration of a mobile computing device with a WMR is as follows. Chatterjee and Matsuno [8] introduced an off-line method for a WMR to follow a route drawn by hand on a scaled real scene map with predefined obstacles. Neural networks and a mobile device were used. Similarly, Skubic et al. [9], [10] and Chronis and Skubic [11], [12] presented a tool that allowed sketching, on a Personal Digital Assistant (PDA), a scaled real scene map and a route that the WMR had to perform. The route captured with the PDA was sent to a computer so that a fuzzy logic algorithm generated the real route for the WMR. Additionally, Skubic et al. [13] introduced an user interface prototype to drive a group of WMR with a tablet. The route to be followed and the obstacles to be avoided by the WMR were sketched in the tablet. The interface was validated via an usability study. Furthermore, Sakamoto et al. [14] developed an interface of stroke gestures to command a WMR in order to clean a house. Images of the house were collected via ceiling cameras and transmitted to a tablet, so that the user indicated with a hand-drawn sketch the route or area of the house to be cleaned by the robot. Moreover, Shah et al. [15] designed a human-machine interface based on the probabilistic multistroke sketching. The strokes were modeled with the variable duration hidden Markov method, whereas a search algorithm along with a heuristic found the most likely sketch until confirmation. Mission objectives were successfully executed for the WMR operated remotely. By their part, Jung et al. [16] reported a mobile interface based on sketch to accomplish telepresence in real static workspaces. For this, a WMR with monitor, cameras, and speakers was used to interact with the workspace, whereas a tablet was used to sketch routes and gestures for the WMR. Boniardi et al. [17], [18] introduced an approach for localization and navigation based on hand-drawn sketches of the environment. The Monte Carlo algorithm, along with the local deformation of the sketch, was used to estimate the robot state. An usability test was carried out to validate the approach. Lastly, Mielle et al. [19] carried out a method to interpret sketch-maps using Voronoi diagrams. Also, they introduced a graph matching method to find correspondences between sketch-maps and ground truth maps. Both methods were successfully validated. Other important papers were reported by Negulescu and Inamura [20] and Samakrob et al. [21], who developed computer graphic interfaces where real scene maps, obstacles, and routes were drawn using a mouse.
On the other hand, the literature review associated with the implementation of trajectory tracking controllers for WMR was carried out in [22]. From this review, it is concluded that, in general, this implementation has been carried out by using personal computers, DSP, FPGA, and embedded systems of high capabilities, such as the ones from dSPACE, LabView, Sensoray, Xilinxs, etc. This equipment requires license for specialized software as Matlab, ControlDesk, Lab-View, VHDL, etc. [23]- [25]. Hence, specialized knowledge and training are required for the programming related to the planning and generation of desired trajectories, as well as for programming and executing the tracking controller. Also, in such a case, every time a new trajectory is wanted to execute, it has to be programmed, load, and run with the specialized software. This implies that the WMR performing the trajectory tracking task for industrial applications [26] would has to be operated by specialized employees.
From the literature review two fashions are found: i) The one concentrated on developing interfaces based on the sketch approach for mapping environments and drawing routes, which does not include the implementation and performance of tracking controllers for WMR. ii) The one focused on the design, implementation, and performance of tracking controllers for WMR, where intuitive and simple user interfaces were not used. Also, some observations have to be made regarding the papers dealing with fashion i: Not all of the developed interfaces were connected to a real WMR and none of them described the algorithm to carry out the planning and generation of the routes for the real workspace of the WMR. Thus, this paper combines fashion i and ii to deliver an intuitive and simple platform that allows carrying out the planning, generation, and tracking of trajectories with a WMR. This, through the integration of a mobile device that includes a trajectory planning app and a differential drive WMR, which has an embedded system dotted with a trajectory generation algorithm and a trajectory tracking control algorithm. The trajectory planning app is developed on the basis of the sketch approach, the trajectory generation algorithm is based on Bézier polynomials and concatenation of straight-lines, and the tracking control algorithm is proposed departing from the dynamic model of the WMR. An advantage of this technological integration of hardware and software is that specialized training and expertise are not required for the platform operation, so that any user could intuitively and easily control the WMR through the mobile device.
The rest of the paper is organized as follows. The technological integration of hardware is described in Section II. The trajectory planning app developed by authors is introduced in Section III, whereas the own authorship trajectory genera- tion algorithm is detailed in Section IV. Then, the trajectory tracking control algorithm is proposed in Section V. The experimental results of the whole platform, i.e. of the technological integration of hardware and software, are presented in Section VI. The conclusion is given in Section VII and a comparative assessment of the performance of the proposed trajectory tracking control algorithm is presented in Appendix.

II. TECHNOLOGICAL INTEGRATION OF HARDWARE
The hardware involved in the technological integration is described below.
1) A mobile computing device. This is a SM-T800 tablet from Samsung, which has a screen of 10.5'', a CPU Samsung Exynos Octa, and a 3 GB RAM. The tablet allows sketching by hand a representation of the trajectory to be tracked by the WMR through an app developed in Android, which shall be described in Section III. 2) An embedded system. It is a Jetson TK1 board from NVIDIA, wirelessly communicated with the mobile device, which is part of a differential drive WMR prototype and receives a set of coordinates of the hand-drawn sketch that represents the desired trajectory for a WMR prototype, but geometrically scaled to the real workspace. With these scaled coordinates, the Jetson TK1 board executes the trajectory generation algorithm that delivers the desired trajectory for a WMR prototype in the real workspace. Also, the Jetson TK1 board computes the trajectory tracking control algorithm for a WMR prototype to perform the tracking task. The most important characteristics of this board are its ARM Cortex A15 CPU, RAM of 2 GB, and Operating System (OS) Ubuntu 14.04. 3) A differential drive WMR prototype. This was built at the Mechatronics Laboratory of CIDETEC-IPN and is shown in Fig. 1. The rest of the parts of the prototype are: a) Base, which is made of aluminum and whose dimensions are 422.84 mm × 350 mm from end to end with 6 mm of thickness. b) Actuators, are two DC motors from MicroMo of the model GNM3150, with the G2.6 gearbox. c) Sensors, two E6B2-CWZ6C incremental encoders from Omron are used to measure the angular position of the WMR wheels, from which the angular velocities of the wheels are computed. The resolution of the encoders is 2000 ppr. d) Batteries, two are rechargeable of 12 V CD − 12 A/h and connected to integrate a primary power supply of 24 V CD , which supplies energy to the motors, sensors, and electronic devices; while a secondary power supply is obtained with a lithium polymer battery of 12 V CD − 20, 000 mAh to supply energy to the embedded system. e) Electronic devices, this part includes a bluetooth module for the wireless communication between the embedded system and the mobile device, an Arduino UNO board which receives the duty cycles to generate the PWM signals that activate two H-bridge circuits to drive the DC motors, two logic level converters that receive and electrically treat the signals from the bluetooth module and the encoders, and voltage regulators used to reduce the voltage of the primary power supply to the one required for the different electronic devices. A graphical representation of the technological integration of hardware is shown in Fig. 2. The software that completes the intuitive and simple platform to carry out the trajectory tracking task with a WMR, that is the trajectory planning app, the trajectory generation algorithm, and the trajectory tracking control algorithm, are introduced separately in next sections.

III. TRAJECTORY PLANNING APP
For WMR, the traditional methods for trajectory planning are road maps, cell decomposition, and artificial potential fields [29]. However, these methods imply algorithms with complex mathematical equations. Thus, by using the sketch approach, an app that allows planning trajectories intuitively in a mobile computing device is proposed in this section.
The operation of the trajectory planning app consists of three stages: 1) Hand-draw a sketch on the screen of the mobile computing device (tablet) to represent the desired trajectory for the WMR. 2) Geometrically scale the coordinates of the hand-drawn sketch to the real measurements of the WMR workspace. 3) Wirelessly send the scaled coordinates to the embedded system (Jetson TK1 board). This app was developed in the open source OS Android, since it is the OS most used in mobile devices [30], and has the following buttons: • Manual trajectory planning. This button allows performing stages 1 and 2. The main menu of the app and a hand-drawn sketch are shown in Fig. 3. In the sketch, the circle represents the WMR and x p , y p are the references from which the coordinates of the sketch are obtained, which are related to the pixels of the screen of the tablet.
• Bluetooth connection. This button pares the tablet with the Jetson TK1 board, so that stage 3 is carried out. For the stage 2 of the operation of the trajectory planning app, the following own authorship algorithm is executed: 1) Since the sketch is a set of consecutive pixels, see Fig.  4(a), take the coordinates of h pixels of the hand-drawn sketch with the MotionEvent class to generate the following array: The MotionEvent class provides the methods getX(int) and getY(int) to query x 0 , . . . , x h and y 0 , . . . , y h , respectively. Also, note that h is the number of columns of T , hence it is obtained with instruction length. Both class and instruction are of the OS Android. 2) Carry out a geometric scaling of the hand-drawn sketch according to the dimension of the workspace. In this case the workspace has 2 m × 2 m, from which a space of 1.6 m×1.6 m is considered because, when executing tracking, the middle point of the axis that join the wheels of the WMR is the one taken into account to achieve the task. This consideration ensures that the WMR performs trajectories inside the workspace.
Since T is a two dimension array of two rows and h columns, its rows are decomposed in two arrays, T x and T y , with the values x j and y j , respectively, where j = 0, 1, 2, . . . , h. From T x and T y the smallest values, x min and y min , and the largest values, x max and y max , are found. With these values, considering the real workspace, and the function transformation method, the scaling factors, ϑ x and ϑ y , where found. Therefore, the arrays with the scaled values for the real workspace are computing by using the following expressions: with where l x = x max − x min and l y = y max − y min . Then, T xr and T yr becomes in the first and second row, respectively, of a new two dimension array, T r . The resulting points are exemplified in Fig. 4(b). 3) Compute the distance between the scaled points, whose coordinates are in T r , with the following expression: until j = h − 1. Then, take from T r only the points with a distance equal or greater than 1 cm between them. The rest of points are eliminated, that is, the length of the T r columns is modified (see Fig. 5(a)). 4) In the modified T r , after computing the distance with (3), add points between the points separated with more than 2 cm (see Fig. 5(b)). Again, the length of the T r columns is modified. Thus, T r is the information wirelessly sent to the embedded system with the Bluetooth connection button, which is used to generate the desired trajectory in the next section. Note that the described algorithm allows the trajectory planning in any size screen, since relies only on the workspace size. Also, it is important to mention that the app does not demands high performance, since the method for the trajectory planing is simple, so that it can be executed in mobile devices with low-performance.

IV. TRAJECTORY GENERATION ALGORITHM
This section proposes an algorithm to generate the desired trajectory for the WMR. Some methods that are commonly used in the trajectory generation are parametric functions, splines, Bézier polynomials, and concatenation of straight-lines [28], [31]. In this paper, a combination of first order Bézier polynomials and concatenation of straight-lines is used. This due to Bézier polynomials ensure to join two points continuously.  Also, the algorithms based on Bézier polynomials consume less computing time and are the most numerically stable [32].
The algorithm that carries out the trajectory generation is, in general, described as follows: 1) Estimate the distances between each of the points of the last T r resulting in previous section. To this end, redefine j = 0, 1, 2, . . . , k, with k being the columns of the last T r , and compute (3) until j = k −1. These distances are saved in an array, D, and summed to calculate the length, ϕ, in meters of the desired trajectory that shall be generated. That is: 2) Compute the time duration in which the generated trajectory shall be executed by the WMR in experiment when performing tracking. This is achieved with the following relation: where υ p is a proposed velocity, which cannot be out of the velocity range of the real WMR.

3) Calculate the time in which the Bézier Polynomials
shall interpolate between the points in T r , with the intention of join them later. Then, an array of times is generated with the expression given by

4)
Connect the values of the first row of T r using the first order Bézier polynomial defined by with where t i is the initial time and t f the final one, which are given by

5)
Connect the values of the second row of T r proceeding as in the previous step, that is, using (7). In this case P i = T r [1, j] and P f = T r [1, j + 1] are redefined. The steps 4 and 5 for the sketch points in Fig. 5(b) are represented in Fig. 6. The information obtained with the trajectory generation algorithm is required by the trajectory tracking control algorithm, which shall be described in next section.

V. TRAJECTORY TRACKING CONTROL ALGORITHM
This section proposes the control algorithm to achieve the trajectory tracking task. This proposal is carried out departing from the WMR dynamic model. Also, the stability analysis of the control algorithm as well as the program developed to execute it in the embedded system are introduced. Before that, some remarks on the dynamic model of the WMR are recalled.
In order to render the paper self contained and for the ease of reference of the reader, the following result taken from the control literature is presented, which is useful for the purposes here pursued: Theorem 1: [Theorem 4.18 in [33], p. 172] Let D ⊂ R be a domain that contains the origin and V : [0, ∞) × D → R be a continuously differentiable function such that ∀t ≥ 0 and ∀x ∈ D, where α 1 and α 2 are class K and W 3 (x) is a continuous positive definite function. Take r > 0 such that B r ⊂ D and suppose that Then, there exists a class KL function β and for every initial Moreover, if D = R n and α 1 belongs to class K ∞ , then (11) and (12) hold for any initial state x(t 0 ), with no restriction on how large µ is. Roughly speaking, Theorem 1 states that x converges into a domain whose radius is bounded by α −1 1 (α 2 (µ)) which is known as the ultimate bound. Also, some useful properties of the Euclidean and the spectral norms are as follows. Given some n×n matrices F and G, with the former symmetric, and some y, x ∈ K n , then [34], p. 176, [35], p. 26:

A. DYNAMIC MODEL OF THE WMR
The Fig. 7 shows the differential drive WMR. There, 2b is the width of the mobile robot and r is the radius of each wheel. The xy world coordinate system is O and P 0 is the XY coordinate system fixed to the mobile robot. Also, the origin of the coordinate system P 0 is placed at the middle of the axis which is common to the right and left driving wheels. The center of mass of the mobile robot is P c , which is on the X -axis, and the distance from P 0 to P c is d. For the latter description, m c and m w are, respectively, the mass of the body and the mass of the wheel with a motor. Whereas I c , I w , and I m are the moment of inertia of the body about the vertical axis through P c , the moment of inertia of the wheel with a motor about the wheel axis, and the moment of inertia of the wheel with a motor about the wheel diameter, respectively. The configuration of the mobile robot can be described by the five generalized coordinates q = [x, y, φ, θ r , θ l ] T where (x, y) are the coordinates of P 0 , φ is the heading angle of the mobile robot, and θ r , θ l are the angles of the right and left driving wheels. It is assumed that the wheels roll and do not slip. The dynamic model of this mobile robot is given by [27]: where τ = [τ r , τ l ] T consists of torques τ r and τ l applied at the right and the left driving wheels. ν = [ν 1 , ν 2 ] T represents angular velocities of the right and the left driving wheels, ν 1 and ν 2 respectively. Whereas m = m c + 2m w and I = m c d 2 + 2m w b 2 +I c +2I m . Finally, defining v = sign(ν 1 +ν 2 ) ẋ 2 +ẏ 2 and w =φ, the following is obtained from (13): where A is a nonsingular matrix.
has an ultimate bound which can be rendered arbitrarily small by a suitable choice of the positive controller gains k pφ , k dφ , k p1 , k p2 , k i1 , k i2 , k pv , provided that WMR is not required to move too fast. Remark 1: Controller in Proposition 1 is composed by a proportional-derivative (PD) trajectory tracking controller (21) which computes the WMR desired angular velocity w d . This controller is driven by the orientation angle error φ e , i.e. if φ e → 0 then robot orientation points toward the desired point on the desired trajectory. The WRM desired translational velocity v d is proportional to distance existing between the WMR actual position on the xy plane and the desired point on the desired trajectory. However, only the component of such a distance in the direction of the actual WMR orientation is considered. The expression in (19) computes the actual torques to be applied at the robot wheels in order to force both the actual WMR angular velocity w and the actual WMR translational velocity v to reach their desired values w d and v d , respectively. These torques are computed using two proportional-integral (PI) velocity controllers driven by the wheels velocity errors. According to (20) if these errors tend to zero, i.e. ifν → 0, then w → w d and v → v d . This is the rationale behind controller in Proposition 1.
Proof: Replacing (19) in (14) and adding and subtracting some convenient terms it is found: z =ν.
Expression (23) is included in order to render easier the variable manipulation in the algebraic procedure that follows. Note that, according to (17) and (20), the following is obtained: Usingφ = w it can be written: Replacing (26) in w d given in (21) and replacing w d in (25), it is obtained: Finally, the closed loop dynamics is given by (22), (23), (27) and Now, consider the following continuously differentiable function: Note that (28) can be bounded as follows: Hence, it is concluded that: with ξ = [φ e ,ν 1 ,ν 2 , z 1 , z 2 ,χ 1 ,χ 2 ] T and c 1 = On the other hand, it is possible to upper bound (28) as: According to (29) and (30), it is had that Note that α 1 and α 2 are class K ∞ functions. It is straightforward to verify that the time derivative of V along the trajectories of the closed loop dynamics (22), (23), (27) is given as: It can be bounded the following term as: In a similar way, it can be obtained if 2s 3 λ min K p ≤ ν ≤ ξ . Therefore, it can be boundedV as:V Matrix K PM is positive definite (and, hence, all of its eigenvalues are positive) if it is strictly diagonally dominant and its diagonal entries are positive [34], i.e.: Note that: and, hence: Taking into account this, considering (15), (24) and using matrix notation, it can be written: Hence, there always exists a large enough k pv > 0 such that where k pv = k pv1 + k pv2 , k pv1 > 0, k pv2 > 0.
Since φ e and cos 2 (φ e ) are not zero simultaneously, then (35) is always true provided that k pφ and k pv2 are large enough and the product χ * χ * − χ is not too large. Remark 2: If both χ * and χ * − χ are large in practice, one possible situation is that the desired point χ * is far from the WMR actual position χ and that distance between these points is increasing very fast. Hence, it is likely that the trajectory tracking task be interrupted if cos 2 (φ e ) = 0. This explains why this condition might be a source of instability. Note however, that the trajectory tracking task might be restored when cos 2 (φ e ) becomes far from zero provided that the product k pv2 χ * − χ is large enough. This also means that WMR might lag the desired position, but distance between χ * and χ remains within a bound ifχ * also remains within a bound.
On the other hand, if: the trajectory tracking task is not interrupted despite cos 2 (φ e ) = 0 for a while.
Furthermore, note that matrix Q 1 is positive definite if det Q > 0, which is always satisfied by large enough constants k pυ > 0 and λ min {K PM } > 0. Hence, it can be written: Matrix Q 0 is positive definite if all of its five leading principal minors are positive. This can be always be satisfied by using large enough controller gains k pφ , k p1 , k p2 , k i1 , k i2 . This means that Q 0 can be rendered positive definite and, hence, λ min {Q 0 } > 0. Then, it is obtained: Finally, taking into account (33), (34), and using some constant 0 < θ < 1, it can be written: and ξ satisfying (35). We stress that W 3 (ξ ) is a positive definite function provided that |φ| is constrained to remain within a given upper bound and cos 2 (φ e ) is far from zero, i.e. according to (31) and (36) conditions (8) and (9) are satisfied locally. Further, (10) can be expressed as µ < α 1 (r) c 2 for some r > 0. Thus, Theorem 1 ensures that for any initial condition satisfying ξ (t 0 ) ≤ α 1 (r) c 2 , the closed loop state ξ has an ultimate bound which satisfies (11), (12) and it is given as α −1 1 (c 2 µ 2 ). Note that, if we assume that ξ remains within a domain S = {ξ ∈ R 5 : ξ < r} and we allow only slow movements, i.e. |ẋ * (t)| , |ẏ * (t)| , |ẍ * (t)| , |ÿ * (t)| are small, then µ is bounded because φ e ,φ e ,φ e ,φ,φ andφ * are bounded. Moreover, this also ensures thatυ d and υ d , in definition of s 3 , are bounded. Hence, µ > 0 can be rendered arbitrarily small by choosing a large λ min (Q 0 ), i.e. large values for k pφ , k p1 , k p2 , k i1 , k i2 and large values for k pυ , λ min (K p ) and λ min (K i ) such that λ min (K P ) > max{k 2 pφ , k 2 dφ , k pυ } and λ min (K i ) > max{k 2 pφ , k 2 dφ , k pυ }, provided that cos(φ e ) is far from zero, i.e. φ e is close to zero. Moreover, according to (29), (30), (32), it is also required that ratios k p2 /k p1 and k i2 /k i1 be kept constant as K p y K i are increased. Thus, the ultimate bound α −1 1 (c 2 µ 2 ) can be rendered arbitrarily small. Moreover, this and µ < α 1 (r) c 2 as well as ξ (t 0 ) ≤ α 1 (r) c 2 ensure that given any finite r > 0 there always exists a VOLUME 8, 2020 small enough initial condition such that this result stands. This completes the proof of Proposition 1.

C. PROGRAM DEVELOPED TO EXECUTE THE CONTROL ALGORITHM IN THE EMBEDDED SYSTEM
In order to implement the trajectory tracking control algorithm (19) in the embedded system (Jetson TK1), a program was developed in Python. This programming language was chosen because is powerful and easy to learn [36], compared with other languages such as C or Java. The developed program has four functions: a) Right encoder reading, b) left encoder reading, c) main, and d) serial communication, which are represented in Fig. 9. The functions a and b obtain from the encoders the information related with the position of the wheels of the WMR prototype, the derivative of this position is computing by using Euler method to estimate ν 1 and ν 2 , respectively. In the c function the algorithm to generate the desired trajectory, introduced in Section IV, is executed. Then, the trajectory tracking control algorithm (19) is computed. Since the experimental instrumentation of τ requires an electrical conditioning, c function also transforms the torques τ r and τ l given by (19) in continuous voltages through the relation: where u r and u l are the voltages for the right and left DC motors of the WMR prototype, respectively, R a is the armature resistance, and k m is the torque constant of the DC motors. Note that u r and u l can take values in the intervals [−u r max , +u r max ] and [−u l max , +u l max ], with u r max and u l max being the maximum voltages of the right and left DC motors, respectively. For purposes of implementing u r and u l via a PWM, that is, obtaining the switched voltages u rc and u lc , the corresponding average voltages u rav and u lav are obtained by using where these voltages can take values in the interval [0, 1] and are associated with the duty cycles of the PWM signals. In order to determine the directions, dir r and dir l , of u r and u l , respectively, and consequently the direction of the DC motors, the following conditions are considered: dir r = 0 for u r ≥ 0, 1 for u r < 0, (38) dir l = 0 for u l ≥ 0, 1 for u l < 0.
Lastly, the communication serial function send values obtained from (37) to the Arduino UNO board through RS-232 protocol. This latter computes (38) and (39).
Is is important to mention that the four described functions are programmed in the Jetson TK1 board as subprocess. This is aided with the multiprocessing package by Python, which allows process-based parallelism and hence leveraging multiple processors. Thus, the functions are simultaneously executed in the four cores of the Jetson TK1 board processor.
With the app described in Section III and the computing program here described, the intuitive planning, generation, and tracking of trajectory for a WMR are accomplished, as can be corroborated in next section.

VI. EXPERIMENTAL TESTS
Experimental results obtained from the technological integration are shown in this section for two different sketches. Before that, a briefly description of the gain tuning of the proposed trajectory tracking control algorithm (19) is given.

A. GAIN TUNING OF THE CONTROL ALGORITHM
For tuning the gains of the trajectory tracking control algorithm (19), an automatic procedure based on parallel computing was used [37]. This procedure consists mainly in four steps: i) By taking into account the tuning rule and the number of control gains, a finite set of numerical values are generated and grouped in arrays through a Matlab script. In this case, large values for k pφ , k dφ , k pv , k p1 , k p2 , k i1 , k i2 with k p1 /k p2 = 1 and k i1 /k i2 = 1 were considered. Hence, a large number of combinations to select such gains is obtained. ii) With these combinations, numerical simulations of the system in closed-loop are simultaneously performed through Matlab Parallel Computing Toolbox. iii) From the several obtained system responses, the ones achieving the control objective with a tracking error iqual or less than 0.1 [m] are selected, i.e. (χ * − χ ) ≤ 0.1. iv) Lastly, the gain combination that delivers a control response with the smallest error is identified.

B. EXPERIMENTAL RESULTS
For the experimental tests of the intuitive and simple platform herein presented to wirelessly plan, generate, and track trajectories with a WMR, through a technological integration of hardware and software, the sketches in Figs. 3 and 10 were considered.
For both sketches, the trajectory planning was performed with the app, as described in Section III, by choosing υ p = 0.3 m/s. After planning the desired trajectory for the WMR and sending it wiressly to the embedded system, the trajectory generation algorithm (introduced in Section IV) automatically generated the desired trajectory for the WMR. Subsequently, the trajectory tracking control algorithm, proposed in Section V, carried out the trajectory tracking task as shown in Figs. 11 and 12. The physical parameters of the WMR prototype and control gains required for the execution of the the trajectory tracking algorithm are given below.
The radius of each wheel and the half of the width of the WMR were measured directly in the prototype, obtaining: whereas the control gains used were:  Fig. 10. For both sketches, the initial position and orientation of the WMR prototype were set at (x, y) = (0, 0) and φ = 0. While executing the experiments, the angular velocities of the wheels ν 1 and ν 2 , estimated with the sensors described in Section II, and the kinematic model (16) of the WMR were used to obtain the real-time estimation of (x, y, φ) by computer integration.
The corresponding experimental results for the sketches shown in the Figs. 3 and 10 are presented in Figs. 11 and 12, respectively. There, it can be seen that: i) The desired trajectory χ * has been well planned and generated through the technological integration. See for example Figs. 11(c), 11(d) and Figs. 6(a), 6(b) in Section IV. ii) The proposed control algorithm successfully executes the trajectory tracking task, i.e. χ → χ * , even when the WMR is far from the initial position of the desired trajectory. This can be corroborated with Figs. 11(b) and 12(b), where the WMR prototype located far from the initial desired position reaches such a position and tracks the desired trajectory with an error around zero. After experiments, an usability test of the technological integration of hardware and software -herein introducedwas carried out with high school and college students. All of them were visitors to the Mechatronics Laboratory at CIDETEC-IPN. These students were separate in groups of fifteen. The test consisted on three steps: 1) Only mention to the groups that the WMR prototype can perform any trajectory drawn by hand in the tablet and a practical example was shown. Then, the students were allowed to use the technological platform. 2) Explain to students the mathematical and programming process involved in the technological platform to perform the planning, generation, and tracking of trajectories. Also, it was described how the planning, generation, and tracking of trajectories can be achieved with a PC and specialized software. 3) Listen to opinions from the students about their experience when using the technological integration. Conclusion of these opinions was that all the students were amazed when realized of all the mathematical and programming functions contained in the tablet and embedded system. Also, they were overwhelmed with all the mathematics involved. Thus, all students expressed that with the tablet and the developed app and algorithms is better and easier to control the WMR prototype. This compared with the programming of the planning, generation, and control algorithms for the tracking task with a PC and specialized software, every time a new experiment is performed by the WMR prototype. This usability test corroborates that the introduced technological integration of hardware and software delivers an intuitive and simple platform to plan, generate, and track trajectories with a WMR.
It is important to remark that, to the authors' knowledge, there is not a technological platform reported in literature (see [8]- [19]) that can achieve the trajectory tracking task with a WMR through a mobile computing device. Thus, a proper comparison between the proposed technological integration and one reported in literature cannot be carried out. Nevertheless, in order to evaluate only the performance of the trajectory tracking control algorithm herein proposed, a comparative assessment between this proposed control and two controls taken from literature is presented in Appendix.

VII. CONCLUSION
This paper has presented a technological integration of hardware and software, which delivers an intuitive and simple platform to perform the wireless planning, generation, and tracking of trajectories with a WMR prototype. For the trajectory planning, an app that exploits the hand-drawn sketch approach was developed by authors. Whereas a trajectory generation algorithm based on combination of Bézier polynomials and concatenation of straight-lines was proposed. Lastly, a trajectory tracking control algorithm was proposed to accomplish the tracking task, which was obtained departing from the dynamic model of the differential drive WMR. The technological platform here presented has three advantages: i) The trajectory planning app, by means of the sketch approach, and the wireless connection between the tablet and the Jetson TK1 board allow an intuitive manual planning of a desired trajectory for the WMR prototype in the real workspace. ii) The Bézier polynomials and concatenation of straight-lines allow to smoothly interconnect the points of the geometrically scaled coordinates of a sketch representing the desired trajectory. Therefore, a continuous desired trajectory is generated for the WMR prototype with less computing time consumption. iii) The proposed trajectory tracking control algorithm is simple and easy to experimentally implement. Thus, this paper has presented an useful technological integration of hardware and software, delivering a platform that could be introduced in industry activities. This mainly because of two reasons: a) it includes a simple and robust control algorithm that ensures to achieve the trajectory tracking task. b) it can be easily operated through the mobile computing device.

APPENDIX COMPARATIVE ASSESSMENT OF THE PROPOSED CONTROL
A comparative assessment of the performance of the trajectory tracking control algorithm proposed in Section V is given here. This control algorithm is compared with two tracking controls taken from literature. One of them was designed from the kinematic model of the WMR and reported in [27]. The other one is based on the dynamic model of the WMR and was introduced in [38]. These two controls operate differently to the proposed control algorithm (19). Their objective is to achieve that a WMR tracks a desired trajectory imposed by a reference WMR, which is defined as follows: where x * , y * , and φ * are the desired trajectory and υ r and ω r are the reference inputs. Also, the tracking control reported in [27] refers to the linear and angular velocities of the WMR, defined as: where v and w stand as defined in (17), but with ν 1 and ν 2 non saturated, K 1 , K 2 , K 3 are positive constants, and the tracking error is given by: whereas the tracking control in [38] represents torque defined as follows: with M (q) and C (q,q) as defined in (15), K pa , K ia , K 1a , K 2a , K 3a being positive constants and its corresponding tracking error being: Thus, the trajectory planning app and the trajectory generation algorithm presented in Sections III and IV, respectively, cannot be directly applied for the tracking controls (41) and (43).
Since the redesign of the trajectory planning app and the trajectory generation algorithm for other controls is beyond of the scope of this study, for the comparative assessment the trajectory planning and trajectory generation were carried out directly in the embedded system of the WMR prototype described in Section II. The desired trajectory used to test the tracking controls (41) and (43) is defined in Table 1. There, in each interval of the time, t, where applies, υ r and ω r , are determined by the following polynomials: where Whereas the coefficients r 1 , r 2 , and r 3 were chosen as in [39]: It is important to mention that, in the times t i and t f , (45) and (46) satisfy: To test the tracking control algorithm (19) herein proposed, the desired trajectory translated to the plane XY is required. Hence, such a trajectory is generated by introducing υ r and ω r of the Table 1 in (40). The resulting desired trajectory is shown in Fig. 13(a).
For the real-time implementation of the proposed tracking controller (19), only the following WMR parameters are required: In the experiments, same initial conditions were used for the three controls, that is: The gains for the control (41) were chosen as: While, the gains for the control (43) were selected as:  k pυa = 2, k pω = 2, k iυ = 50, k iω = 50.
Lastly, the gains for the proposed control (19) were set as follows: The results obtained from the three controls are shown in Fig. 13. To differentiate the variables of the three controls, subscripts PC, C1, and C2 were used for the proposed control (19), control (41), and control (43), respectively, where was needed. Because of the difference in the operation of the three controls, a comparison is carried out but only considering their performance when tracking the desired trajectory with respect to the plane xy. In Fig. 13(a), a similar trajectory tracking performance is observed for the three controls. However, there is a main difference on the beginning of the experiment. Note that, the proposed control (19) tracks the desired trajectory from the beginning and the other controls do not. In terms of the trajectory tracking error, the proposed control has minor error than the control (41), but has a larger error than the control (43). Although, it can be thought that control (43) has better performance than the proposed control (19), it is important to note that the proposed control does not require physical parameters of the WMR prototype associated with masses and inertias. Therefore, it can be stated that the proposed control is also robust under uncertain parameters. Another important characteristic of the proposed control, observed in Fig. 13, is that the maximum velocities ν 1 , ν 2 , and υ are the smallest when abrupt changes appear in the desired trajectory. This implies that the WMR prototype moves smoothly along all the desired trajectory, when performing the tracking task. This is a very important behavior to pursuit industrial applications.
Finally, it is worth mentioning that a performance comparison between the Jetson TK1 board and the DS1104 board from dSPACE, when executing complex trajectory tracking controls, was reported in [40]. There, it was concluded that the Jetson TK1 board has a performance similar to the DS1104 board. She is currently a Professor and a Researcher with the Sección de Estudios de Posgrado e Investigación de la Unidad Profesional Interdisciplinaria de Ingeniería y Ciencias Sociales y Administrativas de IPN. She has published articles in journals indexed in JCR and presented papers in international conferences. Her current research interests include automatic control applications for underactuated mechanical systems, mobile robots, power electronic systems using information and communication technologies, and development of educational technology. She He is currently a Professor and a Researcher with the Instituto Tecnológico de Iztapalapa. He has published articles in journals indexed in JCR and presented papers in international conferences. His research interests include control applications for underactuated mechanical systems, such as inverted pendulums and unmanned aerial vehicles, design, programming, and instrumentation of robotic and mechatronic prototypes.