GithubHelp home page GithubHelp logo

Comments (2)

AxelVoitier avatar AxelVoitier commented on July 24, 2024

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:

  • An application needs to store place-dependent data. For instance, an application doing SLAM.
  • An application needs to react differently depending on the place the robot is. For instance, having different reactions between Home and Work places.

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:

  • SignatureProvider: a class/interface used to be sub-classed by provider of signatures.
  • getNamedLocation(type=None): acquire signatures. If a match with a named location can be done, return the name. If not, store the signatures in the unknown list. Type parameter restricts the signature acquisition to specific providers. Can be None, a provider or a list of providers.
  • getDetailedLocation(type=None): like getNamedLocation(). But also return full signature details (can be used to get GPS location for instance).
  • getUnknownLocations(type=None): return all unknown location signatures of a certain type or list of type. If type is None, return for all types.
  • matchNamedLocation(name, signature(s)): match signature(s) to a name. Remove the signature(s) from the unknown list is applicable.
  • getSignaturesForName(name, type=None): get the list of signature for a certain named location.
  • removeSignatureForName(name, signature(s)): remove the signature(S) of a location for a certain named location.

To complement.

from naoutil.

AxelVoitier avatar AxelVoitier commented on July 24, 2024

Complementing the SignatureProvider abstract API:

  • SignatureProvider.acquireSignature(): return a signature of the current location.
  • SignatureProvider.matchSignatureInList(signature, signatureList): return the index of a matched signature. Allow the signature provider to define how a signature match to another (e.g.: let a gps signature provider to define a radius around a gps coordinate where another signature can be said to match it).

from naoutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.