Thanks to BasicAwareness the robot:
Waiting for stimuli
Reacts to stimuli such as:
Looks in the direction of the stimulus with his head and body.
Comes back to a neutral position if he found nobody, tracks the person otherwise.
Tracking detected human
Follows the engaged person with his head and body.
For optimal detection and tracking, it is recommended to run a LocalizeAndMap to map the environment, and then a Localize to keep the robot localized inside his environment. Using his map, Pepper has an (almost) 360° awareness, using his base sensors.