ApproachHuman


level_6


Goal - Make Pepper come closer to a specific human in order to start the interaction with them.

// Get a human.
val human = ...

// Build the action.
val approachHuman = ApproachHumanBuilder.with(qiContext)
                                        .withHuman(human)
                                        .build()

// Run the action asynchronously.
approachHuman.async().run()
// Get a human.
Human human = ...;

// Build the action.
ApproachHuman approachHuman = ApproachHumanBuilder.with(qiContext)
                                                  .withHuman(human)
                                                  .build();

// Run the action asynchronously.
approachHuman.async().run();

Typical usage - With ApproachHuman action Pepper can be more proactive. He does not need to wait for people to approach him, now Pepper can directly move towards them and invite them to interact with him.

If ApproachHuman action finishes with success, with EngageHuman action Pepper can start an interaction with the approached human.


How it works

Whom should Pepper try to approach?

level_6

Pepper should try to approach humans who are interested in the robot but are not at ease enough to approach him and start the interaction with him on their own.

HumanAwareness gives a suggestion via getRecommendedHumanToApproach method:

val humanAwareness = qiContext.humanAwareness
val recommendedHuman = humanAwareness.recommendedHumanToApproach
HumanAwareness humanAwareness = qiContext.getHumanAwareness();
Human recommendedHuman = humanAwareness.getRecommendedHumanToApproach();

Warning

getRecommendedHumanToApproach returns null if there is no recommended human to approach.

The recommendation is made based on engagement intention state of a human, as well as his distance from the robot. Moreover, preference is given to humans who were not already approached by the robot.

The approach phase

After finding a human to approach, the approach phase starts by building the ApproachHuman action:

val approachHuman = ApproachHumanBuilder.with(qiContext)
                                        .withHuman(recommendedHuman)
                                        .build()

approachHuman.async().run()
ApproachHuman approachHuman = ApproachHumanBuilder.with(qiContext)
                                                  .withHuman(recommendedHuman)
                                                  .build();

approachHuman.async().run();

Warning

Make sure the flap is closed before running the ApproachHuman action because otherwise the robot won’t be able to move toward the human.

Possible interruptions

level_6

The robot’s path toward the targeted human can be interrupted due to multiple reasons such as moving or static obstacles, other humans approaching the robot, etc.

OnHumanIsTemporarilyUnreachableListener listener can be used to create robot behaviors to continue attracting the human statically, for example by verbally inviting them for an interaction with him.

val approachHuman = ApproachHumanBuilder.with(qiContext)
    .withHuman(recommendedHuman)
    .build()

approachHuman.addOnHumanIsTemporarilyUnreachableListener {
    val say = SayBuilder.with(qiContext)
                        .withText("I have troubles to reach you, come closer!")
                        .build()
    say.run()
}

approach = approachHuman.async().run()
ApproachHuman approachHuman = ApproachHumanBuilder.with(qiContext)
        .withHuman(recommendedHuman)
        .build();

approachHuman.addOnHumanIsTemporarilyUnreachableListener(() -> {
    Say say = SayBuilder.with(qiContext)
                        .withText("I have troubles to reach you, come closer!")
                        .build();
    say.run();
});

approach = approachHuman.async().run();

Performance & Limitations

Signs and feedback

Pepper’s movement is accompanied by animations and sounds that make his intentions more clear to humans around him. To signify that he is moving toward a certain human, Pepper will raise his right hand in the direction of this human. If Pepper’s movement is interrupted, he will show surprise with an “oh” sound.

No obstacle avoidance

Pepper is moving in a straight line toward the targeted human and he is not able to avoid obstacles on the way. As previously explained, in case of an obstacle Pepper can start static attract strategy.

Lost target

Approach can fail if Pepper does not detect the approached human anymore.

Detection of humans

Human detection is multimodal, it is based on cameras and laser/sonar measurements. For an optimal performance, it is advised to map the environment and localize the robot, as explained in LocalizeAndMap.

See also