I think you're on the right track. Some joints have more than one axis, e.g. revolute2, so the index specifies which axis to to control. I think the ur3 robot only has revolute joints so the index should be 0. The SetForce call still works in your example because the ODE revolute joint implementation ignores the index value.