Search code examples
pythonnao-robotpepperchoregraphe

Making Pepper to look around the place


Is it possible to make Pepper to look around the room until it detects face/landmark or until some condition satisfaction (such as timer expiration for example)?

I have tried for first iteration to make Pepper rotate 360 degrees with ALMotion.moveTo(0, 0, 0.0174533 * 360) but during this rotation face/landmarks could not be detected.


Solution

  • There is no incompatibility between doing ALMotion.moveTo, and looking for faces etc. - normally whatever you're doing for face/landmark detection work whether or not Pepper is moving.

    Worth knowing, from the documentation:

    • the angle parameter should be in radians, not degrees

    • You can pass a fourth parameter, the time in second to do this move, so you can control pepper's rotation speed (Maybe pepper is going too fast, and that's why she isn't seeing anything?)

    As soon as you see something, call ALMotion.stopMove().