Download A vision guided robot for tracking a live, loosely constrained pig PDF

TitleA vision guided robot for tracking a live, loosely constrained pig
LanguageEnglish
File Size176.5 KB
Total Pages14
Table of Contents
                            A vision guided robot for tracking a live, loosely constrained pig
	Introduction
	Method and materials
		Finding the P2 position
		The robot
			Specification
			Mechanical design
			Controller design
		Sensor placement strategy
		Evaluation of robot performance
			Off line testing
			Real time tracking
	Results
		Off line testing
		Real time tracking
	Discussion
	Conclusions
	Acknowledgements
	References
                        
Document Text Contents
Page 1

Computers and Electronics in Agriculture 44 (2004) 93–106

A vision guided robot for tracking a live,
loosely constrained pig

A.R. Frosta,∗, A.P. Frencha,b, R.D. Tilletta,
T.P. Pridmoreb, S.K. Welcha

a Silsoe Research Institute, Wrest Park, Silsoe, Bedford MK45 4HS, UK
b School of Computer Science and IT, Nottingham University, Nottingham NG8 1BB, UK

Received 30 September 2003; received in revised form 4 February 2004; accepted 17 March 2004

Abstract

This paper reports a step towards the development of robotic systems capable of applying sensors to
animals so that valuable information about their health and development can be obtained automatically.
A vision guided robot has been designed to track a given position (the P2 position used for backfat
measurement) on the body of a pig as it stands, loosely constrained, in a feeding stall. The vision
guidance system was based on a model which predicted the P2 position from the positions of points
on the periphery of plan view video images of the pig. A purpose built, two axis, SCARA robot
with pneumatic actuation was developed. The tracking performance of the combined robot and image
analysis system was evaluated by testing the ability of the robot to track recorded images of a pig
moving around in a feeding stall, and by its ability to track live pigs in a field trial. The results showed
that it should be feasible for a vision guided, pneumatic robot to track a moving pig and place an
ultrasonic sensor at a target position on its back at a frequency which would enable useful data to be
collected.
© 2004 Elsevier B.V. All rights reserved.

Keywords:Image analysis; Livestock monitoring; Robotics

1. Introduction

The motivation for the work described in this paper is the emergence of various sens-
ing systems that can provide valuable information about an animal if they are held in
particular positions with respect to the animal. For example there are sensors for body

∗ Corresponding author. Fax:+44-1525-860156.

0168-1699/$ – see front matter © 2004 Elsevier B.V. All rights reserved.
doi:10.1016/j.compag.2004.03.003

Page 2

94 A.R. Frost et al. / Computers and Electronics in Agriculture 44 (2004) 93–106

composition, body temperature, heart rate and respiration rate, and electronic noses for
health and fertility monitoring (Frost et al., 1997). One of the main factors that will
limit the use of these new sensors is the need for large amounts of skilled labour if the
sensors are to be deployed manually. A solution to this problem is to develop robotic
systems capable of holding a sensor in some predetermined position with respect to an
animal while it is in a location that it frequently visits, such as a feeding or drinking
station.

The most relevant prior art in this area relates to milking robots which are designed
to attach teatcups to cows without human intervention (Rossing and Hogewerf, 1997).
Although the success of milking robots offers an encouraging precedent, the task for a
sensor placement robot is significantly different. In a robotic milking system the robot
has to find and track moving teats whilst attaching the teatcups. To facilitate this the
cow’s movements are severely restricted by the milking stall and, since the cow is iden-
tified by a transponder, the robot can be given a first estimate of where to find the teats
of a particular animal from a data base of teat position coordinates constructed during
previous milkings. A sensor placement robot working with unidentified animals having
greater freedom of movement, in a feeding stall for example, would not have these ad-
vantages. Also a milking robot is only capable of locating very particular parts of the
animal, i.e. the teats, which are amenable to location techniques that are not applicable
to locating positions on an animal which have no distinct morphological identity. For ex-
ample, ultrasonic and vision based techniques for detecting signals which are characteris-
tic of teats are not suitable for locating a featureless position on the back or flank of an
animal.

An example application in which the location of a featureless position is required is that
of using an ultrasonic probe to measure backfat depth on a pig in a feeding stall. This is the
potential application which is considered in this paper. Consideration of the variation in fat
depth across the back of the pig with position has indicated that an appropriate target position
to place a sensor for automatic measurement is 25 mm ahead of the last rib and 50 mm from
the midline. This will be referred to as the P2 position, since it corresponds approximately to
the position of that name which is most commonly used in the UK for backfat measurement
by ultrasonic probe (Whittemore, 1993). The P2 position is not a visible feature of the
animal, but previous papers have described how image analysis has been used to generate
sets of coordinates corresponding to such target positions on the animal’s body (Frost et al.,
2000; Tillett et al., 2002). Models were established to predict the positions of arbitrary points
on the body of a pig from the positions of identifiable features in the plan view image of
the periphery of the pig which could be measured automatically. This paper reports further
development of the image analysis procedure and the performance of a robot that has been
designed to track the target position.

The final stages of a robotic backfat measurement process, which were not attempted in
the work reported here, would be to apply the ultrasonic sensor to the back of the pig, and
to obtain satisfactory signals from it. This raises the question of how the pig would respond
to contact with the sensor. Although a rigorous study of this was not attempted, it was noted
that when pigs were touched with a hand-held ultrasonic sensor, they frequently showed
no response at all provided they were feeding. This observation supported the choice of
a feeding stall as the location for the robot. Regarding the issue of obtaining satisfactory

Page 7

A.R. Frost et al. / Computers and Electronics in Agriculture 44 (2004) 93–106 99

and to continue to track the pig whilst keeping the sensor in contact with the target point,
perhaps using compliance in the attachment mechanism to accommodate small relative
movements between the robot and the pig. This will be referred to as the constant tracking
mode of operation, and was the one used for off-line testing of the robot. Another possibility
would be for the robot to attach the sensor to the pig (for example by vacuum) once it had
been placed within tolerance of the target point, and to release the sensor so that it could
float independently of the robot while the signal from the sensor was recorded. This will be
referred to as the floating mode.

Practical considerations suggested a third possibility. When activated, the robot arm
moved across the view of the overhead camera, usually obscuring one or more kink points,
so making it more difficult to predict the P2 position. However, movement analysis (Frost
et al., 2000) suggested that pigs, once eating, can stay still for long enough to place the
sensor. This made it desirable for the robot to remain in a parked position, out of view for
the overhead camera until the pig had remained almost stationary, as measured by the P2
tracker, for a predetermined period. The robot could then be activated to move to the P2
position, P2 position tracking suspended and pig movement detection passed to an algorithm
which tracked the longitudinal position of the pig’s rump, which it located as an intensity
boundary, and which was not obscured by the robot arm. This position was not adequate to
provide an estimate of P2 position since it took no account of the lateral position of the pig
or of its orientation in the stall, but it did provide a good indicator of large scale movements
of the pig. The design of the feeder meant that most movement occurred longitudinally.
When a threshold for rump motion was exceeded, on the assumption that the pig was either
leaving the stall, or had at least temporarily stopped feeding, the robot could be withdrawn
to the parked position and P2 tracking resumed. This was termed the intermittent tracking
mode and was the one used in the field trial.

2.4. Evaluation of robot performance

2.4.1. Off line testing
The performance of each controller was assessed by applying step changes to the demand

position for the actuator. The steps were applied separately with the inactive actuator held
at a constant length to remove any effects of dynamic coupling during the tests.

The performance of the combined robot and image analysis tracking system was evaluated
by testing the ability of the robot to track recorded images of a pig moving around in a feeding
stall. The analysis procedure based on six kink points (Frost et al., 2000; Tillett et al., 2003)
was used on the images to predict the P2 position. Six sequences of pig movement (each
of approximately 90 s duration) were used, showing various pigs at various ages. An image
analysis algorithm (Frost et al., 2000) designed to measure the position of a visible point
was used to measure the actual position of the target point, which is normally invisible but
which, for this purpose, was visibly marked. The robot was driven with time histories of
target point movement, and the tracking response of the robot was measured and compared
to the actual movement of the target point.

The same data were used to predict the potential of the robot for maintaining the position
of a sensor to within a given tolerance of the target point for a given period of time. This was
done by calculating, for each pig movement sequence, the number of periods of a given dura-

Page 8

100 A.R. Frost et al. / Computers and Electronics in Agriculture 44 (2004) 93–106

tion during which the robot maintained a position which was within a given tolerance of the
measured position of the target point. For this purpose the run length was standardised at 80 s.

As mentioned above, one of the reasons for using pneumatic actuation was to make
the robot soft so that it would be deflected by an animal pushing against it, which would
reduce the probability of the animal or the robot being damaged. To evaluate the response
of the system to a simulated collision between the robot and an animal the arm was rapidly
deflected by hand and released. The deflection force, which was applied normal to the end
of the arm, was about 25 N as measured by a spring balance.

2.4.2. Real time tracking
The performance of the complete system was tested in a field trial. The robot was attached

to a feeding stall in a pen containing 12 Duroc× Landrace× Large White females. They
were grown for several weeks with the robot in place, but not in use, with feed being
placed into the feeding stall so that they became accustomed to it. The trial was carried
out using six of the pigs when they were about 13 weeks old and weighed on average 56
kg. A monochrome video camera was mounted above the pen, looking vertically down to
give a plan view of the pig whilst it was feeding. The feeding station was illuminated by a
combination of daylight, ambient room lights, and one 60 W lamp attached to the top of the
feeder. This ensured that there was sufficient contrast in the image between the back of the
pig and the background. The approximate P2 position was marked on the pigs with a square
of black tape measuring approximately 25 mm× 25 mm as they walked into the feeder.

The image analysis algorithm located the four kink points and adjusted the offset constants
a and d inEqs. (1) and (2)to fit the particular pig and marked P2 position. The robot then
operated in the intermittent tracking mode. When the variance of the P2 position stayed
below a threshold of 40 mm over a sliding window of 4 s the robot was activated, causing it
to move to the last predicted P2 position. The P2 position predictor was then turned off, the
robot held its position, and the rump tracking algorithm was invoked. When a threshold rump
movement was exceeded, the robot was withdrawn. Kink point tracking was then resumed
and the robot reactivated if and when the P2 position variance criteria were again met.

3. Results

3.1. Off line testing

Fig. 3shows the responses of the actuators to step changes in position demand. Although
the tests for each actuator were carried out separately they are shown here plotted together
for the sake of compactness. For the same reason 100 mm has been added to the length of
actuator 2.

Fig. 4 shows an example of the tracking performance of the robot. It is a comparison
between the movements of the target point and of the robot in thex andy directions for
one typical run.Fig. 5shows the results of the sensor position maintenance calculations. It
includes results from all of the experimental runs.

Fig. 6shows an example of the results of the tests in which the robot arm was deflected
by hand and released.

Page 13

A.R. Frost et al. / Computers and Electronics in Agriculture 44 (2004) 93–106 105

placements for each of the six visits to the feeder recorded inTable 1. In the trial the robot
was only deployed once for each period for which the pig was stationary. These periods
were usually long enough to allow more than one deployment, so it is reasonable to expect
that more than two deployments per visit would be normal. As mentioned above, a mean
number of 10 visits per day could be expected, so at least 20 reading from an ultrasonic
sensor should be possible each day for each pig.

5. Conclusions

It has been shown that it is feasible for a vision guided, pneumatic robot to track a
predetermined target position on the back of a live pig, loosely constrained in a feeding stall.
The analysis of video plan view images of the pig, using a model to predict the position of
the invisible target position from the measured positions of identifiable features on the pig
has been shown to permit tracking with adequate accuracy in real time. The performances of
two different operating modes (constant tracking and intermittent tracking) were examined,
the former using video recordings of pig movements, and the latter in a field trial with
live animals. The results of these tests showed that both modes are capable of producing
a sufficient number of well placed contacts with the pig to enable an ultrasonic sensor to
yield useful data. The intermittent tracking mode, as used in the field trial, was found to
be a successful solution to the problem of the robot arm obscuring the view of the camera
producing the images that were used for tracking.

Pneumatic actuation appears to be an appropriate choice for a robot for this application.
A pneumatic robot is likely to cost about half as much as an equivalent hydraulic system.
Electrical actuation is likely to cost about the same as pneumatic, but pneumatic actuation
does not present an electrical safety hazard. Although satisfactory position control is rela-
tively difficult to achieve with pneumatic actuators because of their inherent non-linearities,
it has been shown that adequate dynamic and steady state responses can be achieved using
a conventional controller. It has shown that it is feasible to produce a soft pneumatic robot,
which can be deflected by light transient forces, such as may result from accidental contact
with an animal.

Acknowledgements

The authors acknowledge the vital contributions made by the following colleagues: Steve
Crook who was responsible for the mechanical design of the robot, John Lowe and Pete
Richards who implemented the controller software and Paul Twydell, who was responsible
for the data logging system. The work was funded by the Biotechnology and Biological
Sciences Research Council.

References

Frost, A.R., Street, M.J., Hall, R.C., 1993. The development of a pneumatic robot for attaching a milking machine
to a cow. Mechatronics 3 (4), 409–418.

Similer Documents