Simultaneous Localisation and Configuration (SLAC) for Wireless Sensor Networks in indoor environments using FastSLAM.
With SLAC we aim to simultaneously localise both the user and the devices of a system deployed in an indoor environment. The algorithm is privacy-aware and is an online localisation method; i.e. localisation starts whenever a user starts moving inside a building. Moreover, for the SLAC system we focus on a solution that can be deployed in smart spaces without additional hardware requirements besides users’ mobile phones` and the components of the space. By utilising a mobile phone we remove the need for a application-dependent device that the user needs to keep.
A online presentation describing the SLACjs project can be found here:
The following list of demo's are demo's of the local/browser version of SLACjs and use simulated data.
Local version of SLACjs running in the browser (with simulated data). Blue path is the ground truth motion of the user. Each grey path is a particle. Black squares are landmarks; red squares their best estimate retrieved from the particle filter.
A new landmark is initialised using a separate particle filter. On each new measurement the filter is updated to end up with a rough estimate of the landmark position. Note that this is range-only SLAM, so no heading information is present in the measurements.
After initialisation the landmark position is further refined using EKF's.
SLACjs is designed to work on mobile devices utilising the compass and accelerometer data. A first version running on an iPad:
The following screenshot shows a replay of live data recorded using the iPad version of SLACjs. All data is real data and is played back in real time (so no simulated movement or beacons). Performance of this particle run, measured in average landmark location error, is 1.87 meters. 'Red blocks' are estimated landmarks, 'black blocks' are their true positions.
Overview of algorithm
All steps of the SLACjs algorithm are displayed in the flow chart below. The chart depicts the process of updating the particle filter based on a single observation. In the case of multiple observations, each observations is processed before resampling takes place.
SLACjs uses bower and gulp to manage dependencies and build the project; both can be installed using npm. Make sure that you have npm installed and then run:
- Install gulp globally (only do this if you do not have gulp installed yet):
npm install --global gulp
- Install project dependencies:
- Install all bower dependencies:
For building the mobile version of SLACjs Cordova has to be installed including the target platforms. SLACjs is configured to build for iOS and Android. To prepare the project for mobile development run the following command:
This builds a mobile version of the project and adds all plugins and platforms as defined in
config.js. Make sure that you run this command from the main project directory.
Running SLACjs locally
A local version of SLACjs with simulated data can be run using:
The main entry point of the local SLACjs version can be found in
Running SLACjs on a mobile platform
To build a mobile version a combination of both Gulp and Cordova has to be used. Build the project and export the resources using:
/mobile directory. The
mobile directory is a Cordova project and can be used accordingly (i.e. using
cordova run ... or
cordova prepare). See the Cordova docs for more information about building.
When you have Phonegap installed you can use the development app to quickly test the app by running:
phonegap serve (Note: this must be run inside the
To automatically rebuild all resources a specific serve task is available for mobile:
Building & tools
To just build the files, without running the server, the following can be used:
gulp build (for local version)
gulp mobile (for mobile version)
The previous build can be cleared using:
gulp clean (for local version)
gulp mobile-clean (for mobile version)
Individual parts of the project can be built using one of the sub tasks. Run the help task to get a list of functions:
Two configuration files define most of the behaviour of SLACjs. The build configuration file is located in:
The build config file contains configuration for the all the Gulp tasks.
The application configuration, which contains all settings used by the application, can be found in:
Libraries & Third-party software
- Browserify: To pack all separate modules.
- JSHint & JSCS: For static code analysis and checking code guidelines. Runs automatically when using the gulp watch command.
- BrowserSync: For live reloading of the development server
The following Cordova plugins are used in the mobile version:
SLACjs utilises the Babel ES6 polyfill to support older browsers and mobile devices.
Exporting data (iOS)
To use iTunes File Sharing to download data files the following needs to be added to the .plist file:
Copyright (C) 2015 Wouter Bulten
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.