Implementation of a map route analysis robot: combining an Android smart device and differential-drive robotic platform

. This paper proposes an easy-to-implement and relatively low-cost robotic platform with capability to realize image identification, object tracking, and Google Map route planning and navigation. Based on the JAVA and Bluetooth communication architectures, the system demonstrates the integration of Android smart devices and a differential-drive robotic platform.


Introduction
Robotic applications have attracted a great deal of attention in four areas: image identification and object tracking (IDOT) [1][2], map positioning and navigation (MPN) [3][4], web communication (WC) [5][6], and vocal control for speech recognition (VCR) [7][8].In IDOT, feature-based or appearance-based recognition algorithms are usually adopted for facial recognition, road marking, and vehicle tracking.For better accuracy and reliance, the combination of autonomous self-deployment sensor networks with mobile robots [9] allows for the integration and incorporation of map route analysis, obstacle detection and avoidance.Parallel to the visual control of robots, vocal-sensitive robots designed to adaptively characterize the fundamental frequency and signal envelope of a sound [10] may greatly support surveillance and care services.Conducted by machine learning, recent advances in VCR for semantic analysis [11][12] and emotion analysis have achieved more realistic intelligence in human-computer dialogue.
These applications indicate that big data information [13] and WC technologies form the bedrock upon which innovative solutions of the Internet of Things [14] are being built, and are pushing forward the development and service of robotics.However, the aforementioned robotic applications also indicate that robots are able to be well placed in highly dynamic environments and can simultaneously feedback rich information.The cost of the huge computational efforts is, however, prohibitive, let alone extending them to outdoor or large-scale scenarios [15] where expensive beacon and differential-GPS [16] are commonly used at present.Therefore, the use of heterogeneous technologies to improve their performance, or at first at least to improve their affordability, has become an emergent and practical issue.
In practice, the strategy of installing the above four sensors or extended modules on robotic platforms is known for its lack of a price advantage.Meanwhile, there is too great a loading on the robot's on-board controller for it to support multidisciplinary control, especially for image processing.The realization of real-time data acquisition and analysis on a 16-bit processor would be tough.As a comparison, the state-of-the-art microelectronic technologies have been built to easily resolve 20 fps ultrafast and 640 480 2D real-time video streaming by the quad-core 64-bit processor with 1.5 Ghz clock speed of a smart phone.Nevertheless, the robotic microcontroller utilities remain significant in serving as middleware to bridge I/O pines, joints and communication protocols in the control of sensors and actuators via a smart phone.We expect that this short description has provided, either from an economic or performance perspective, a persuasive and broad motivation to investigate the combination of a mobile driving robotic platform such as the LEGO or Arduino suites with smart phones.
Due to the space limitation, in this report we focus specifically on introducing some studies on IDOT and MPN.We used the LEGO NXT robotic platform to build the main body of a mobile robot.A JAVA-based objectoriented algorithm was used to develop the programs on Android smart phones.The machine-human interaction was mediated by Bluetooth transmissions.

The Architecture
While traditionally using differential two-wheeled robots encountered limitations of movement and direct control, these shortcomings were overcome by Ribeiro et al. who used a robot with three Omni-directional wheels [17].The transverse drift induced by the axial-movement on that platform however leads to a reduction in the precision required in this work.Hence, a differentialdriving mobile robot was adopted, considering the practical points of reducing the mechanical complicity and extensive accessibility.Translational displacement and the speed signals of the robot were provided via fastresponse DC encoder servomotors.Two LEGO NXT mobile robotic architectures, as shown in Figure 1, were adopted in our tests.While Newtonian kinematics assumes that optimal rolling may occur without slipping, destructive pure rotations were found in some tests to irregularly induce a translational mismatch using the twowheeled robot (a).Therefore, a tracked robot (b) with higher resistance contact was also implemented as a comparison.The environment errors were statistically reduced via multiple measurements and featured the one with better performance.
Due to its resource advantages, NXT Direct Commands provide Bluetooth protocols in direct communication with the robot [18].The robot can interpret the commands embedded in the Direct Commands from the smart phone and then execute the corresponding action.This brings great convenience in robotic control to developers who can pay attention to programs for smart phones rather than for the robot.The communication platform is supported by leJOS NXJ, a JAVA virtual machine executed on NXT, for which many application objects can be freely accessed and developed on Eclipse [19].Based on these specifications, a JAVA-based control kernel is appropriate for bridging the smart device of the Android core and the LEGO robot.
The operation of the robot was tested in two ways: (i) manual and (ii) autonomous.In case (i), the action control on the speed of the wheels was realized via an orientation sensor by detecting the variation in the orientation of the smart phone with pitch and roll (Figure 2), and via the displacement of the touch point (Figure 3).The control of the differential-drive is depicted in the right 4-quadrant circle, by assuming 4 definite movements for the left and right wheels as (v,v), (-v,-v), (v,-v), and (-v,v).
In this manner, the speed of the individual wheels (v R or v L ) is definitely returned whenever the (x,y) coordinates of a specific (yellow) point are acquired.On the other hand, in case (ii), the robot is completely directed by the route planning accomplished with the importation of the Google Earthsupplied KML (K e y h o l e M a r k u p L a n g u a g e ) i n to t h e Google map [20].In Figure 5, the robot was designed to avoid illumination from a flashlight.The idea was realized by openCV calculation, incorporating algorithms of image binarization and multiscale edge detection.The theoretical evaluation of the coordinates and the size of the light return the information of the direction and distance to the following movement of the robot.
In our experiment, it was found that the homogeneity of the illumination has a direct influence on the accuracy of the image identification.This problem may possibly be fixed by adopting a Kalman filter or particle filter algorithm to speed up the reaction of the smart phone to external light sources.Further verification of this reasoning and extended investigation will be reported elsewhere in the near future.

Map Positioning & Navigation
In this section we demonstrate the integration of Google map navigation and mobile robot control via the Android platform.As shown in Figure 6, the experiment was performed by first choosing the starting point and the destination on the Google map.The GPS returned latitude B and longitude O of the objects in terms of [22]    are the first and second eccentricities of the spheroid.The arc length d that the robot has travelled was evaluated via the Haversine formula [22]: regarding R the radius of the right sphere Earth, B 12 and 12 O represent the geographical latitude and longitudeof points 1 and 2. Then the corresponding displacement and rotation angle of the robot can be calculated by applying the commands bearingTo() and distanceTo() classified in the Location of Android APIs (application programming interface).To reach a precise measurement, an infinitesimal displacement within an extremely slow movement, although inconvenient, is established.For practical use, inevitable zig-zag overshooting and the cumulative error have to be considered.We applied a compass sensor with PID controller (proportional-integral-derivative) for stepwise error correction.Eventually an excellent refinement was revealed in the dynamic control.
Furthermore, we also investigated the data transmission between the smart phone and the robot.The  In our experiment, it was found that the web condition plays a primary role in the signal distortion and data reliability.Unfortunately, the signal transmission took roughly 0.3~0.4seconds by Bluetooth communication, and another few seconds are required to the Cloud.Therefore, an optimal sampling and trigger has to be seriously considered.Moreover, the 45q sampling was found to reach the best recognition in our tests.
However, the impact of disturbance can be statistically reduced in long-time or multi-term measurements.Therefore, it is still worth noting that since real-time data storage is likely to soon be available on both the Cloud and smart phones, Google Charts will then provide fast and multivariate interfaces for big data processing and display.On the other hand, the combination of a smart phone reveals the power of synchronized remote control of the mobile robot and server end, bringing the potential of intensive applications to the industrial Internet of Things.

Conclusion
In this project we demonstrate image identification, object tracking, and Google Map route planning and navigation with an easy-to-implement and relatively lowcost robotic LEGO NXT platform.The robotic kinematics was under autonomous control based on the JAVA and Bluetooth communication architectures.The systematic connections on the leJOS, openCV and Android APIs applications lead to the realization of an integration of Android smart devices and a differentialdrive robotics platform.Finally, we have demonstrated that environment detection by a mobile robot can be easily achieved.The combination of smart phone and Google Charts made it easy to realize big data storage and characteristic distribution.The use of smart phones for robotic control achieves a powerful integration of control, monitoring, communication, sensing, and calculation on a personal mobile device.Undoubtedly, strong connections between smart phones, the Cloud, and instruments must greatly inspire extensive and intensive creativity and imagination regarding innovative applications of cyber-physical integration.

Figure 4 .
Figure 4. JAVA-based leJOS protocol for the LEGO NXT robotic platform, a partial demonstration of object tracking.

Figure 5 .
Figure 5. Image identification and light avoiding realized via openCV calculation.
the reference of the geodesic coordinates, in which a(b) is the semi-major(minor) axis of the Earth, XYZ are Cartesian coordinates

Figure 6 .
Figure 6.Google map route planning and navigation of a mobile robot.From left to right: Android-NXT communication interface setup display, route planning information, and moving instruction.

Figure 7 .
Figure 7.A radar chart.Environment data detected by supersonic sensor are shown by the red curve.