Use of Global Mapping Architecture for Implementation of All Terrain Robot Movement

— The aim of this paper is to conceptualize, design and implement the working of a self-operated vehicle that is capable of fulfilling transportation and delivery needs of its users for ease of operations and increased safety. The system operates by receiving the desired destination location details from the user. The user just needs to click on the map provided by OSM to give the destination location to the robotic vehicle remotely over the network. The system uses Robot Operating System (ROS) as a middleware sitting on top of the integrated sensor circuit placed on all terrain mechanical chassis. This vehicle provides single point access of control for the system of the vehicle from anywhere on the same local network. The OSM map application is in the master server, which ensures that not everyone can have the access to the vehicle’s control unit. This work has been demonstrated on a small robotic vehicle designed for all terrain movement


INTRODUCTION
Self-driven or autonomous vehicles have become a cuttingedge research topic in robotics and automation domain [1][2][3]. They are capable of fulfilling the traditional vehicles' capabilities without human intervention. Autonomous vehicles perceive their environment with sensors deployed on them. These sensors mainly provide information which are processed further to help in safe navigation of vehicle to reach desired destination. The prototype vehicle mentioned in this paper is autonomously driven according to destination mentioned by the user. Concurrently, vehicle needs to recognize its position on a global reference frame to record the global coordinates of destination and target location is provided to the vehicle from the application being operated by the user. To accomplish this task, the vehicle uses GPS, with a magnetic compass and Inertial Measurement Unit (IMU) to gain information for safe traversal. The vehicle is capable to identify the non-accessible path from the paths provided on the extract optimal path information to reach a goal provided to it. The present vehicle is battery driven, hence it offers several advantages over conventional fuel-based vehicles. This prototype is eco-friendly with almost zero emissions. It is energy efficient with low power consumption. When used for delivery services, it is comparatively cheaper in operation with low maintenance cost. In addition, it also provides assurance of reaching the destination location once properly selected.

THEORY AND LITERATURE REVIEW
The literature review section has been completely covered under six broad areas, namely, all-terrain vehicles (ATV), robot operating system (ROS), Rosbridge, GPS, ArduPilot Mega (APM) board and control systems. These are provided in the sub-sections below.

All-Terrain Vehicles
All-Terrain Vehicles (ATVs) [4] are those vehicles which can be driven on almost all surfaces such as desert areas, rugged terrains to concrete roads, grasslands, shallow watery lands etc. On a commercial scale, in the early 1970s, ATVs were introduced in markets for sale in United States with the initial models having a three-wheeler design. ATVs became more popular in the early 1980s with introduction of models having four-wheel design and thus it became a predominant choice of users worldwide [5].

Safety concerns associated with ATV
Along with significant increase in sales of ATV, increment in fatalities and injuries with usage of ATVs was also observed. Various research studies [6][7][8][9][10][11] have been conducted to test the risks of injuries associated with driving ATVs. Based on mortality and injury scores they have been compared as dangerous as motorcycles. Proper usage of protective equipment may help in reduction of most of the common injuries related to their usages. Equipment's like suitable helmet approved by Department of Transportation (DOT), protective eye-wear, gloves along with riding boots for almost all riding conditions are recommended by majority of ATV manufacturers for sports-enthusiasts or while driving on challenging terrains like aggressive riders also (such as rock crawling or hill-climbing), motocross-style protector for chest with knee/shin guards for further protection would also add up to the safety of drivers of ATV.

Classification of ATVs
According to Oregon law [12], an ATV is a two-to eightwheeled vehicle with a motor designed for riding on unpaved surfaces. Oregon divides commercial ATVs into four classes: Class I ATV, Class II ATV, Class III ATV and Class IV ATV based on their physical structure, mechanical configuration and load carrying capacities.

Advantages of ATVs
ATVs offer many advantages over conventional vehicles, some of these are: (a) Unique moving ability: ATV's are designed to locomote in all types of terrain surface conditions and the associated problems like bumps, dips, hills, etc. They are designed to give the convenience of driving in all varying terrains including areas which remain inaccessible by other vehicles, which makes them more beneficial for wide range of tasks. (b) Strong dynamic ability: Owing to compact size and tight turning radius, an ATV has efficient capabilities of maneuvering on the narrow spaces. ATVS possess high power-to-weight ratio due to the fact that they get powered up by relatively smaller engines and also it has light weight body structure. This helps it to accelerate and brake spontaneously. (c) Easy to repair and maintain: Being a compact system repair of mechanical components is quite simple. The mechanical simplicity of design of ATV makes maintenance and customization easier.

Prototype of the proposed vehicle
The proposed vehicle is designed as an all-terrain vehicle, so that it can travel on critical road surfaces and move anywhere. Thus it possesses all the advantages of ATV discussed above. Moreover, being autonomous in nature, the safety issues connected with driving this laboratory scale prototype ATV are taken into consideration through the use of advanced algorithms. The developed prototype vehicle uses "Dagu Wild Thumper" 6-wheel-drive all terrain chassis. Figure 1 shows the photograph of the bare mechanical chassis used to design this prototype vehicle. This rugged chassis is designed to traverse over all types of terrains, like concrete roads, steep incline and even stairs, making it generalized research platform for any vehicle. This prototype meets the requirements of performing tasks in complex outdoor environment normally observed in a mining operations or field. The used chassis features six powerful DC motors with brass brushes and 34:1 steel gearboxes that drive large (120 mm diameter) spiked tires, and a unique "super-twist" suspension system which forms a basis to keep each wheel in contact with the ground for maximum traction while driving over uneven or bumpy or highly undulating surfaces. The suspension can be adjusted to suit different loads and road conditions. All the 6 motors associated with the six wheels can be independently controlled with the help of the motor driver L298D and a microcontroller (Arduino Mega). This provides a wider control over vehicle's speed, steering and brakes. The steering of the vehicle is done using differential motor, and the two extra wheels in the middle helps the vehicle to take turns freely, without deviating from the mean position. The chassis is equipped with two encoders (48 cpr) connected to the both the motors in the middle, which gives more accurate readings compared to the single encoder.

ROS
ROS, or Robot Operating System [13][14] is an open source framework which provides an abstraction layer for complex configurations involving both software and hardware. ROS supports several programming languages making it flexible for most of the users to resolve their problems by several means.

Concepts of ROS
ROS gives access to a framework which allows to segregate processes, also referred to as nodes, providing a means to communicate between the nodes. Multiple nodes function together in a full robotic system in sequential and / or parallel execution modes. A node can be described as processes such as a sensor publishing data, localization algorithm, or even a data logger. Each node is dedicated to execute some particular function with larger algorithms and functionalities realized through the interactions between the nodes. Some terminologies that have been used throughout the rest of paper have been discussed as follows: Node -An executable unit which communicates with other nodes through message passing Message -Unit of data exchanged between nodes Topic -Communication channel between two or more nodes Publisher -Node pushing data into a Topic. Receiver -Node receiving data from a Topic Service -Remote procedure call in which Node A requests, Node B performs some action, and Node B returns the outputs to Node A.

ROS Bridge
Rosbridge [15][16] gives us an additional level of abstraction on top of ROS and treats all of ROS as a back end. This helps developers by eradicating the need of having an intimate knowledge of low-level control interfaces, middleware build systems and execute sophisticated robotic sensing with control algorithms. The only prerequisite being understanding of middleware packages involving to build and transportation mechanisms. Rosbridge layers a simple socket serialization protocol over all of this complexity, on top of which application developers of all levels of experience can create applications. ROS abstracts individual robot capabilities, allowing robots to be controlled through messages. It also provides facilities for starting and stopping the individual ROS nodes providing encapsulation of unified view of robot and its environment. Rosbridge also allows access to underlying ROS messages and services as serialized JavaScript Object Notation (JSON) objects, and in addition provides control over ROS node execution and environment parameters.

Features of Rosbridge
Rosbridge provides a JSON (JavaScript Object Notation) API (application program interface) to ROS functionality for other programs to interface with ROS. Various front end applications also interface with Rosbridge, including a WebSocket server for web browsers. Rosbridge specifically consists of protocol and its implementation. Rosbridge protocol is a specification for sending JSON based commands to ROS. This protocol is programming language and transport agnostic with the underlying idea being, any language or transport that can send JSON can talk to the Rosbridge protocol and interact with ROS. The protocol includes publishing and subscribing to topics, making service calls, getting and setting params, and even compressing messages and more. In the second part, the Rosbridge suite package implements the Rosbridge protocol and provides WebSocket transport layer to the developer. Three of the important packages include Rosbridge library, Rosapi and Rosbridge server that are used for different applications by the developers.

ArduPilot Mega(APM)
ArduPilot Mega (APM) is a IMU system to assist autopilot that is based on the Arduino Mega platform. This system is designed to control fixed-wing aircraft, multi-rotor helicopters, traditional helicopters including ground vehicles and submarines. The ArduPilot project [17] was started by Jordi Munoz (in 2007) and which was later released by Munoz and Anderson in 2009 (flight controller software) along with a hardware board. At present, the ArduPilot code evolution continues support for integrating and communicating with powerful companion computers for autonomous navigation, plane support for additional vertical take-off and landing (VTOL) architectures, integration with submarines, and integration with ROS platform. MAVLink extendable communication node for ROS or MAVROS, is a package that is used for the integration of APM with ROS for proper sensing, data integration and processing having facilities of proxy for ground control stations. The ArduPilot Mega (APM) comprises of three components: APM hardware board which is a physical board consisting sensors and processor, the APM firmware with code running on APM board, and the APM software, a program running on system for uploading firmware and change the settings on the APM board. The ArduPilot Mega version2.5 (APM2.5) board has been used in the prototype vehicle for this technical investigation.
2.6.1 Specifications of APM2.5 board APM2.5 board consists of Atmel's ATMEGA2560 and ATMEGA32U-2 chips for processing and USB functions. It is an Arduino compatible device. It has 3-axis gyro, accelerometer, a high-performance barometer, a 3 axis magnetometer/digital compass (powered by Honeywell's HMC5883L-TR chip). There is an onboard 4 MP data-flash chip automatic data logger. APM2.5 supports off-board GPS and any TTL level GPS receiver can be connected to the board for obtaining the user coordinates.

Global Positioning System(GPS)
The Global Positioning System [18][19][20] is a based on satellites for highly accurate position, velocity and time estimation of the user location. Determination of position, time and velocity of the user, a Time of Arrival (ToA) technique is used which is based on measurement of transit time of propagation of signal from satellite to receiver. Pseudo-range between satellite and receiver is estimated by multiplication of transit time and speed of light because transit time measurement involves unknown receiver clock bias. Finally, through trilateration with the estimated pseudo ranges from several satellites, the GPS receiver can estimate user position and local time. The GPS receiver used in the prototype vehicle is Ublox M8N.

Specifications of Ublox M8N
The position accuracy of the used Ublox M8N GPS receiver is approximately 2 to 2.0 m circular error probability (CEP), acquisition time for the cold start is 26 s, aided start time is 2 s and the reacquisition time is 1.5 s; sensitivity to tracking and navigation is -167 dBm, to cold start is -148 dBm and that for hot start is -156 dBm, the navigation update rate is 10 Hz. The operating temperature ranges from -40 degrees C to 85 degrees C and the storage temperature lies within -40 degrees C to 85 degrees C. It features additional front-end LNA for easier integration of antenna and a front-end SAW filter increasing the jamming immunity. It is compatible with APM boards.

Control Systems
The control operations involved in tracking and following paths of an autonomous vehicle are one of the most important challenges in automation because of constraints on mobility, high-speed operation, speed of motion, complex interaction with environment and most typically lack of prior information.
In general, the concepts of control system can be classified based on linearity as Linear control system and Non-linear control system. Linear control systems are those which follow the principle of superposition, which includes homogeneity and additivity. A system follows principle of superposition, if, for any two given inputs x1 and x2 to the system, one has y1 and y2 as the corresponding outputs, and then if the input x = a. x1 + b. x2 is provided to the system, then the corresponding system output should be y = a. y1 + b. y2, where a and b are constants. An example of linear control system can be a control system which consists of only resistive network and DC source. On the other hand, non-linear control systems include all those systems which do not follow the principle of superposition. A thermostat controlled heating system can be classified as non-linear control system. Another perspective for classifying the control system based on active parts may be considered as dynamic and static control system. The static control systems are those systems in which the output depends only on present input. If the main objective of control system is to maintain a physical variable at some value in presence of noise or disturbances, then static control system is used. Example of this system is a controller used to maintain the speed of generator at constant value that results in a generated voltage having frequency of 60 Hz even in presence of varying electrical power loads. The system whose output depends on present as well as past inputs is normally called dynamic system. The dynamic control system can be described as a control system in which a physical variable is required to follow, or track, some desired time function. Example of this system may be considered as a control system of robot, in which robotic chassis is made to follow some desired path in space satisfying certain criteria. Various control methods include PID control method, LQR control method, fuzzy control method, model referenced control method etc [21][22][23][24][25][26][27] exists at the present time. These methods are briefly discussed below:

PID Controller
A proportional-integral-derivative controller (PID controller) follows a control loop feedback mechanism which finds it use in various applications requiring modulated control in a continuous manner. A PID controller calculates an error value e(t) as the difference between a desired set point (SP) and an estimated process variable (PV) for correction based on proportional, integral, and derivative terms (denoted P, I, and D respectively). The implemented control system of the prototype vehicle is based on PID control, as it is much simpler to put into practice compared to other control system algorithms, and it also provides good motion control of the vehicle.

LQR Controller
The Least Quadratic Regulator (LQR) controller is an optimal controller a mechanism which predicts future outputs at every time step for minimizing a global criterion/cost function. The algorithm is mainly focused on detection of controller settings which minimize the undesired deviations. The magnitude of control action gets included in cost function at each time step. This algorithm helps in reduction of work done by control systems engineer for optimization of controller. The LQR algorithm is essentially an automated way of finding an appropriate state-feedback controller. Difficulty in finding the right weighting factors limits the application of the LQR based controller synthesis.

Model Predictive Controller
Model predictive controllers (MPC) rely on processes having dynamic models. The main advantage of MPC is the fact that optimization of current timeslot is not allowed, keeping future timeslots in account. This mechanism is obtained by optimization of finite time horizon but implementing current time slot and performing optimization iteratively. MPC possesses the ability to take control actions by anticipating future events. This predictive ability remains absent in PID controllers. MPC follows a digital control implementation universally with achievement of faster response times through specially designed analog circuitry. better result in comparison to conventional PID controller. However, they are more complex in implementation.

Control System used in the Developed Prototype
PID based approach has been implemented for controlling both the speed and direction of movement of the prototype robotic vehicle. Different model parameters used in this model have been discussed below: `P` is proportional to present value of the (SP -PV), i.e., error e(t). For example, on the account of large and positive error, similar large and proportional control output is observed, taking Kp as gain factor. Usage of proportional control in a process with tasks like temperature control will result in error between set point and actual process value, as error is required to generate proportional response. If there is zero error, then there will be zero response consecutively. `I` accounts for previous values of the (SP -PV) error for integrating them over time produce term `I`. For example, after application of proportional control portion if residual error exists, this term helps in eradicating the error by generating control outputs based on historic cumulative value of errors over previous time steps. On elimination of error, the term `Ki` ceases to grow. Thus decrement in error diminishes proportional effect which gets compensated by growth in integral effect. `D` is a best estimate of the future trend of the difference error (SP -PV) value, based on current rate of change. This is often referred as "anticipatory control", as it effectively reduces effect of difference error by exerting control influence generated by rate of error change. Here, rapidness in change is directly proportional to dampening or control effect. The gain associated with this term is Kd. A PID controller (1) calculates a difference or error value, e(t) as the difference between a desired set point (SP) and a measured process variable (PV) while it applies a correction based on proportional, integral, and derivative terms: ( ) = * ( ) + ∫ ( ) + * ( ) () Here, u(t)is the process variable (like velocity) Kp is the proportional gain, Kd is differential gain and Ki is the integral gain. Since, it is not possible to realize the derivative and the integral term in the micro-controller directly, so instead of this, a discrete PID control algorithm has been used. The PID control in this vehicle is implemented in the code for the motor control module of Arduino Mega. The following pseudo-code (algorithm) shows our implementation:

PROPOSED APPROACH
The prototype takes the inputs for its current position information as the start position from GPS module in terms of latitude and longitude. User provides the destination by clicking on the map location and the application generates the destination latitude and longitude to be used by the vehicle based on the point selected by the user. Based on the start and destination points, the vehicle obtains the accessible sequence of waypoints. Once the destination is reached, another user can take over the control of the vehicle. Algorithmic Chart for this process is shown in Figure 2.  Figure 3 provides the idea of traversing the path from start location to the destination point, the distance d between the start and destination points is calculated using Haversine formula [28] using equations (2), (3), and (4) given below:  () Equation (5) represents the calculation for the heading (bearing) angle to be followed by the robotic vehicle.
= 2(sin . cos 2 , cos 1 . sin 2 − (5) = sin 1 . cos 2 . cos (6) Here, start latitude: = 1, destination latitude: = 2,start longitude: = 1, destination longitude: = 2, and are the difference in longitudes and latitudes respectively computed between the consecutive start and destination location points. R is earth's radius (mean radius = 6,371,000 m). The vehicle aligns itself according to the heading and the current angle measured from the compass, and then follows the straight line path until the distance recorded using encoder equals d. The start and destination points are updated from the way points, and the process is repeated until the final destination is reached, where the vehicles stops. Figure 4 shows the pictorial data flow of the process. 4.0 EXPERIMENTAL SETUP In this section we have described the hardware as well as the software setups for the present investigation. As of now, the hardware components are used only for positioning and localization on a global reference frame, whereas the implemented software components perform the tasks of data extraction of GPS and compass; selection of GPS coordinates from the OSM, waypoint extraction for navigation and PID controlled movement of the robotic chassis.

Hardware Setup
The prototype is built on a Wild Thumper chassis ( Figure 5) having the sensors attached on the required locations in the different components. Each of the six motors are mounted independently on six different suspension units attached with the chassis. All the six wheels are separately attached with the six motors fitted with the chassis in such a way that they remain protruded from the chassis. Three independently working controlling units are placed in the lower casing, where two motors, placed on the left and right sides of the chassis, can be controlled and driven from a single motor controlling unit. Hence, all the six wheels can now be driven and controlled by the motor controllers. There are encoders placed in the middle two wheels of the robotic vehicle as per the specifications provided earlier. In addition, a Raspberry-Pi3 is attached on the robotic vehicle for processing purposes. The sensors including GPS module, digital compass on APM2.5 board and the APM2.5 board itself are placed and connected with the processing unit. The navigation code and implementation of PID controller logic for the robotic vehicle is incorporated in an Arduino Mega2560 board placed following the RaspberryPi3 board (as shown in Figures 4 and 5). Since this prototype has to cover distances far away from AC power sources, it is fitted with a pack of 3 celled Li-Po battery having a maximum rated voltage of 11.4V and capacity of 5200mAh.

Software Setup
The software setup consists of four distinct modules for (a) data extraction of GPS and compass using ROS nodes, (b) destination selection, and (c) waypoint extraction. These are explained below in brief: (a) Extracting GPS and Compass Data Two of the ROS packages are used for extracting GPS and Compass data. These are, ArduPilot and Mavros. The first one burns the code / firmware on the APM2.5 board whereas the second one, as described earlier, is used for providing proxy for the ground control stations. Figures 6 and 7 display the sample compass data and GPS data. The bearing / heading angle has been shown to be extracted from the compass whereas of all the extracted data points from GPS, we use the latitude and longitude values for our navigation purposes. The variation in height is neglected for this study. Here, Rosbridge connects the OSM application to the ROS, such that the GPS and compass data which is being published on their respective topics can be known to the application for locating the present position and at the same time passing the selected information to the ROS subscriber node. Figure 8 represents the graphical user interface where the start and destination. Location points are displayed. The destination point is selected by the user on the same GUI before the same gets displayed. With every movement of the robot, the current location gets refreshed on the GUI and upon reaching the destination suitable message gets displayed to the user. During the experiment, based on the destination selected by user on the map (as shown in Figure 6), the following results are obtained Figure 9 shows the execution of the module starting from the selection of the destination point by the user (represented by a TRUE value for goTo parameter), displaying the destination latitude, destination longitude, start latitude and start longitude. Once this information is made available, the nearest locations points are obtained from the "Google Maps" module. Also, the drivable shortest path, from among the selected paths, is selected. The available list of waypoints along this selected path is then made available to the python list for the robot to move. The waypoints obtained are all those accessible points for driving between the start and destination position. Figure 10 shows a sample of the obtained drivable waypoints longitude and latitude data for one of the experiments conducted in this study. The topics containing these data are /latitude (depicting a ROS topic) and /longitude (depicting another ROS topic). These topics along with other topics containing information like distance travelled by the vehicle subscribed by the main node, here Figure 11. The main node keeps track of the current distance travelled by the vehicle and the current compass angle and compares it with the desired distance and angle. Based on these comparisons, control action is provided to the vehicle.  Figure 6 -11] show that all the commands were tested successfully, and that vehicle followed the expected path.  However, due to dependency on the GPS, the accuracy in positioning of the vehicle is limited to that of GPS module itself. It depends on the strength of signal received, noise, no. of logged satellites. The variation in no. of logged satellites is due to the GPS ephemeris, different weather conditions, places, clear or cloudy sky etc. Beside GPS, the orientation of the vehicle depends on the data received from compass. Due to variation in the local magnetic field strength, EMI interference and noise, the compass data is also subjected to errors. So, both the GPS receiver data and the compass data were analyzed to find its accuracy and precession. The GPS receiver was kept at a fixed position, and sample data were obtained, for no. of visible satellites ranging from 4 to 14.
The mean position error was recorded, along with the variance and root mean square error (RMSE). It was observed that the accuracy and precision of the receiver increased significantly with increase in no. of visible or logged satellites. Figure 12 shows the mean position (latitude and longitude), along with position error, variance and RMSE with respect to no. of logged / visible satellites. The graph in Figure 13 shows the error quantities with different no. of satellites and it can be interpreted that the corresponding accuracy and precision of the GPS readings increase with the increase in no. of visible / logged satellites. The average position accuracy is observed to be 3.5 m with the average variance and RMSE of 3.47 and 1.86 m respectively. Along with the GPS data, the compass data was also analyzed. It was observed that when the vehicle was kept static in one direction, and recorded data were analyzed, the mean bearing angle came to be 4.0325 degree NE, the variance was of 0.0010, and the root mean square error (RMSE) value was 0.03083 degree. This shows that the compass has very low variation in the reading in static mode of operations, while in the dynamic mode of operations RMSE has been computed to be varying from0.14 to 2.66 degrees. Fig13. Bar Graph showing errors in GPS data vs. No. of visible satellites when the GPS receiver is static.

CONCLUSION
In this paper, all terrain robot movement using global mapping architecture was implemented with the help of a designed prototype vehicle. The goal was to enable the user to give the vehicle the desired destination point using a global map remotely, and it must reach that point following the shortest path drivable available from extracted GPS waypoints. Experiments were conducted on our prototype, and it successfully reached the destination each time, which was provided remotely using the OSM map. The results from the experiment show that the ROS and the Rosbridge application were successfully integrated with the vehicle which was used for vehicle control from remote locations. The all-terrain movement capability of the vehicle gives it an extra edge over other vehicles. The data from GPS receiver and compass were recorded for analysis of the accuracy and precision measures. Thus, it may be concluded that the use of the proposed vehicle in the real world scenario is practically feasible, and economical. Using this vehicle, the delivery and transportation needs can be easily met by the users at low cost, along with all the benefits that has already been discussed in this paper. The only requirement of the vehicle is that both user and vehicle must be in the same network which is its limitation. This is being planned to be remove in future work, by providing mechanism to control the vehicle from any network, and from any part of the globe. Also, the focus was mainly on navigation part for this study, so collision detection-avoidance and visionbased interpretation capabilities have not been implemented, but these will be incorporated to enhance the working of the vehicle in the future work.