Dynamic simulation of robots interacting with stiff contact surfaces