Decoupling and feedback linearization of robots with mixed rigid/elastic joints