Wifi signal strength varies spatially. This project built and deployed the required ROS-nodes to autonomously generate a Floorplan of a location, overlaid with signal strength. The analyses make use of geographic-weighted regression to plot spatial variance.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
In order to create this node, we make a new package in our catkin workspace.
$ cd ~/catkin_ws/src
src $ catkin_create_pkg signal_gthr std_msgs rospy
After this folder’s been created, replace the contents of the new folder with the folder in this repository. To deploy our new node, we make our host_posAndSignal.py executable, and then catkin_make this package:
$ sudo chmod +x signal_gthr/src/host_posAndSignal.py
$ cd ~/catkin_ws
$ rospack profile
Now you are ready to run the host_posAndSignal.py script. Locate a folder to save the data output.
Initialize ROS, and bringup the robot and your wifi node of choice.
For specific launch instructions on the TurtleBot3, the platform used in my build of this project, see their website.
deadspottr$ roslaunch turtlebot3_bringup turtlebot3_robot.launch
deadspottr$ rosrun single_sig_test signal_strength.py
We now launch the signal_gthr node we just constructed on the host computer.
host$ roslaunch turtlebot3_slam turtlebot3_slam.launch
host$ rosrun rviz rviz -d `rospack find turtlebot3_slam`/rviz/turtlebot3_slam.rviz
host$ roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch
To begin data-collection, run:
host$ rostopic echo -p /signal_dtagthr > /Path/to/output/file.txt
Now that the nodes are running, allow the robot to drive around the area you are trying to map.
After you are satisfied with the local area map, save the resulting map into the data folder, where we’ve been saving the publishings of the /signal_dtagthr topic.
host$ rosrun map_server map_saver -f map
To process these files into an output map, we now run the R script.
host$ r -f /Path/to/GenerateSignalMap.R
Because this script can run from any location, you will be prompted twice to enter the location of the data files that we collected.
When promped, enter the direct path to the file or folder asked. If this does not work, you can hard-code the path locations directly into the script.
The final generated file will be in the folder of the R script and be pdf file titled Rplots.pdf.