Comments (2)
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.
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)
- Add NaoEnvironment usage to README
- Support reading config items from file
- Add missing language name to 2-letter ISO code in i18n
- Run pylint on code HOT 5
- Move data dir outside behaviour dir HOT 2
- Use os.path.join to join path segments
- Update choreographe boxes from i18n
- Everything working well except audioPlayer HOT 2
- Memory Callbacks HOT 4
- Exception when run on windows 7 HOT 4
- Backward compatibility with previous argument names for broker creation.
- Document how to find NAOs with Avahi
- Make function that resolves ip/port of naos available publicly.
- Have an environment variable to specify a prefered robot when finding a NAO
- Make a timeout in avahi loop
- Memory callbacks appear to be broken HOT 9
- In NaoEnvironment, allow for ALProxy creation with broker ip/port.
- Better test infrastructure HOT 2
- Improve logging
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naoutil.