Overview

ALSentinel (ex-ALWatchDog) is a module that implements vital services for Nao:
- Check Vitality of naoqi.
- Check Battery.
- Check press on chest Button (soft power off).
- Warn about motor heating.
...

Methods

void run ()

Monitors buttons and Battery.

void setPowerLimit (const float& powerLimit)

Change the power threshold; below it, Nao will sit down and remove power from his motors.

powerLimit

power limit in percent, default: 0.07; 0.00 to disable this feature.

void enablePowerMonitoring (const bool& enable)

Enable or Disable power monitoring.

enable

true to enable, false to disable, default: true

void enableHeatMonitoring (const bool& enable)

Enable or Disable heat monitoring.

enable

true to enable, false to disable, default: true

void powerButtonOnPress (const string& dataName, const AL::ALValue& data, const string& message)

callback when the power button is pressed. (internal use).

dataName

Name of the modified data

data

value of the data

message

associate message.

void enableDefaultActionSimpleClick (const bool& enable)

enable or disable the "hello, i'm nao..." after one short push of the Power button. In both cases the ALMemory ALSentinel/SimpleClickOccured key will be set to true, so users can read/registerOnChange it, then reset to false after handling the event.

enable

true of false to respectively enable or disable

void enableDefaultActionDoubleClick (const bool& enable)

enable or disable the "ouch" action after two pushes.

enable

true of false to respectively enable or disable

void enableDefaultActionTripleClick (const bool& enable)

enable or disable the "restart naoqi" action after three pushes.

enable

true of false to respectively enable or disable

void onTemperatureMeasure (const string& dataName, const AL::ALValue& data, const string& message)

callback for change in battery power level. (internal use).

dataName

Name of the modified data

data

value of the data

message

associate message.

void onMotorError (const string& dataName, const AL::ALValue& data, const string& message)

callback for change in battery power level. (internal use).

dataName

Name of the modified data

data

value of the data

message

associate message.

void onAccX (const string& dataName, const AL::ALValue& data, const string& message)

callback for internal use.

dataName

Name of the modified data

data

value of the data

message

associate message.

void onAccY (const string& dataName, const AL::ALValue& data, const string& message)

callback for internal use.

dataName

Name of the modified data

data

value of the data

message

associate message.

void onAccZ (const string& dataName, const AL::ALValue& data, const string& message)

callback for internal use.

dataName

Name of the modified data

data

value of the data

message

associate message.

void enableBatteryMeasure (const bool& enable)

check the battery information, voltage and alarm flag

enable

true of false to respectively enable or disable (default: true)

void onBatteryMeasure (const string& dataName, const AL::ALValue& data, const string& message)

callback for internal use.

dataName

Name of the modified data

data

value of the data

message

associate message.

void BatteryChargeStatusChanged (const string& dataName, const AL::ALValue& data, const string& message)

callback for internal use.

dataName

Name of the modified data

data

value of the data

message

associate message.

void BatteryChargeCellVoltageMinChanged (const string& dataName, const AL::ALValue& data, const string& message)

callback for internal use.

dataName

Name of the modified data

data

value of the data

message

associate message.

int getBatteryLevel ()

Get the battery level (0..5) 5: full 0: totally empty (never reached).

Returns

the battery level (0..5): 5: full 0: totally empty (never reached)

string getBatteryLevelDesc ()

Get a text presentation of the battery level ('My battery is...').

Returns

the sentence describing the battery level

void enableCheckRemainingRam (const bool& enable)

check the remaining physical memory

enable

true of false to respectively enable or disable (default: true)

void presentation (const bool& enableFastCheckJoints)

Launch a small presentation of Nao: name, ip, battery. It's the default behavior launched when user press on the chest

enableFastCheckJoints

if true, Nao will quickly check that his joints are moving properly.

int getRemainingRam ()

get the remaining physical memory value (one shot)

Returns

the remaining RAM in kb

void exitNaoqi ()

exit naoqi (warning: it will really exit Naoqi)


Methods inherited from ALModule

void exit ()

Exits and unregisters the module.

string version ()

Returns the version of the module.

Returns

A string containing the version of the module.

bool ping ()

Just a ping. Always returns true

Returns

returns true

vector<string> getMethodList ()

Retrieves the module's method list.

Returns

An array of method names.

AL::ALValue getMethodHelp (const string& methodName)

Retrieves a method's description.

methodName

The name of the method.

Returns

A structure containing the method's description.

AL::ALValue getModuleHelp ()

Retrieves the module's description.

Returns

A structure describing the module.

string getBrokerName ()

Gets the name of the parent broker.

Returns

The name of the parent broker.

string getUsage (const string& name)

Gets the method usage string. This summarise how to use the method.

name

The name of the method.

Returns

A string that summarises the usage of the method.


Copyright © 2010 Aldebaran Robotics - All rights reserved