Iterative learning control of robots with elastic joints