Integration of Humanoid Robots in Collaborative Working Environment: A case study on motion generation