Milking arrangement, computer-implemented method, computer program and non-volatile data carrier
Patent Information
- Application Number
- PCT/SE2026/050231
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-04-14
- Filing Date
- 2026-04-02
- Publication Date
- 2026-10-22
Smart Images

Figure SE2026050231_22102026_PF_FP_ABST
Abstract
Description
[0001] Milking Arrangement, Computer-Implemented Method, Computer Program and Non-Volatile Data Carrier
[0002] TECHNICAL FIELD
[0003] The present invention relates generally to automatic milking of dairy animals. Especially, the invention relates to a milking arrangement according to the preamble of claim 1 and a corresponding computer-implemented method. The invention also relates to a computer program and a non-volatile data carrier storing such a computer program.
[0004] BACKGROUND
[0005] It is challenging to achieve fully automatic milking of dairy animals. This is particularly the case if high operational reliability, cost-efficiency, robustness and animal friendliness are factored in. Various types of so-called robot milking systems are known, for example where the animals are milked on a voluntary basis. However, for instance, automatic milking systems may also be employed together with milking parlors of herringbone type or where the animals are milked on a rotating platform. Below follows some specific examples of solutions that are applicable in automatic milking systems.
[0006] EP 1 996 010 discloses a teat location system for automated milking systems that comprises a light projection source and a camera having a two dimensional array of pixels, each of which is capable of returning time of flight information as well as intensity. Depth of field limitations and the problem of overlapping teat images are thereby overcome or minimized.
[0007] EP 3 241 431 describes a method for performing a teat-related operation on a dairy animal in an animal-positioning area using a robot device. The robot device has a robot arm with a camera and a teat-treating device. The method comprises providing the robot arm outside the animal-positioning area, at least once performingdetermining an image of the environment by means of the camera, searching for a leg in the image, if no leg has been recognised in the image: displacing the robot arm in longitudinal direction outside the animal-positioning area until a leg has been recognised in the image, determining the longitudinal position of the leg with respect to the camera, displacing the robot arm in the direction of a predetermined position range with respect to the determined leg as long as the determined position is not in the predetermined position range, displacing the end part of the robot arm at right angles to the longitudinal direction from outside the animal-positioning area as far as under the dairy animal, and performing the teat-related operation.
[0008] Thus, technical solutions are known for locating the teats of a dairy animal and repositioning a robot arm so that the robot arm reaches a particular teat being the subject of a teat-related operation. However, there is no solution that provides an overall efficient means to ensure that a robot arm may reach all the animal’s teats from a given position for the basis of the robot arm considering the fact that the animal might move during the teatcup-attachment procedure.
[0009] SUMMARY
[0010] The object of the present invention is therefore to offer a solution that mitigates the above problem, and thus allows animal movements during the teatcup-attachment procedure while ensuring that the robot arm is capable of attaching all teatcups.
[0011] According to one aspect of the invention, the object is achieved by a milking arrangement that includes a milking box, a robot arm, a controller and at least one displacing member. The milking box is adapted to hold one dairy animal at the time during a milking session. The milking box has a bottom surface with a general rectangular shape extending in a length dimension and a width dimension respectively. The robot arm is adapted to attach at least two teatcups to respective at least two teats of the dairy animal when the dairy animal is held in the milking box. The robot arm is arranged along a first side of the milking box, which first side extends in thelength dimension. The robot arm carries a camera that is configured to register range image data representing the teats of the dairy animal. The controller is configured to obtain the range image data, and based thereon control the robot arm to attach the at least two teatcups to the respective at least two teats. In response to control signals from the controller, the at least one displacing member is configured to prompt the dairy animal to move along at least one of the length and width dimensions in the milking box. After having controlled the robot arm to attach a first teatcup to a first teat of the dairy animal, the controller is specifically configured to determine, based on the range image data, if a second teat is positioned within a reach of an end effector of the robot arm to which second teat a second teatcup is to be attached. If the second teat is not positioned within said reach, the controller is further configured to control at least one of the at least one displacing member to prompt the dairy animal to move in such a direction that after the movement the second teat is expected to be within said reach. It is worth noting that, according to the invention, the second teatcup may be any teatcup attached after the first teatcup, i.e. for example a third or a fourth teatcup.
[0012] This milking arrangement is advantageous because it allows that a basis for the robot arm is arranged at a given position relative to the milking box while ensuring that all teatcups can be attached to the animal in a safe, reliable and animal-friendly manner. Moreover, the camera that is used to guide the end effector to attach the teatcups may also be employed to determine whether one or more displacing members shall be activated to prompt the dairy animal to move.
[0013] According to one embodiment of this aspect of the invention, after that the at least one of the at least one displacing member has been controlled to prompt the dairy animal to move, the controller is configured to control the robot arm to attach the second teatcup to the second teat only if, based on the range image data, the second teat is expected to be within said reach. In other words, the controller is configured to double check that the animal has actually moved as intended before initiating the teatcup attachment. Naturally, thisis advantageous both from a safety perspective and with respect to the chances of succeeding with the teatcup attachment.
[0014] Preferably, after having controlled the robot arm to attach the second teatcup to the second teat, the controller is further configured to control the at least one of the at least one displacing member to return to a position in which it avoids prompting the dairy animal to move. Namely, once the second teatcup is attached, there is no need to restrict the animal’s movements. On the contrary, at this point in time it is typically beneficial to allow her to move freely within the boundaries of the milking box.
[0015] According to another embodiment of this aspect of the invention, the controller is configured to derive at least one spatial coordinate, such as a three-dimensional position of the second teat based on the range image data. Namely, based on this type of data it is straightforward to control the end effector of the robot arm to move appropriately to the teat and attach a teatcup thereto.
[0016] According to yet another embodiment of this aspect of the invention, the reach of the robot arm comprises a volume within the milking box, which volume adjoins the first side of the milking box and which volume encompasses a work envelope of the end effector. The work envelope defines an entire space that can be reached by the end effector. Thus, the reach is defined as all points in space that are reachable by the end effector from the position at which the basis for the robot arm is arranged.
[0017] Consequently, the basis of the robot arm is arranged at a given position relative to the first side of the milking box and the volume that comprises the work envelope of the end effector is delimited by spatial coordinates that have a fixed relationship to the given position. The position for the basis of the robot arm, however, may be adjustable, at least along the length dimension of the milking box. According to still another embodiment of this aspect of the invention, the controller is configured to determine if the second teat is positioned within the reach of the end effector through a process that comprises checking if the at least one spatial coordinate ofthe second teat is within a range of spatial coordinates delimiting the volume that comprises the work envelope of the end effector. Thereby, the controller may conveniently determine how to control one or more of the displacing members to achieve a desired movement of the dairy animal.
[0018] According to further embodiments of this aspect of the invention, the at least one displacing member comprises one or more of: a first push member configured to drive the dairy animal to move in a first direction along the length dimension of the milking box, e.g. towards an entry gate adapted to allow the dairy animal into the milking box when the entry gate is positioned in an open state; a second push member configured to drive the dairy animal to move in a second direction along the length dimension of the milking box, e.g. towards an exit gate adapted to allow the dairy animal to leave the milking box when the exit gate is positioned in an open state, and a fourth push member configured to drive the dairy animal to move in a fourth direction along the width dimension of the milking box, e.g. towards the first side where the basis of the robot arm is located. Here, the controller is configured to generate each of the first, second and fourth control signals respectively. Thus, the controller may conveniently prompt the dairy animal to position herself where the end effector reaches the teat to which a given teatcup is to be attached. According to one embodiment of this aspect of the invention, at least one of the at least one displacing member is configured to abutt the dairy animal to drive the dairy animal to move. Le. the displacing member is adapted to make physical contact with the dairy animal at least during a part of the period when the displacing member operates. For example, the displacing member may be represented by a swivellable or slidable bracket, plate and / or rod.
[0019] According to another embodiment of this aspect of the invention, additionally or alternatively, one or more of the displacing member may comprise an attraction member that, in response to a third control signal from the controller, is movable in at least one of the first and second directions, and is adapted to contactlessly stimulate the dairy animal to move in the forward and / or backward directions res-pectively. Thereby, the dairy animal may be controlled efficiently based on positive stimuli in combination with, or as an alternative to, the above physically contacting control means.
[0020] According to another aspect of the invention, the object is achieved by a computer-implemented method, which is executed in a processing unit in a controller, which controller, in turn, is included in the above-proposed milking arrangement. The method involves obtaining the range image data, and based thereon controlling the robot arm to attach the at least two teatcups to the respective at least two teats. Specifically, the method involves controlling the robot arm to attach a first teatcup to a first teat of the dairy animal, and thereafter determining, based on the range image data, if a second teat is positioned within a reach of an end effector of the robot arm to which second teat a second teatcup is to be attached. If the second teat is not positioned within said reach, the method further involves controlling at least one of the at least one displacing member to prompt the dairy animal to move in such a direction that after the movement the second teat is expected to be within said reach. The advantages of this method, as well as the preferred embodiments thereof, are apparent from the discussion above with reference to the proposed animal handling system.
[0021] According to a further aspect of the invention, the object is achieved by a computer program loadable into a non-volatile data carrier communicatively connected to at least one processing unit. The computer program includes software for executing the above method when the program is run on the at least processing unit. According to another aspect of the invention, the object is achieved by a non-volatile data carrier containing the above computer program.
[0022] Further advantages, beneficial features and applications of the present invention will be apparent from the following description and the dependent claims.
[0023] BRIEF DESCRIPTION OF THE DRAWINGSThe invention is now to be explained more closely by means of preferred embodiments, which are disclosed as examples, and with reference to the attached drawings.
[0024] Figure 1 illustrates the outline of a generic milking box according to one embodiment of the invention;
[0025] Figures 2a-b schematically illustrate the reach of an end effector of a robot arm according to one embodiment of the invention;
[0026] Figures 3 - 4 show side and top views respectively of a milking box according to one embodiment of the invention; and
[0027] Figure 5 illustrates, by means of a flow diagram, the general method according to the invention.
[0028] DETAILED DESCRIPTION
[0029] Figure 1 illustrates the outline of a generic milking box 110 according to one embodiment of the invention.
[0030] The milking box 110 is adapted to hold one dairy animal at the time during a milking session. The milking box 110 may be included in any type of milking parlor where each animal is milked individually, such as for example a herringbone milking parlor or a milking parlor on a rotating platform. The milking box 110 has a bottom surface 111 with a general rectangular shape extending in a length dimension x and a width dimension y respectively. If the milking box 110 is located on a rotating platform, the length sides of the milking box 110 are typically not completely parallel to one another because here the bottom surface 111 has the general shape of a truncated triangle. In this disclosure, however, such a shape is also considered to be a general rectangular shape.
[0031] A milking arrangement is associated with the milking box 110, which milking arrangement includes a robot arm 220 that is adapted to attach at least two teatcups to respective at least two teats of the dairy animal when the dairy animal is held in the milking box 110.Referring now also to Figure 3 that shows a side view of the milking box 110, we see that the robot arm 220 is arranged along a first side rx of the milking box 110, which first side rx extends in the length dimension x. Preferably, a basis 221 of the robot arm 220 is arranged at a given position (XP, yp, ZP) relative to the first side rx of the milking box 110 and an end effector 227 of the robot arm 220 has a reach R that covers a volume within the milking box 110, which volume adjoins the first side rx. The volume, in turn, is delimited by spatial coordinates that have a fixed relationship to the given position (XP, yp, ZP) of the basis 221 of the robot arm 220. The position (XP, yp, ZP) may be adjustable, preferably at least along the length dimension x of the milking box 110.
[0032] The robot arm 220 carries a camera 225 that is configured to register range image data Dimg3D representing the teats of the dairy animal A, i.e. the range image data Dimg3D indicate respective distances between an image plane in the camera 225 and different imaged elements in front of the camera 225.
[0033] A controller 230 is configured to obtain the range image data Dimg3D, and based thereon control the robot arm 220 to attach the at least two teatcups to the respective at least two teats. Referring now to Figures 2a and 2b, the controller 230 is configured to control the robot arm 220 to attach a first teatcup TC to a first teat T1 of the dairy animal A.
[0034] Thereafter, based on the range image data Dimg3D, the controller 230 is configured to determine, if a second teat T2, T3 or T4 is positioned within the reach R of the end effector 227 to which second teat T2, T3 or T4 a second teatcup is to be attached. If the second teat T2, T3 or T4 is positioned within the reach R, the controller 230 controls the end effector 227 to attach the second teatcup to the second teat T2, T3 or T4.
[0035] If, however, the second teat T2, T3 or T4 is not positioned within the reach R, the controller 230 is configured to control at least one displacing member 241 , 242, 243 and / or 244, which is included in the milking arrangement such that the at least one displacing member 241 , 242, 243 and / or 244 respectively prompts the dairy animalA to move along at least one of the length and width dimensions x and / or y respectively in the milking box 110 in such a direction Mxythat after the movement the second teat T2, T3 or T4 is expected to be within the reach R. According to embodiments of the invention, the displacing members 241 , 242, 243, 244 may for example be represented by one or more cylindric elements, such as bar or rods, brackets, plates or one or more of the gates via which the dairy animal A enters or leaves the milking box 110.
[0036] According to one embodiment of the invention, after that the at least one displacing member 241 , 242, 243 and / or 244 has been controlled to prompt the dairy animal A to move, the controller 230 is configured to control the robot arm 220 to attach the second teatcup to the second teat T2, T3 or T4. This, however, is effected if and only if, based on the range image data Dimg3D, the second teat T2, T3 or T4 is expected to be within the reach R of the end effector 227 on the robot arm 220.
[0037] Thus, should the range image data Dimg3D indicate that the second teat T2, T3 or T4 is expected to be outside of said reach R, the controller 230 is preferably configured to again control the at least one displacing member 241 , 242, 243 and / or 244 to prompt the dairy animal A to move in such a direction, say Mxy, that after the movement the second teat T2, T3 or T4 is expected to be within the reach R.
[0038] According to one embodiment of the invention, the controller 230 is configured to derive at least one spatial coordinate of the second teat to which the teatcup is to be attached based on the range image data Dimg3D. For example, the controller 230 may be configured to derive a respective spatial coordinate of each teat tip to which no teatcup has been attached yet.
[0039] Figure 2a exemplifies a scenario where the first teatcup TC has been attached to the first teat T1 of the dairy animal A. Here, we assume that the dairy animal A was positioned such that the first teat T1 was within the reach R when the first teatcup TC was attached. However, subsequently the dairy animal A has moved, for example in response to the teatcup attachment, so that the teats T1 ,T3 and T4 have become positioned outside the reach R. Figure 2a also represents a spatial coordinate (xn, yn, zn), (X21 , 21 , Z21 ), (X31, ysi, Z31) and (X41, y4i, Z41) for each of the teats T1 , T2, T3 and T4 at a first point in time after that the first teatcup TC has been attached, which spatial coordinates (xn, yn, zn), (X21 , y2i , Z21 ), (X31, ysi, Z31) and (X41, y4i, Z41) have been derived by the controller 230 based on the range image data Dimg3D, and preferably designates a three-dimensional position, i.e. a respective position in each of the x, y and z dimensions.
[0040] Technically, at the first point in time illustrated in Figure 2a, the robot arm 220 would be able to attach the second teatcup to the teat T2. However, this would risk driving the dairy animal A even further away from the basis 221 of the robot arm 220 and render the attachment of additional teatcups more difficult, or impossible.
[0041] Therefore, the controller 230 is preferably configured to control at least one of the displacing member 241 , 242, 243 and / or 244 to prompt the dairy animal A to move M1 , M2, M21 and / or M3 respectively in such a direction Mxythat after the movement all the teats to which no teatcup has yet been attached, i.e., T2, T3 and T4 are expected to be within the reach R. Here, the controller 230 may for example be configured to control a first displacing member 241 to prompt the dairy animal A to move backwards D1x, i.e. in a negative x-direction and control a second displacing member 244 to prompt the dairy animal A to move sideways towards D3y, i.e. in a negative y-direction so that the overall direction Mxypoints backwards D1x and sideways D3y, so that after the movement the respective spatial coordinates (X12, yi2, Z12), (X22, y22, Z22), (X32, y32, Z32) and (X42, y42, Z42) of all the teats T2, T3 and T4 respectively are expected to be within the reach R. Figure 2b illustrates this situation at a second point in time after the first point in time that is illustrated in Figure 2a.
[0042] According to one embodiment of the invention, the controller 230 is configured to determine if the second teat T2, T3 or T4 is positioned within the reach R of the end effector 227 through a process that comprises checking if the at least one spatial coordinate of thesecond teat in question T2, T3 or T4, i.e. , (X21, 21, Z21), (X31, ysi, z3i), (X41, y4i, Z41), (X22, y22, Z22), (x32, y32, Z32) and (X42, y42, Z42) respectively is within a range of spatial coordinates, which delimits the volume that comprises the work envelope of the end effector 227.
[0043] Figure 3 shows a side view of the milking box 110 according to one embodiment of the invention and Figure 4 shows a corresponding top view of the milking box 110. Inter alia, Figures 3 and 4 exemplify the above-mentioned displacing members. For instance, according to one embodiment of the invention, the milking arrangement may include a displacing member that contains a first push member 241 configured to drive the dairy animal A to move in a first direction D1x along the length dimension x of the milking box 110 in response to a first control signal C1 generated by the controller 230. The first push member 241 may here contain one or more cylindershaped elements, such as bars and / or rods.
[0044] According to one embodiment of the invention, the milking arrangement includes a displacing member that contains a second push member 242 configured to drive the dairy animal A to move in a second direction D2x along the length dimension x of the milking box 110 in response to a second control signal C2 generated by the controller 230. Analogous to the above, the second push member 242 may contain one or more cylinder-shaped elements, such as bars and / or rods. However, each of the first and second push members 241 and 242 may equally well include an alternative type of element, for instance in the form of a swivellable or slidable bracket and / or plate. Preferably, a swivellable type of second push member is connected to at least one axle 441a, 441 b or 442a, 442b respectively, which, in turn, is mounted on the milking box 110.
[0045] For example, the first and second directions D1x and D2x may be opposite to one another, and the first push member 241 may be configured to drive the dairy animal A to move in a backward direction towards an entry gate 271 that is adapted to allow the dairy animal A into the milking box 110 when the entry gate 271 is positioned in an open state. Analogously, the second push member 242may be configured to drive the dairy animal A to move in a forward direction towards an exit gate 272 adapted to allow the dairy animal A to leave the milking box 110 when the exit gate 272 is positioned in an open state. Alternatively, or in addition thereto, the entry gate 271 and / or the exit gate 272 itself may include one or more element which is also configured to function as a push member that is controllable in response to a control signal generated by the controller, such that the controller 230 may prompt the dairy animal A to move in such a direction that after the movement the second teat, say T2, T3 orT4, is expected to be within the reach R of the end effector 227.
[0046] According to one embodiment of the invention, at least one of the displacing members contains a third push member 244 that is configured to drive the dairy animal A to move in a third direction D3y along the width dimension y of the milking box 110 in response to a fourth control signal C4 generated by the controller 230. Here, the third direction D3y is preferably aimed towards the first side rx of the milking box 110 where the robot arm 220 is arranged. This namely improves the chances of positioning the second teat, say T2, T3 or T4, within the reach R of the end effector 227.
[0047] According to one embodiment of the invention, at least one of the displacing members is configured to abutt the dairy animal A to drive the dairy animal A to move. This means that the displacing member in question is adapted to make physical contact with the dairy animal A at least temporarily while causing the dairy animal A to move. Alternatively, or in addition thereto, according to one embodiment of the invention, at least one of the displacing members includes at least one attraction member 243 that, in response to a third control signal C3 generated by the controller 230, is movable in at least one of the first and second directions D1x and / or D2x, which at least one attraction member 243 is adapted to contactlessly stimulate the dairy animal A to move M21 in the forward and / or backward directions respectively. Slidable water bowls and feeding troughs constitute examples of such attraction members 243.
[0048] According to one embodiment of the invention, after having control-led the robot arm 220 to attach the second teatcup to the second teat T2, T3 and / or T4, the controller 230 is further configured to control the at least one displacing member 241 , 242, 243 and / or 244 to return to a position in which it avoids prompting the dairy animal A to move. In other words, when the displacing member in question has completed its prompting task it may return to a neutral position in which it does not have any prompting function.
[0049] It is generally advantageous if the controller 230 is configured to effect the above procedure in an automatic manner by executing a computer program. Therefore, the controller 230 may include at least one processing unit 233 and a memory unit 235, i.e. nonvolatile data carrier, storing a computer program 237, which, in turn, contains software for making the at least one processing unit 233 execute the actions mentioned in this disclosure when the computer program 237 is run on the at least processing unit 233. In order to sum up, and with reference to the flow diagram in Figure 5, we will now describe the computer-implemented method according to the invention, which method is performed in the at least one processing unit 233 of the controller 230.
[0050] In a first step 510, a robot arm of a milking arrangement is controlled to attach at least one teatcup to a respective at least one teat of a dairy animal. Preferably, the steps of the procedure that follow step 510 are applied to any teatcup subsequent to the first attached teatcup. However, according to the invention, it is also conceivable to only employ the procedure to attach a third or fourth teatcup.
[0051] In a 520 following step 510, range image data are obtained from a camera on a robot arm that is configured to attach the teatcups to the dairy animal’s A teats, which range image data represent the teats of the dairy animal A.
[0052] Then, in a step 530, based on the range image data, it is checked if a next teat to which a teatcup is to be attached is positioned within the reach of an end effector of the robot arm. If this condition is fulfilled, a step 550 follows; and otherwise, the procedure continues to a step 540.In step 540, at least one displacing member is controlled to prompt the dairy animal A to move in such a direction that after the movement the next teat to which a teatcup is to be attached is expected to be within the reach of the end effector.
[0053] Subsequently, a step 560 checks if all the teatcups have been attached; and if so, the procedure ends. Otherwise, the procedure loops back to step 530.
[0054] In step 550, the robot arm is controlled to attach the teatcup to the next teat.
[0055] The process steps described with reference to Figure 5 may be controlled by means of a programmed processor. Moreover, although the embodiments of the invention described above with reference to the drawings comprise processor and processes performed in at least one processor, the invention thus also extends to computer programs, particularly computer programs on or in a carrier, adapted for putting the invention into practice. The program may be in the form of source code, object code, a code intermediate source and object code such as in partially compiled form, or in any other form suitable for use in the implementation of the process according to the invention. The program may either be a part of an operating system, or be a separate application. The carrier may be any entity or device capable of carrying the program. For example, the carrier may comprise a storage medium, such as a Flash memory, a ROM (Read Only Memory), for example a DVD (Digital Video / Versatile Disk), a CD (Compact Disc) or a semiconductor ROM, an EPROM (Erasable Programmable Read-Only Memory), an EEPROM (Electrically Erasable Programmable Read-Only Memory), or a magnetic recording medium, for example a floppy disc or hard disc. Further, the carrier may be a transmissible carrier such as an electrical or optical signal which may be conveyed via electrical or optical cable or by radio or by other means. When the program is embodied in a signal, which may be conveyed, directly by a cable or other device or means, the carrier may be constituted by such cable or device or means. Alternatively, the carrier may be an integrated circuit in which the program is embedded, the integrated circuit being adapted for performing, or for use in the performance of, the relevant processes.Variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a study of the drawings, the disclosure, and the appended claims.
[0056] The term “comprises / comprising” when used in this specification is taken to specify the presence of stated features, integers, steps or components. The term does not preclude the presence or addition of one or more additional elements, features, integers, steps or components or groups thereof. The indefinite article "a" or "an" does not exclude a plurality. In the claims, the word “or” is not to be interpreted as an exclusive or (sometimes referred to as “XOR”). On the contrary, expressions such as “A or B” covers all the cases “A and not B”, “B and not A” and “A and B”, unless otherwise indicated. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage. Any reference signs in the claims should not be construed as limiting the scope.
[0057] It is also to be noted that any reference in this specification to a second, third, fourth etc. of an instance or a feature does not require the presence of a first or lower ordered specimen of the instance or feature in question. The ordinal numbers merely represent a convenient means of reference to distinguish the specific instances or features from one another.
[0058] It should further be noted that features from the various embodiments described herein may freely be combined, unless it is explicitly stated that such a combination would be unsuitable.
[0059] The invention is not restricted to the described embodiments in the figures, but may be varied freely within the scope of the claims. Any subject-matter falling outside the scope of the claims is provided for information purposes, only.
Claims
Claims1. A milking arrangement comprising:a milking box (110) adapted to hold one dairy animal (A) at the time during a milking session, which milking box (110) has a bottom surface (111) with a general rectangular shape extending in a length dimension (x) and a width dimension (y) respectively,a robot arm (220) adapted to attach at least two teatcups to respective at least two teats of the dairy animal (A) when the dairy animal (A) is held in the milking box (110), which robot arm (220) is arranged along a first side (rx) of the milking box (110), which first side (rx) extends in the length dimension (x), and which robot arm (220) comprises a camera (225) configured to register range image data (Dimg3D) representing the teats of the dairy animal (A),a controller (230) configured to obtain the range image data (Dimg3D), and based thereon control the robot arm (220) to attach the at least two teatcups to the respective at least two teats, andat least one displacing member (241 , 242, 243, 244) configured to prompt the dairy animal (A) to move along at least one of the length and width dimensions (x; y) in the milking box (110), characterized in thatthe controller (230) is configured to control the robot arm (220) to attach a first teatcup (TC) to a first teat (T1) of the dairy animal (A), and thereafter:determine, based on the range image data (Dimgso), if a second teat (T2, T3, T4) is positioned within a reach (R) of an end effector (227) of the robot arm (220) to which second teat (T2, T3, T4) a second teatcup is to be attached, and if the second teat (T2, T3, T4) is not positioned within said reach (R),control at least one of the at least one displacing member (241 , 242, 243, 244) to prompt the dairy animal (A) to move in such a direction (Mxy) that after the movement the second teat (T2, T3, T4) is expected to be within said reach (R).
2. The milking arrangement according to claim 1 , wherein, after that the at least one of the at least one displacing member (241 , 242, 243, 244) has been controlled to prompt the dairy animal (A) to move, the controller (230) is configured to control the robot arm(220) to attach the second teatcup to the second teat (T2, T3, T4) only if, based on the range image data (Dimgso), the second teat (T2, T3, T4) is expected to be within said reach (R).
3. The milking arrangement according to any one of claims 1 or 2, wherein the controller (230) is configured to derive at least one spatial coordinate ((x2i, y2i, z2i); (x3i, ysi, z3i); (x4i, y4i, z4i); (x22, y22, z22); (x32, y32, z32); (x42, y42, z42)) of the second teat (T2, T3, T4) based on the range image data (Dimgso).
4. The milking arrangement according to claim 3, wherein the at least one spatial coordinate ((x2i, y2i, z2i); (x3i, y3i, z3i); (x4i, y4i, z4i); (x22, y22, z22); (x32, y32, z32); (x42, y42, z42)) of the second teat (T2, T3, T4) expresses a three-dimensional position.
5. The milking arrangement according to any one of claims 3 or 4, wherein said reach (R) comprises a volume within the milking box (110), which volume adjoins the first side (rx) and which volume comprises a work envelope of the end effector (227).
6. The milking arrangement according to claim 5, wherein a basis (221) of the robot arm (220) is arranged at a position ((XP, yp, ZP)) relative to the first side (rx) of the milking box (110) and the volume that comprises the work envelope of the end effector (227) is delimited by spatial coordinates that have a fixed relationship to said position ((xP, yP, ZP)).
7. The milking arrangement according to claim 6, wherein the controller (230) is configured to determine if the second teat (T2, T3, T4) is positioned within the reach (R) of the end effector (227) through a process that comprises checking if the at least one spatial coordinate ((x2i, y2i, z2i); (x3i, y3i, z3i); (x4i, y4i, z4i); (x22, y22, z22); (x32, y32, z32); (x42, y42, z42)) of the second teat (T2, T3, T4) is within a range of spatial coordinates delimiting the volume that comprises the work envelope of the end effector (227).
8. The milking arrangement according to any one of the prece-ding claims, wherein the at least one displacing member comprises a first push member (241) configured to drive the dairy animal (A) to move in a first direction (D1x) along the length dimension (x) of the milking box (110) in response to a first control signal (C1), and the controller (230) is configured to generate the first control signal (C1 ).
9. The milking arrangement according to any one of the preceding claims, wherein the at least one displacing member comprises a second push member (242) configured to drive the dairy animal (A) to move in a second direction (D2x) along the length dimension (x) of the milking box (110) in response to a second control signal (C2), and the controller (230) is configured to generate the second control signal (C2).
10. The milking arrangement according to claims 8 and 9, wherein the first and second directions (D1x; D2x) are opposite to one another, the first push member (241) is configured to drive the dairy animal (A) to move in a backward direction towards an entry gate (271) adapted to allow the dairy animal (A) into the milking box (110) when the entry gate (271) is positioned in an open state, and the second push member (242) is configured to drive the dairy animal (A) to move in a forward direction towards an exit gate (272) adapted to allow the dairy animal (A) to leave the milking box (110) when the exit gate (272) is positioned in an open state.1 1 . The milking arrangement according to any one of claims 8 to 10, wherein the at least one displacing member comprises a third push member (244) configured to drive the dairy animal (A) to move in a third direction (D3y) along the width dimension (y) of the milking box (110) in response to a fourth control signal (C4), and the controller (230) is configured to generate the fourth control signal (C4).
12. The milking arrangement according to claim 11 , wherein the third direction (D3y) is aimed towards the first side (rx) of the milking box (110).
13. The milking arrangement according to any one of claims 7 to12, wherein at least one of the at least one displacing member is configured to abutt the dairy animal (A) to drive the dairy animal (A) to move.
14. The milking arrangement according to claims 8 and 9, wherein the at least one displacing member comprises at least one attraction member (243) that, in response to a third control signal (C3), is movable in at least one of the first and second directions (D1x; D2x) and is adapted to contactlessly stimulate the dairy animal (A) to move in the forward and / or backward directions respectively, and the controller (230) is configured to generate the third control signal (C3).
15. The milking arrangement according to any one of the preceding claims, wherein, after having controlled the robot arm (220) to attach the second teatcup to the second teat (T2, T3, T4), the controller (230) is further configured to:control the at least one of the at least one displacing member (241 , 242, 243, 244) to return to a position in which it avoids prompting the dairy animal (A) to move.
16. A computer-implemented method executed in a processing unit (233) of a controller (230) in a milking arrangement which further comprises a milking box (110) adapted to hold one dairy animal (A) at the time during a milking session, which milking box (110) has a bottom surface (111) with a general rectangular shape extending in a length dimension (x) and a width dimension (y) respectively; at least one displacing member (241 , 242, 243, 244) configured to prompt the dairy animal (A) to move along at least one of the length and width dimensions (x; y) in the milking box (110); and a robot arm (220) adapted to attach at least two teatcups to respective at least two teats of the dairy animal (A) when the dairy animal (A) is held in the milking box (110), which robot arm (220) is arranged along a first side (rx) of the milking box (110), which first side (rx) extends in the length dimension (x), and which robot arm (220) comprises a camera (225) configured to register range image data (Dimgso) representing the teats of the dairy animal (A), which method comprises:obtaining the range image data (Dimgso), and based thereon controlling the robot arm (220) to attach the at least two teatcups to the respective at least two teats,characterized bycontrolling the robot arm (220) to attach a first teatcup (TC) to a first teat (T1 ) of the dairy animal (A), and thereafter:determining, based on the range image data (Dimgso), if a second teat (T2, T3, T4) is positioned within a reach (R) of an end effector (227) of the robot arm (220) to which second teat (T2, T3, T4) a second teatcup is to be attached, and if the second teat (T2, T3, T4) is not positioned within said reach (R),controlling at least one of the at least one displacing member (241 , 242, 243, 244) to prompt the dairy animal (A) to move in such a direction (Mxy) that after the movement the second teat (T2, T3, T4) is expected to be within said reach (R).
17. A computer program (237) loadable into a non-volatile data carrier (235) communicatively connected to a processing unit (233), the computer program (237) comprising software for executing the method according to claim 16 when the computer program (237) is run on the processing unit (233).
18. A non-volatile data carrier (235) containing the computer program (237) of the claim 17.