Running MILES on the Raspberry PI2

From Lofaro Lab Wiki
Jump to: navigation, search

Currently we have not Created a script that will start all the required processes on the raspberry PI2. Hopefully we willl be able to do this, but until then here is how to get it running yourself.


Starting the Wi-Fi data collection

Open a command console and type

 ifconfig

This will give you the names of the currently connected WLAN adapters.

Now that you know the wlan names, we can start the trigger for the data. Open a terminal and type:

 rosrun wifi_scanner trigger wlan1 wlan2 wlan3 .... wlanN

Note that you will need to type the names of all the wlans you saw in ifconfig

Now that you have the trigger, each wifi_scanner needs to be started. Open a terminal for each of the wlans you saw in ifconfig and type:

 rosrun wifi_scanner scan_wifi -i wlanN

N refers to the wlan number. Remember that you will need to do this for each wlan you saw in ifconfig.


You now are collecting data that is being published to a ROS topic. This ROS topic will be heard by the Localizer.


Starting the Localizer

The Localizer listens to the wifi data being collected and compares it to a file of values that it collected earlier. Using this and a magnetometer, it is able to predict its current location and Orientation. To start the Localizer type:

 rosrun localizer localizer

The localizer is now sending the location and the Orientation via a ROS topic. This data will be acquiried by the Serial Listener and will be sent to the robot when requested.


Starting the Serial listener

The Serial Listener listens to the Serial Port to see if there are requests. The requests it can handle are requesting a Map, requesting a metadata file, requesting location once, and requesting location at 5 Hz. If the user requests location, the Listener will contact the Localizer and get its current guess as to location and send that back to the user. To start the serial listener open a terminal and type:

 rosrun seriallistener seriallistener /dev/ttyUSB0

Note that we need to specify the port that is being used to send the Serial data.