Professional Documents
Culture Documents
Route Planning For Automatic Indoor Driving of Smart Cars: Sandip Roy Zhiyang Zhang
Route Planning For Automatic Indoor Driving of Smart Cars: Sandip Roy Zhiyang Zhang
Abstract—While various types of traffic navigation maps play scenarios of the automated smart car navigation can be
an important role in our life, the complex layout of large summarized as follows:
number of buildings in the city makes it difficult for people to Indoor positioning and navigation inside large
find destinations and walking routes indoors. Since GPS does buildings: When entering a large complex building,
not work very accurately inside the buildings, for indoor it is quite a difficult task for people to quickly and
navigation problem we still have to depend on the traditional accurately find the target location. Smart cars can
front desk human resource consultation. In recent years, the help people to plan the route, find the best route, and
rapid development of artificial intelligence technology has direct to the designated location.
made it possible for smart car navigation instead of the manual
Indoor express sorting and delivery: With the
consultation. Not only that, smart cars can even handle short-
distance goods transportation. Combining indoor positioning
increase of courier temporary storage services these
technology with different video signals or any other non-GPS days it greatly facilitated the time coordination
satellite positioning technology for directing the smart car to between courier delivery and customer pickup, but
the designated position is a hot research direction these days. customers still sometimes feel that this pickup could
In this paper, we mainly study the realization and application have been more convenient. The smart car can
of a smart car in the indoor automated driving system. Our improve this efficiency by sorting those parcels and
proposed smart car, built using the Raspberry Pi 3, uses a then deliver it to the intended person at the entrance
series of famous path planning algorithms such as Dijkstra’s of the customer’s building.
algorithm, Best priority search and A*(A star) algorithm to Finding lost people: In large public places or
plan the driving path of the car's automatic driving. Finally, buildings, such as airports, train station, shopping
the real-time obstacle avoidance function is also realized by malls etc. when the companion or child is lost, the
using ultrasonic ranging, infrared ranging and pan-tilt camera. smart car can monitor the images in real time by
Several experiments were conducted to compare the efficiency downloading it from the server through the network,
of using different path finding algorithms and the results of identify the furnishings and modeling and thus
using infrared ranging and ultrasonic ranging during obstacle quickly locate the lost children. It can also guide
avoidance. people to the location of their lost baby/companion.
Public safety: If there is a serious accident inside
Keywords-raspberry Pi; smart car; ultrasonic ranging; polar
the room, the smart car can help people quickly
map; A* algorithm; Dijkstra algorithm; best priority search;
indoor route planning locate themselves and plan their escape route. In
extremely serious incidents, smart cars can help
rescuers locating the victims and thus assist in the
I. INTRODUCTION rescue process.
With the development of human lifestyles and living In this paper, we mainly study the realization and
standards, these days human beings tend to spend more than application of a smart car in the indoor automated driving
70% of their time inside of the large and complex indoor system [4]. After using the horizontal steering angle and
locations. Thus, efficient indoor navigation [1, 2] or route ultrasonic distance measuring device to determine its
planning [14, 18, 20] has become a very important research position in the scene map model, our proposed smart car has
direction these days. While the GPS technology doesn’t implemented few famous path planning algorithms such as
work very accurate for the indoor locations, previous Dijkstra’s algorithm [10, 11, 19], Best priority search [8] and
research works have tackled this problem of indoor A* algorithm [3, 23] to plan the driving path of the car's
navigation using Wi-Fi [9] and sometimes using both Wi-Fi automatic driving. Here the real-time obstacle avoidance [6]
and Bluetooth together (hybrid) [17]. In [21] W. Yuan and function is realized by using ultrasonic ranging [5], infrared
ranging and pan-tilt camera [12]. Our overall system
M. Schneider have introduced 3D route planning for indoor
combines path planning algorithm, embedded system design,
space. When developing our research, we have studied a lot
infrared ranging, ultrasonic ranging, pan-tilt camera, image
of works [16, 22, 24] that have provided a nice overview of
retrieval technology etc. to realize the automatic driving of
different path planning algorithms for robots. The application
smart cars. The camera that is put on the front of the smart
Authorized licensed use limited to: Universidad Industrial de Santander. Downloaded on May 31,2020 at 22:29:56 UTC from IEEE Xplore. Restrictions apply.
car can take pictures of the target and then the target is intervals into the medium. When that transmitted sound
recognized by the camera. The ultrasonic detecting device wave encounters any object during its propagation then that
measures the distance from the target to the trolley and the sound wave is reflected back to the sensor as an echo. Finally,
angle of the head of the gimbal is used to establish a polar the sensor measures the distance of that target object based
coordinate with the car itself as the origin. Specifically, the on the time spent between transmitting the signal and
main work is as follows: receiving it back. For measuring the distance of any object, it
Collection of the data, the data source is the indoor does not have to depend on the intensity of the reflected
simulation experiment environment. sound wave and thus it works very good in avoiding any
Setting up a smart car experimental environment background interferences like light, dust, smoke, mist, vapor,
based on Raspberry Pi 3. lint etc. Pretty much all the materials that are able to reflect
Calling the map model from the server through sound can be detected using the ultrasonic sensor. Having
WebSocket and returning the target recognition type this great ability that it can also work in dusty air condition
from the server and position coordinates. gives us even more reliability. Only one disadvantage that is
Determine the position coordinates of the car itself found with using ultrasonic sensors is that they aren’t very
by using the infrared detecting device, the ultrasonic good when defining the edges of an object.
distance measuring device and the pan-tilt camera.
Implementing Dijkstra’s algorithm, best priority B. Infrared ranging principle
search and A* algorithm for path planning. Infrared sensor is an instrument that uses infrared light to
Using the infrared detection device, the ultrasonic detect the presence of an object. The infrared ranging sensor
distance measuring device and the pan/tilt camera to uses the principle [13] that depending on the distance of the
realize the automatic obstacle avoidance function. obstacle, the intensity of different reflections of the infrared
This paper is divided into five chapters. The first chapter signal is also different. When the distance is near, the
is the introduction. The development status and research intensity of the reflected light is strong, on the other hand,
background of smart cars are introduced, and the main work when the distance is far, the intensity of the reflected light
of this paper is illustrated. The second chapter is the signal is weak. And that’s how the detection of the distance
theoretical basis for the subsequent implementation, the of the obstacle is performed. The infrared ranging sensor has
principle of ultrasonic and infrared ranging, Dijkstra’s a pair of diodes, infrared signal transmitting diode and the
algorithm, best priority search and the A* algorithm is receiving diodes. The transmitting tube emits an infrared
introduced here. The third chapter is the realization part of signal of a specific frequency and the receiving tube receives
the smart car’s path planning and automatic obstacle the infrared signal of that frequency. When the transmitted
avoidance, showing how to use the theory described in the infrared ray encounters an obstacle, the infrared signal is
second chapter. Here we have introduced the details of each reflected back and received. After receiving and processing,
implementation separately. The fourth chapter is dedicated to it is returned to the smart car host through the digital sensor
the experimentation part. Using the scene map as a model, interface. In our system, the smart car can then use this
according to the realization of the third chapter, the whole infrared return signal to identify changes in the surrounding
system is realized and finally different path planning environment.
algorithms were compared to present the results. The fifth
C. Principle of Web socket
chapter contains the summary and the outlook section. The
research results and significance of this topic are summarized, HTML5 defines the Web socket protocol [15], which
and suggestions for the future development are put forward. saves server resources and bandwidth and enables
communication with the server in real time. Web socket is a
II. REVIEW OF THE RELEVANT THEORETICAL protocol for full-duplex communication over a single TCP
FOUNDATIONS connection. WebSocket makes it easier to exchange data
In the smart car model proposed in this paper, after using between the client and the server, allowing the server to
the horizontal steering angle and the ultrasonic distance actively push data to the client. In the Web socket API, the
measuring device to determine its position in the scene map client/browser can directly create a persistent connection and
model, the smart car uses a series of famous path planning transfer data in both directions. Using HTTP protocol, the
algorithms such as Dijkstra’s algorithm, best-first search and client needs to constantly ask the server if there are any new
A* algorithm to plan the automatic driving of the car. Finally, messages to be received. Web Sockets on the other hand
the real-time obstacle avoidance is done by means of doesn’t require any request from the client side in order to
ultrasonic ranging, infrared ranging and pan/tilt camera. respond. The client can just listen to the server for any new
Overall, the main technical theories used in this paper messages whenever its available. Web sockets work
include infrared ranging, ultrasonic ranging, path finding perfectly for any real-time applications, chat apps, IOT,
algorithms, and WebSocket technology. online multiplayer games etc.
744
Authorized licensed use limited to: Universidad Industrial de Santander. Downloaded on May 31,2020 at 22:29:56 UTC from IEEE Xplore. Restrictions apply.
situations and can be extended to many more situations, but initial point to the target point can be found, as long as all
actually path searching is rather a common approach to solve edges have a non-negative value. In Figure. 3, the pink node
more complex problems. Although Moving a simple object is the initial node, the violet node is the target point, and the
seems to be a very easy job to do but Path finding is actually diamond shaped blue colored area is the area scanned by the
quite complicated. For understanding the reason behind why Dijkstra’s algorithm. The areas with the lightest color are
it is troublesome when it comes to path finding we have to those that are furthest from the initial point, thus forming the
consider the following: frontier of the exploration. One good thing about Dijkstra’s
algorithm is that although it runs slower, but it always does
guarantee that a shortest path will be found.
745
Authorized licensed use limited to: Universidad Industrial de Santander. Downloaded on May 31,2020 at 22:29:56 UTC from IEEE Xplore. Restrictions apply.
A* algorithm. Therefore, it is very important to choose a III. IMPLEMENTATION OF AUTOMATIC DRIVING FOR
good heuristic function. Heuristics can control the behavior SMART CARS
of A*. If we consider the general formula in equation (1), in
No doubt, the implementation of different smart cars can
an extreme case, if h(n) is 0, then only g(n) works, and A*
bring great convenience to our life. Here in this work we
evolves into Dijkstra’s algorithm, which guarantees the car
mainly focus on implementation of two aspects of automatic
can find the shortest path. If h(n) is often smaller (or equal)
driving of the smart car, these are:
than the actual cost of moving from n to the target, A* is
Implementation of route planning
guaranteed to find the shortest path. The smaller the value of
Real-time obstacle avoidance function
h(n) is, the more nodes in A* needs to be visited which
The route planning is implemented based on the path
makes the operation very slow. Here we can consider few
finding algorithms and the car's own positioning system, and
scenarios:
the real-time obstacle avoidance function is realized with the
If h(n) is exactly equal to the cost of moving from n
help of the infrared sensor, the ultrasonic sensor and the
to the target, then A* will only find the best path and
pan/tilt camera.
not extend the other. Although this can't happen in
all situations, one can still be in some special cases. A. System Architecture Overview
Let them be exactly equal (h(n) is exactly equal to
the actual value). As long as the perfect information
is provided, A* will run perfectly.
If h(n) is sometimes higher than the actual cost of
moving from n to the target, A* cannot guarantee
that a shortest path will be found, but it will run
faster.
In another extreme case, if h(n) is much larger than
g(n), then only h(n) works and A* evolves into the
BFS algorithm.
So here we have found a very interesting situation, we
can actually decide what do we want from A*. In the ideal
case we want to find the shortest path as quickly as possible.
If our goal is too low, we will still get the shortest path, but
Figure 4. Smart car.
the speed will be much slower. On the other hand, if our goal
is too high then might have to give up the idea of finding the Due to the rapid development of the Raspberry Pi
shortest path. Academically, if the heuristic function value is microcomputer in recent years, considering its reach
an underestimation of the actual cost, the A* algorithm is functionality and better scalability, we have also chosen
called the simple A algorithm (Simply A). However, here we Raspberry Pi 3 to build our smart car (Figure. 4). While
continue to call it A* because it is the same when it comes to another open source electronic platform, Arduino is also very
the implementation. easy to develop, but the open source community is not as
We have seen that it is a crucial decision to make during active as the Raspberry Pi's open source community and does
choosing between speed and accuracy. A*'s ability to change not have higher scalability. Therefore, after overall
its own behavior is based on heuristic cost functions, which comparison, we finally chose to use Raspberry Pi 3 [9].
are very useful in games. A compromise between speed and During implementation of our overall design (Figure 5) we
precision will make the game run faster. In many games, we focus on the following four points:
don't really need to get the best path, just the approximation Positioning of the trolley in the experimental scene
is enough. What we need depends on what happens in the map
game or how fast the machine is running the game. The Path planning of the car to the target
choice between speed and accuracy is not global. In certain Automatically generate the car driving code
areas of the map, accuracy is important, we can use dynamic according to the planning path
selection based on this. For example, suppose we might stop Real-time obstacle avoidance function
recalculating a path or changing direction at some point, then The car is built using the Raspberry Pi 3 and it uses
it is more important to choose a good path near the current Python scripts to control motor drives, pan-tilt camera and
position. So why do we need to bother with the accuracy of infrared sensors. The experimental scene map model is
subsequent paths? For a safe area on the map, the shortest provided from the already conducted experimental results
path may not be important, but when escaping from an stored in a server. The trolley determines the position of
enemy village, safety and speed are the most important. Here, itself by detecting the distance of the surrounding objects and
in the safe area, we can consider not finding the exact the angle of rotation of the steering gear by using infrared
shortest path and taking the approximate path making the rays. The path planning of the car to the target uses three
pathfinding process very fast, but in the dangerous area, both algorithms to compare the results, namely, Dijkstra’s
the safety and the speed of escape are equally important algorithm, Best priority search and A* algorithm.
factors to consider.
746
Authorized licensed use limited to: Universidad Industrial de Santander. Downloaded on May 31,2020 at 22:29:56 UTC from IEEE Xplore. Restrictions apply.
Figure 7. Infrared ranging principle.
747
Authorized licensed use limited to: Universidad Industrial de Santander. Downloaded on May 31,2020 at 22:29:56 UTC from IEEE Xplore. Restrictions apply.
coordinates of the obstacle B are d , L with respect B. Hardware Environment
to the coordinate system and the horizontal steering gear as TABLE I. HARDWARE ENVIRONMENT
the pole (figure 9). Then, according to the orthogonal angle
coordinates of the obstacle B in the map model the cartesian Raspberry Pi 3 model B+ Quad core 1.2 GHz 64-bit CPU
coordinates of the trolley are inferred. According to the
transformation and correspondence of the coordinates, the CPU 8 GB 1600 MHz DDR3
coordinates xcar , ycar of the cart in the map model are RAM 16GB
determined, where
WLAN BCM43438 wireless LAN
ycar yb L cos( d )
Ethernet 100 Base Ethernet
C. Software Environment
Figure 9. Conversion of coordinate system and determination of TABLE II. SOFTWARE ENVIRONMENT
coordinates.
748
Authorized licensed use limited to: Universidad Industrial de Santander. Downloaded on May 31,2020 at 22:29:56 UTC from IEEE Xplore. Restrictions apply.
REFERENCES
[1] J. Dong, Y. Xiao, Z. Ou, Y. Cui, and A. Ylä-Jääski, "Indoor tracking
using crowdsourced maps," in Proceedings of the 15th International
Conference on Information Processing in Sensor Networks, 2016, p. 5.
[2] J. Dong, Y. Xiao, M. Noreikis, Z. Ou, and A. Ylä-Jääski, "imoon:
Using smartphones for image-based indoor navigation," in
Proceedings of the 13th ACM Conference on Embedded Networked
Sensor Systems, 2015, pp. 85-97.
[3] F. Duchoň, A. Babinec, M. Kajan, P. Beňo, M. Florek, T. Fico, et al.,
"Path planning with modified a star algorithm for a mobile robot,"
Procedia Engineering, vol. 96, pp. 59-69, 2014.
Figure 11. path finding algorithms performance. [4] T. Tao, "Fuzzy automatic driving system for a robot car," in 2014
International Conference on Fuzzy Theory and Its Applications
(iFUZZY2014), 2014, pp. 132-137.
V. CONCLUSION AND FUTURE WORK [5] J. Borenstein and Y. Koren, "Obstacle avoidance with ultrasonic
Here in this work we have successfully completed the sensors," IEEE Journal on Robotics and Automation, vol. 4, pp. 213-
218, 1988.
positioning of the smart car, route planning and automatic
[6] J. Borenstein and Y. Koren, "Real-time obstacle avoidance for fast
obstacle avoidance. The experiment is based on the raspberry mobile robots," IEEE Transactions on systems, Man, and Cybernetics,
pie-based smart car plus the ultrasonic and infrared detecting vol. 19, pp. 1179-1187, 1989.
device and the cloud. Few famous path finding algorithms [7] J. L. Crowley, "World modeling and position estimation for a mobile
are used here in the previously trained scene map model to robot using ultrasonic ranging," in Proceedings, 1989 International
realize the route planning of the automatic car driving. Conference on Robotics and Automation, 1989, pp. 674-680.
Finally, the real-time obstacle avoidance function is applied [8] R. Dechter and J. Pearl, "Generalized best-first search strategies and
by using the pan-tilt camera and the ultrasonic detecting the optimality of A," Journal of the ACM (JACM), vol. 32, pp. 505-
device to avoid pedestrians or any other unknown mobile 536, 1985.
targets walking between the targets. In addition, here we [9] D. Han, S. Jung, M. Lee, and G. Yoon, "Building a practical Wi-Fi-
based indoor navigation system," IEEE Pervasive Computing, vol. 13,
have used Python and WebSocket technology to achieve car- pp. 72-79, 2014.
to-server communication, showing high efficiency in writing [10] Y. Y. G. Jianya, "An Efficient Implementation of Shortest Path
code and in actual use. The user only needs to take the photo Algorithm Based on Dijkstra Algorithm [J]," Journal of Wuhan
of the target using the camera of the car and no other further Technical University of Surveying and Mapping (Wtusm), vol. 3,
operation is required. Everything else is independently 1999.
completed by the smart car, which greatly simplifies the [11] H. I. Kang, B. Lee, and K. Kim, "Path planning algorithm using the
process and service of many manual consultations for the particle swarm optimization and the improved Dijkstra algorithm," in
2008 IEEE Pacific-Asia Workshop on Computational Intelligence
production and life of the society. and Industrial Application, 2008, pp. 1002-1004.
A. Future work Recommendation [12] K. Kurihara, S. i. Hoshino, K. Yamane, and Y. Nakamura, "Optical
motion capture system with pan-t mera tracking and real time data
Now-a-days, although the research on smart cars are processing," in Proceedings 2002 IEEE International Conference on
endless, there is no mature car that is popular among the Robotics and Automation (Cat. No. 02CH37292), 2002, pp. 1241-
public, the available ones are really expensive too. We feel 1248.
that with the continuous development of artificial [13] E. Lavarec and L. Tremel, "Method and device for obstacle detection
intelligence, the innovation of embedded robots, embedded and distance measurement by infrared radiation," ed: Google Patents,
2004.
car chips and hardware technology can definitely bring
[14] D. Mandloi and J.-C. Thill, "Object-oriented data modeling of an
breakthroughs in quality and efficiency for the realization of indoor/outdoor urban transportation network and route planning
smart cars. In the present era of big data, positioning services analysis," in Geospatial Analysis and Modelling of Urban Structure
like Google or Baidu maps have a huge amount of data for and Dynamics, ed: Springer, 2010, pp. 197-220.
deep learning, which can support more accuracy. At that [15] V. Pimentel and B. G. Nickerson, "Communicating and displaying
time one can choose more efficient deep learning method real-time data with websocket," IEEE Internet Computing, vol. 16, pp.
than the classic algorithm to complete the path planning. In 45-53, 2012.
addition, obstacle avoidance technology can achieve more [16] N. Sariff and N. Buniyamin, "An overview of autonomous mobile
precise positioning by combining multiple position signals, robot path planning algorithms," in 2006 4th Student Conference on
Research and Development, 2006, pp. 183-188.
such as Wi-Fi signals or communication signals. The
[17] H.-K. Su, Z.-X. Lıao, C.-H. Lin, and T.-M. Lin, "A hybrid indoor-
combination and correction of multiple signals can greatly position mechanism based on bluetooth and WiFi communications for
improve the accuracy in practical use. It is also expected that smart mobile devices," in 2015 International Symposium on
more efficient computer vision algorithms will allow the Bioelectronics and Bioinformatics (ISBB), 2015, pp. 188-191.
camera to do better obstacle avoidance. [18] T.-A. Teo and K.-H. Cho, "BIM-oriented indoor network model for
indoor and outdoor combined route planning," Advanced Engineering
ACKNOWLEDGMENT Informatics, vol. 30, pp. 268-282, 2016.
[19] H. Wang, Y. Yu, and Q. Yuan, "Application of Dijkstra algorithm in
We want to thank Professor Weixiong Rao of Tongji robot path-planning," in 2011 second international conference on
university for his overall supervision and guidance. mechanic automation and control engineering, 2011, pp. 1067-1069.
749
Authorized licensed use limited to: Universidad Industrial de Santander. Downloaded on May 31,2020 at 22:29:56 UTC from IEEE Xplore. Restrictions apply.
[20] J. Yu and S. M. LaValle, "Planning optimal paths for multiple robots [22] G. Zhang, X. Hu, J. Chai, L. Zhao, and T. Yu, "Summary of path
on graphs," in 2013 IEEE International Conference on Robotics and planning algorithm and its application," Mod. Mach, vol. 5, pp. 85-90,
Automation, 2013, pp. 3612-3617. 2011.
[21] W. Yuan and M. Schneider, "Supporting 3D route planning in indoor [23] S.-p. ZHANG, X.-k. WANG, and J. DUAN, "Application of A-star
space based on the LEGO representation," in Proceedings of the 2nd Algorithm in Mobile Robot Path Planning," Mechanical Engineering
ACM SIGSPATIAL international workshop on indoor spatial & Automation, p. 59, 2012.
awareness, 2010, pp. 16-23. [24] D.-q. Zhu and M.-z. Yan, "Survey on technology of mobile robot path
planning," Control and Decision, vol. 25, pp. 961-967, 2010.
750
Authorized licensed use limited to: Universidad Industrial de Santander. Downloaded on May 31,2020 at 22:29:56 UTC from IEEE Xplore. Restrictions apply.