Professional Documents
Culture Documents
Using EM To Learn Motion Behaviors of Persons With Mobile Robots
Using EM To Learn Motion Behaviors of Persons With Mobile Robots
2.1 Motion Patterns Since the correspondence variables c are not observable
in the first place the common approach is to integrate
We begin with the description of our model of motion over them, that is, to optimize the expected log likelihood
patterns, which is subsequently estimated from data us- Ec [ln p(d, c | θ) | θ, d] instead. Since the expectation is
ing EM. Within this paper we assume that a person en- a linear operator we can move it inside the expression, so
gages in M different types of motion patterns. A mo- that we finally get:
tion pattern, denoted θm with 1 ≤ m ≤ M , is repre-
k
sented by K probability distributions p(x | θm ). The N
X 1
mean of each probability distribution is computed based Ec [ln p(d, c | θ) | θ, d] = T · M · ln √
on β = dT /Ke subsequent positions on the trajectories. i=1
2πσ
k
Accordingly, p(x | θm ) specifies the probability that the T X
M
!
1 X
person is at location x after [(k−1)·β+1; k·β] steps given − · E[cim | θ, d]kxti − µdt/βe
m k2 , (3)
2σ 2 t=1 m=1
that he or she is engaged in motion pattern m. Thus, we
calculate the likelihood of a trajectory di under the m-th
motion model θm as where E[cim | θ, d] depends on the model θ and the data
d.
T
Y
dt/βe Optimizing (3) is not an easy endeavor. EM is an algo-
p(di | θm ) = p(xti | θm ). (1)
rithm that iteratively maximizes expected log likelihood
t=1
by optimizing a sequence of lower bounds. In particular,
Please note that the approach described in [2] is a special it generates a sequence of models, denoted θ[1] , θ[2] , . . .
instance of this scheme, as it corresponds to β = 1. of increasing log likelihood. Mathematically, the stan-
dard method is to turn (3) in a so-called Q-function which
2.2 Expectation Maximization depends on two models, θ and θ0 . In accordance with (3),
In essence, our approach seeks to identify a model θ that this Q-function is factored as follows [2]:
maximizes the likelihood of the data. To define the like-
lihood of the data under the model θ, it will be useful to N
introduce a set of correspondence variables, denoted cim . X 1
Q(θ0 | θ) = T · M · ln √
Here i is the index of a trajectory di , and m is the index of 2πσ
i=1
a motion model θm . Each correspondence cim is a binary T X
M
!
variable, that is, it is either 0 or 1. It is 1 if and only if the 1 X
− 2· E[cim | θ, d]kxti − µ0dt/βe
m k2 . (4)
i-th trajectory corresponds to the m-th motion pattern. If 2σ t=1 m=1
The sequence of models is then given by calculating have converged, we check whether the overall data like-
lihood can be improved by increasing or decreasing the
θ[j+1] = argmax Q(θ0 | θ[j] ) (5) number of model components. During the search, we
θ0
therefore continuously monitor two types of occurrences:
starting with some initial model θ[0] . Whenever the Q-
function is continuous as in our case, the EM algorithm 1. Low data likelihood: If a trajectory di has low likeli-
converges at least to a local maximum. hood under the model θ, this is an indication that no
appropriate motion pattern for di has yet been iden-
In particular, the optimization involves two steps: calcu-
tified.
lating the expectations E[cim | θ[j] , d] given the current
model θ[j] , and finding the new model θ[j+1] that has the
2. Low motion pattern utility: If we can remove a
maximum expected likelihood under these expectations.
model component θm without reducing the overall
The first of these two steps is typically referred to as the
data likelihood, this indicates that θ contains a sim-
E-step (short for: expectation step), and the latter as the
ilar motion pattern and that θm is a duplicate. To
M-step (short for: maximization step).
detect such a redundant model component θm , we
To calculate the expectations E[cim | θ[j] , d] we apply calculate the data log likelihood with and without
Bayes rule, obeying independence assumptions between θm . Technically, this involves executing the E step
different data trajectories: twice, once with and once without θm .
A:
B:
C:
Figure 2: A single trajectory extracted from the laser
data (left image) and trajectories of two different classes
of motion behaviors (right image). D:
3 Laser-based Implementation
E:
The EM-based learning procedure has been implemented
for data acquired with laser-range finders. To acquire the
data we used three Pioneer I robots which we installed in
the environments. The robots were aligned so that they F:
covered almost the whole environment. Typical range
data obtained during the data acquisition phase are de-
picted in Figure 1.
To determine the trajectories that are the input to our al- G:
gorithm we first extract the position of the person in the
range scans. We locate changes in consecutive laser-
range scans and use local minima in the distance his-
tograms of the range scans. In a second step we identify
resting places and perform a segmentation of the data into
different slices in which the person moves. Furthermore, Figure 3: Expectations E[cim |θ[j] , d] computed in the differ-
we smooth the data to filter out measurement noise. Fi- ent iterations of the EM-algorithm.
nally, we compute the trajectories, i.e. the sequence of po-
sitions covered by the person during that motion. When 4.1 Application of EM
computing these trajectories, we ignore positions which In the first experiment, we applied our approach to learn
lie closer than 15 cm to each other. A typical result of this a motion model for 42 trajectories recorded in a home
process is shown in the left image of Figure 2. environment (see Figure 1). We started our algorithm
with a model size of M = 10. Figure 3 shows for
4 Experimental Results different rounds of the EM the resulting expectations
E[ci1 | θ[j] , d], . . . , E[ciM [j] | θ[j] , d] for every trajec-
To evaluate the capabilities of our approach, we per-
tory di under the current model θ[j] (the darker the more
formed extensive experiments. The first set of experi-
likely). The x-axis of each plot contains the trajectories
ments described here demonstrates the ability of our ap-
d1 , . . . , dN and the y-axis contains the different model
proach to learn different motion patterns from a set of [j]
trajectories. Then we analyze the classification perfor- components θi , for i = 1, . . . , M [j] .
mance of learned models. In all experiments we set the To enhance the readability we grouped the trajectories be-
parameter β to 5 which we experimentally found out to longing to the same motion pattern. Please note that there
yield good results regarding the success rate of learning are exactly three trajectories for each motion pattern in
correct models. this particular data set.
16
number of motion patterns
model evaluation
30 number of motion patterns
model evaluation
0
overall evaluation Ec [ln p(d, c | θ[i] ) | θ, d[i] ] − M [i] α
number of motion patterns
12 -200
24
-150
seen from the figure, our algorithm first tries to reduce
22
10 -300 20 -200 the model complexity. This is because the model con-
8
-400 18 -250 tains components with very low utilities.
16
-300
0 2 4 6
iterations
8 10 0 5 10 15
iterations
20 25
We additionally applied our algorithm to data recorded in
our office environment (the map is depicted in Figure 5
Figure 4: Evolution of the number of model components and (left)). Figure 4 (right) shows the model complexity and
the overall evaluation of the model for the home (left) and the model evaluation for one run in which we started with 30
office environment (right). different motion patterns. As can bee seen from the fig-
ure, the algorithm decreases the model complexity until
Since a uniform distribution of E[cim | θ, d] repre- only 16 (non-redundant) components remain. Afterwards
sents a local maximum in the log likelihood space, the it increases this number to improve the model evaluation.
EM-algorithm immediately would get stuck if we ini- Finally, it terminates with the model correctly represent-
tialize the expectations uniformly. To avoid this we ini- ing 25 different motion patterns.
tially use a unimodal distribution of the expectations for To evaluate the performance of our approach we carried
each trajectory, i.e., for each di the expectations E[ci1 | out 100 experiments for each data set. In every experi-
θ[0] , d], . . . , E[ciM | θ[0] , d] form a distribution with a ment we chose a random set of trajectories and counted
unique peak. The location of the mode, however, is cho- the number of correct classifications. It turned out that
sen randomly. our algorithm was able to learn the correct model in 100%
The topmost image of Figure 3 labeled A shows the ini- of the cases using the data recorded in the home environ-
tialization of the expectations. The second image (plot ment and in 91% of the cases using the data recorded in
B) shows the expectations after one iteration. In the situ- the office environment. The left image of Figure 5 shows
ation corresponding to C the EM has converged to a local two trajectories that our algorithm falsely classified in all
maximum in the log likelihood space given 10 different situations in which it failed. As can be seen from the fig-
motion patterns. As can be seen from the figure, there are ure, both trajectories are extremely similar although they
four model components that explain two different motion actually belong to different motion behaviors.
patterns. In the next step (image D) our algorithm there-
fore tries to improve the data likelihood by introducing 4.2 Predicting Trajectories
a new model component to which it assigns the highest To evaluate the capability of our learned models to predict
probability for trajectory 25 which has the lowest likeli- human motions we performed a series of experiments. In
hood given the current model. The situation after the EM each experiment we randomly chose fractions of test tra-
has again converged to a local maximum is shown in E. jectories and computed the likelihood of the correct mo-
As before, another motion pattern is introduced. We omit tion pattern. Figure 5 (right) shows the average likelihood
the corresponding images for the sake of brevity. The of the correct motion behavior depending on the length
correct classification is found after our algorithm has in- of the observed fraction. As can be seen from the figure,
troduced four additional model components (plot F). As the classification results are quite good and our approach
can be seen from the figure, the system has determined a yields models allowing a mobile robot to reliably identify
model in which all trajectories are correctly clustered into the correct motion pattern. For example, if the robot ob-
motion patterns. Nevertheless, our algorithm still tries serves 50% of a trajectory, then the probability of the cor-
to further improve this model by removing and adding a rect motion behavior is about 0.6 in both environments.
model component. However, since none of these opera-
tions increases the overall evaluation, our algorithm ter- Figure 5 (center) illustrates for one trajectory of the per-
minates and outputs the model corresponding to F. Plot G son in the office environment the evolution of the set of
shows the expectations for a model with 15 components. possible motion behaviors. Shown in grey are the means
As can be seen from the histogram, three trajectories are of four different motion patterns. The black line corre-
assigned to two different model components. Because sponds to the trajectory of the person which was observed
of the penalty term our algorithm prefers the lower com- for the first time at the position labeled S. In the beginning
plexity model corresponding to histogram F. there are four possible motion behaviors (W, B, D, M) to
which the trajectory might belong. When location 1 is
Figure 2 (right) shows the corresponding trajectories of reached the motion behavior W can be eliminated from
two different motion behaviors after the convergence of the set of hypotheses because the corresponding likeli-
the EM. Obviously, the trajectories are correctly clus- hood gets too low. Thus, even if the system is not able to
tered. uniquely determine the intended goal location, it can al-
Figure 4 (left) shows for the same data set but for a differ- ready predict that the person will follow the corridor dur-
ent initialization of the expectations the evolution of the ing the next steps. When the person reaches location 2
W D office environment
home environment
W D 1
average likelihood
T 0.8
B
3 0.6
S 1 2
M 0.4
0.2
0
10 20 30 40 50 60 70 80 90 100
length of observed trajectory [%]
Figure 5: The two classes of trajectories which sometimes are classified into the same motion behavior (left), an example of motion
prediction (center) and the average likelihood of the correct motion behavior after observing fractions of trajectories (right).
the system can also exclude the motion behavior B. Fi- [5] R. Duda, P. Hart, and D. Stork. Pattern Classification.
nally, when the person reaches position 3, C becomes un- Wiley-Interscience, 2001.
likely and D becomes the most probable motion behavior. [6] H. Endres, W. Feiten, and G. Lawitzky. Field test of a
This illustrates, that the results of the prediction are use- navigation system: Autonomous cleaning in supermarkets.
ful even in situations in which there are ambiguities about In Proc. of the Int. Conference on Robotics & Automation
the actual intention of the person. (ICRA), 1998.
[7] S. King and C. Weiman. Helpmate autonomous mobile
5 Conclusions robot navigation system. In Proc. of the SPIE Conference
on Mobile Robots, pages 190–198, Boston, MA, November
In this paper we presented a method for learning motion 1990. Volume 2352.
behaviors of persons in indoor environments. Our ap- [8] E. Kruse and F. Wahl. Camera-based monitoring system for
proach applies the popular EM-algorithm to cluster sim- mobile robot guidance. In Proc. of the Int. Conference on
ilar behaviors into single patterns. Thereby it is able to Intelligent Robots and Systems (IROS), 1998.
estimate the number of motion patterns. Additionally, it
[9] G. Lacey and K. Dawson-Howe. The application of
can deal with trajectories of different length. The output robotics to a mobility aid for the elderly blind. Journal
of our algorithm is a collection of motion patterns, each of Robotics and Autonomous Systems (RAS), 23:245–252,
corresponding to a principle motion behavior of a person. 1998.
Using the resulting motion patterns our system can pre-
[10] S. M. Lavalle, H. H. Gonzalez-Banos, G. Becker, and J.-
dict the motions of persons based on observations made C. Latombe. Motion strategies for maintaining visibility of
by the robot. a moving target. In Proc. of the IEEE Int. Conference on
Our approach has been implemented and applied to range Robotics & Automation (ICRA), 1997.
data recorded with mobile robots equipped with laser- [11] G.J. McLachlan and T. Krishnan. The EM Algorithm and
range sensors. In practical experiments we demonstrated Extensions. Wiley Series in Probability and Statistics, 1997.
that our method is able to reliably learn typical motion be- [12] N. Roy, G. Baltus, D. Fox, F. Gemperle, J. Goetz, T. Hirsch,
haviors of a person in a domestic residence as well as in D. Magaritis, M. Montemerlo, J. Pineau, Schulte J., and
an office building. We furthermore described how to use S. Thrun. Towards personal service robots for the elderly.
the resulting models to predict the motions of persons in In Proc. of the Workshop on Interactive Robotics and En-
the vicinity of the robot. tertainment, 2000.
[13] C. Schaeffer and T. May. Care-o-bot - a system for assist-
References ing elderly or disabled persons in home environments. In
Assistive technology on the threshold of the new millenium.
[1] H. Asoh, S. Hayamizu, I. Hara, Y. Motomura, S. Akaho,
IOS Press, Amsterdam, 1999.
and T. Matsui. Socially embedded learning of office-
conversant robot Jijo-2. In Proc. of the Int. Joint Conference [14] R.D. Schraft and G. Schmierer. Serviceroboter. Springer
on Artificial Intelligence (IJCAI), 1997. Verlag, 1998. In German.
[2] M. Bennewitz, W. Burgard, and S. Thrun. Learning motion [15] D. Schulz, W. Burgard, D. Fox, and A.B. Cremers. Track-
patterns of persons for mobile service robots. In Proc. of the ing multiple moving targets with a mobile robot using par-
IEEE Int. Conference on Robotics & Automation (ICRA), ticle filters and statistical data association. In Proc. of the
2002. Int. Conference on Robotics & Automation (ICRA), 2001.
[3] H. Bui, S. Venkatesh, and G. West. Tracking and surveil- [16] S. Tadokoro, M. Hayashi, Y. Manabe, Y. Nakami, and
lance in wide-area spatial environments using the Abstract T. Takamori. On motion planning of mobile robots which
Hidden Markov Model. Intl. J. of Pattern Rec. and AI, 2001. coexist and cooperate with human. In Proc. of the Int. Con-
ference on Intelligent Robots and Systems (IROS), 1995.
[4] W. Burgard, A.B. Cremers, D. Fox, D. Hähnel, G. Lake-
meyer, D. Schulz, W. Steiner, and S. Thrun. Experiences [17] Q. Zhu. Hidden Markov model for dynamic obstacle avoid-
with an interactive museum tour-guide robot. Artificial In- ance of mobile robot navigation. IEEE Transactions on
telligence, 114(1-2), 1999. Robotics and Automation, 7(3), 1991.