Ok I think I better understand what you are trying to do. Actually, with @Clement we are working on the Explauto library (cf. this post). You can also find here an example of an under-actuated pendulum and how it can be controlled (an exemple can be seen here).
That’s very interesting! It makes me even more convinced that this is also the way to go for robotics.