ALEngagementZones

NAOqi PeoplePerception - Overview | API


What it does

ALEngagementZones allows you to classify detected people and/or movements using their position in space with respect to the robot and the Concept of engagement zones.

Concept of engagement zones

The space in front of the robot is divided in configurable zones. Thus, you can adapt the behavior of the robot depending on the zone a person or a movement is detected in.

How it works

Zone definition

The Engagement zones are defined by the following parameters:

Name Defines... Settings
FirstDistance “near” ALEngagementZonesProxy::setFirstLimitDistance()
SecondDistance “farther” ALEngagementZonesProxy::setSecondLimitDistance()
LimitAngle “in front” ALEngagementZonesProxy::setLimitAngle()

From these parameters are deduced 3 zones:

  • Zone1 is near, in front,
  • Zone2 is far in front and also near but on the sides,
  • Zone3 is far on the side and also “very far” i.e. beyond SecondDistance.

Default values

  • FirstDistance = 1.5m,
  • SecondDistance = 2.5m and
  • LimitAngle = 90 degrees.
../../_images/engagementzones2.png

Other example

../../_images/engagementzones.png

Getting started

ALEngagementZones allows you to compute the engagement zone of any other object from its position in FRAME_ROBOT, using: ALEngagementZonesProxy::computeEngagementZone().

ALEngagementZones can also be used jointly with other modules. For further details, see:

In Choregraphe, the Robot View allows you to see the engagement zones and also the people detected by ALPeoplePerception.

UseCases

EngagementZones with PeoplePerception

The module ALEngagementZones can be used to compute the engagement zone for each person in the population detected by the module ALPeoplePerception.

Warning

It will only work if ALPeoplePerception has also been subscribed to.

The engagement zone of each person is added to the description of this person in the ALMemory by filling the key PeoplePerception/Person/<ID>/EngagementZone.

The people are then classified depending on their engagement zone. The memory keys EngagementZones/PeopleInZone1, EngagementZones/PeopleInZone2 and EngagementZones/PeopleInZone3 store the list of the IDs of the people in each zone. Each time at least one of these lists is updated, the event EngagementZones/PeopleInZonesUpdated() is raised.

Besides, using ALEngagementZones with ALPeoplePerception also allows you to detect if someone is approaching the robot or moving away:

In order to be able to trigger some behaviors when people enter a specific zone, the events EngagementZones/PersonEnteredZone1(), EngagementZones/PersonEnteredZone2() and EngagementZones/PersonEnteredZone3() are also raised each time when a person leaves one zone to enter another one.

EngagementZones with MovementDetection

The module ALEngagementZones can be used to compute the engagement zone for each movement detected by the module ALMovementDetection.

Warning

It will only work if ALMovementDetection has also been subscribed to.

The people are then classified depending on their engagement zone. The memory keys EngagementZones/LastMovementsInZone1, EngagementZones/LastMovementsInZone2 and EngagementZones/LastMovementsInZone3 store the list of movements in each zone. These movement lists have exactly the same structure as the memory key MovementDetection/MovementInfo, described in ALMovementDetection. Each time at least one of these lists is updated, the event EngagementZones/MovementsInZonesUpdated() is raised.

When no movement has been detected, the event EngagementZones/MovementsInZonesUpdated() is not raised and the movement lists in the previous memory keys stay the same.

Warning

If the robot is not equipped with a 3D sensor, it is not possible to detect the distance of a movement with respect to the robot, thus to determine which engagement zone it belongs to. Therefore, the movements are all stored in each of the memory keys EngagementZones/LastMovementsInZone1, EngagementZones/LastMovementsInZone2 and EngagementZones/LastMovementsInZone3.