ALLandMarkDetection API

NAOqi Vision - Overview | API | Tutorials


Namespace : AL

#include <alproxies/allandmarkdetectionproxy.h>

Methods

int ALLandMarkDetectionInfoProxy::getCurrentPeriod()

Gets the current period.

Returns:Refresh period (in milliseconds).
float ALLandMarkDetectionInfoProxy::getCurrentPrecision()

Gets the current precision.

Returns:Precision of the extractor.
int ALLandMarkDetectionInfoProxy::getMyPeriod(const std::string& name)

Gets the period for a specific subscription.

Parameters:
  • name – Name of the module which has subscribed.
Returns:

Refresh period (in milliseconds).

float ALLandMarkDetectionInfoProxy::getMyPrecision(const std::string& name)

Gets the precision for a specific subscription.

Parameters:
  • name – name of the module which has subscribed
Returns:

precision of the extractor

std::vector<std::string> ALLandMarkDetectionInfoProxy::getOutputNames()

Get the list of values updated in ALMemory.

Returns:Array of values updated by this extractor in ALMemory
AL::ALValue ALLandMarkDetectionInfoProxy::getSubscribersInfo()

Gets the parameters given by the module.

Returns:Array of names and parameters of all subscribers.
void ALLandMarkDetectionInfoProxy::subscribe(const std::string& name, const int& period, const float& precision)

Subscribes to the extractor. This causes the extractor to start writing information to memory using the keys described by getOutputNames(). These can be accessed in memory using ALMemory.getData(“keyName”). In many cases you can avoid calling subscribe on the extractor by just calling ALMemory.subscribeToEvent() supplying a callback method. This will automatically subscribe to the extractor for you.

Parameters:
  • name – Name of the module which subscribes.
  • period – Refresh period (in milliseconds) if relevant.
  • precision – Precision of the extractor if relevant.
void ALLandMarkDetectionInfoProxy::subscribe(const std::string& name)

Subscribes to the extractor. This causes the extractor to start writing information to memory using the keys described by getOutputNames(). These can be accessed in memory using ALMemory.getData(“keyName”). In many cases you can avoid calling subscribe on the extractor by just calling ALMemory.subscribeToEvent() supplying a callback method. This will automatically subscribe to the extractor for you.

Parameters:
  • name – Name of the module which subscribes.
void ALLandMarkDetectionInfoProxy::unsubscribe(const std::string& name)

Unsubscribes from the extractor.

Parameters:
  • name – Name of the module which had subscribed.
void ALLandMarkDetectionInfoProxy::updatePeriod(const std::string& name, const int& period)

Updates the period if relevant.

Parameters:
  • name – Name of the module which has subscribed.
  • period – Refresh period (in milliseconds).
void ALLandMarkDetectionInfoProxy::updatePrecision(const std::string& name, const float& precision)

Updates the precision if relevant.

Parameters:
  • name – Name of the module which has subscribed.
  • precision – Precision of the extractor.

Events

Event: "LandmarkDetected"
callback(std::string eventName, AL::ALValue value, std::string subscriberIdentifier)

Raised when one or several landmarks are currently being detected.

Parameters:
  • eventName (std::string) – “LandmarkDetected”
  • value – Informations related to the detected landmarks. Further details below.
  • subscriberIdentifier (std::string) –

LandMarkDetected Value Structure

The output ALValue is organized as follows:

ALLandMarkDetectionInfo

ALLandMarkDetectionInfo {
  TimeStamp,
  MarkInfo[N],
  CameraPoseInNAOSpace,
  CameraPoseInWorldSpace,
  CurrentCameraName
}

with as many mark_info tags as marks currently detected.

TimeStamp

This field is the time stamp of the image that was used to perform the detection.

TimeStamp {
  TimeStamp_Seconds,
  Timestamp_Microseconds
}

MarkInfo

For each detected mark, we have one MarkInfo field:

MarkInfo {
  ShapeInfo,
  MarkID
}

ShapeInfo

ShapeInfo {
  1,
  alpha,
  beta,
  sizeX,
  sizeY
}
  • the heading angle describes how the Naomark is oriented about the vertical axis with regards to NAO’s head.
  • alpha and beta represent the location of the NaoMark’s center in terms of camera angles in radian.
  • sizeX and sizeY are the mark’s size in camera angles.

MarkID

is the number written on the naomark and which corresponds to its pattern.

CameraPoseInNaoSpace

Position6D of the camera at the time the image was taken, in FRAME_ROBOT.

CameraPoseInNaoSpace

Position6D of the camera at the time the image was taken, in FRAME_WORLD.

CurrentCameraName

Name of the camera that was used to take the image (“CameraTop”, or “CameraBottom”).