1

Is it possible to somehow use the Engagement Zones of NAOqi 2.5 or anything similar in the newer NAOqi 2.9.5 in Android? Or is there any way to still continuously detect people in front of Pepper or close to it? Currently, I am trying to use human awareness for that purpose, but there are no preset zones, and most of the time, Pepper does not recognize anyone.

Sweta Jain
  • 3,248
  • 6
  • 30
  • 50
Yannic
  • 23
  • 2

1 Answers1

0

The API about engagement zones has not been ported to the Qi SDK. However it is not so hard to re-implement it. The documentation describes them as follows:

enter image description here

I found this function isInArc that you can use with the position of the human's head relative to the robot:

fun zoneOfHuman(human: Human, robotFrame: Frame): Int {
  val headFrame = human.headFrame
  val timedTransform = headFrame.computeTransform(robotFrame)
  val transform = timedTransform.transform
  return if (isInArc(transform, 1.5, PI / 2)) 1
    else if (isInArc(transform, 2.5, PI / 2)) 2
    else 3
}

Now you can call that regularly using a Kotlin timer on the human you are interested in, typically the one that Pepper already engages autonomously. Actually you can start an interaction quite reliably without caring about the zones that much.

Victor Paléologue
  • 2,025
  • 1
  • 17
  • 27
  • 1
    Ahh, ok thank you! My approach doesn't look as good, but should work pretty similarily. I thought maybe for the zones Pepper does not need to find a face of a human to approach. But as this seems not to be the case, i will try your solution. Thanks! – Yannic Oct 20 '21 at 16:38
  • Yes, and in fact when a `Human` appears in the `humansAround`, Pepper has already checked its appearance, and often woud have already detected a face. Pepper will engage them as soon as possible. – Victor Paléologue Oct 21 '21 at 09:09