Software Specifications for EvAAL Competitors
On-site track
Competitors of EvAAL 2015 have to code an Android application targeted for smartphones (no tablet are allowed) that:
- computes the location of the target user during the measurement session
- reports the estimated position twice per second to the measurement application (the StepLogger).
We provide two Android-based applications:
The StepLogger provides two basic functionalities:
- a logging service designed to log the position computed by the applications of the competitors (Section 1) as well as the time you press the buttons shown
- a GUI to perform the measurements (Section 2)
The StepLoggerClient provides one basic feature:
- a fake localization system generating fake positions and invoking the logging system of StepLogger
APKs are available for download here.
Source code of the appliations StepLogger and StepLoggerClient are available:
https://ala.isti.cnr.it/home/svn/software/localization/Android/EvAAL15/
svn://ala.isti.cnr.it/software/localization/Android/EvAAL15
with username : competitor and password: competitor
1. StepLogger Logging Interface
StepLogger provides a simple service for the applications of the competitors. The service is implemented with one single method named:
void logPosition(in long timestamp, in double x, in double y, in double z);
which is provided by the StepLogger app; the moethod should be invoked through the AIDL interface. Specifically, competitors must add the StepLogger AIDL file to their Android project and invoke the logPosition method twice per second.
Every time the competing app calls logPosition StepLogger logs the following information:
- Time stamp: this time expressed in seconds (please refer to the currentTimeMillis() provided by the Java System class)
- Coordinates x, y, z
This information is stored in the file positions.log, as detailed below under “StepLogger Logging mechanism”.
1.1. How to use the StepLogger AIDL interface
- Add the AIDL file in the right Java package, namely it.cnr.isti.steplogger
- Invoke the logPosition method by following these steps:
- Create an Intent object
- Set the class name of the intent object with:
- BOUNDSERVICE_PACKAGE = "it.cnr.isti.steplogger";
- BOUNDSERVICE_CLASS = ".StepLoggerService";
- Invoke the bindService(…) method provided by Android OS in order to bind to the service that matching with BOUNDSERVICE_PACKAGE and BOUNDSERVICE_CLASS
void bindService(in Intent intentService, in ServiceConnection mConnection, in int flags);
You should download the apk and the source code of the stub StepLoggerClient application, which intended to provide an example of how the competing application should interact with the StepLogger. StepLoggerClient shows a GUI with two buttons: START LOGGING POSITION and STOP LOGGING POSITION.
Note: Since StepLoggerClient invokes a method provided by the StepLogger app, you have to first start a new measurement session (See Section 2.1)
When you click on START LOGGING POSITION:
- The StepLoggerClientActivity creates an intent object and it sends the intent to the StepLoggerClientService
- The StepLoggerClientService manages the intent received with the following steps:
- It creates an intent for invoking the logPosition service
if (intent != null) {
intentService.setClassName(BOUNDSERVICE_PACKAGE, BOUNDSERVICE_PACKAGE + BOUNDSERVICE_CLASS);
}
- It binds to the service with the Android system call:
bindService(intentService, mConnection , Context.BIND_AUTO_CREATE );
- It invokes twice per second the logPosition with coordinated of x,y and z generated randomly
while (mustRun) {
if(!isBound){
timer.schedule(new TimerTask() {
@Override
public void run() {
bindService(intentService, mConnection , Context.BIND_AUTO_CREATE ); }
}, 1000);
} else {
try{
if (mService != null) {
Log.d(LOG_TAG, "logPosition called");
mService.logPosition(System.currentTimeMillis(), Math.random() * 1000,
Math.random() * 1000, Math.random() * 1000);
}
Thread.sleep(INTERVAL);
} catch (Exception e) {
Log.e(LOG_TAG, e.getMessage());
e.printStackTrace();
}
}
}
2. StepLogger GUI
StepLogger provides a GUI to be used by competitors to perform the measurement sessions. The actor will walk along a predefined path within the evaluation site and he/she click the button displayed by StepLogger when stepping over the markers placed on the floor. The button displayed on the screen shows the same label of the markers positioned on the floor, so that the actor can double-check when to press the button. Every time the button is pressed, StepLogger logs the following information :
- Time stamp: this time is gathered from the clock of the smartphone running StepLogger
- The label displayed when the button is pressed
These information are stored in the file buttonsPressed.log, please refer to the “StepLogger Logging mechanism” section for information about the logs.
2.1. How to start a new measurement session
FIRST: copy the this INI file under the Download directory of your phone. For example: /storage/emulated/0/Download/
- Install StepLogger and StepLoggerClient applications. Please remember to enable installation from unknown sources in you smartphones, otherwise you smartphone will prevent the installation of third-party applications.
- Search for StepLogger and StepLoggerClient applications on your smartphone. Usually, after the installation of a new applications, you can find them by browsing the application menu.
- Move StepLogger and StepLoggerClient on the Home page screen
- Run StepLoggerClient and click on the button name "Start Logging Position"
- Run StepLogger. The splash screen shows a welcome message and the “Start a new measurement session” on the button.
- Fill the form by writing the competitor ID, this ID will be use as suffix to the name of the log files that StepLogger write along the measurement session.
- Start walking on the room and press the button when you step over the marker with the same label shown by the button. Some examples:
- StepLogger updates the logs as soon as you press the button. When you switch to another application and then reopen StepLogger, it resumes from the last button pressed.
- After stepping over all the markers, StepLogger finalizes the log files and shows a white screen
Some options:
We show now two options of the StepLogger application. The options are available with the top-right menu:
- Start a new measurement session: allows to start again the session from point 6 (see above)
- Settings are available on the top-right menu, it allows to switch to test mode. In test mode StepLogger does not log any file. Note that Test mode should be off during the measurement session
2.2. StepLogger Logging mechanism
StepLogger writes the logs generated during the measurement session to the Download directory of the devices running StepLogger. Inside the Download directory, StepLogger archives the log files in the folder named it.cnr.isti.steplogger. For example the full path of the smartphone used for tests (Sony Xperia M2) is:
storage/sdcard0/Download/it.cnr.isti.steplogger/
Within the folder it.cnr.isti.steplogger/ StepLogger creates a folder for every measurement session, the logs are placed in folder whose name follows this convention:
[YearMonthDay]T[HourMinutesSeconds][Competitor ID]
The following image shows an example of the names assigned to the folders for the measurement sessions.
Every folder contains the logs of the measurement session(s) related to the Competitor ID. For every measurement session StepLogger creates two files:
- buttonsPressed.log : logs the time stamp and the label of the button pressed
- positions.log : logs the time stamp and the position (x,y,z) notified by the application of the competitors
Download this ZIP file containing examples of logs generated by StepLogger
2.2. Notes
- StepLogger is the logger application offering a logging system for your localization application by means of AIDL interface
- StepLoggerClient is an example of localization system generating fake positions and invoking the logging system of StepLogger
- In order to avoid confusion run StepLoggerClient OR your localization application
- Code your localization application so that it is possibleto stop the system and stop invoking the AIDL interface
For any question that might be potentially of interest for all the competitors use the mailing list:
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
Michele Girolami (software chair)
.
|