Golf cart prototype development and navigation simulation using ROS and Gazebo

. This paper presents our approach to development of an autonomous golf cart, which will navigate in inaccessible by regular vehicles private areas. For this purpose, we have built a virtual golf course terrain and golf cart model in Gazebo, selected and modernized ROS-based packages in order to use them with Ackermann steering vehicle simulation. To verify our simulation and algorithms, we navigated the golf cart model from one golf hole to another within a virtual 3D golf course. For the real world algorithms’ verification, we developed a small-size vehicle prototype based on Traxxas radio-controlled car model, which is equipped with an on-board controller and sensors. The autonomous navigation of Traxxas-based vehicle prototype has been tested in indoor environment, where it utilized sensory data about environment and vehicle states, and performed localization, optimal trajectory computation and dynamic obstacles’ recognition with adjusting the route in real time.


Introduction
The growth in the amount of research on unmanned vehicle technology for the past decade shows significant interest to autonomous vehicle control and navigation.Almost all major car manufacturers conduct their own research in this field, and even non-automotive companies like Google and Uber perform investigations toward rapid commercialization of autonomous vehicle technology, where an intelligent autopilot will replace drivers to transport people on public roadways [1].However, due to slow evolution of autonomous cars related regulations, and inability of existing technologies to handle complex aspects of driving (e.g., poor road conditions or unsafe navigation of some human drivers), fully autonomous vehicles are still far from being commercially available.Nevertheless, modern conventional cars are more commonly being equipped with features that make them semi-autonomous.Most high-end cars from famous brands bear radars, cameras and other sensors that allow having safe and convenient features like automatic cruise control, automatic parking, lane keeping and automatic braking.The next step in this domain is to transfer all driver's functions to a vehicle, beginning from a semi-autonomous mode when a driver should be ready to take control over a car at every moment and aiming to a fully autonomous mode.Already available on the market Tesla cars are equipped with a semi-autonomous system which can drive the car at highway speeds and in stop-and-go traffic mode, set the speed correspondingly to traffic conditions, steer around curves within a lane and change a lane on driver request.
While large car manufacturers expand testing of autonomous cars, different universities research teams concentrate on specialized vehicles automation, for example, such as self-driving golf carts [2][3][4][5].
Our long-term goal deals with development of autonomous golf cart (AGC) for passenger transportation.Although, while within our simulation we consider AGC navigation through golf course oriented on golf players' conveyance, operation areas for the AGC prototype are not limited to golf purposes and may also include parks, tourist tours, airports, and recreation zones as well as potential application in search and rescue outdoor scenarios within urban areas (e.g., under conditions of chemical or nuclear pollution which do not significantly affect urban infrastructure).The AGC implementation contains three main stages: (1) golf cart simulation and testing of navigation algorithms in a simulated virtual environment; (2) building a prototype on a base of a radio-controlled car model, and (3) transferring the developed systems to a full sized golf cart and testing it in a real world environment.In this paper we present the first two stages of our research.
The rest of the paper is organized as follows.Section 2 describes the system setup: the basic system components for the AGC configuration, and our results on development of vehicle prototype based on the Traxxas radio-controlled car model.Section

System setup
Our long-term goal is to build an autonomously navigated golf cart, which will be controlled by Robot Operating System (ROS) 1 based set of algorithms.This section describes the golf cart configuration and our efforts in development of an autonomous vehicle prototype based on Traxxas radio-controlled car model as a first approximation of AGC implementation.

An autonomous golf cart configuration: sensors, control and systems
This subsection describes the key AGC hardware components, which are necessary for environmental data acquisition and control of the vehicle.These key components include sensors, a driving system, a humanvehicle interface system and an on-board computer, which solves computational, safety and decision-making tasks.Based on the presented in [5,6] concepts we specify the main functional autonomous vehicle system components, which will be used in our AGC, as follows: x Driving system provides vehicle locomotion control and consists of motors, a steering wheel and brake pedals (the two later components give a human driver possibility to take control of the autonomous vehicle at any moment).
x Power system supplies with electrical power all AGC systems, e.g.motors, on-board computer, sensors, etc.
x Computational platform is an on-board computer, which performs functions of sensor fusion, environment model building, case-based reasoning, path planning, and computing appropriate control signals for AGC goals.
x Safety system provides a functionality of emergency stop and alarm warnings, followed by immediate passing of AGC control back to a human driver at any moment; it includes such special equipment as light and sound warning systems, and emergency stop "red buttons" to switch off the autopilot mode.
x Sensory system provides AGC with necessary information about surrounding environment state and internal vehicle state.Table 1 presents in details the sensory kit, which is responsible for real-time data acquisition, vehicle localization and navigation, and a dynamic world model creation.
x Human-vehicle interface system provides a graphical user interface to interact with a passenger (e.g., a golf player) by selecting a next waypoint and to present a current golf cart status and AGC system states.
x Decision-making system is a sophisticated intelligent system, which uses as its input a current world model and its predicted states, and performs next AGC actions planning.Table 1.Sensory kit for the autonomous golf cart.

Sensors Description
Front Bumper LIDAR Detects wheel level obstacles in front of the golf cart and inclination type of road surfaces (flat/ascending/descending).

Front Roof LIDAR
LIDAR is placed with a negative pitch angle to a travelling plane and detects front obstacles before the golf cart, determining also road's local relief details.GPS/GLONASS navigation system Identifies the golf cart location in absolute coordinate system.

Camera
Recognizes dynamical obstacles and moving objects.

Inertial measurement unit (IMU)
Measures car's dynamical characteristics (angles, velocities and accelerations), using a set of 3D accelerometers, gyroscopes and magnetometers.

Encoders
Receives odometry data from wheels' angular position.

Side sonars
Detects side obstacles from short-distance proximity sonars.

A vehicle prototype development
As the first step toward AGC, we have been developing a small-size vehicle prototype based on Traxxas 7407 radio-controlled (RC) car model 2 (Fig. 1), which will be used to verify and test our ROS-based navigation algorithms.The Traxxas 7407 model, which is a 1:10 scaled model of a typical car, becomes widespread among RC car enthusiasts, as far as it has powerful electric drive platform, allowing to achieve the maximum speed up to 100 km/h.The model is supplied with Velineon 3500 brushless sensorless DC motor, NiMH Battery 3000mah 8.4V, Velineon VXL-3s Electronic Speed Control (ESC), and the Traxxas TQi 2.4GHz radio controlling system.We have modernized the basic vehicle model with onboard computer and sensors.As a computational platform we have used the low power NVidia Jetson TX1 embedded computer, supporting CUDA technology with on-board parallel computation.We have also utilized the 9 Degrees of Freedom (DOF) Razor IMU 3 , incorporated MEMS triple-axis gyro, triple-axis accelerometer and triple-axis magnetometer for nine degrees of inertial measurements.We mounted an optical incremental Lynxmotion Quadrature Motor Encoder to the electric motor, and installed ZED stereo camera, Logitech webcamera (1280x800 pixels, 25 fps) and Hokuyo UTM-30LX-EW LIDAR.We have used both LIDAR and stereo camera to get a point cloud data, constructing a map and detecting obstacles.Figure 2 presents our current version of the model for prototyping.While the final decision of visual sensory information fusion and sensor utilization is still on the way and requires additional testing, we have obtained the first results of the autonomous RC car navigation with a web-camera.The vehicle utilized web-camera data about environment and sensory information on vehicle states, and performed localization, optimal trajectory computation and dynamic obstacles' recognition with adjusting its route in real time while performing a white line following of an ellipsoidlike figure in indoor laboratory environment.

Golf cart's 3D model simulation in Gazebo
We began developing the AGC navigation algorithm with creation of a proper simulation model, using Gazebo 2.2 for building both the AGC model and simulation environment.Gazebo 4 is an integrated with ROS graphical engine, which simulates physics, builds a 3D robot model using its URDF description 5 , and then allows running vehicle control algorithms in a developed environment.To control AGC model we used ROS Indigo [7] software, where we have modified the basic 4 Gazebo is 3D robot simulator: www.gazebosim.org 5 URDF is a Unified Robot Description Format, which is an XML format for robot model representing within ROS.
algorithms of ROS Navigation Stack framework 6 .The ROS Navigation Stack permits implementing navigation algorithms for differential drive robots.It receives data from odometry, sensors streams, and computes commands of safe velocity toward a determined goal position, which then will be executed by a car driving system.The algorithms, which prove their effective work within the simulation, will be further applied for the real AGC, and ROS structure and functionality helps to simplify such process significantly.Figure 3 presents a full-scale AGC simulation model in Gazebo.As far as Gazebo allows simulating a car-like steering system, we have created the Ackerman steering vehicle model that corresponds to standard golf cart steering.Gazebo also allows obtaining sensors' simulation such as IMU, LIDARs, encoders, cameras, and stereo cameras.After finishing the steering system we have integrated these sensors into our AGC model and created a golf cart course simulation.Figure 4 demonstrates the golf cart moving within a developed golf field environment in Gazebo simulator.

ROS-based algorithms for navigation
For our AGC simulation we have modified the existing ROS packages to use them with Ackermann steering robot.The following algorithms were utilized: x Global planner is used to set a global path for the car within a point-to-point navigation task.Default ROS package implements Dijkstra's global path planning algorithm [8].
x Local planner, which is realized in a search-based planning library (SBPL) of domain-independent graph searches and is based on a lattice planner [9].
x Direction Cosine Matrix (DCM) algorithm [10] for filtration of IMU data.
x Robot localization is based on AMCL ROS package 7 adaptation to the AGC model.This package represents 2D probabilistic robot localization during its locomotion in a simulated environment and implements adaptive Monte Carlo localization approach [11] with a particle filter to track robot location on a given map [12].This set of algorithms has been implemented within our AGC simulation for successful vehicle navigation to a predefined goal pose within a 2D map.Further, we started to verify and configure this set of algorithms on the car prototype, which was presented in Section 2.2.

Results of golf cart navigation simulation
As we have mentioned in Section 3, we used the standard package of ROS Navigation Stack, which includes a set of algorithms for localization, local and global planning, and controlling the mobile robot.This package is designed for a differential drive and holonomic drive robots, but it does not perform well for a car-like steering robot.We have modified the Navigation Stack package in order to work with Ackermann Steering vehicle.The main changes were as follows: • Adding local planner (teb_local_planner).
• Supplementing with specific motion primitives for a car-like robot.
• Adapting specific for car-like commands to control the vehicle.
We have used the package teb_local_planner 8 , as a local planner, which relies on the method called Timed Elastic Band [13][14][15].This approach is extended to capture the specific constraints and objectives, which are appropriate for emergency manoeuvres in critical situations [16].It can locally optimize the robot's trajectory with respect to trajectory execution time, separation from obstacles (i.e., path safety) and compliance with kinodynamic constraints at a runtime.
With this set of packages and algorithms, we can navigate golf cart through a golf course from one golf hole (marked with a flag) to another, as shown in Fig. 5.

Conclusion and Future plans
We are focusing on a long-term goal of building a fullsize autonomous golf cart, which will be controlled and navigated with ROS-based algorithms.We have divided the AGC implementation into three main stages: (1) golf cart simulation and testing of navigation algorithms in the simulated environment; (2) small-size car model prototyping, and (3) a full-size golf cart prototype supplying with sensors and systems, and its navigation in a real environment.This paper presents the current state of research, which dealt with the first two stages.
We have completed the virtual golf course relief as a simulated environment and built AGC model in Gazebo.Then we selected and further developed a set of ROSbased algorithms for navigation of a car-like robot within the simulated environment.The original ROS package algorithms, which include global and local planners, algorithms of data filtration and robot localization, were further modernized in order to be applied with Ackermann steering vehicle simulation.As the result of our simulation, we have successfully navigated the golf cart model from one golf hole to another in the simulated golf course environment in Gazebo.Finally, we have developed a small-size vehicle prototype based on Traxxas radio-controlled car model, which has been used to verify and configure the set of ROS-based algorithms in the real world conditions.Although we have not approved the final configuration of vision sensors yet, we have obtained the first results of the autonomous vehicle prototype navigation along a white line of an ellipsoid shape within indoor laboratory environment using webcamera data processing.
Our future work will concentrate on transferring navigation algorithms from Gazebo simulation to the real model, and adapting algorithms for new vision sensors: LIDAR and stereo camera, with selection of one, which optimally suits our tasks.After the verification of all algorithms on the scaled model, we will implement them into a full-size autonomous golf cart prototype.

Figure 2 .
Figure 2. The vehicle model for algorithms prototyping.

Figure 3 .
Figure 3.The full-scale golf cart simulation model in Gazebo.Blue area indicates the range of LIDAR scanning.

Figure 4 .
Figure 4.The model of simulated golf cart with sensors and ground relief simulation.

Figure 5 .
Figure 5. Simulation of a golf cart navigation from one golf hole to another in a virtual golf course environment in Gazebo.