Method for Continuous Injection Path Planning in Multiple Piglets
By using a multi-piglet continuous injection path planning method, a robotic system is used to identify and stabilize the piglet's posture. Combined with a robotic arm and a needle-free injector, the problem of high labor intensity and low efficiency in piglet vaccine injection is solved, achieving efficient and accurate vaccine injection and meeting the needs of large-scale farming.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- AGRI INFORMATION INST OF CHINESE ACAD OF AGRI SCI
- Filing Date
- 2026-04-07
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, piglet vaccination relies on manual operation, which has the problems of high labor intensity, high labor costs and low operation efficiency, making it difficult to meet the high-efficiency immunization operation requirements in large-scale breeding scenarios.
A continuous injection path planning method for multiple piglets was adopted. The robot system used an RGB-D camera to identify the injection area on the back of the piglets. Combined with a robotic arm and a veterinary needleless injector, it was possible to continuously inject vaccines into multiple piglets. The method included a pig body holding device, a gathering mechanism and an overhead mechanism to stabilize the piglets' posture, and optimized injection path planning to improve efficiency.
It enables efficient and continuous injection of vaccines into multiple piglets, reduces labor intensity and costs, improves operational efficiency, ensures injection accuracy and consistency, reduces omissions and errors, and meets the needs of large-scale farming.
Smart Images

Figure CN122297845A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of disease prevention and control technology in pig farming, and more specifically, to a method for planning a continuous injection route for multiple piglets. Background Technology
[0002] Swine farming is a vital industry related to national welfare and people's livelihood, and swine disease prevention and control is a crucial link in ensuring swine production. Vaccinating pigs is an important means of disease control. How to automate vaccination to replace manual injection, thereby improving operational efficiency and reducing production costs, is a research direction for those skilled in the art.
[0003] Automated injection robots already exist in the market. For example, patent application CN114557796A, entitled "Robot System," uses a mobile cart and a seven-DOF collaborative robotic arm to move the injection end effector. Another example is patent application CN119648781A, entitled "A Method and System for Vaccinating Sows Based on Deep Learning and Machine Vision," which uses a mobile cart and a collaborative robotic arm to inject the vaccine into the sow's rump. However, these technologies are all designed for adult pigs.
[0004] In pig farming, piglets require frequent and large-scale immunizations. Current piglet vaccination methods rely on manual injection, which results in high labor intensity, high labor costs, and low operational efficiency.
[0005] Therefore, there is an urgent need for a more efficient robotic system to automatically inject vaccines into piglets, improve operational efficiency, reduce labor intensity and high labor costs, and thus meet the needs of high-efficiency immunization operations in large-scale farming scenarios. Summary of the Invention
[0006] This application aims to address the technical problem of how to achieve rapid and continuous injection of vaccines into piglets using a robotic system, thereby improving operational efficiency, reducing the labor intensity of operators, and lowering labor costs. It provides a method for planning continuous injection paths for multiple piglets using a robotic system for efficient continuous injection.
[0007] The first aspect of this application provides a method for planning a continuous injection pathway for multiple piglets, comprising the following steps: Step D1, from N injection points P for multiple piglets i Select a starting injection point; Step D2: Add the starting injection point to the injection sequence F; Step D3, N injection points P i Injection points other than the starting injection point are unvisited injection points W jThese unvisited injection sites W j Form the set of unvisited injection sites U; Step D4: Determine the starting injection point as the current injection point; Step D5: Iterate through all unvisited injection points W in the set of unvisited injection points U. j The cycle time A(i→j) between the current injection point and the unvisited injection point is calculated using the following formula: A(i→j)=max(t ij ,T) In the formula, T represents the return reset time of the veterinary needleless injector, t ij This indicates the time it takes for the needle-free injector to move from the current injection point to an unvisited injection point. Step D6: Filter out several values where the cycle time A(i→j) is greater than T, and then select the unvisited injection point W corresponding to the minimum value among these values. j As the next injection site; Step D7: Add the next injection point to the injection sequence F; Step D8: Delete the selected unvisited injection points from the set U of unvisited injection points, and update set U; Step D9: Determine the next injection point as the current injection point, and then return to step D5; Repeat steps D5 to D9 until all unvisited injection points in the set U of unvisited injection points have been traversed, ultimately generating a P containing N injection points. i The injection sequence F.
[0008] Preferably, the multi-piglet continuous injection path planning method is implemented based on a multi-piglet continuous vaccine injection robot. The multi-piglet continuous vaccine injection robot includes a platform frame, an RGB-D camera, a main control unit, a robotic arm device located above the platform frame, a veterinary needle-free injector connected to the robotic arm device, and a pig holding device located below the platform frame. The pig holding device includes a support frame, a gathering mechanism, and an overhead mechanism. The support frame is fixed inside the platform frame. The gathering mechanism is used to construct a longitudinally adjustable limiting space above the support frame to longitudinally gather and limit the multiple piglets transferred to the support frame. The overhead mechanism vertically lifts the piglets in the limiting space so that the piglets' limbs are detached from the support frame. The main control unit controls the robotic arm device to drive the veterinary needle-free injector to sequentially inject vaccines into each piglet in the limiting space. The RGB-D camera is connected to the top of the platform frame.
[0009] Preferably, the gathering mechanism includes a limiting plate, a guide plate, and two sets of horizontal drive mechanisms. The two sets of horizontal drive mechanisms are respectively connected to the platform frame and arranged longitudinally. The limiting plate is fixedly connected to one end of the bearing support, and the two ends of the guide plate are respectively connected to the free ends of the two sets of horizontal drive mechanisms. Under the action of the horizontal drive mechanisms, the guide plate moves longitudinally away from or towards the limiting plate.
[0010] Preferably, the support frame includes multiple longitudinally arranged pedals arranged side by side, with a through channel between adjacent pedals; the overhead mechanism includes a lifting drive mechanism, a lifting plate, and top rods, the lifting drive mechanism is fixedly connected to the platform frame, and there are multiple top rods arranged at intervals along the lateral direction, with the lower end of each top rod connected to the free end of the lifting drive mechanism via the lifting plate; the top rods are located in the through channel.
[0011] A second aspect of this application provides a method for planning a continuous injection pathway for multiple piglets, comprising the following steps: The first step is to construct a YOLOv11-OBB target detection model for the back of piglets; The second step is to deploy the YOLOv11-OBB target detection model for the backs of piglets; The third step is to input the RGB images of multiple piglets captured by the RGB-D camera into the YOLOv11-OBB target detection model targeting the back of the piglets. The YOLOv11-OBB target detection model targeting the back of the piglets outputs the detection result image. In the detection result image, each piglet displays two OBB detection boxes. Select one of the two OBB detection boxes as the target injection area. The fourth step is to use the center point of the target injection area as the injection location; The fifth step is to calculate the spatial coordinates of the injection sites, thus obtaining multiple injection points corresponding to multiple piglets; The sixth step is to add multiple injection points to the injection sequence. The injection sequence is used by the multi-piglet continuous vaccination robot to carry out the injection task.
[0012] Preferably, the first step is achieved through the following process: Step 1), Data Acquisition: In a pigsty environment, a large number of images of the backs of piglets were acquired using an RGB-D camera; Step 2), mark the injectable areas on the back of the piglet: OBB bounding boxes were used to annotate a large number of piglet back images. The annotation locations were the areas on both sides of the spine and between the front and hind legs on the back of the piglets. This yielded the dataset used to train the model. Step 3) Divide the dataset used to train the model into a training set and a validation set in an 8:2 ratio, and train the YOLOv11-OBB object detection model to obtain the YOLOv11-OBB object detection model for the back of piglets.
[0013] Preferably, in the third step, if the confidence difference between the two OBB detection box regions is <0.1, the region with the largest area is selected as the final target injection region; if the confidence is >0.1, the region with the highest confidence is selected as the final target injection region.
[0014] Preferably, the multi-piglet continuous injection path planning method is implemented by a multi-piglet vaccine continuous injection robot. The multi-piglet vaccine continuous injection robot includes a platform frame, an RGB-D camera, a main control unit, a robotic arm device located above the platform frame, a veterinary needleless injector connected to the robotic arm device, and a pig body holding device located below the platform frame. The pig body holding device includes a support bracket, a gathering mechanism, and an overhead mechanism. The support bracket is fixed inside the platform frame. The gathering mechanism is used to construct a longitudinally adjustable limiting space above the support bracket to longitudinally gather and limit the multiple piglets transferred to the support bracket. The gathering mechanism includes a limiting plate, a guide plate, and two sets of horizontal drive mechanisms. The two sets of horizontal drive mechanisms are respectively connected to the platform frame and arranged longitudinally. The limiting plate is fixedly connected to one end of the support bracket, and both ends of the guide plate are respectively connected to the free ends of the two sets of horizontal drive mechanisms. The guide plate moves longitudinally away from or towards the limiting plate under the action of the horizontal drive mechanisms. The overhead mechanism vertically lifts the piglets in the confined space so that their limbs are detached from the support frame; the main control unit controls the movement of the robotic arm to drive the veterinary needleless injector to inject vaccines into each piglet in the confined space in sequence; the RGB-D camera is connected to the top of the platform frame.
[0015] Preferably, the support frame includes multiple longitudinally arranged pedals arranged side by side, with a through channel between adjacent pedals; the overhead mechanism includes a lifting drive mechanism, a lifting plate, and top rods, the lifting drive mechanism is fixedly connected to the platform frame, and there are multiple top rods arranged at intervals along the lateral direction, with the lower end of each top rod connected to the free end of the lifting drive mechanism via the lifting plate; the top rods are located in the through channel.
[0016] Preferably, the multi-piglet continuous injection path planning method is implemented by a multi-piglet continuous vaccine injection robot, which includes a robotic arm device, a veterinary needleless injector connected to the robotic arm device, and a piglet positioning device; the piglet positioning device includes multiple partitions and a platform, the multiple partitions are fixedly connected to the platform respectively, the multiple partitions are arranged side by side, and a piglet receiving channel is formed between two adjacent partitions; the baffle is detachably connected to the platform, and the baffle is located at the front end of the multiple partitions.
[0017] The beneficial effects of this invention are that, for multiple piglets, after obtaining the spatial coordinates of the injection point for each piglet, a reasonable continuous injection path can be planned, enabling continuous vaccination of multiple piglets, improving operational efficiency, and significantly reducing the labor intensity and cost of manual injection. It also ensures injection accuracy, avoiding abnormalities such as missed injections, incorrect injections, and duplicate injections. Furthermore, it maximizes injection consistency. Injection consistency means following standardized injection procedures, administering the vaccine to each pig at the same site, with essentially the same dosage, and at essentially the same depth. Injection consistency ensures stable, controllable, and repeatable effects, which is crucial for herd immunization in piglets.
[0018] To meet the needs of large-scale farming.
[0019] Further features and aspects of the present invention will be clearly described in the following detailed description with reference to the accompanying drawings. Attached Figure Description
[0020] Figure 1 This is an isometric view of the multi-piglet continuous vaccine injection robot of the present invention; Figure 2 This is a front view of a robot that continuously injects vaccines into multiple piglets; Figure 3 yes Figure 1 The diagram shows the structure of the robot after the robotic arm and main control unit have been removed. Figure 4 This is a schematic diagram of the robotic arm device; Figure 5 This is a schematic diagram of the connection between a veterinary needleless injector and a robotic arm device. Figure 6 This is a schematic diagram of the structure after the support frame and the aggregation mechanism are assembled; Figure 7 This is a schematic diagram of the horizontal drive mechanism; Figure 8 This is a structural diagram of the overhead structure; Figure 9 This is a schematic diagram of the structure when the overhead mechanism is reset; Figure 10 This is a schematic diagram of the structure when the overhead mechanism lifts the piglets; Figure 11 This is a schematic diagram of the guide plate of the gathering mechanism after displacement; Figure 12 This is a diagram illustrating multiple piglets being held in place. Figure 13 This is a flowchart of the injection procedure; Figure 14 This is a flowchart of the injection path planning method; Figure 15 When annotating images of piglets' backs captured by a camera using annotation tools, the bounding boxes on both sides of the piglet's spine are marked. Figure 16 This is a schematic diagram of the piglet positioning device; Figure 17 yes Figure 16 A side view of the piglet positioning device shown.
[0021] Explanation of symbols in the diagram: 100. Platform frame; 101. Crossbeam; 102. Longitudinal beam; 103. Front upright; 104. Rear upright; 105. Middle upright; 200. Pig body holding device; 201. Bearing bracket; 2011. Through passage; 202. Guide plate; 203. Horizontal drive mechanism; 2031. Mounting frame; 2032. Horizontal electric push rod; 2033. Connecting block; 2034. Path notch; 204. Limiting space; 205. Top rod; 2051. Limb gap; 206. Lifting drive mechanism; 2061. Vertical electric push rod; 2062. Connecting frame; 2063. Slider; 2064. Optical axis guide rail; 2065. Lifting plate; 2066. Mounting base; 300. Robotic arm device; 301 1. Vertical linear module; 3011. Main board; 302. Horizontal linear module; 3021. Horizontal plate; 303. Vertical linear module; 3031. Vertical plate; 400. Injector unit; 401. Veterinary needle-free injector; 402. Pressure sensor; 500. Position acquisition unit; 501. RGB-D camera; 502. Camera bracket; 600. Main control unit; 700. Moving wheels; 800. Power supply unit; 900. Swing door; 1. Piglet; 2. Piglet; 203B. First partition; 204B. Second partition; 205B. Third partition; 206B. Fourth partition; 207B. Fifth partition; 208B. Baffle; 209B. Platform; 100B. Frame; 400B. Veterinary needle-free injector. Detailed Implementation
[0022] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] The specific embodiments described below are merely preferred embodiments of this application, and the scope of protection of this application is not limited thereto. Those skilled in the art can make modifications or variations based on the principles, concepts, and spirit of this application, and the resulting technical solutions should all be covered within the scope of protection of this application.
[0024] Example 1
[0025] like Figure 1 and Figure 2As shown, the multi-piglet continuous vaccination robot includes a platform frame 100, a main control unit 600, a robotic arm device 300, a position acquisition unit 500, a syringe unit 400, and a pig holding device 200. The platform frame 100 adopts a cuboid frame structure fixed by crossbeams 101, longitudinal beams 102, and columns. Four casters 700 are installed at the bottom of the platform frame 100 to facilitate movement of the entire machine. The casters 700 are preferably universal wheels with brakes; of course, casters 700 with a drive source can also be used, in which case the drive source is communicatively connected to the main control unit. The main control unit is fixed to the outside of the platform frame 100 in the form of a control cabinet. The robotic arm device 300 and the position acquisition unit 500 are located in the upper area of the platform frame 100. The syringe unit 400 is installed at the end of the robotic arm device 300, and the pig holding device 200 is located in the lower area of the platform frame 100. Figure 3 As shown, the pig holding device 200 includes a support bracket 201 and a gathering mechanism. The support bracket 201 is fixed inside the platform frame 100. The gathering mechanism is used to construct a longitudinally adjustable limiting space 204 above the support bracket 201. Specifically, the limiting space 204 is formed by the support bracket 201, the platform frame 100, and the gathering mechanism. The lateral dimension is the inner dimension of the platform frame 100, and the longitudinal space is adjusted by the action of the gathering mechanism to longitudinally gather and limit the piglets transferred to the support bracket 201. The position acquisition unit 500 collects the position information of multiple piglets located in the limiting space 204. The main control unit controls the robotic arm device 300 to move according to the obtained position information, so as to drive the syringe unit 400 to inject vaccines into each piglet in sequence.
[0026] The main control unit 600 can be an edge controller, which integrates modules such as bus communication, data acquisition, motion control, and machine vision. In this solution, the position acquisition unit 500 is an RGB-D camera 501. The RGB-D camera 501 is fixed above the platform frame 100 by a camera bracket 502, with the lens facing the limiting space 204. It is used to acquire image information (RGB image and depth image) of each piglet in the limiting space 204. The edge controller identifies and locates the predetermined injection area on the back of each piglet through a visual detection algorithm. Specifically, it can combine the depth value with the camera's intrinsic parameters to convert the two-dimensional coordinates of the image into three-dimensional coordinates, and then finally determine the spatial coordinates of the injection point corresponding to each piglet.
[0027] The robotic arm device 300 is a Cartesian robotic arm, such as... Figure 4As shown, a three-axis linear workspace is constructed by combining a longitudinal linear module 301, a transverse linear module 302, and a vertical linear module 303. This workspace is adapted to the limiting space 204. Preferably, there are two longitudinal linear modules 301, which are fixed to the top of the platform frame 100 via a main board 3011. The transverse linear module 302 is mounted on the sliders of the two longitudinal linear modules 301 via a horizontal plate 3021. The vertical linear module 303 is mounted on the slider of the transverse linear module 302 via a vertical plate 3031. The syringe unit 400 is assembled on the slider of the vertical linear module 303, and the injection head of the syringe unit 400 is vertically oriented towards the limiting space 204. It should be noted that an articulated multi-degree-of-freedom manipulator can also be used as a specific implementation of the robotic arm device 300. It should be noted that the Cartesian robotic arm used in this embodiment is only an example, and those skilled in the art will understand that other types of robotic arm structures can also be used.
[0028] Further preferably, to reduce cross-infection from needles, the syringe unit 400 uses a veterinary needle-free syringe 401. The veterinary needle-free syringe 401 is a conventional product in the prior art. It operates passively; when the jet end of the veterinary needle-free syringe 401 contacts the skin on the piglet's back and is pressed down, it releases the vaccine solution. The veterinary needle-free syringe 401 can be mechanically compressed to form a high-speed liquid jet, achieving penetrating injection of the vaccine solution into the skin and subcutaneous tissue. To improve the controllability and consistency of the injection triggering process and ensure the stability of the injection position and contact conditions, the syringe unit 400 also includes a pressure sensor 402, which is preferably a spoke-type pressure sensor, such as... Figure 5 As shown, the outer circle of the spoke-type pressure sensor is fixedly connected to the end of the robotic arm device 300, and the inner circle of the spoke-type pressure sensor is connected to the top of the veterinary needleless injector 401. When the robotic arm device 300 operates, it drives the veterinary needleless injector 401 to press down on the skin of the piglet's back. During the pressing process, the spoke-type pressure sensor can detect the pressure value (the pressure value is sent to the main control unit 600). The main control unit 600 compares the pressure value with a set threshold. If the pressure value is greater than the set threshold, it is considered that the injection task for the piglet has been completed, and then controls the robotic arm device 300 to rise, so that the veterinary needleless injector 401 is away from the piglet's back. The set threshold is greater than the pressure required for the veterinary needleless injector 401 to operate.
[0029] like Figure 6As shown, the gathering mechanism includes a limiting plate, a guide plate 202, and a horizontal drive mechanism 203. Specifically, the horizontal drive mechanism 203 is fixedly installed on the platform frame 100 in a direction parallel to the longitudinal direction of the support bracket 201. The limiting plate is fixedly assembled at one end of the support bracket 201, serving as the front limiting surface of the limiting space 204. The guide plate 202 is fixedly assembled on the free end of the horizontal drive mechanism 203, moving longitudinally away from or towards the limiting plate, serving as the rear guiding surface of the limiting space 204. Specifically, the control cabinet of the main control unit 600 is fixed in the middle of the front column 103 of the platform frame 100, and the rear cabinet panel of the control cabinet constitutes the limiting plate. Of course, a partition can also be installed at this position as a limiting plate, such as... Figure 6 As shown, two parallel intermediate columns 105 are fixed to two opposing crossbeams 101 in the middle of the platform frame 100. The front column 103, intermediate column 105, rear column 104, middle crossbeam 101, middle longitudinal beam 102, support bracket 201, guide plate 202, and the rear panel of the control cabinet together form a limiting space 204. To facilitate the transfer of piglets into this space, a swing door 900 is provided between the intermediate column 105 and the front column 103. Specifically, the swing door 900 is hinged to the middle longitudinal beam 102 and preferably closes magnetically. After opening, it forms an entrance for transferring piglets in the middle of the platform frame 100. Two sets of horizontal drive mechanisms 203 are located between the intermediate column 105 and the rear column 104, symmetrically installed on the two intermediate columns 105. Figure 7 As shown, the horizontal drive mechanism 203 includes a mounting frame 2031 and a horizontal electric push rod 2032 fixed inside the mounting frame 2031. One end of the mounting frame 2031 is fixedly connected to the rear column 104, and the other end is fixedly connected to the middle column 105. The output end of the horizontal electric push rod 2032 is located on the side facing away from the control cabinet (limiting plate). A connecting block 2033 for assembling the guide plate 202 is fixed on the output end. The connecting block 2033 extends through the mounting frame 2031, and the mounting frame 2031 has a path notch 2034 for the horizontal movement of the connecting block 2033. As the horizontal electric push rods 2032 in the two horizontal drive mechanisms 203 move synchronously, the guide rod 202 moves longitudinally towards the rear cabinet plate (limiting plate) of the control cabinet. Figure 11 As shown, the longitudinal dimension of the limiting space 204 decreases and stops after reaching a preset distance. Multiple piglets transferred to the support bracket 201 are then longitudinally confined side-by-side within the limiting space 204. Figure 12 As shown.
[0030] The mounting frames 2031 of the two sets of horizontal drive mechanisms 203, together with the front column 103, the middle column 105, the rear column 104, the middle crossbeam 101, the middle longitudinal beam 102, the load-bearing bracket 201, the guide plate 202 and the rear cabinet plate of the control cabinet, together form a limiting space 204.
[0031] To further restrict the activity of piglets within the confinement space 204 and reduce the impact of posture changes on the injection operation, the pig body holding device 200 also includes an overhead mechanism. The overhead mechanism vertically lifts the piglets within the confinement space 204, causing the piglets' limbs to detach from the support frame 201, thereby restricting their running and stabilizing their body position.
[0032] like Figure 8 As shown, the overhead mechanism includes a lifting drive mechanism 206, a lifting plate 2065, and top rods 205. The lifting drive mechanism 206 is fixedly installed on the platform frame 100 below the bearing support 201. Multiple top rods 205 are arranged horizontally and spaced through the bearing support 201. The lower end of each top rod 205 is mounted on the free end of the lifting drive mechanism 206 via the lifting plate 2065, and they move synchronously vertically. Figure 6 As described above, the support bracket 201 in this solution uses multiple parallel longitudinally arranged pedals fixed to the central crossbeam 101 between platforms. Adjacent pedals are connected by a through channel 2011, and the top rod 205 moves vertically within the limiting space 204 via this through channel 2011. There is one top rod 205 between two adjacent pedals, and the top rod 205 is located within the through channel 2011. The number of top rods 205 is at least three, forming at least two limb gaps 2051 for placing the forelimbs and hindlimbs of piglets. In this solution, the number of top rods 205 is five, forming a total of four limb gaps 2051, thus adapting to piglets of different sizes. Figure 9 and Figure 10 As shown, for this size of piglet, the hind legs are located between the first and second push rods 205, and the forelegs are located between the third and fourth push rods 205. Alternatively, the hind legs can be located between the second and third push rods 205, and the forelegs between the fourth and fifth push rods 205. When the overhead mechanism is in the reset state, such as... Figure 9 As shown, the top rod 205 still extends a certain distance above each pedal. At this time, the piglet's limbs, located within the limb gaps 2051, are supported on the pedals. When the overhead mechanism drives the top rod 205 to rise, as... Figure 10 As shown, the piglets' limbs are off the ground, making them unable to run, and their posture becomes more stable.
[0033] Specifically, such as Figure 8The lifting drive mechanism 206 consists of two sets, symmetrically arranged within the front column 103 and the rear column 104, respectively, operating synchronously to drive each top rod 205 to rise or fall. The lifting drive mechanism 206 includes a vertical electric push rod 2061, an optical axis guide rail 2064, a linear slider 2063, a connecting frame 2062, and a mounting base 2066. The vertical electric push rod 2061 is fixed to the lower crossbeam 10 of the platform frame 100 via the mounting base 2066. 1. Its output end is fixedly connected to the connecting frame 2062. A linear slider 2063 is fixed on the outside of the connecting frame 2062. The linear slider 2063 is sleeved on the optical axis guide rail 2064. The optical axis guide rail 2064, which slides with the linear slider 2063, is fixed between the middle crossbeam 101 and the lower crossbeam 101. The top of the connecting frame 2062 is fixedly connected to the lifting plate 2065. Each top rod 205 is fixedly installed on the lifting plate 2065 at horizontal intervals.
[0034] To ensure the robot's flexibility during use, a power supply unit 800 is also installed within the platform frame 100, such as... Figure 1 As shown, the power supply unit 800 includes multiple lithium batteries connected in parallel. The lithium batteries supply power to the aforementioned edge controller, Cartesian robotic arm, pressure sensor 402, veterinary needleless injector 401, RGB-D camera 501, horizontal electric actuator 2032, and vertical electric actuator 2061, among other electrical devices. The edge controller communicates with the RGB-D camera, pressure sensor 402, and veterinary needleless injector 401 via serial ports, with the controller of the robotic arm device 300, the horizontal drive mechanism 203 of the pig body holding device 200, and the lifting drive mechanism 206 via a CAN bus, and with the cloud platform via a wireless network (WIFI) to achieve operational data management.
[0035] refer to Figure 13 The method of administering vaccines to piglets using the aforementioned robot includes the following steps: S1. Robot initialization: The injection robot starts up, the power supply unit 800 supplies power to each electrical device, the edge controller controls the robotic arm device 300 to perform zero-point calibration and move to the initial preparation position; controls the gathering mechanism and the overhead mechanism in the pig body holding device 200 to move to the initial preparation position; controls the RGB-D camera 501 to start up and acquire image data in real time.
[0036] S2. Loading and Holding Pigs: After the initialization of the above subsystems is completed, the first batch of multiple piglets are manually transferred to the support frame 201 in sequence. The edge controller controls the horizontal drive mechanism 203 to move, and the guide plate 202 moves horizontally a set distance (the set distance is determined according to the number of piglets transferred and the body width of piglets of different qualities) so that the piglets gather in the predetermined range of the limiting space 204. The lifting drive mechanism 206 is controlled to move, and the top rod 205 moves up to lift the piglets, so that the piglets' limbs are separated from the support frame 201 to limit their running and thus stabilize their body position.
[0037] S3. Injection Point Detection and Identification: The RGB-D camera 501 acquires image information of each piglet under restricted conditions and transmits it to the edge controller. The edge controller identifies and locates the predetermined injection area on the back of each piglet based on a visual detection algorithm, determining the spatial coordinates of the injection point for each piglet. Furthermore, an identification tag can be created for each piglet and injection information can be recorded to distinguish between injected and uninjected piglets.
[0038] Further optimization is needed. Given the piglets' small, long, and slanted body shape, the YOLOv11-OBB target detection model can identify the predetermined injection area on the piglet's back. The YOLOv11-OBB model not only possesses basic rotating target detection capabilities but also features specialized optimizations in angular accuracy, small target sensitivity, and handling of dense occlusion. Images acquired by the RGB-D camera 501 are input to the YOLOv11-OBB target detection model, which outputs a detection result image. The bounding boxes in the detection result image indicate the injection area. The specific process is as follows: The first step is to construct a YOLOv11-OBB target detection model for the back of piglets.
[0039] Step 1), Data Acquisition: In a pigsty environment, multiple piglets are placed in the confined space of a robot, and images of the piglets' backs are captured using an RGB-D camera 501. The piglets in the confined space are then replaced to expand the diversity of the image data.
[0040] Step 2), mark the injectable areas on the back of the piglet: The injectable areas on the back of piglets are defined as the region on either side of the spine and between the hind and hind legs, with two injectable areas per piglet. Since these two injectable areas on the piglet's back are elongated and the piglets' orientations are not uniform, Oriented Bounding Boxes (OBBs) are used to label the injectable areas. OBBs can be rotated to match the actual angle of the piglet. This rotational capability offers advantages; the OBBs can more closely align with the piglet's orientation, allowing the boxes to fit the shape and orientation of the object more precisely, thus improving detection accuracy. When multiple piglets are clustered together, the close fit of the OBBs prevents overlap between adjacent piglets' bounding boxes, allowing for clearer differentiation of each individual and its corresponding injectable area, significantly improving detection robustness and preventing false positives or false negatives.
[0041] When using annotation tools to annotate the collected images of piglet backs, the annotation locations are on both sides of the piglet's spine, in the area between the forelegs and hind legs, such as... Figure 15 As shown, the red and blue OBB bounding boxes are labeled. This completes the dataset used to train the model.
[0042] Step 3) Divide the dataset used to train the model into a training set and a validation set in an 8:2 ratio, train the YOLOv11-OBB object detection model, and obtain the piglet back injectable region detection model.
[0043] The second step is to deploy the pre-built YOLOv11-OBB target detection model for the backs of piglets.
[0044] The third step involves inputting the RGB images captured by the RGB-D camera 501 into the YOLOv11-OBB target detection model targeting the piglet's back. The model outputs a detection result image, showing two OBB bounding boxes on either side of the spine for each piglet. The area enclosed by these OBB bounding boxes is the injectable region. One of the two OBB bounding boxes is selected as the target injection region. Preferably, if the confidence levels of the two OBB bounding box regions are similar (difference < 0.1), the region with the largest area is selected as the final target injection region; if the confidence level difference is > 0.1, the region with the highest confidence level is selected as the final target injection region.
[0045] The fourth step is to obtain the target injection area and then use the center point of that area as the injection location.
[0046] The fifth step is to calculate the spatial coordinates of the injection site. Based on the pixel coordinates of the injection site and the depth value of that point (acquired by the RGB-D camera), the three-dimensional coordinates of that site are calculated using the camera's intrinsic parameters. Then, the three-dimensional coordinates are transformed (from the camera coordinate system to the robotic arm coordinate system) to obtain the spatial coordinates of the injection site.
[0047] S4. Injection Task Planning: The edge controller transmits the aforementioned spatial coordinates to the controller of the robotic arm device 300. The controller of the robotic arm device 300 generates injection execution sequence and motion trajectory planning parameters based on the position distribution of each injection point, and sequentially performs single-pig injection tasks on multiple piglets within the confinement space 204. When injecting a single piglet, the specific steps are as follows: S401. The robotic arm device 300 drives the veterinary needleless injector 401 to move to the first safe position above the spatial coordinates of the first piglet's injection point. The safe position is typically about 2cm above and to the left of the injection point, meaning the spatial coordinates of the first piglet's injection point are (x, y, z). The unit of the coordinate values is... If cm, then the coordinates of the first safe position are (x, y, z+2); S402, the robotic arm device 300 drives the veterinary needleless injector 401 to move down and press down on the injection area on the back of the piglet. The veterinary needleless injector 401 works to release the vaccine liquid, and the pressure sensor 402 collects the pressure value in real time; S403, when the pressure value is greater than the set threshold, it is considered that the injection task for the piglet has been completed, and then the robotic arm device 300 is controlled to rise, so that the veterinary needleless injector 401 moves up to the first safe position. Then it moves to the second safe position above the injection point spatial coordinates of the second piglet, and repeats the above operation steps until the injection operation of all piglets in the confined space 204 is completed.
[0048] S5. Reset and Data Recording: After completing the injection task for multiple piglets, the robotic arm device 300 resets, and the overhead mechanism and the gathering mechanism reset in sequence (the guide plate 202 of the gathering mechanism returns to...). Figure 6 As shown in the initial position, the top rod 205 of the overhead mechanism descends to... Figure 9 (Initial position shown); the edge controller records the injection information and uploads it to the cloud platform. The injection information includes at least the injected piglet ID, vaccine type / batch, injection time and number of injections; the piglets that have completed the vaccination are manually transferred to the immunized area, and the second batch of piglets to be vaccinated are transferred to the support bracket 201.
[0049] S6. Batch Cycle and Work Transfer: Repeat steps S2 to S5 to complete the continuous injection of N batches of piglets; after completing the immunization work of piglets in the current pigsty, the mobile platform frame is transferred to the next work area and steps S2 to S5 are continued.
[0050] As can be seen, the injection robot, through the coordinated control of multiple functional modules, enables continuous vaccination of multiple piglets, effectively reducing the labor intensity and cost of manual injection, improving operational efficiency, and enhancing injection accuracy. It also reduces problems such as missed or incorrect injections and ensures injection consistency as much as possible.
[0051] By using a pig-holding device to restrain and stabilize multiple piglets, and in conjunction with a robotic arm and a veterinary needleless injector, a continuous injection process can be achieved. This significantly reduces the intensity of manual operation and increases the injection capacity per unit time, while minimizing direct contact between personnel and animals. The stable restraint of the pigs, combined with the movement of the robotic arm to drive the veterinary needleless injector, greatly improves injection accuracy. Visual detection identifies and locates the predetermined injection areas on the backs of multiple piglets, further enhancing injection accuracy. It also maximizes injection consistency, meeting the requirements of high-quality disease control. Furthermore, by combining identification and injection records, it enables the association management of injection subjects and injection information, reducing the probability of missed, incorrect, or duplicate injections. Using a needleless injection method reduces the risk of cross-contamination related to needles; simultaneously, the combination of pressure threshold control by pressure sensors and visual positioning improves the controllability and consistency of the injection triggering process, helping to ensure the stability of injection position and contact conditions.
[0052] It should be noted that the task planning stage of the above injection method can be further optimized. The structure of a veterinary needle-free injector generally uses a spring or compressed air to propel the vaccine liquid to the spray nozzle. Due to the structure and working principle of the veterinary needle-free injector, after one injection, a second injection cannot be performed immediately; there is a waiting period of approximately 2 seconds, i.e., a 2-second return-to-base time. If it takes 1.5 seconds for the veterinary needle-free injector to move to the injection point of the next piglet after completing the injection of the previous piglet, then it is necessary to wait for the veterinary needle-free injector to be ready and cannot perform the injection immediately. Therefore, to ensure that the veterinary needle-free injector can move to the target piglet without waiting, refer to... Figure 14 The following injection path planning method is adopted: After obtaining the spatial coordinates of the injection point for each piglet, N injection points P are obtained. i Subsequently, in order to complete the injection of all piglets more efficiently, the injection path was planned in the following way.
[0053] Step D1, from N injection points P i Choose a starting injection point.
[0054] Step D2: Add the starting injection point to the injection sequence F. At this time, the injection sequence F contains only one data point.
[0055] Step D3, N injection points P iInjection points other than the starting injection point are unvisited injection points W j These unvisited injection sites W j Form the set of unvisited injection sites U.
[0056] Step D4: Determine the starting injection point as the current injection point.
[0057] Step D5: Iterate through all unvisited injection points W in the set of unvisited injection points U. j The cycle time A(i→j) between the current injection point and the unvisited injection point is calculated using the following formula.
[0058] A(i→j)=max(t ij ,T) In the formula, T represents the return-to-reset time of the veterinary needle-free injector from the completion of the first injection to the second injection. t ij This indicates the time it takes for the needle-free injector to move from the current injection point to an unvisited injection point, driven by a robotic arm.
[0059] Step D6: Filter out several values where the cycle time A(i→j) is greater than T, and then select the unvisited injection point W corresponding to the minimum value among these values. j As the next injection site.
[0060] Step D7: Add the next injection point to the injection sequence F.
[0061] Step D8: Delete the selected unvisited injection points from the unvisited injection point set U, and update set U.
[0062] Step D9: Designate the next injection point as the current injection point. Then return to step D5.
[0063] Repeat steps D5 through D9 until all unvisited injection points W in the unvisited injection point set U are reached. j All points are traversed, ultimately generating a P containing N injection points. i The injection sequence F.
[0064] Example 2 The method in Example 1 can be implemented using the following apparatus.
[0065] like Figure 16 and 17As shown, the first partition 203B, the second partition 204B, the third partition 205B, the fourth partition 206B, and the fifth partition 207B are fixedly connected to the platform 209B. All four partitions are located in the vertical direction and are arranged side by side. A piglet-accommodating channel is formed between the second partition 204B and the first partition 203B. The distance between the second partition 204B and the first partition 203B is slightly larger than the width of the piglet, just enough to enclose the piglet along the width direction. The piglet can only walk forward in a straight line in the narrow channel between the second partition 204B and the first partition 203B and cannot turn around. Similarly, a piglet-accommodating channel is formed between the third partition 205B and the second partition 204B, which just encloses the piglets; a piglet-accommodating channel is formed between the fourth partition 206B and the third partition 205B, and a piglet-accommodating channel is formed between the fifth partition 207B and the fourth partition 206B, which just encloses the piglets. The piglets are located in the accommodation channel (narrow channel) between two adjacent partitions. The baffle 208B is detachably connected to the platform 209B. The baffle 208B is located at the front end of the first partition 203B, the front end of the second partition 204B, the front end of the third partition 205B, the front end of the fourth partition 206B, and the front end of the fifth partition 207B. The baffle 208B can block the piglets. The first piglet in each row is blocked by the baffle 208B, that is, the head of the piglet is blocked by the baffle 208B.
[0066] Prepare multiple piglets for processing by having them enter the piglet receiving channels one by one within the partitioned area. In each receiving channel, piglets walk forward (from left to right as shown by the arrows in the diagram), with their heads in front and tails behind, and the heads of later piglets close to the tails of those in front. Multiple piglets in each receiving channel form a line. The first piglet eventually reaches barrier 208B and is stopped, causing the piglets behind it to stop as well. Next, once the piglets in each receiving channel are stably distributed and have stopped moving, a robotic arm uses a veterinary needle-free injector to automatically inject each piglet with a vaccine. After all piglets have been injected, barrier 208B is removed, and the piglets in each receiving channel exit. The piglets are then collected and returned to the pigpen.
[0067] Blocks 214B, 215B, 216B, and 217B can be installed at the rear of the corresponding piglet receiving channel. These blocks prevent the last piglet in a row from potentially moving backwards. In addition to blocks, a door can be installed at the entrance at the rear of the piglet receiving channel; closing the door will also prevent the last piglet from moving backwards.
Claims
1. A method for planning continuous injection pathways for multiple piglets, characterized in that, Includes the following steps: Step D1, from N injection points P for multiple piglets i Select a starting injection point; Step D2: Add the starting injection point to the injection sequence F; Step D3, N injection points P i Injection points other than the starting injection point are unvisited injection points W j These unvisited injection sites W j Form the set of unvisited injection points U; Step D4: Determine the starting injection point as the current injection point; Step D5: Iterate through all unvisited injection points W in the set of unvisited injection points U. j The cycle time A(i→j) between the current injection point and the unvisited injection point is calculated using the following formula: A(i→j)=max(t ij ,T) In the formula, T represents the return reset time of the veterinary needleless injector, t ij This indicates the time it takes for the needle-free injector to move from the current injection point to an unvisited injection point. Step D6: Filter out several values where the cycle time A(i→j) is greater than T, and then select the unvisited injection point W corresponding to the minimum value among these values. j As the next injection site; Step D7: Add the next injection point to the injection sequence F; Step D8: Delete the selected unvisited injection points from the set U of unvisited injection points, and update set U; Step D9: Determine the next injection point as the current injection point, and then return to step D5; Repeat steps D5 to D9 until all unvisited injection points in the set U of unvisited injection points have been traversed, ultimately generating a P containing N injection points. i The injection sequence F.
2. The method for planning continuous injection pathways for multiple piglets according to claim 1, characterized in that, The method for planning the continuous injection path for multiple piglets is implemented based on a continuous injection robot for multiple piglets. The continuous injection robot for multiple piglets includes a platform frame, an RGB-D camera, a main control unit, a robotic arm device located above the platform frame, a veterinary needleless injector connected to the robotic arm device, and a pig body holding device located below the platform frame. The pig body holding device includes a support bracket, a gathering mechanism, and an overhead mechanism, wherein the support bracket is fixed inside the platform frame; The gathering mechanism is used to construct a longitudinally adjustable limiting space above the support frame to longitudinally gather and limit multiple piglets transferred to the support frame; the overhead mechanism vertically lifts the piglets in the limiting space so that the piglets' limbs are detached from the support frame; the main control unit controls the movement of the robotic arm device to drive the veterinary needleless injector to sequentially inject vaccines into each piglet in the limiting space; the RGB-D camera is connected to the top of the platform frame.
3. The method for planning continuous injection pathways for multiple piglets according to claim 2, characterized in that, The gathering mechanism includes a limiting plate, a guide plate, and two sets of horizontal drive mechanisms. The two sets of horizontal drive mechanisms are respectively connected to the platform frame and arranged longitudinally. The limiting plate is fixedly connected to one end of the bearing support. The two ends of the guide plate are respectively connected to the free ends of the two sets of horizontal drive mechanisms. Under the action of the horizontal drive mechanisms, the guide plate moves longitudinally away from or towards the limiting plate.
4. The method for planning continuous injection pathways for multiple piglets according to claim 3, characterized in that, The supporting support includes multiple longitudinally arranged pedals side by side, with a through channel between adjacent pedals; the overhead mechanism includes a lifting drive mechanism, a lifting plate, and top rods; the lifting drive mechanism is fixedly connected to the platform frame; there are multiple top rods arranged at intervals along the lateral direction, and the lower end of each top rod is connected to the free end of the lifting drive mechanism via the lifting plate; the top rods are located in the through channel.
5. A method for planning continuous injection pathways for multiple piglets, characterized in that, Includes the following steps: The first step is to construct a YOLOv11-OBB target detection model for the back of piglets; The second step is to deploy the YOLOv11-OBB target detection model for the back of piglets. The third step is to input the RGB images of multiple piglets captured by the RGB-D camera into the YOLOv11-OBB target detection model targeting the back of the piglets. The YOLOv11-OBB target detection model targeting the back of the piglets outputs the detection result image. In the detection result image, each piglet displays two OBB detection boxes. Select one of the two OBB detection boxes as the target injection area. The fourth step is to use the center point of the target injection area as the injection location; The fifth step is to calculate the spatial coordinates of the injection sites, thus obtaining multiple injection points corresponding to multiple piglets; The sixth step is to add the multiple injection points to the injection sequence, which is used by the multi-piglet vaccine continuous injection robot to carry out the injection task.
6. The method for planning continuous injection pathways for multiple piglets according to claim 5, characterized in that, The first step is achieved through the following process: Step 1), Data Acquisition: In a pigsty environment, a large number of images of the backs of piglets were acquired using an RGB-D camera; Step 2), mark the injectable areas on the piglet's back: OBB bounding boxes were used to annotate a large number of piglet back images. The annotation locations were the areas on both sides of the spine and between the front and hind legs on the back of the piglets. This yielded the dataset used to train the model. Step 3) Divide the dataset used to train the model into a training set and a validation set in an 8:2 ratio, and train the YOLOv11-OBB object detection model to obtain the YOLOv11-OBB object detection model for the back of piglets.
7. The method for planning continuous injection pathways for multiple piglets according to claim 6, characterized in that, In the third step, if the confidence difference between the two OBB detection box regions is less than 0.1, the region with the largest area is selected as the final target injection region; if the confidence is greater than 0.1, the region with the highest confidence is selected as the final target injection region.
8. The method for planning continuous injection pathways for multiple piglets according to claim 5, 6, or 7, characterized in that, The method for planning the continuous injection path for multiple piglets is implemented by a continuous injection robot for multiple piglets. The continuous injection robot for multiple piglets includes a platform frame, an RGB-D camera, a main control unit, a robotic arm device located above the platform frame, a veterinary needleless injector connected to the robotic arm device, and a pig body holding device located below the platform frame. The pig body holding device includes a support bracket, a gathering mechanism, and an overhead mechanism, wherein the support bracket is fixed inside the platform frame; The gathering mechanism is used to construct a longitudinally adjustable limiting space above the support frame to longitudinally gather and limit multiple piglets transferred to the support frame. The gathering mechanism includes a limiting plate, a guide plate, and two sets of horizontal drive mechanisms. The two sets of horizontal drive mechanisms are respectively connected to the platform frame and arranged longitudinally. The limiting plate is fixedly connected to one end of the support frame, and both ends of the guide plate are respectively connected to the free ends of the two sets of horizontal drive mechanisms. Under the action of the horizontal drive mechanisms, the guide plate moves longitudinally away from or towards the limiting plate. The overhead mechanism vertically lifts the piglets within the confined space, allowing their limbs to detach from the support frame; the main control unit controls the robotic arm to drive the veterinary needleless injector to sequentially inject vaccines into each piglet within the confined space; the RGB-D camera is connected to the top of the platform frame.
9. The method for planning continuous injection pathways for multiple piglets according to claim 8, characterized in that, The supporting support includes multiple longitudinally arranged pedals side by side, with a through channel between adjacent pedals; the overhead mechanism includes a lifting drive mechanism, a lifting plate, and top rods; the lifting drive mechanism is fixedly connected to the platform frame; there are multiple top rods arranged at intervals along the lateral direction, and the lower end of each top rod is connected to the free end of the lifting drive mechanism via the lifting plate; the top rods are located in the through channel.
10. The method for planning continuous injection pathways for multiple piglets according to claim 5, 6, or 7, characterized in that, The method for planning the continuous injection path for multiple piglets is implemented by a continuous injection robot for multiple piglets, which includes a robotic arm device, a veterinary needleless injector connected to the robotic arm device, and a piglet positioning device. The piglet positioning device includes multiple partitions and a platform. The multiple partitions are fixedly connected to the platform, and the multiple partitions are arranged side by side, forming a piglet accommodating channel between two adjacent partitions. The baffle is detachably connected to the platform and is located at the front end of multiple partitions.
Citation Information
Patent Citations
Robot system
CN114557796A
Sow vaccine injection method and system based on deep learning and machine vision
CN119648781A