davesnowdon / naoutil

A project containing useful utility code for NAO developers (mostly in python). Includes support for i18n and JSON serialisation of arbitrary classes
GNU Lesser General Public License v3.0
9 stars 6 forks source link

Add support for location detection #12

Open davesnowdon opened 11 years ago

davesnowdon commented 11 years ago

It would be useful for NAO to be able to recognise locations. One mechanism for doing this could be the use of wifi access points and signal strength. If a GPS sensor is attached then that could be used too.

naoutil should provide an interface to name & recognise locations that abstracts the technology used.

AxelVoitier commented 11 years ago

The underlying implementation would have to map named locations with a list of possible signatures. A signature would be defined by its type (wifi, gps, avahi, etc.) and its value (relevant only to the sub-component implementing the type).

When a signature does not correspond to any known named location, it would have to be stored in a list, the unknown list. If it is possible to tell that different signatures of different types correspond to the same place (such as, they are acquired at the same time), then they would have to be aggregated together in a list before being added to the unknown list. Later on, the NAO owner can map a signature or a list of signature with a named location. This could be done through a widget, a behaviour or naoutil API for instance.

The list of named locations associated with their signatures, plus the unknown list, have to be stored in a robot-dependent place. This could be a local file, specific ALMemory keys, or ALPreferences. The point is that any behaviour could have access to it through naoutil API.

We define two typical use case of this named location API:

Some special locations could be used, by convention, by the client applications. E.g., an application could assume that there exist a typical scenario where Home and Work places is commonly used. The naoutil API does not have to provide anything special for that. It is up to the application developers to make such usage of special locations. The naoutil API documentation could simply list them as their adoptions-by-convention emerge.

Proposed naoutil API:

To complement.

AxelVoitier commented 11 years ago

Complementing the SignatureProvider abstract API: