WiFi Localization for Mobile Robots

A project of the Robotics 2019 class of the School of Information Science and Technology (SIST) of ShanghaiTech University. Course Instructor: Prof. Sören Schwertfeger.

Zhu Ningzhi and Zhou Yu


Localization for mobile robots can be challenging in various environments. But WiFi localization for robots provides a low-cost method or better effect while integrated with other localization technologies, because of high WiFi coverage in environments. For this purpose, we propose to do WiFi localization for mobile robots. Specifically, we want to combine the positioning capability of the SLAM algorithm with the WiFi localization methods, and use fingerprinting to capture the spatial features of the WiFi signal strength. In the end, mobile robots can achieve relatively better accuracy of WiFi localization in a known environment.

System Description

SLAM and RSS Map belong to the offline phase, which is to collect the data to build map for the online phase next time. We use SLAM to get such a real world map, which can be helped by ROS package “gmapping”. Only such a real world map is not enough. What we need is a RSS map. So we need to get signal strength information to make the real world map become a RSS map. Signal strength information means that we get the signal strength information in the position (x,y) in the map. We realize this by using the “iw” command tool in Linux.Theoretically, different places in the map may have different signal strength, which means that if two points are neighbors in signal space, they may be neighbors in real space. So we uses a technique called “Nearest Neighbor in Signal Space” to decide the mapping relationship between the real-time date and the RSS map.
 The whole process based on “SLAM”, “RSS Map” and “Nearest Neighbor in Signal Space” can be described with the following algorithm. We firstly use SLAM to get the real map. In the same time during SLAM, we use “iw” command tool on linux to get RSS information to build a RSS map. Then in online phase, we use “Nearest Neighbor in Signal Space” to localize the robot.  

Design of the Experiment

The whole experimental process is divided into three parts.
In the first part, we drove our J-5 robot in three laboratories and aisles around the MARS center. At the same time, the J-5 robot began to use Velodyne16 and SLAM algorithms for positioning, and continuously published positioning coordinate results on ROS topic / tf. We continuously use the first ROS node mentioned above to collect these positioning results, and WiFi strength information in the relevant environment, and published them with the topic / test. In order to use these data later, we used the ROS rosbag command to monitor and record all messages with the topic / test. For related files, see the /code/wifi localization/map and bag/ folder under the project repository in GitLab.
In the second part, use the prepared second ROS node to process the .bag file obtained above, obtain the correspondence between WiFi signal strength and coordinates in the MARS center environment, and process it into a form that is easy for subsequent processing.
In the third part, the SLAM algorithm, the first and the third ROS nodes are turned on at the same time for real-time WiFi localization. Among them, the first node collected the WiFi strengths with their Mac addresses and the coordinates determined by SLAM, and published these data with topic / test. At the same time, the third ROS
node obtained the data processed in the second part, combined it with the WiFi signal strength in / test, and used the algorithm in this report to achieve real-time coordinate localization. In order to facilitate the judgment of the experimental results, the third node sends the predicted coordinates and the coordinates determined by SLAM
under the topic /wifi loc at the same time, and simultaneously calculates the positioning accuracy and the accuracy histogram. 

Experimental Results

In the 60% case, the WiFi localization algorithm of this project achieves relatively normal accuracy. But forty percent of cases fail. We carefully analyzed the reasons for this failure throughout the experiment. Because our WiFi localization is based on the SLAM positioning algorithm, the accuracy of the algorithm in this report must be lower than the SLAM algorithm itself. However, the SLAM algorithm is a vision-based algorithm and is very sensitive to visual interference. Any local visual interference may cause severe fluctuation in local coordinates, which will produce very bad results. During the experiment, the positioning failure occurred when a pedestrian appeared around the robot, or when a narrow doorway entered the laboratory room from the corridor. When the space around the robot is gradually widening and there is less visual interference, the positioning accuracy will return to the normal accuacy level (less than 4m). This reason analysis points to the limitations of the experimental procedures in this report and future research directions.


Localization for mobile robots can be challenging in various environments. But WiFi
localization for robots provides a low-cost method or better effect while integrated with
other localization technologies, because of high WiFi coverage in environments. This
course project report deeply analyzes the implementation principle behind WiFi local-
ization, studies some of the research results, and presents the classic RSS algorithm in
detail. Finally, we implemented the entire experiment process on a real robot based on
the RSS algorithm, and verified the rationality and feasibility of the algorithms related
to WiFi localization. Our experiments were performed using the positioning function
of the SLAM algorithm. Under normal circumstances, this method can achieve better
accuracy (less than 4m). But because SLAM algorithm is based on vision, it is very susceptible
to visual interference or local small environment, which will cause failure in 40% of cases.
This also shows the limitations of our experimental process and points the way for future