At least one teat cup (111, 112, 113, 114) is automatically fetched from a teat cup magazine (120) in which each teat cup has a respective fixed position. A reference entity (160) has a fixed spatial relationship to the teat cup magazine and each teat cup stored therein. A remote detecting means (130) registers wireless energy (135) reflected by the reference entity, and based thereon determines a respective position for the at least one teat cup relative to a robotic arm (150). The robotic arm carries a gripper means (140) configured to hold at least one teat cup during removal thereof from the teat cup magazine. The reference entity is configured to allow the remote detecting means to receive wireless energy reflected against the reference entity while moving the robotic arm towards the least one teat cup for removing the at least one teat cup from the teat cup magazine. Hence, an adequate control of the robotic arm and its gripper means is facilitated.