{'fraction_non_alphanumeric': 0.024620595323389567, 'fraction_numerical': 0.006773920406435224, 'mean_word_length': 4.891788181120491, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design and Implementation of Indoor and Outdoor Security Patrol Mobile Robot

The purpose of this study is to design a mobile robot prototype solution that can independently perform indoor and outdoor safety inspections. First, according to our project objectives, the hardware platform of mobile robot is designed. Then, the software design and implementation of the patrol robot in outdoor environment is completed. Finally, the system software of autonomous patrol robot in indoor environment is realized. The results show that the system hardware and software of the patrol robot can achieve good operation effect. Therefore, we conclude that patrol robot plays an important role in indoor and outdoor security.


Introduction
With the rapid development of China's economy, more and more factories, high-tech parks and shopping malls have appeared in the people's lives. However, these places put forward new special needs for security work [3]. Normally, security tasks in these places are done by people. With the continuous expansion of the scope of inspection, employment costs continue to rise. Relying solely on human security has been unable to meet the increasingly complex security needs [2]. In addition, in some dangerous environment, human security is not suitable for the implementation of patrol work. For example, in the substation, the factory area is full of high-voltage wires, which is very dangerous for mankind. However, these places are also related to the normal life of a city. It requires security work at all times. As a result, a special service-oriented patrol mobile robot appeared [4]. With the continuous development of science and technology, various functions and various types of robots are coming to our real life. Among them, the mobile robot is a dazzling star. Mobile robot is a highly integrated product of modern high science technology [1]. The design and manufacture of mobile robot involve many disciplines, such as mechanical engineering, control principle, electronic technology and computer technology. It is the most representative high-tech complex in modern times [5]. After decades of development, mobile robot technology has been widely used in industry, commerce, agriculture, national defence, space, aviation, tourism, office automation, medical and health care and life services and many other fields. With the continuous progress and development of computer, chip and sensor technology, mobile robot technology has reached new heights again and again [7].
In foreign countries, Japan's Tmsuk company and Sanyo Electric Corporation jointly designed the quadruped robot, which is a home security robot. Quadruped robot has the function of human sound perception and temperature alarm [6]. It can communicate with its host via a wireless network and can cross the steps of 15cm. The robot was secondary development by some security guards and implemented a comprehensive security guard service [13]. In the US military logistics department, because of the large number of warehouses that need to be patrolled, Cybermotion has developed a mobile robot that can patrol the indoor environment, which is named "MDARS". Its minimum speed is 3km / h, and a charge can patrol 8 hours [8]. It can detect the invasion of foreign personnel within the range of 10 meters. "MDARS" mobile robots are equipped with a variety of sensors, including thermal imagers, cameras, laser radar and infrared sensors. After the staff member goes off work, "MDARS" mobile robot can patrol continuously in storehouse. When smoke, fire, intruders are detected, an alarm is sounded. In addition, in the United States robot system company, the researchers developed a "MDARS-I" mobile robot, which is applied to the outside. The robot can identify and bypass obstacles. If it cannot be bypassed, it will stop and notify the operator [14]. Compared with other developed countries, the research on mobile service robots in China is late. However, in recent years, the momentum of development has been rapid [12]. In 2014, Shenyang Institute of Chinese Academy of Sciences successfully developed a mobile inspection robot for nuclear power plants and power stations. It has a variety of sensors that incorporate visual, speech, and conversational features [11]. The front and rear are equipped with 16 infrared sensors, 16 ultrasonic sensors, and a camera mounted at the top of the mobile robot [10]. These sensors and control algorithms can let them know the external information of environment and their own motion state, and help them complete the formulation of motion control strategies, including obstacle avoidance and optimal path planning. In February 2015, Xiamen Power Technology Co., Ltd. successfully developed a smart mobile robot for substation inspection. It can take real-time pictures in the substation, and let the operators see the operation of the substation [9].

Software Design of Mobile Robot for Outdoor Inspection
The design goal is to let mobile inspection robot replace people to accomplish security tasks in dangerous environment. In the artificial control system, it mainly realizes the following four aspects of functions. First, the mobile robot realizes the real-time image service using IVA-HD hardware image coding function of OMAP master slice. Second, the PC control terminal acquires commands and sends them to the mobile robot. The mobile robot analyzes the control commands and maps them into control signals to adjust the motion of the robot itself. Third, the mobile robot acquires the current GPS geolocation information and sends it to the PC console. PC control terminal uses electronic map to achieve real-time GPS positioning. Fourth, in order to detect and monitor the appearance of foreign personnel in the image, the robot control system can detect, and can give the operator real-time clear reminder service. Fifth, in the course of robot movement, when the laser radar detects an obstacle in front, the mobile robot stops moving forward and only has the steering function. The software construction of the outdoor inspection mobile robot is shown in Figure 1.

Design and Implementation of Motion Control Software for Mobile Robot
A mobile robot has four moving motors and two camera motion control modules. Among them, four motor motors are divided into two groups. When the robot moves forward and backward, the two motors of the left and right sides will perform the same movements. When it needs to turn left, the two motors on the left will move back, and the motor on the right will move forward, so that it produces a differential motion that can be turned in place. Camera control of the steering gear is relatively simple. Two steering gears can realize the camera's swing. In this way, the camera can get a better view of the field.
In order to control the movement of the robot simply and conveniently, the game remote control handle is applied indirectly in the PC control terminal. First of all, it initializes the network communication class and the handle data acquisition class, establishes the communication link with the robot, obtains the remote-control handle data, invalidates the remote-control handle instruction, assures the effective handle instruction, and transmits the effective control instruction to the mobile robot. Then, it sets the PWM corresponding signal generation pin, establishes the network link with the PC control terminal, obtains the remote-control control data from the network communication, analyzes the handle control command, and maps the control command into the PWM control signal to control the mobile robot movement. The motion control of the mobile robot is shown in Figure 2.

Performance Test of Target Recognition and Tracking
The generation of the detector is calculated and analyzed in a probabilistic manner. If Nx is used to represent the size of the set X, then: NR0: the number of candidate detectors, that is, the size of the detector set prior to review; NR: the number of valid detectors, that is, the size of the set of detectors after the review; NS: the number of strings in the "own" collection; PM: the probability of matching between any two random strings; Pf: false dismissal probability,that is, Pf=(1-PM)NR; f: the probability that any random string does not match the NS string in the "own" set, that is, f=(1-PM)NS.
Because f=(1-PM) NS, we can get . When the PM is small enough, according to the Taylor expansion: , there is the minimum value of NR0. At this point, the required set of candidate detectors is minimal, that is, the number of randomly generated strings is minimized.
The performance index of human target recognition and tracking is shown in Table 1. As can be seen from Table 1, the recognition rate of single object recognition is 80%, and the recognition rate of single object tracking is 75%. The algorithm can be well adapted to the movement of the tracking target distance from the camera. In addition, it can be well adapted to the deformation of moving targets.

Software Design of Mobile Robot for Indoor Inspection
This part mainly introduces the design and realization of the local map and path planning of the mobile robot in the indoor environment. The goal of this task is to design a dimension that enables the inspection of mobile robots in an indoor environment. First, the research was conducted in a simple experimental environment. Lidar is used to construct planar maps in simple local environments. Then, combined with the gyroscope sensor, motion path planning and precise motion control are realized in the local environment. The purpose of this study is to lay a solid theoretical and practical foundation for future research design. The local map construction algorithm based on lidar data and the autonomous patrol motion control algorithm based on local map are mainly studied. Then, the algorithm was implemented and tested. The flow chart of the construction of indoor local map and the procedure of autonomous patrol inspection is shown in Figure 3.

Construction of Indoor Local Maps based on Lidar Data
The communication between laser radar and external system is communicated through serial signal. They use non-text form binary data, and each data message has a unified header data format.

Advances in Computer Science Research, volume 74
Each communication process is initiated by an external system, and the RPLIDAR ranging kernel is also operated after power transmission. It does not automatically send data to the external system on the other side of the communication interface. The data packets sent by the external system to the RPLIDAR ranging core are called requests. The data packets sent back to the external system by the RPLIDAR ranging core are called responses. After receiving the request data message from the external system, the RPLIDAR will perform the corresponding processing. If the corresponding request expects the RPLIDAR to respond, a reply message is sent. RPLIDAR scan ranging operations also use request and response modes. Only after the external system sends the start scan ranging request, the RPLIDAR will start scanning and send the response data to the external system continuously.
In this experiment, the homemade lidar sensor RPLIDA is used as experimental equipment. In the process of scanning the lidar, it will get the complete multi frame laser ranging data. This frame contains 361 points in the laser coordinate system's angles, distances, and energy factors. We will separate the sampling points from a sampling point, and use line segments to do the fitting. This local environment map can represent all the information about the environment in the current position of the robot. The local linear feature map construction process is shown in Figure 4.

Performance Evaluation and Result Test of Local Map Construction
According to the method of adaptive variable threshold, the segmentation of point distance can achieve better experimental results. The formula is used as follows: T1 is the segmentation threshold. D represents the distance between two points. T represents an adaptive point segmentation threshold.

Advances in Computer Science Research, volume 74
When the data quality factor is less than 15, it means that the data segment is unreliable, and the quality is poor. The data segment that can also react with the quality factor less than 15 may be far away from the laser range finder. Through the fitting of the data, we can divide the map segment data into different data levels. After fitting the operation, it can be divided into four different segments. Corresponding to the angle values of the polar coordinates in the raw data, we obtain the four segments of 0~140 degrees, 141~160 degrees, 161~200 degrees, and 201~230 degrees. These four data segments are the basic data that we need to measure the robot moving in that direction. The analysis results are shown in Table 2. After fitting the calculation, we found that the distance from the laser rangefinder is greater than D = 1000mm. The quality factor of the LIDAR data is less than the data end of Q = 15, which can be used as the travel line of the robot. Therefore, 141~60 degrees and 201~230 degrees are possible to move the robot at an azimuth angle.
The purpose of designing this part is to let mobile robots instead of people to accomplish some patrol tasks in larger patrol area and dangerous environment. The PC control terminal acquires commands and sends them to the mobile robot. The mobile robot analyzes the control commands and maps them into control signals to adjust the motion of the robot itself. The mobile robot collects the current GPS location information and sends it to the PC control end. PC control terminal uses electronic map to realize real time GPS positioning. In order to be able to detect and patrol the personnel in the reconnaissance and patrol tasks, the robot can remind the operator. The target recognition and tracking function is designed. With the development of embedded software and hardware technology, the field of mobile robot will also develop rapidly. In future practical applications, mobile inspection robots will show their advantages and capabilities in intelligent warehousing, logistics, intelligent factories and intelligent buildings. Indoor mobile robots are still in a simple experimental prototype stage. However, with the continuous improvement of the mobile robot program, patrol robots will be truly applied in the future.

Conclusion
In this paper, the main design objective is the design and implementation of mobile robot for indoor and outdoor security inspection. A prototype design of mobile robot based on laser radar for indoor and outdoor inspection is proposed. Some new sensors are applied to realize the basic construction of mobile robot hardware platform. After the system has been completed, each function has been verified and tested. The results show that the software and hardware of the mobile robot system can work effectively according to the design requirements, and the running state is good. The intended design purpose is achieved. In addition, it provides a reasonable and effective experimental platform for the study of autonomous construction, global map and motion control of mobile inspection robots in complex environments.