RMiyagusuku / ros-wifi-localization

ROS packages for wireless signal strength based localization
BSD 3-Clause "New" or "Revised" License
31 stars 9 forks source link

General questions #2

Open pavloblindnology opened 4 years ago

pavloblindnology commented 4 years ago

Hello,

  1. What package do you use to read RSSI measurements?
  2. Where are the locations of WIFI APs (used in path loss model) and trained Gaussian Processes model stored?
  3. How can I map and train my own model?
  4. What's the difference between self_localization, wlrf_localization and wlrf_localization2 launch files? AFAIU, self_localization computes pure WIFI localization based on RSSI and odometry coming from TF odom->base_link computed by AMCL. While wlrf_localization2 file constantly reads particles cloud from AMCL, update it based on WIFI probabilities map, and if the cloud is too spread out, reinitialize the AMCL. While in your papers, if I'm not mistaken, it should be some mix of both - pure WIFI particle filter is computed based on RSSI and odometry, and AMCL is reinitialized with WIFI particles only if the difference between WIFI and AMCL particle filters is too big.
  5. Is information in pickled files really needed? It seems to be just for logging purposes, no? Thanks.
RMiyagusuku commented 4 years ago

Hi, Thanks for your interest in this work. While I am still trying to maintain this library, I am currently working on a new release for the ros-wrapper. So some things may change (the current version will not be deleted, a branch with the current version will always be left on the repository).

To acquire rss data

Use rosrun rss acquire

To get AP locations

If you are using the hGP model that incorporates path loss models https://github.com/RMiyagusuku/wifi-localization/blob/master/Localization/sensormodel/pathloss/classes_c.py Pathloss parameters are stored in model.pathloss.params. For the default FLog function: z = p0 - p1log((x-p2)^2+(y-p3)^2) AP locations are p2 and p3

Training with other data

The train_data_name roslaunch argument determines where the system gets data to train the models when the system is launched

scripts/localization line 100: raw_rss,poses,tmp_odom = load_data(file_name=file_name) #odometry is not needed that code read the file and gets rss data and poses from pickle files from your bag.

I am adding new scripts to generate these from a bag file taken using rss acquire

  1. launch/playback_generate_map.launch
  2. launch/playback_generate_trajectory.launch
  3. scripts/save

self_loaclization and wlrf_localization

Yes, self is only wifi and wlrf initializes amcl with wifi particles. The mixed version does not have a single ros-launch file that executes the whole system. I had self and wlrf running in parallel and a python script checking for particles difference.

Pickle files

Check the answer on training with other data

pavloblindnology commented 4 years ago

Hi, Thank you for the response. rosrun rss acquire internally runs chopper.py script which I cannot find anywhere. Where can I find it?

RMiyagusuku commented 4 years ago

I have added chopper.py and filter_rss.py to src/rss You need to copy this somewhere your PYTHON_PATH can easily find them I just copy them on /bin/

pavloblindnology commented 4 years ago

To get AP locations Pathloss parameters are stored in model.pathloss.params.

Do I understand right that both GP and hGP models use training dataset consisting of robot locations and RSSI measurements in those locations, but hGP model somehow derives additionally AP locations from those data using Levenberg-Marquardt nonlinear least squares? I.e, AP locations are not provided by the user? If that is correct how can I report found AP locations?

self_loaclization and wlrf_localization Yes, self is only wifi and wlrf initializes amcl with wifi particles. The mixed version does not have a single ros-launch file that executes the whole system. I had self and wlrf running in parallel and a python script checking for particles difference.

Where can I find this python script, is it amcl_wifi?

Thanks.

RMiyagusuku commented 4 years ago

I.e, AP locations are not provided by the user?

Yes. hGP learns the AP locations from data by optimizing a pathloss function.

If that is correct how can I report found AP locations?

That functionality would need to be added. To set the AP locations you would need to modify the Flog function, either setting them or using your reported locations to initialize the optimization function.

Where can I find this python script, is it amcl_wifi?

It is not amcl_wifi, I searched for the file but cannot find it.

pavloblindnology commented 4 years ago

Seems like not all WIFI APs support monitor mode to report RSSI. In my case rosrun rss acquire, which uses tcpdump internally, returns no beacon packets. Sad.

pavloblindnology commented 4 years ago

That functionality would need to be added. To set the AP locations you would need to modify the Flog function, either setting them or using your reported locations to initialize the optimization function.

Did you do some comparison of ground truth and learned AP locations? Or it doesn't matter too much since WIFI localization needs pathloss function optimized and not AP locations.

RMiyagusuku commented 3 years ago

Seems like not all WIFI APs support monitor mode to report RSSI. In my case rosrun rss acquire, which uses tcpdump internally, returns no beacon packets. Sad.

Sorry for the late reply, I missed the last two messages. Indeed some wireless cards do not support monitor mode, but I have had even usb-wireless dongles work. It may be a permission issue. Check if you can listen to data and beacons using something like Wireshark it has a GUI and is more user-friendly. Also, which OS are you using? I have tested this in Ubuntu and should work on most if not all Debian distributions. Windows is a different story. I did initially tried using Windows several years ago, but I found it quite restrictive, not sure if it has improved.

RMiyagusuku commented 3 years ago

That functionality would need to be added. To set the AP locations you would need to modify the Flog function, either setting them or using your reported locations to initialize the optimization function.

Did you do some comparison of ground truth and learned AP locations? Or it doesn't matter too much since WIFI localization needs pathloss function optimized and not AP locations.

I have not checked ground truths. But the system will work as long locations are more or less ok.