Development of software for simulation of Android applications

In this paper the system based on Python programming language for control of Pioneer 3dx mobile robot is considered. To write code in Python initially the ARIA language imported. The Pioneer 3dx’s simulation control is started by creating a robot object and connecting it with the emulator. In case of failed connection Pioneer is performed exiting from the program. Program Codes is written for research works and performs some actions like grabbing and moving the ball with the external gripper, and then putting this ball on another place. This routine code is useful in performing some laboratory and industry tests. The areas, where could be used Pioneer 3dx mobile robot and method of application to the different fields are not limited. As our research shown that the Pioneer 3dx with gripper mainly can be used in industries for routine work, in laboratories for different experiments. The hardware components of mobile robot are pitman motor, motor control, sensors, actuators and communication among them. The main focus was receiving initial data from sensors. Movement is performed based on robot’s motor. The control panels located on the Pioneer robot have indicators that increase capabilities of mobile robot. The software packages used for Pioneer robot is eyes-client mobile application. Additionally, in research work the ultrasonic sensor’s working principle and logic were applied. Core programming language ARIA and its working through Python considered also. The code written during research work was applied on the simulator MobileSim that makes robot perform a series of planned actions. The application of smartphone on Pioneer 3dx robot for speech recognition purpose can improve the functionality and effectiveness of it. Moreover, the additional camera also underlined as new feature for security and monitoring system.


Introduction
Autonomous mobile robotic systems are used in a wide variety of industries today. Corporate customers are interested in multifunctional industrial robots, mass of buyers are actively purchasing intelligent vacuum cleaners and dog robots, security and rescue services are counting on autonomous devices that can tirelessly perform tracking and search tasks. Moreover, all such devices should ideally move confidently in unfamiliar and unpredictable real-world environments. So far, the main problem of all currently existing mobile devices moving independently, without human control, remains navigation. For successful navigation in space, the on-board system of the robot must be able to build a route and control the movement parameters (set the angle of turning of the wheels and the speed of their turning), correctly to interpret the information about the environment that it received from the sensors, and constantly to monitor its coordinates.

Hard automation:
• This type of automation is to perform tasks that possess an unchanging sequence of actions.

Programmable automation:
• The programmable automation is applied in case of needing rapidly changing of control program according to the task.

Flexible automation:
• This type of automation possesses a range of program combinations, which used on schedule [3].
Firstly, we need to build a simulator, where MobileSim will be utilized. The programming of Simulated robots is the same as programming real robots and will be performed on Python. Taking into consideration that this robot will use real-time data, run time should be a very high speed, so here the main point is choosing the appropriate programming language. Moreover, the main aims of our research work are: • Confirmation of correct functionality of all electronic parts of Pioneer Robot.
• Designing of the printed circuit boards to interface with a range of electronic boards of Pioneer Robot. • Development of the codes for Microcontroller which will executed various tasks by Pioneer Robot. The sequence of actions will include movement of the robot take into account of obstacles, move the item via an additional tool gripper to another place (especially this sequence of actions is suitable for industrial implementation) • Performing of monitoring of the control system.

Statement of the problem
The robot has such functions as mapping, direction, observing and so on. For some time early, Pioneer Robot was used in Murdoch University for research. initially, in robot used of the system with Linux, however was replaced by Microcontrollers. The durability, versatility, reliability, flexibility, and 3 ruggedness of robots make them appropriate for using different purposes like industrial production, laboratory works, educational research, etc.
In this paper introduced software of mobile robot. Software is one of the essential parts for operation of the mobile robot Pioneer 3dx. We will detailed discuss software packages of this mobile robot and methods of control of the Pioneer 3dx, and as the main part of the monitoring system especially of the information about a block structure of the control system. The Pioneer 3dx system includes simulation by computer based on created GUI and software packages like ARIA, Mapper3Basic, SonARNL, MobileSim. Python is an actively developing scripting language that is used to solve a large volume of the most diverse problems and tasks [4,[5][6][7][8][9]. Python is suitable for creating computer and mobile applications, uses it in working with a large amount of information, when developing websites and various other projects, and it used in machine learning. Particularly, during last year is developed an autonomous robot`s control.
To control of Pioneer 3dx mobile robot via Python Programming language, to write code in Python at first ARIA language should be imported. The Pioneer 3dx`s simulation control is started by creating a robot object and connecting it with the emulator. In case of failed connection with Pioneer, decision to exit from the program is made. Following is the representation of the code written for research work, which enables robot to perform some actions like moving, taking the ball with the external gripper, and then putting this ball on another place. This routine code is useful in some laboratories or industries.
Additionally, in order to monitor all processes via logs will be used the TestNG framework. TestNG is a testing framework and in our case it will be used for reporting about failures and success of the Pioneer 3dx. For this purpose, XML file in the project is created and the whole process will be described by logs. By using the SendGrid email delivery service all reports will be sent to the mail for notifying about Pioneer 3dx`s operation. Therefore, the working personal can be repair of the fail or some damages in case of failed tasks.
One way to improve of the Pioneer 3dx mobile robot is to add a speech recognition feature based on smartphones for ROS. Speech recognition includes 3 stages: acquisition, preprocessing, output of the result. To reach results can be used either online -Google`s or offline -Simon`s speech server.
Speech recognition process operation principle includes: receiving of voice, recognizing it, output in the text format. The whole operation principle of system is the following (figure 1). The speech server performs speech recognition which converts sound words to the digital form. As noted above for accomplishing converting is used online Google speech and offline Simon`s speech server.
Using Google server: For using this speech recognition method an internet access is needed. By Google`s AndroidClient software package transfers the voice from Android phone, signal is written to the Google Server, where this voice is converted to digital code.
Using Simon`s speech server: It is an open-source application, which is used in speech recognition systems. The operation principle of the Simon server uses 3 packages: server, client, GUI for server. Simon server is utilized LM -Language Model in vocabulary role and AM -Acoustic Model for sound recognition (figure 2). Simon speech server have several priorities: Trainingused for adding new words to the vocabulary and activities for improving the acoustic model.
Grammar -This section is responsible for the grammar of words.

Figure 2.
Operation principle of the system.

Solution of the problem
The control of the Pioneer robot is performed by client software, which transmits command packet via robot connection. The result can be reached with motion`s command functions through actions or direct commands. All these output signals are sent to the Pioneer. The SIP (Session Initiation Protocol) is constantly sending data packets, which establish a synchronized task processing cycle in ArRobot. The cycle contains a range of tasks like SIP packet handling, sensor interpretation, resolution, action handling, user tasks` invocation, state reflection, etc. This cycle is executed constantly in some amount of time. The whole process can be demonstrated in the following ( figure 3). The cycle is commenced by command ArRobot::run(), which starts the synchronous process, while the ArRobot::stopRunning() can stop the process.
State reflection: it is a class in ArRobot, which performs for saving data about Pioneer`s current condition [10][11][12][13][14]. This data includes such information as for estimated of the pose, a battery voltage, the current velocity, etc. This information received via standard SIP, which additionally includes sonar`s reading updates, reflected in the ArRobot. Moreover, ArRobot utilizes state reflection for sending the previous motion request to the Pioneer.
The Pioneer`s velocity is restricted by various parameters. First of all, some of them are restricted by ARIA in parameter files: maximum, acceleration, velocity, deceleration. However, these parameters can be changed runtime, by commands like ArRobot::setTransVelMax(), ArRobot::setLatVelMax(), ArRobot::setRotVelMax(), in order to increase the speed of Pioneer.  Figure 3. Overview of the Pioneer`s ArRobot task cycle.
The "Top" parametersspeed limit in ARCOS firmware impossible change during runtime, however it is possible only via configuration parameters.
Direct commands: the command packet can send directly to the Pioneer`s simulator via ArRobot in the low level access. This direct command contains a 1-byte size. Motion commands: the next level after direct commands, is motion commands. This section, allow controlling the movement tasks are sent by the ArRobot state reflection section. This part also is responsible for the velocity of the Pioneer robot.
Actions: ArRobot class helps work with dynamic and continuous tasks. So, it is possible to establish a complex combination of commands, which will be solved with the help of a high level Action system. Actions executed with establishing ArAction subclass which overloads ArAction::fire() method.
Python is an actively developing scripting language that is used to solve a large volume of the most diverse problems and tasks [15][16][17]. Python is suitable for development computer and mobile applications, uses it in working with a large information, when developing websites and various other projects, and uses it in machine learning. Particularly, during last year's based on Python is developed an autonomous robot`s control. Simon Android-Client: This application firstly gets all inputs from the user, then sends this data to the server for recognition. At first of all, the client application communicates with the server via port 4444 by TCP connection.
The sound inputs to the server, then the server recognizes the voice and sends the result to the client. The recognition process is a working with the frequency of sound, where is used down sampling method which downs the frequency of input signal between 48k to 16k. In response, the Simon server returns readable text. As noted above whole process is divided into 3 stages: Acquisition, Preprocessing, Result Extraction.
Acquisition: In this phase smartphone attached to Pioneer after connection with the server is ready for receiving voice input. Each input`s volume should be from 0 to 5000 to being recognizable. In case of threshold is more than audio`s value and more than 150 ms -input command activates, buffers and became ready for the next phase.
Preprocessing: this stage responsible for applying to down sample and trimming on sound. Trimming is the process of deleting pauses in the buffered voice. This supports to improve the quality and efficiency of the sound. Down sampling is a phase that responsible for decreasing the frequency of the sound, which at the same time makes size of it smaller than the original version.
Result Extraction: in this sub-phase section software communicate with the server in half duplex. In this case will be sent various information like length, size, etc., while as response server will send different possible strings.
ROS Android-clientis an application which is used in smartphone and communicates with ROS server. The main structure of this connection is the following: • Getting of connected • Getting of recognized output • Establishing ROS commands • Sending to the server.
Then process from b step to d is repeated continuously. ROS android-server: The connection between ROS server and ROS client establishes, then the process occurred in the server is: • Connection to ROS • Getting of data from port 5000 • Input process • Preparation ROS information • Publish output Then this sequence will be repeated. On futhure work, it is possible to use these strings as commands in order to accomplish tasks. Adding of the commands via Python language with pronunciation specific words, Pioneer will be able to perform some actions. Moreover, by speech recognition is possible to establish a security system where Pioneer robot will be unlocked only for specific sound or voice. Another idea to increase of the efficiency of the Pioneer robot is adding a camera to it. One of the useful accessories of this robot is a camera which is performed for security either motion. After adding physical camera, the configuration with the help of Python will allow to demonstrate real time data and store these videos for security purposes.

Conclusion
The results obtained during this work is following: the areas, where could be used Pioneer 3dx mobile robot, the application methods in the different industries. Pioneer 3dx with gripper mainly can be used in industries for routine (simple and repeated) work, in laboratories for different experiments.