Wrist device for a robot