ALSonar API

NAOqi Sensors - Overview | API


See also

Namespace : AL

#include <alproxies/alsonarproxy.h>

Method list

As any module, this module inherits methods from ALModule API.

It also inherits methods from ALExtractor API.

Note that only the ALExtractor::subscribe() and ALExtractor::unsubscribe() methods are useful for ALSonar.

Events

Event: "SonarLeftDetected"
callback(std::string eventName, float dist, std::string subscriberIdentifier)

raised when there is someting in front of NAO (left side) at less than 0.5m.

Parameters:
  • eventName (std::string) – “SonarLeftDetected”
  • dist – the obstacle distance in meter
  • subscriberIdentifier (std::string) –
Event: "SonarRightDetected"
callback(std::string eventName, float dist, std::string subscriberIdentifier)

raised when there is someting in front of NAO (right side) at less than 0.5m.

Parameters:
  • eventName (std::string) – “SonarRightDetected”
  • dist – the obstacle distance in meter
  • subscriberIdentifier (std::string) –
Event: "SonarLeftNothingDetected"
callback(std::string eventName, float val, std::string subscriberIdentifier)

raised when there is nothing in front of NAO nor on his left side.

Parameters:
  • eventName (std::string) – “SonarLeftNothingDetected”
  • val – always 0.0
  • subscriberIdentifier (std::string) –
Event: "SonarRightNothingDetected"
callback(std::string eventName, float val, std::string subscriberIdentifier)

raised when there is nothing in front of NAO nor on his right side.

Parameters:
  • eventName (std::string) – “SonarRightNothingDetected”
  • val – always 0.0
  • subscriberIdentifier (std::string) –