A Unified Approach to Dynamic Control of Robots