Navigation with random obstacle

NAO stands up and waits for someone to hand a piece of paper. When the paper is handed over the person touches his head and NAO starts looking for the trash bin. When it visualizes the trash bin it starts moving towards it but all of a sudden an obstacle is placed on his way. NAO modifies his path for avoiding the bin and reaches safely the trash bin. When it is arrived it approaches the bin to throw the paper. When NAO has finished his job, he "feels" tired. A person arrives, touches his head and he start resting in the crouch position.