# SoftBank Robotics documentation What's new in NAOqi 2.8?

# APIs – Synthesis – from 2.1 to 2.8

## Core

### Core - New services

#### New service: ALExpressionWatcher

ALExpressionWatcher allows you to be notified or query the validity of a condition expression.

For further details, see: ALExpressionWatcher.

#### New service: ALKnowledge

ALKnowledge implements a triplestore which is a way to store information in a Subject-Predicate-Object representation. It uses a library called Soprano.

For further details, see: ALKnowledge.

#### New service: ALUserInfo

ALUserInfo provides a simple API to store and get information about a given user. It is built on top of ALKnowledge.

For further details, see: ALUserInfo.

### Core - Improvements

#### ALAutonomousLife: new methods

Methods for Autonomous Ability management:

- `ALAutonomousLifeProxy::setAutonomousAbilityEnabled`
- `ALAutonomousLifeProxy::getAutonomousAbilityEnabled`
- `ALAutonomousLifeProxy::getAutonomousAbilitiesStatus`

And also:

- `ALAutonomousLifeProxy::getActivityContextPermissionViolations`

  Provides information on why an activity might be refused to be focused.

- `ALAutonomousLifeProxy::getFocusContext`

  Provides context of the activity trigger condition at activity focus moment so that you can know why your activity has been triggered.

#### New extractor for life: ALMood

ALMood is now part of the extractors started automatically by Autonomous Life.

For further details, see: ALMood Activated during Autonomous Life and Extractors management.

#### Conditions expression language: new types supported

The conditions expression language, used by Launch trigger conditions and ALExpressionWatcher, now takes signals and maps.

For further details, see: Conditions expression language.

#### Trigger conditions: improved

- New operators and functions for trigger conditions: @, #, bang(), stable(), pref(), int(), float(), string()
- Non-existing memory keys used in a trigger condition will make that key evaluate to false instead of ignoring the entire condition. Uninitialized memory keys (with ALValue type “Invalid”) also evaluate to false.

For further details, see: Launch trigger conditions.

#### rand: new Trigger Condition operator

A new random operator returns a random value according to parameters.

For further details, see: Conditions expression language.

#### ALConnectionManager: new methods

- `ALConnectionManagerProxy::setServiceIPv4`
- `ALConnectionManagerProxy::setServiceDomains`
- `ALConnectionManagerProxy::setServiceNameservers`
- `ALConnectionManagerProxy::setServiceProxy`
- `ALConnectionManagerProxy::provisionService`
- `ALConnectionManagerProxy::provisionedServices`
- `ALConnectionManagerProxy::removeProvisionedService`

#### ServiceManager: error recovery added

If your service is an autorun service and it crashes, it is now restarted by the ServiceManager.

For further details, see: ServiceManager.

#### ServiceManager: new methods

Add start|stop|restart API to ServiceManager API that throw on error.

#### ALDiagnosis: new method and event

To summarize active and passive diagnostic results:

- `ALDiagnosisProxy::getDiagnosisStatus`
- `ALDiagnosis/DiagnosisErrorChanged()`

#### ALUserSession: API finalized

ALUserSession is no longer a “work in progress”.

New methods to get user creation and detection dates:

- `ALUserSession::getUserCreationDate`
- `ALUserSession::getFirstEncounterDate`
- `ALUserSession::getCurrentEncounterDate`
- `ALUserSession::getLastEncounterDate`
- `ALUserSession::getSecondsSinceLastEncounter`

New methods for users introspection:

- `ALUserSession::doesUserExist`
- `ALUserSession::areUsersPermanent`
- `ALUserSession::isUserPermanent`
- `ALUserSession::getPermanentUserList`
- `ALUserSession::isUserSessionOpen`

New methods for translating a UserSession ID in a PeoplePerception ID and conversely:

- `ALUserSession::getPpidFromUsid`
- `ALUserSession::getUsidFromPpid`

API change for user bindings introspection:

- `ALUserSession::getBindingSources` renamed `ALUserSession::getBindingList`
- `ALUserSession::doesBindingSourceExist` renamed `ALUserSession::doesBindingExist`

Data sources API deprecated, the following methods should not be used anymore:

- `ALUserSession::doesUserDataSourceExist`
- `ALUserSession::getUserDataSources`
- `ALUserSession::getUserData`

Note: use ALUserInfo to store user data.

#### ALUserSession: improved user recognition

When a user is focused by ALBasicAwareness, ALUserSession tries to recognize them only with good quality pictures. It can make the overall process a bit longer but reduces the risk of false positives.

### Core - Deprecated

#### ALStore: deprecated module

ALStore has been deprecated. Do not use it.

#### ALConnectionManager: deprecated method

- `ALConnectionManagerProxy::setServiceConfiguration`

  Use `ALConnectionManagerProxy::setServiceIPv4`, `ALConnectionManagerProxy::setServiceDomains` `ALConnectionManagerProxy::setServiceNameservers`, or `ALConnectionManagerProxy::setServiceProxy` instead.

## Interaction engines

### Interaction engines - New services

#### New service: ALAutonomousBlinking

ALAutonomousBlinking enables the robot to make its eye LEDs blink when it sees someone and when it is interacting.

For further details, see: ALAutonomousBlinking.

#### New service: ALBackgroundMovement

ALBackgroundMovement triggers some slight movements that the robot does autonomously. If the robot makes some other motion (i.e. there is a call to a method of ALMotion), the background movements are stopped until the motion is done.

For further details, see: ALBackgroundMovement.

#### New service: ALListeningMovement

ALListeningMovement enables some slight movements showing that the robot is listening.

For further details, see: ALListeningMovement.

#### New service: ALSpeakingMovement

ALSpeakingMovement enables to start autonomously movements during the speech of the robot.

For further details, see: ALSpeakingMovement.

#### New: Dialog lexicon

The content of the Dialog lexicon is published.

For further details, see: Dialog Lexicon.

#### New: use Basic Channel topics in applications

It is now possible to include Basic Channel topics in applications.

For further details, see: include.

### ALDialog - Improvements

#### Collaborative Dialog fully integrated

Collaborative Dialog management is now fully integrated. It is available by default on all robots.

It means that any topic tagged as Collaborative Dialog is automatically activated when Talking with Pepper.

For further details, see: Collaborative dialog vs applications.

#### Collaborative Dialog uses the Semantic Engine

During a Collaborative Dialog, the Semantic Engine is activated. So, be aware of the additional content it brings.

For further details, see:

- Semantic Engine & Collaborative Dialog,
- Semantic Engine & QiChat rules,
- Priority among rules in a Collaborative Dialog.

#### QiChat: new functions

The following new instructions are available:

Rules

Learning rule |  |

Rule functions and properties

^concatenate | ^frequency |

Time & Date methods

^currentDateTime ^currentDate ^currentTime | ^sayDateTime ^sayDate ^sayTime

Call functions and program logic

^keepFocus |  |

Web Mining

^wiki |  |

Knowledge Functions

^addKnowledge ^updateKnowledge | ^containsKnowledge ^notContainsKnowledge | ^removeKnowledge ^queryKnowledge

Knowledge Metadatas Functions

^getKnowledgeId ^addMetadata ^queryMetadata | ^updateMetadata ^containsMetadata ^notContainsMetadata | ^removeMetadata ^setExpiringKnowledge ^setHappeningKnowledge

Miscellaneous

- %script
- ^switchFocus
- ^break
- ^enumerate
- overload
- pronunciation
- ^call
- ^pCall
- ^preProcess
- ^getUserInfo
- ^setUserInfo

#### QiChat: language management improved

New syntax to specify the language of a topic: use the English name of the language, like French or Japanese, instead of the former codification, like frf or jpj:

    language: English

    language: enu # DEPRECATED since 2.7

For further details, see QiChat reference about language.

#### QiChat: file management improved

include & unloadTopic

In order to avoid unpredictable side effects between topics, `ALDialogProxy::unloadTopic` has no effect on topics loaded via an include instruction.

%script ^call & Dialog Engine

In order to avoid unexpected effects, it is no longer allowed to use a %script or a ^call to call back the Dialog Engine.

#### ALDialog: new methods

- `ALDialogProxy::runTopics`
- `ALDialogProxy::stopTopics`
- `ALDialogProxy::subscribe`
- `ALDialogProxy::unsubscribe`
- `ALDialogProxy::resetLanguage`
- `ALDialogProxy::addBlockingEvent`
- `ALDialogProxy::removeBlockingEvent`
- `ALDialogProxy::getLanguage`
- `ALDialogProxy::setDelay`
- `ALDialogProxy::getFocus`
- `ALDialogProxy::runDialog`
- `ALDialogProxy::say`
- `ALDialogProxy::stopDialog`
- `ALDialogProxy::stopPush`

- `ALDialogProxy::loadTopicContent`
- `ALDialogProxy::getLoadedTopics`
- `ALDialogProxy::getAllLoadedTopics`
- `ALDialogProxy::getActivatedTopics`
- `ALDialogProxy::addToConcept`
- `ALDialogProxy::getConcept`
- `ALDialogProxy::clearConcepts`
- `ALDialogProxy::setConfidenceThreshold`
- `ALDialogProxy::getConfidenceThreshold`
- `ALDialogProxy::getAllConfidenceThresholds`
- `ALDialogProxy::removeAllLanguageThresholds`
- `ALDialogProxy::setAnimatedSpeechConfiguration`
- `ALDialogProxy::getAnimatedSpeechConfiguration`

#### ALDialog: new events

- `Dialog/Scope()`
- `Dialog/MainDialogStarted()`

- `Dialog/MainDialogStarted()`

- `Dialog/Tag()`
- `Dialog/Focus()`
- `Dialog/FocusDescription()`
- `Dialog/ActivateTopic()`
- `Dialog/DeactivateTopic()`
- `Dialog/OpenSession()`
- `Dialog/NothingToSay()`
- `Dialog/RobotModel()`

### ALBasicAwareness - Improvements

#### Pausing and resuming ALBasicAwareness

ALBasicAwareness can be paused, which means it will stop making the robot move until it is resumed.

For further details, see: Pausing and Resuming.

#### ALBasicAwareness: new methods

- `ALBasicAwarenessProxy::pauseAwareness`
- `ALBasicAwarenessProxy::resumeAwareness`
- `ALBasicAwarenessProxy::isAwarenessPaused`
- `ALBasicAwarenessProxy::setEnabled`
- `ALBasicAwarenessProxy::isEnabled`
- `ALBasicAwarenessProxy::isRunning`

### Interaction engines - Deprecated

#### Deprecated module: ALAutonomousMoves

Deprecated modules
ALAutonomousMoves | Use the ALBackgroundMovement and ALListeningMovement instead.

#### Run_dialog is deprecated and disabled

Collaborative Dialog management is now fully integrated: as a consequence, former Run_dialog applications are now useless.

In order to avoid redundant call and potential conflicts, an empty Run_dialog application is now installed as a system application on the robot, preventing former version to override it.

#### ALDialog: deprecated methods

Deprecated Methods | Instead, use ...
--- | ---
`ALDialogProxy::setASRConfidenceThreshold` | `ALDialogProxy::setConfidenceThreshold`
`ALDialogProxy::getASRConfidenceThreshold` | `ALDialogProxy::getConfidenceThreshold`

- `ALDialogProxy::startApp`
- `ALDialogProxy::startUpdate`

#### ALBasicAwareness: deprecated methods

Deprecated Methods | Instead, use ...
--- | ---
`ALBasicAwarenessProxy::startAwareness` | `ALBasicAwarenessProxy::setEnabled`
`ALBasicAwarenessProxy::stopAwareness` | `ALBasicAwarenessProxy::setEnabled`
`ALBasicAwarenessProxy::isAwarenessRunning` | `ALBasicAwarenessProxy::isRunning`

## Emotion

### Emotion - New services

#### New service: ALMood

ALMood reads instantaneous emotion of persons and ambiance.

For further details, see: ALMood.

## Motion

### Motion - New services

#### New service: ALAnimationPlayer

ALAnimationPlayer allows you to run animations. This service is a wrapper of ALBehaviorManager, its goal is to have an easy way to start animations according to animation tags or the current posture of the robot.

ALAnimationPlayer is used by ALAnimatedSpeech and brings some new features to this module (dynamic selection of animations depending on robot position and model).

For further details, see: ALAnimationPlayer.

#### ALNavigation: New experimental exploration APIs

ALNavigation implements new APIs dedicated to exploration & localization.

Warning

This is still a work in progress, and API may change in the future.

For further details, see: Mapping and Localization and Exploration API.

### Motion - Improvements

#### ALMotion move methods improved

Pepper: Leg animations are now supported during move.

The former limitations during a Move command, are now removed. It is now possible to generate animation on the leg joints, using directly: HipPitch, KneePitch and even HipRoll joint.

#### ALMotion: wakeUp method improved

- `ALMotionProxy::wakeUp`: if the robot is already stiffened, the call returns True immediately.

#### ALMotion: new event

- `ALMotion/RobotPushed()`

#### ALTracker: new methods

- `ALTrackerProxy::getMaximumAcceleration`
- `ALTrackerProxy::getMaximumVelocity`
- `ALTrackerProxy::setMaximumAcceleration`
- `ALTrackerProxy::setMaximumVelocity`

#### Obstacle avoidance for ALRecharge

ALRecharge now uses `ALNavigationProxy::navigateTo` when going to the Charging station from far distance, so he is able to avoid obstacles.

#### ALRecharge: new events

- `ALRecharge/CloseToChargingStation()`
- `ALRecharge/MoveFailed()`
- `ALRechargeProxy::adjustDockingPosition`
- `ALRechargeProxy::getUseTrackerSearcher`
- `ALRechargeProxy::setUseTrackerSearcher`
- `ALRechargeProxy::setMaxNumberOfTries`
- `ALRechargeProxy::getMaxNumberOfTries`

- `ALRecharge/DockingBackwardStarted()`
- `ALRecharge/DockingUTurnStarted()`

#### ALRecharge: new error code

The following method now returns an ALValue containing an int errorcode:

- `ALRechargeProxy::lookForStation`

The following methods now returns an int errorcode:

- `ALRechargeProxy::moveInFrontOfStation`
- `ALRechargeProxy::dockOnStation`
- `ALRechargeProxy::leaveStation`

For further details, see: errorcode.

#### Push Recovery reflex improved

Push recovery reactivity has been improved, allowing a stronger reaction of the robot to a potential fall.

For further details, see: Push Recovery.

### Motion - Deprecated

#### ALRobotPose: module removed

Use ALRobotPosture instead.

Removed methods

- ALRobotPose::getActualPoseAndTime
- ALRobotPose::getPoseNames

Removed event

- `robotPoseChanged()`

Removed ALMemory Keys

- `robotPose`
- `robotPoseSince`

#### ALMotion: deprecated methods

- `ALMotionProxy::setBreathConfig`
- `ALMotionProxy::getBreathConfig`

Now ALBackgroundMovement configures the breathing animation automatically.

#### ALMotion: deprecated event

Deprecated Event | Instead, use ...
--- | ---
`ALMotion/Safety/RobotPushed()` | `ALMotion/RobotPushed()`

#### ALRecharge: deprecated method

`ALRechargeProxy::stopAll` is deprecated.

This call may not operate during critical operation like docking or undocking.

## Audio

### Audio - Improvements

#### Language management improved and secured

An application cannot anymore permanently change the language of the robot: setLanguage methods scope is now limited to the application.

For further details, see: How to temporarily change the language of the robot.

#### ALTextToSpeech: New API to change the pronunciation of a word

This new API makes it possible to tweak the pronunciation of a word by providing a phonetic transcription.

New methods:

- `ALTextToSpeechProxy::addToDictionary`
- `ALTextToSpeechProxy::deleteFromDictionary`
- `ALTextToSpeechProxy::showDictionary`

#### ALSpeechRecognition: VOCON 4.7 update

Vocon is the embedded part of the Nuance Vocon hybrid distribution. It segments and processes speech utterances on the robot without server access.

New features in the 4.7 update:

- Increased performance

  During our tests, the speech recognition latency was reduced by 15%. Nuance claims the reduction can be as good as 20%.

- Updated mandarin Chinese acoustic models

  The new acoustic models improve the handling of tonal information for standard Mandarin Chinese, and reduces the error rate.

#### ALTextToSpeech: Increase Speech Volume

Japanese Voice only

When the speech volume is already at its maximum, and the gain hardware cannot be increased, the speech volume can be increased with an audio dynamic compressor. This audio dynamic compressor will be applied on the voice only (not on the other played sounds). It will increased the perceived volume of the voice.

For further details, see: `ALTextToSpeechProxy::setParameter`

Configuration Required: new version of Japanese language package.

### Audio - Deprecated

#### ALSpeechRecognition: deprecated methods

The following methods are deprecated and not effective anymore:

- `ALSpeechRecognitionProxy::getAudioExpression`
- `ALSpeechRecognitionProxy::setAudioExpression`
- `ALSpeechRecognitionProxy::setVisualExpression`

The robot uses new sign & feedback instead.

#### ALSpeechRecognition: deprecated usage

New sign & feedback makes ALSpeechRecognition module almost deprecated.

Warning

ALSpeechRecognition is a low level module, offering elementary speech recognition functions, which are fully integrated in ALDialog.

Therefore, it is highly recommended to prefer the usage of ALDialog.

Notably, a direct usage of ALSpeechRecognition does not trigger the Listening feedback described in Talking with Pepper section.

For further details, see: New sign & feedback.

#### ALAnimatedSpeech: deprecated methods

Deprecated Methods | Instead, use ...
--- | ---
`ALAnimatedSpeechProxy::setBodyLanguageMode` | `ALSpeakingMovementProxy::setMode` and `ALSpeakingMovementProxy::setEnabled`
`ALAnimatedSpeechProxy::setBodyLanguageModeFromStr` | `ALSpeakingMovementProxy::setMode` and `ALSpeakingMovementProxy::setEnabled`
`ALAnimatedSpeechProxy::getBodyLanguageMode` | `ALSpeakingMovementProxy::getMode` and `ALSpeakingMovementProxy::isEnabled`
`ALAnimatedSpeechProxy::getBodyLanguageModeToStr` | `ALSpeakingMovementProxy::getMode` and `ALSpeakingMovementProxy::isEnabled`
`ALAnimatedSpeechProxy::addTagsToWords` | `ALSpeakingMovementProxy::addTagsToWords`

## Vision

### Vision - Improvements

#### ALVisionRecognition: New API for database management and to work on files

API for database management:

- `ALVisionRecognitionProxy::clearCurrentDatabase`
- `ALVisionRecognitionProxy::getSize`

New methods to learn and detect objects from image files:

- `ALVisionRecognitionProxy::detectFromFile`
- `ALVisionRecognitionProxy::learnFromFile`

New methods to control the number of objects that can be detected at the same time, in the same image:

- `ALVisionRecognitionProxy::getMaxOutObjs`
- `ALVisionRecognitionProxy::setMaxOutObjs`

### Vision - Deprecated

#### ALCloseObjectDetection: disabled and deprecated module

The results provided by ALCloseObjectDetection were not satisfactory. It does not deserve to be tested further, please do not use it anymore.

Furthermore, on Pepper V1.8, ALCloseObjectDetection is not available at all.

For further details, see: alcloseobjectdetection.

## People Perception

### People Perception - Improvements

#### ALFaceCharacteristics: New memory key with the facial features coordinates

- `PeoplePerception/Person/<ID>/FacialPartsProperties`

This memory key contains, for a given user, the coordinates of all detected facial features.

#### ALPeoplePerception: performances improved

People detection is thwarted by a strong back light. However, improvements have been made, so some cases, previously in failure, now give better results.

## Sensors & LEDs

### Sensors & LEDs - New services

#### New service: ALTactileGesture

ALTactileGesture is intended to manage tactile gestures on the head sensors.

With ALTactileGesture, you can:

- Detect tactile gestures performed on the head sensors,
- Respond to tactile gestures via qi.Signals and ALMemory events,
- Create new tactile gestures on-the-fly.

For further details, see: ALTactileGesture.

### Sensors & LEDs - Improvements

#### ALTouch: new event

- `BackBumperPressed()`

### Sensors & LEDs - Deprecated

#### ALInfrared: deprecated module

ALInfrared has been deprecated and removed, use WiFi instead.

### Python SDK

#### Python SDK includes the `qicore` module

Starting with 2.5.0, the Python SDK includes the `qicore` module, which should allow you to use `qiFile` from Python.

This means that the filesystem hierarchy inside the SDK had to change, you can no longer set PYTHONPATH to where you have extracted the Python SDK.

Instead:

- On Mac and Linux you have to set `PYTHONPTAH` to `/path/to/python/sdk/lib/python2.7/site-packages`.
- On Windows you have to set `PYTHONPATH` to `C:\path\to\python\sdk\lib`.

For further details, see: Python SDK - Installation Guide.

#### Mac: link with the Python libraries coming from Python.org

On Mac we now link with the Python libraries coming from Python.org, instead of using the Python libraries provided by Apple.

This means you have to install Python from python.org and make sure to use `/usr/local/bin/python` when using the Python SDK on Mac.

For further details, see: Python SDK - Installation Guide.

### C++ SDK

#### Windows: Visual Studio 2013 instead of 2010

Visual Studio 2013 is now supported, replacing Visual Studio 2010.

Note that 2013 is mandatory because our SDK now implements the C++ 11 features available in Visual Studio 2013.

For further details, see: Supported Compiler and IDE.

### qi Framework

#### New: qi::Clock, guaranteed system-wide, useful for time-stamping things

libqi exposes several clocks, each of which having a distinctive set of properties.

For further details, see: qi clocks and qi Framework - ChangeLog.

This release Note was generated on 2021-10-01.

Glossary Site map Index Support Contact Legal Notices