A Multitasking Architecture for Humanoid Robot Programming