Motion planning for humanoid walking in a layered environment | Synapse