Topological duality in humanoid robot dynamics