SoftBank Robotics documentation What's new in NAOqi 2.8?

ALExtractor API

NAOqi Core - Overview | ALExtractor API | ALVisionExtractor API


Method list

Any ALExtractor inherits methods from ALModule API. It also has the following specific methods:

Parameters update
Introspection
void ALExtractor::subscribe(const std::string& subscribedName, const int& period, const float& precision)

There are two overloads of this function:

Subscribes to the extractor with given period and precision values. If not yet started by another subscriber, starts processing data periodically and publishes data in ALMemory (either as memory keys or events).

Parameters:
  • subscribedName – Name of the subscriber.
  • period – Period of the extractor in milliseconds.
  • precision – Precision of the extractor.
void ALExtractor::subscribe(const std::string& subscribedName)

Subscribes to the extractor with:

  • the extractor default period and precision if not yet started by another subscriber;
  • the extractor current period and precision if already started.
Parameters:
  • subscribedName – Name of the subscriber.
void ALExtractor::unsubscribe(const std::string& subscribedName)

Unsubscribes a given subscriber from the extractor.

Parameters:
  • subscribedName – Name of the subscriber.
void ALExtractor::updatePeriod(const std::string& subscribedName, const int& period)

Updates the extractor period for a given subscriber if relevant.

Parameters:
  • subscribedName – Name of the subscriber.
  • period – New period in milliseconds.
void ALExtractor::updatePrecision(const std::string& subscribedName, const float& precision)

Updates the extractor precision for a given subscriber if relevant.

Parameters:
  • subscribedName – Name of the subscriber.
  • precision – New precision.
int ALExtractor::getCurrentPeriod()

Gets the current period of the extractor.

Returns:Smallest period required by all the subscribers.
float ALExtractor::getCurrentPrecision()

Gets the current precision of the extractor.

Returns:Highest precision required by all the subscribers.
std::vector<std::string> ALExtractor::getEventList()

Gets the list of events raised by the extractor.

Returns:vector of names [ event_1, event_2 ... ].
std::vector<std::string> ALExtractor::getMemoryKeyList()

Gets the list of ALMemory keys modifies by the extractor.

Returns:vector of names [ memoryKey_1, memoryKey_2 ... ].
int ALExtractor::getMyPeriod(const std::string& subscribedName)

Gets the current period of a given extractor.

Parameters:
  • subscribedName – Name of the subscriber.
Returns:

Current period.

float ALExtractor::getMyPrecision(const std::string& subscribedName)

Gets the current precision of a given extractor.

Parameters:
  • subscribedName – Name of the subscriber.
Returns:

Current precision.

std::vector<std::string> ALExtractor::getOutputNames(void)

Gets the list of ALMemory keys and events modified by the extractor.

Returns:vector of names [ event_1, event_2, ... , memoryKey_1, memoryKey_2 ... ].
AL::ALValue ALExtractor::getSubscribersInfo()

Gets the list of parameters for all the current subscribers (name, period and precision).

Returns:Array of the form [ [name_1, period_1, precision_1], [name_2, period_2, precision_2] ... ].