Next Article in Journal
An Accurate Bandgap Voltage Reference Ready-Indicator
Next Article in Special Issue
Robust Hand Gesture Recognition Using HOG-9ULBP Features and SVM Model
Previous Article in Journal
Automated Detection of Alzheimer’s via Hybrid Classical Quantum Neural Networks
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

HMM-Based Dynamic Mapping with Gaussian Random Fields †

1
Zhongyuan-Petersburg Aviation College, Zhongyuan University of Technology, Zhengzhou 450007, China
2
Departamento de Informática, Escola de Ciências e Tecnologia, Universidade de Évora, 7004-516 Évora, Portugal
*
Author to whom correspondence should be addressed.
This paper is an extended version of our paper published in 24th International Conference on Automation and Computing under the title “Mapping Dynamic Environments Using Markov Random Field Models”.
Electronics 2022, 11(5), 722; https://doi.org/10.3390/electronics11050722
Submission received: 14 January 2022 / Revised: 19 February 2022 / Accepted: 21 February 2022 / Published: 26 February 2022
(This article belongs to the Special Issue Recent Advanced Applications of Rehabilitation and Medical Robotics)

Abstract

:
This paper focuses on the mapping problem for mobile robots in dynamic environments where the state of every point in space may change, over time, between free or occupied. The dynamical behaviour of a single point is modelled by a Markov chain, which has to be learned from the data collected by the robot. Spatial correlation is based on Gaussian random fields (GRFs), which correlate the Markov chain parameters according to their physical distance. Using this strategy, one point can be learned from its surroundings, and unobserved space can also be learned from nearby observed space. The map is a field of Markov matrices that describe not only the occupancy probabilities (the stationary distribution) as well as the dynamics in every point. The estimation of transition probabilities of the whole space is factorised into two steps: The parameter estimation for training points and the parameter prediction for test points. The parameter estimation in the first step is solved by the expectation maximisation (EM) algorithm. Based on the estimated parameters of training points, the parameters of test points are obtained by the predictive equation in Gaussian processes with noise-free observations. Finally, this method is validated in experimental environments.

1. Introduction

1.1. Literature Review

Dynamic environments are particularly important and complex. These environments include static objects and different kinds of dynamic objects. High dynamic objects, such as moving people, change their position quickly. Low dynamic objects, such as doors and pieces of furniture, can appear and disappear from particular locations however those events are comparatively rare. Autonomous robots should be able to know if objects are static or dynamic to help in path planning.
In earlier research, the environments were assumed to be static. The classical method for static environments is occupancy grid mapping [1,2,3] where maps are divided into a grid and the states of different grid cells are assumed to be independent. In dynamic environments, one popular strategy is to estimate the number of potential targets, their positions, and velocities from sensor data [4,5,6]. The dynamic object detection needs to identify the objects and their correspondence in different time instants. The other one is to apply Markov chains. The dynamic occupancy grids proposed in [7,8,9,10,11,12,13] does not rely on high-level object models. Every grid cell is associated with a Markov chain, where its future occupancy state only depends on the current state. Since the occupancy observations are noisy, the states are not directly observable and the process is modelled instead by hidden Markov models (HMMs) [14] at each point in space. Estimating good parameters in an HMM requires considerable data. If the dependence between different grid cells is taken into account, as is done in [8], maps are built with inconsistencies.

1.2. Research Gap and Motivation

Dynamic object detection requires more powerful sensors [15], such as cameras, while HMM-based methods can be applied with simple distance sensors. Normally, the correlation between parameters in space is not considered in HMM-based methods and inconsistent maps will be produced. In our previous work [16], the inconsistency in discrete space was dealt with by using Markov random fields to regularise the grid. The static mapping methods [17,18,19,20,21,22,23], based on Gaussian Random Fields (GRFs), build smooth occupancy grid maps and predict the occupancy of unobserved space in continuous space. This paper is motivated by them and proposes a new dynamic mapping method based on GRF that is able to deal with continuous space instead of a discrete grid. The state change at every point in continuous space is modelled by a Markov chain with two parameters, and the HMM proposed in [8] is extended with normalised emission probabilities. In one time instant, the map is assumed to be static, and an occupancy grid map is built to obtain the normalised emission probabilities. GRFs are applied to consider the correlation between a point and its neighbouring points. Given the occupancy grid maps, the parameters of every point in the whole space can be estimated. In order to reduce the computation complexity, the parameter estimation is divided into two steps. The first step is to estimate the parameters for training points using the EM algorithm [24,25]. The second step is to predict the parameters for test points using the predictive equation of Gaussian processes with noise-free observations.

1.3. Contribution and Paper Organisation

The main contributions of this paper are highlighted below.
(1)
The extension of the HMM with normalised emission probabilities is developed. Instead of observation models, posterior probability can be used directly to estimate HMM parameters, which is convenient in computation in this paper.
(2)
The HMM parameters of observed space can be smoothed. GRFs are applied to consider the dependence between HMM parameters of different points. The noise in measurements can be filtered and consistent dynamic maps are produced.
(3)
The dynamic behaviour of unobserved space can be predicted. Given the spatial correlation between different points, unobserved space can learn HMM parameters from surrounding observed space and their parameters will be similar.
This paper is organised as follows. The related work is summarised in Section 2. The HMMs with normalised emission probabilities are described in Section 3. The GRF-based methods with known poses and pose uncertainty are proposed in Section 4 and Section 5, respectively. The proposed method is validated in experiments in Section 6.

2. Related Work

In dynamic environments, one point in space may have different states in different time instants, and Markov chains can be applied to model the dynamic behaviour. In [8], the map is divided into grid cells, and every grid cell has two possible states: occupied and free. A Markov chain with two parameters is applied to individually modelled every grid cell. One parameter represents the transition probabilities of state from free to occupied. The other one represents the transition probabilities of state from occupied to free. The states can not be observed certainly and an HMM can be applied. In order to deal with incorrect observations, the underlying possible states are extended and consist of seven components: “true”, “false”, “unknown”, “dynamic”, “falsely false”, “falsely true”, and “falsely true/false” in [13]. Based on the parameters of HMMs, dynamic objects can be classified [9]. The dynamic maps based on HMMs are used to do lifelong localisation tasks [10] and simultaneous localisation and mapping [26,27]. In [11], the dynamic behaviour is modelled as an Input-output Hidden Markov Model (IOHMM) [7,28], where the observations of the neighbouring cells in the previous time step are considered, to take the spatial correlation into account. The input of an IOHMM is the observations of neighbouring cells in the previous time step. In [12], the Explicit-state-Duration Hidden Markov Model (EDHMM) is applied to deal with the Markov chain with variable duration and differentiate the dynamic cells from the static environment.
Gaussian processes, also known as GRFs, can be applied to deal with inconsistency in maps. The advantage is that maps with any resolutions could be built. The Gaussian Process Occupancy Map (GPOM) [17] is an occupancy representation of static environments in continuous space. With the increasing number of training data, the computational complexity of Gaussian processes will also increase. For large-scale environments, training data can be divided into many clusters and a Gaussian process is applied to each subset [18]. Similarly, local Gaussian processes are used to ensure continuity by overlapping clusters [19]. Gaussian processes and Bayesian Committee Machines are applied in [20] to recursively update occupancy maps and surface meshes. The multi-support kernel proposed in [21] enables traditional covariance functions to accept two-dimensional regions, reduces the size of covariance matrices, and accelerates Gaussian process inference and learning. A nested Bayesian committee machine is proposed to learn online 3D occupancy maps using Gaussian processes [22]. Online continuous mapping is proposed to build a map as the zero level set of a Gaussian process implicit surface [23].

3. HMMs for Dynamic Environments

3.1. HMMs

The main difference between static and dynamic environments is the existence of unpredictable dynamic objects. In dynamic environments, one point c in space may be occupied or free in different time instants. Here, its next state m c t + 1 is assumed to only depend on the current one m c t and a Markov chain is applied to model the dynamic behaviour. The occupied and free states are denoted by s 1 and s 2 , respectively. The Markov chain is shown in Figure 1, where the probability transition matrix for m c is denoted by A c = { a i j c } and assumed to be time-invariant.
Defining a grid cell whose central point is c, this point is measured once if one measurement z passes by this grid cell. The Markov chain is a discrete model in time. Between two time instants, the state is assumed to be constant and may be measured multiple times. The measurements for the current state m c t are denoted by z i t with the same superscript t and different subscripts, and the measurement sequence is denoted by y t = ( z 1 t , z 2 t , ) . Due to sensor noise, the states cannot be observed certainly, and an HMM can be applied. The graphical model of an HMM is shown in Figure 2, where ζ is the number of the measurement sequences. The corresponding emission probabilities are p ( y t m c t ) . Since robots always move in space, the observation sequences for the states in different time instants may be different, and the emission probabilities are also different. However, they are not unknown parameters. Assuming independent observations, the emission probabilities can be derived by:
p ( y t m c t ) = i p ( z i t m c t ) ,
where p ( z i t m c t ) can be directly given [8].
The probability of staying in state s i is a i i c , and the probability of changing state s i to the others is 1 a i i c . The probability of staying in state s i for d time steps from time step t is:
p ( s i , d ) = ( 1 a i i c ) ( a i i c ) d 1 p ( m c t = s i ) ,
where p ( m c t = s i ) is the probability that the state at time t is s i . The overall expected duration [29] is defined by:
E ( d ) = s i d d p ( s i , d ) = i 1 1 a i i c p ( m c t = s i ) .
Besides two transition probabilities, the overall expected duration provides an alternative way to analyse the dynamic behaviour. The state distribution (occupied, free) of one point may change with time and the overall expected duration at different times may be different. For convenience, the overall expected duration at a stationary state is applied and given by:
E ( d ) = G 1 1 1 a 11 c + G 2 1 1 a 22 c ,
where G 1 and G 2 are the occupancy and free probabilities of the stationary distribution, respectively. The stationary distribution can be obtained by solving:
[ G 1 G 2 ] a 11 c 1 a 11 c 1 a 22 c a 22 c = [ G 1 G 2 ] , G 1 + G 2 = 1 .
As a result, the probabilities G 1 and G 2 are given by:
G 1 = 1 a 22 c 2 a 11 c a 22 c ,
G 2 = 1 a 11 c 2 a 11 c a 22 c .
Given two transition probabilities a 11 c and a 22 c , the overall expected duration can be computed to indicate how dynamic one point is. High dynamic points will have short overall expected duration.

3.2. Parameter Estimation

Since it is not possible to estimate transition probabilities a 11 c and a 22 c by maximising likelihood directly, the EM algorithm can be applied to estimate the transition probabilities and the initial state probabilities. The parameters are denoted by θ c = { ρ i c , a i j c } , where ρ i c represents the initial state probability p ( m c 0 = s i ) . Assuming an observation sequence is denoted by O = ( y 0 , y 1 , , y ζ 1 ) and an underlying state sequence is denoted by M c = ( m c 0 , m c 1 , , m c ζ 1 ) , the likelihood function of θ c given the observation sequence and the underlying state sequence is:
p ( O , M c θ c ) = p ( m c 0 ) p ( z 0 m c 0 ) t = 1 ζ 1 p ( m c t m c t 1 ) p ( y t m c t ) .
However, an observation sequence y t does not include all of the space. When m c t is not observed, the emission probabilities p ( y t m c t ) are set to 1. In order to estimate the parameters, the EM algorithm is applied to recursively maximise a Q function given by:
Q ( θ c , θ c ( k ) ) = M c p ( M c O , θ c ( k ) ) log p ( M c , O θ c ) = M c p ( M c O , θ c ( k ) ) log p ( O M c , θ c ) + log p ( M c θ c ) = M c p ( M c O , θ c ( k ) ) log p ( O M c , θ c )
+ M c p ( M c O , θ c ( k ) ) log p ( M c θ c ) .
The sum is over all the possible state sequence M c . Since the observation sequence O is conditionally independent of the parameters θ c given the state sequence M c , the probability p ( O M c , θ c ) can be rewritten as p ( O M c ) and is a constant. As a consequence, the first term in Equation (10) is a constant and the parameters can be estimated by maximising the second term rewritten as:
M c p ( M c O , θ c ( k ) ) log p ( M c θ c ) = i = 1 2 γ i c ( 0 ) log ρ i c + t i = 1 2 j = 1 2 ξ i j c ( t ) log a i j c = i = 1 2 γ i c ( 0 ) log ρ i c + t i = 1 2 ξ 1 i c ( t ) log a 1 i c + t i = 1 2 ξ 2 i c ( t ) log a 2 i c = f ( ρ 1 c ) + f ( a 11 c ) + f ( a 22 c ) ,
where three functions f ( ρ 1 c ) , f ( a 11 c ) , and f ( a 22 c ) are defined by:
f ( ρ 1 c ) = i = 1 2 γ i c ( 0 ) log ρ i c
= γ 1 c ( 0 ) log ρ 1 c + γ 2 c ( 0 ) log ( 1 ρ 1 c ) ,
f ( a 11 c ) = t i = 1 2 ξ 1 i c ( t ) log a 1 i c
= t ξ 11 c ( t ) log a 11 c + t ξ 12 c ( t ) log ( 1 a 11 c ) ,
f ( a 22 c ) = t i = 1 2 ξ 2 i c ( t ) log a 2 i c
= t ξ 21 c ( t ) log ( 1 a 22 c ) + t ξ 22 c ( t ) log a 22 c .
The variable γ i c ( t ) represents p ( m c t = s i O , θ c ( k ) ) , which is the probability of being in state s i at time t given the observation sequence O and the parameters θ c ( k ) . The variable ξ i j c ( t ) represents p ( m c t = s i , m c t + 1 = s j O , θ c ( k ) ) which is the probability of being in state s i at time t and state s j at time t + 1 given the observation sequence O and the parameters θ c ( k ) . The three functions contain different parameters and can be maximised individually. Maximising the three functions gives the estimations of the initial state probabilities ρ i c and the transition probabilities a i i c ,
ρ i c ( k + 1 ) = γ i c ( 0 ) ,
a i i c ( k + 1 ) = t = 1 ζ 1 ξ i i c ( t ) t = 1 ζ 1 γ i c ( t ) .
Computing the probabilities γ i c ( t ) and ξ i j c ( t ) requires temporary variables α i c ( t ) and β i c ( t ) . The variable α i c ( t ) = p ( y 0 , y 1 , , y t , m c t = s i θ ) is the probability of seeing the y 0 , y 1 , , y t and being in state s i at time t. This step, called forward procedure, is computed recursively from time 0 to t as:
α i c ( 0 ) = ρ i p ( y 0 m c t = s i ) ,
α j c ( t + 1 ) = p ( y t + 1 m c t = s j ) i = 1 2 α i c ( t ) a i j c .
The variable β i c ( t ) = p ( y t + 1 , , y ζ 1 m c t = s i , θ ) is the probability of the ending partial sequence y t + 1 , , y ζ 1 given starting state s i at time t. This step, called backward procedure, is calculated from time ζ 1 to t as:
β i c ( ζ 1 ) = 1 ,
β i c ( t ) = j = 1 2 β j c ( t + 1 ) a i j c p ( y t + 1 m c t = s j ) .
According to Bayes rule, the variables γ i ( t ) and ξ i j ( t ) are given as:
γ i c ( t ) = α i c ( t ) β i c ( t ) j = 1 2 α j c ( t ) β j c ( t ) ,
ξ i j c ( t ) = α i c ( t ) a i j c β j c ( t + 1 ) b j y t + 1 i = 1 2 j = 1 2 α i c ( t ) a i j β j c ( t + 1 ) b j y t + 1 .
During one time instant, the map is assumed to be static. Occupancy grid mapping [30] can be applied to build a temporal occupancy map for every time instant. Since the transition matrix is unknown, the state probabilities p ( m c t = s 1 ) and p ( m c t = s 2 ) are also unknown. All the state probabilities are temporarily set to 0.5 and the posterior probabilities p ( m c t = s 1 y t ) and p ( m c t = s 2 y t ) can be obtained. However, the probabilities p ( y t m c t = s 1 ) and p ( y t m c t = s 2 ) are required for the HMM. Based on Bayes rule, the posterior probability of the occupied state is given by:
p ( m c t = s 1 y t ) = p ( y t m c t = s 1 ) p ( m c t = s 1 ) p ( y t ) ,
where p ( y t ) is a constant and p ( m c t = s 1 ) is the occupancy probability. Similarly, the posterior probability of the free state is given by:
p ( m c t = s 2 y t ) = p ( y t m c t = s 2 ) p ( m c t = s 2 ) p ( y t ) ,
where p ( m c t = s 2 ) is the free probability. Since the state probabilities p ( m c t ) are set to 0.5, the probabilities p ( m c t = s 1 y t ) and p ( m c t = s 2 y t ) are the normalised version of p ( y t m c t = s 1 ) and p ( y t m c t = s 2 ) . Replaced by p ( m c t y t ) to compute α i c ( t ) and β i c ( t ) give another two temporary variables:
α ^ i c ( t ) = η α c ( t ) α i c ( t ) ,
β ^ i c ( t ) = η β c ( t ) β i c ( t ) ,
where η α c ( t ) and η β c ( t ) are constants. Using these two new variables directly to calculate γ i c ( t ) and ξ i j c ( t ) as in Equations (24) and (25), the same γ i c ( t ) and ξ i j c ( t ) can be obtained,
γ i c ( t ) = α ^ i c ( t ) β ^ i c ( t ) j = 1 g α ^ j c ( t ) β ^ j c ( t ) ,
ξ i j c ( t ) = α ^ i c ( t ) a i j c β ^ j c ( t + 1 ) p ( m c t + 1 = s j y t + 1 ) i = 1 g j = 1 g α ^ i c ( t ) a i j c β ^ j c ( t + 1 ) p ( m c t + 1 = s j y t + 1 ) .
Finally these constants are cancelled. As a result, the probabilities p ( m c t y t ) can be used to estimate the parameters conveniently instead of p ( y t m c t ) . For the case that one point is not observed during one time instant, setting the corresponding emission probabilities p ( y t m c t ) to 0.5 also gives the same result.

4. GRF-Based HMM with Known Poses

In the previous section, each point is associated with two HMM parameters: a 11 c and a 22 c . In this section, GRFs are applied to consider the dependence between the parameters of different points, and the two parameters of one point are assumed to be independent. This means there will be two GRFs, one for each parameter. Given some training points in observed space, the parameters of any test point in continuous space can be predicted.
In the previous section, a grid cell is defined in order to obtain the corresponding observation sequence. In this section, the space is divided into grid cells and the central point of each observed grid cell is chosen as a training point. Meanwhile, the test points are chosen arbitrarily. The coordinate set of training points and test points are denoted by I and I * , respectively. The parameters of training points are denoted by A = ( a 11 , a 22 ) , where a 11 = [ , a 11 c , ] T ( c I ) and a 22 = [ , a 22 c , ] T ( c I ) . The parameters of test points are denoted by A * = ( a 11 * , a 22 * ) , where a 11 * = [ , a 11 c , ] T ( c I * ) and a 22 * = [ , a 22 c , ] T ( c I * ) . In probabilistic form, the parameter estimation of all the selected points including training and test points is:
p ( A , A * O ) .
The problem can be factorised as:
p ( A , A * O ) = p ( A * A ) p ( A O ) ,
where p ( A O ) is an HMM parameter estimation problem for training points and p ( A * A ) is an HMM parameter prediction problem for test points. The parameter estimation for training and test points are done individually.

4.1. HMM Parameter Estimation

Due to the independence between a 11 and a 22 , the prior distribution can be factorised as:
p ( A ) = p ( a 11 ) p ( a 22 ) ,
where p ( a 11 ) and p ( a 22 ) are assumed to have the same distribution. The parameter vector a 11 is taken as an example. The log odds form of a 11 c is defined as [31]:
l a 11 c = log a 11 c 1 a 11 c .
The vector of all the l a 11 c of training points is denoted by l a 11 = [ , l a 11 c , ] T ( c I ) and can be expressed as:
l a 11 = log a 11 1 a 11 ,
where 1 is a column of ones and the division is elementwise. The vector l a 11 is assumed to be Gaussian distributed with mean vector μ 1 and covariance matrix K I I ,
l a 11 N ( μ 1 , K I I ) .
The covariance function is the Ornstein–Uhlenbeck kernel function as:
C ( c , c ) = σ f 2 exp | c c | ,
where σ f 2 is the signal variance, the parameter is the length-scale, and the variables c and c are the corresponding coordinates of two random variables. The prior distribution p ( a 11 ) is:
p ( a 11 ) = 1 ( 2 π ) n | K I I | exp 1 2 U ( a 11 ) ,
where n is the number of training points and:
U ( a 11 ) = ( log a 11 1 a 11 μ 1 ) T K I I 1 ( log a 11 1 a 11 μ 1 ) .
Similarly, the log odds form of a 22 c is defined as:
l a 22 c = log a 22 c 1 a 22 c .
The vector of all the l a 22 c of training points is denoted by l a 22 = [ , l a 22 c , ] T ( c I ) and also assumed to be Gaussian distributed. The prior distribution p ( a 22 ) is given in the same way by:
p ( a 22 ) = 1 ( 2 π ) n | K I I | exp 1 2 U ( a 22 ) ,
where
U ( a 22 ) = ( log a 22 1 a 22 μ 2 ) T K I I 1 ( log a 22 1 a 22 μ 2 ) ,
and μ 2 is the mean vector of l a 22 .
During one time instant t, the map that consists of the states of training points is denoted by M t = { , m c t , } ( c I ) and the states of different training points are assumed to be independent. The distribution of the map is:
p ( M t ) = c I p ( m c t ) .
A map sequence consists of different maps M t in time and is denoted by M = { M 0 , , M t , } . As shown in Figure 3, the map sequence depends on space and time. Meanwhile, the map sequence also consists of different state sequences M c ( c I ) in space and can also be expressed as M = { , M c , } ( c I ) . Due to the state independence between different points, the current state of one point only depends on its previous state. The corresponding distribution is computed by:
p ( M ) = c I p ( M c ) .
The likelihood of A given the observation sequence O and the underlying map sequence M is:
p ( O , M A ) = p ( O M , A ) p ( M A )
= p ( O M ) p ( M A ) .
Given the map sequence M , the observation sequence O is conditionally independent of the parameters A . Assuming the measurements are independent of each other, the probability p ( O M ) can be obtained by:
p ( O M ) = t p ( y t M t ) .
The measurement sequence y t only depends on the map configuration M t in the same time instant t. The probability p ( y t M t ) can be derived from the sensor model,
p ( y t M t ) = i p ( z t i M t ) .
Due to the state dependence between different points, the state sequence M c only depends on the corresponding parameter A c at the same coordinate c and p ( M A ) can be factorised as:
p ( M A ) = c I p ( M c A c ) .
The likelihood can be given by:
p ( O A ) = M p ( O , M A ) .
The observation sequence is also conditional on the initial map distribution p ( M 0 ) , which requires the initial state probabilities ρ i c = p ( m c 0 = s i ) of training points as in Equation (44). For convenience, the initial probabilities are not written together with A .
Based on Bayes rule, the posterior distribution is:
p ( A O ) = p ( O A ) p ( A ) p ( O ) ,
where p ( O ) is a normalising constant.
Similar to the HMM problem in the previous section, the EM algorithm is also applied to estimate the parameters. The Q function with the prior distribution [32] is given as:
Q ( A , A ( k ) ) = E M O , A ( k ) log p ( M , O A ) + log p ( A ) = E M O , A ( k ) log p ( O M , A ) + E M O , A ( k ) log p ( M A ) 2 log ( ( 2 π ) n | K I I | ) 1 2 U ( a 11 ) 1 2 U ( a 22 ) ,
where A ( k ) represents the parameters obtained in iteration k. Since the observation sequence O is conditionally independent of the parameters given the map sequence M , the probabilities p ( O M , A ) can be rewritten as p ( O M ) and is a constant. The normalizer, Z, is also a constant. As a result, the parameters can be obtained by maximising the non-constant terms. The second term is rewritten as:
E M O , A ( k ) log p ( M A ) = M p ( M O , A ( k ) ) c I log p ( M c A c ) = c I M p ( M O , A ( k ) ) log p ( M c A c ) = c I M c p ( M c O , A c ( k ) ) log p ( M c A c ) .
Since the initial state probabilities ρ i c are not written together with A c , the probability p ( M c O , A c ( k ) ) is the same as p ( M c O , θ c ( k ) ) in Equation (11), where θ c includes A c and the initial state probabilities ρ i c . The non-constant terms in this Q function is rewritten as:
E M O , A ( k ) log p ( M A ) 1 2 U ( a 11 ) 1 2 U ( a 22 ) = c I f ( ρ 1 c ) + c I f ( a 11 c ) + c I f ( a 22 c ) 1 2 U ( a 11 ) 1 2 U ( a 22 ) = f ( ρ 1 ) + f ( a 11 ) + f ( a 22 ) ,
where ρ 1 is defined by ρ 1 = [ , ρ 1 c , ] T which is the vector of the initial occupancy probabilities ρ 1 c of observed grid cells. The function f ( ρ 1 ) , f ( a 11 ) , and f ( a 22 ) are the vector versions of the ones defined in Equations (13), (15) and (17), defined by:
f ( ρ 1 ) = c I f ( ρ 1 c ) = γ 1 log ρ 1 + γ 2 log ( 1 ρ 1 ) ,
f ( a 11 ) = c I f ( a 11 c ) 1 2 U ( a 11 ) = ξ 11 log a 11 + ξ 12 log ( 1 a 11 ) 1 2 U ( a 11 ) ,
f ( a 22 ) = c I f ( a 22 c ) 1 2 U ( a 22 ) = ξ 22 log a 22 + ξ 21 log ( 1 a 22 ) 1 2 U ( a 22 ) ,
where γ i = [ , γ i c ( 0 ) , ] ( c I ) and ξ i j = [ , t ξ i j c ( t ) , ] ( c I ) . The three functions can also be maximised individually. The derivatives of Q ( A , A ( k ) ) with respect to ρ 1 , a 11 , and a 22 are, respectively, given by:
d d ρ 1 f ( ρ 1 ) = γ 1 T ρ 1 γ 2 T ( 1 ρ 1 ) ,
d d a 11 f ( a 11 ) = ξ 11 T a 11 ξ 12 T ( 1 a 11 ) K I I 1 ( log a 11 1 a 11 μ 1 ) 1 a 11 ( 1 a 11 ) ,
d d a 22 f ( a 22 ) = ξ 22 T a 22 ξ 21 T ( 1 a 22 ) K I I 1 ( log a 22 1 a 22 μ 2 ) 1 a 22 ( 1 a 22 ) ,
where ⊘ is the elementwise division and ⊙ is Hadamard product. Without prior knowledge, the parameter f ( ρ 1 ) can be maximised directly and the estimation of ρ 1 is:
ρ 1 = γ 1 T .
With the prior p ( a 11 ) and p ( a 22 ) , it is not easy to maximise f ( a 11 ) and f ( a 22 ) , or equivalently to minimise f ( a 11 ) and f ( a 22 ) . The line search method (LSM) [33] is used to estimate a 11 and a 22 in range (0,1). The LSM is a gradient-based method and searches for the optimum of the objective function from the initial values of parameters iteratively. Since this estimation is only one step in the whole optimisation process and only the first iterations are numerically relevant, the LSM can be stopped before convergence in order to achieve computationally efficiency.

4.2. HMM Parameter Prediction

The EM algorithm in the previous section does not give the variances of the parameters a 11 and a 22 . After the HMM parameter estimation, all the noise in the observations are assumed to be filtered out and the estimates of a 11 and a 22 are assumed to be without noise. Due to the independence between a 11 c and a 22 c , the prediction problem can be divided as:
p ( A * A ) = p ( a 11 * a 11 ) p ( a 22 * a 22 ) .
Assuming the log odds forms of the parameter vectors a 11 * and a 22 * for test points are denoted by l a 11 * = [ , l a 11 c , ] T ( c I * ) and l a 22 * = [ , l a 22 c , ] T ( c I * ) , respectively. The distributions p ( a 11 * a 11 ) and p ( a 22 * a 22 ) can be derived from p ( l a 11 * l a 11 ) and p ( l a 22 * l a 22 ) , respectively. The joint distribution of l a 22 and l a 22 * is:
l a 11 l a 11 * N μ 1 μ 1 * , K I I K I * T K I * K * * ,
where μ 1 * is the mean vector of l a 11 * , the matrix K I * denotes the covariance matrix between l a 11 and l a 11 * , and K * * is the covariance matrix of l a 11 * . The predictive equation with noise-free observations [34] is:
l a 11 * l a 11 N ( l ¯ a 11 * , K ^ a * ) ,
where the predictive mean vector l ¯ a 11 * and covariance matrix K ^ a * are given as:
l ¯ a 11 * = μ 1 * + K I * K I I 1 ( l a 11 μ 1 ) ,
K ^ a * = K * * K I * K I I 1 K I * T .
The best predictive parameter vector a 11 * of test points is given by the logistic function:
a 11 * = 1 1 + exp l ¯ a 11 * ,
where the division is elementwise. Similarly, the joint distribution of l a 11 and l a 11 * is:
l a 22 l a 22 * N μ 2 μ 2 * , K I I K I * T K I * K * * ,
where μ 2 * is the mean vector of l a 22 * . The coordinates of training points and test points for two prediction problems are the same. As a result, the covariance matrix of the joint distribution and the predictive covariance matrix do not change. The predictive equation of l a 22 * is:
l a 22 * l a 22 N ( l ¯ a 22 * , K ^ a * ) ,
where the predictive mean vector l ¯ a 22 * is:
l ¯ a 22 * = μ 2 * + K I * K I I 1 ( l a 22 μ 2 ) .
The best predictive parameter vector a 22 * of test points is:
a 22 * = 1 1 + exp l ¯ a 22 * .

5. GRF-Based HMM with Pose Uncertainty

The mapping method in the previous section computes the posterior distribution from a prior term and a likelihood term assuming that the precise position of the robot is known. When the uncertainty of robot poses is considered, the problem is how to incorporate that uncertainty into the two terms. The prior distributions depend on the relative positions between different points. However, the chosen points in observed space are the central points of observed grid cells. The points in unobserved space are chosen arbitrarily. As a result, the prior term does not depend on robot poses. Without pose uncertainty, the likelihood term is derived directly from the measurement model p ( z i m ) , where m denotes the whole map. When the robot pose P k at the time step k is uncertain, the measurement model is p ( z i m , P k ) . Based on the law of total probability, the uncertainty of the robot pose can be incorporated into the sensor uncertainty by:
p ( z i m ) = p ( z i m , P k ) p ( P k ) d P k .
In this work, the map is divided into grid cells to obtain observation sequences, however it is not easy to integrate the probability in each grid cell. This problem can be solved by sampling n s points from the distribution p ( P k Z 0 , Z ζ ) and averaging over all the pose samples. Assuming the samples denoted by P k i with associated weights w i , Equation (73) can be rewritten as:
p ( z i m ) = i = 1 n s w i p ( z i m , P k i ) .
Assuming m denotes a whole grid map and the state of one grid cell is denoted by m c , the probability p ( z i m c ) can be obtained by:
p ( z i m c ) = m m c p ( z i m ) p ( m m c m c ) = m m c i = 1 n s w i p ( z i m , P k i ) p ( m m c m c ) = i = 1 n s m m c w i p ( z i m , P k i ) p ( m m c m c ) = i = 1 n s w i p ( z i m c , P k i ) ,
where m m c means the whole map m without m c . After the uncertainty of robot poses are incorporated, the proposed method in the previous section can be implemented as usual.

6. Experiments

6.1. Experimental Setup

The experimental platform consists of two parts: The robot part and the PC part. On the robot part, a 3pi robot and one XBee communication module are connected to an mbed expansion board, two IR sensors are connected to the mbed. On the PC part, one XBee module is connected to the PC by an XBee Explorer USB. The 3pi robot is controlled by the mbed microprocessor which sends commands to the robot by a pair of serial ports. The IR sensors 1 and 2 are two Sharp GP2Y0A41SK0F IR sensors, which can measure distances to objects and generate an analog voltage signal. The mbed samples the analog voltages of the IR sensors by two ADC ports. The voltage data can be sent to the PC by XBees 1 and 2, which are XBee S1 802.15.4 low-power modules. The mbed sends data to XBee 1 by another pair of serial ports. XBee 2 receives the data from XBee 1 and sends it to the PC. Since the mbed processor has limited computational power, the PC is in charge of the mapping tasks.

6.2. Experimental Environments

To illustrate the algorithm, the experimental map is shown in Figure 4. There are some objects with different shapes and sizes. The coordinates of the map are shown in Figure 5. The objects with labels 1, 3, 4, 6, 8, and 9 appear and disappear from their positions with different frequencies. The object 1 changes its state at every loop and the subsequent dynamic objects change their states every 2, 5, 10, 20, and 50 loops, respectively. The objects 2, 5, and 7 are static.
A 3pi robot equipped with two Sharp GP2Y0A41SK0F IR sensors is used to test the proposed method. Its diameter is 9.5 cm and the width W between two wheels is 8.2 cm. Two IR sensors are mounted on the robot as shown in Figure 6, and the relative orientations are ± 30 with respect to the robot’s reference frame. The measuring range is 4 to 30 cm. When the distances are more than 20 cm, the output voltage has lower sensitivity and becomes noisier. In the experiments, the maximum distances of IR sensors are set to 20 cm. Since the aperture angle is very small, the two IR sensors do not interface with each other.

6.3. Pose Uncertainty

As the robot explores the environment, its pose uncertainty will increase. A track with a mark is drawn in Figure 4 to decrease the pose uncertainty. Five QTR-RC reflectance sensors in the front of the robot are used to follow the track and detect the mark, and a simple controller is designed to help the robot follow the track. As the robot moves, its pose is predicted by its motion model while the corresponding uncertainty increases. When the robot detects the mark again, the robot closes its trajectory, and all the poses are corrected.

6.3.1. Robot Motion Model

The robot position is represented by the central point between two wheels in world coordinates, and its orientation is relative to the x axis. Its pose vector is denoted by P = [ x , y , ϕ ] T , which includes the position ( x , y ) and the orientation ϕ . Assuming the speeds of the left and right wheels are denoted by v l and v r , the speed of the robot is modelled as:
d d t x = v l + v r 2 cos ϕ d d t y = v l + v r 2 sin ϕ d d t ϕ = v r v l W .
When the robot goes straight shown in Figure 7, its orientation does not change. Assuming the pose at time step k 1 is denoted by P k 1 = ( x k 1 , y k 1 , ϕ k 1 ) , the next pose P k after a time interval Δ t can be computed based on the Euler method,
x k = x k 1 + v l + v r 2 Δ t cos ϕ k 1 y k = y k 1 + v l + v r 2 Δ t sin ϕ k 1 ϕ k = ϕ k 1 .
When the robot does not move straight shown in Figure 8, direct integration is performed instead of the Euler approximation. Integrating Equation (76) in a time interval Δ t gives the new pose [31]:
x k = x k 1 + W ( v l + v r ) 2 ( v r v l ) ( sin ( ϕ k 1 + v r v l W ) sin ϕ k 1 ) y k = y k 1 + W ( v l + v r ) 2 ( v r v l ) ( cos ( ϕ k 1 + v r v l W ) + cos ϕ k 1 ) ϕ k = ϕ k 1 + v r v l W Δ t .
The system model with additive process noise W is rewritten as:
P k = F ( P k 1 , v r , v l ) + W ,
where W is Gaussian distributed with zero mean and covariance matrix R . The function F ( P k 1 , v r , v l ) represents the expressions on the right sides of Equations (77) and (78).

6.3.2. Robot Measurement Model

The robot follows the track in a clockwise direction. Once the robot detects the mark, there will be one observation of the position of the robot. The part of the track in front of the mark is straight. When the robot arrives at the mark, the simple controller can adjust the orientation of the robot to be close to π . As a result, the position and the orientation become known, although not precisely. However, the observation is not precise. The noisy observation is modelled as:
Z k = P k + [ 4.75 , 0 , 0 ] T + V ,
where V is Gaussian noise with zero mean and covariance matrix Q . The measurement Z k is the pose of the robot head where the reflectance sensors are located and P k is the pose of the central point of the robot. The pose difference between the head and the central point is [ 4.75 , 0 , 0 ] T when the mark is detected.

6.3.3. Pose Smoothing

When the robot starts at the mark and performs a complete loop returning to the mark, only two observations of the pose are available, as shown in Figure 9. The two observations are denoted by Z 0 and Z ζ , respectively. Assuming the position of the mark is at coordinates ( x 0 , y 0 ), both observations Z 0 and Z ζ are equal to ( x 0 , y 0 , – π ). In order to ensure the smoothness of pose estimation along the trajectory, all the poses along the trajectory should be corrected by the observations. The pose smoothing can be obtained by:
p ( P k Z 0 , Z ζ ) = p ( Z ζ P k ) p ( P k Z 0 ) p ( Z ζ Z 0 ) .
This formula is divided into two steps: The forward step p ( P k Z 0 ) and the backward step p ( Z ζ P k ) .
The objective of the forward step is to estimate p ( P k Z 0 ) , which in general can be obtained by iterating the equation:
p ( P k Z 0 ) = p ( P k P k 1 ) p ( P k 1 Z 0 ) d P k 1 .
Since there is no prior knowledge for P 0 , the posterior distribution p ( P 0 Z 0 ) is assumed to be Gaussian distributed with mean ( x 0 , y 0 , – π ) and covariance matrix Q . Based on the previous predicted state distribution p ( P k 1 Z 0 ) , the current predicted state distribution p ( P k Z 0 ) can be obtained. Since the robot model is nonlinear and Equation (82) is difficult to integrate, the forward step is done instead by the scaled unscented transformation [35]. The dimension L of the pose vector p ( P k ) is 3 and 2 L + 1 sigma points should be sampled from the distribution p ( P k 1 Z 0 ) , which is assumed to be Gaussian distributed with mean vector P ¯ k 1 and covariance matrix P k 1 . The sigma points P k 1 i are given by:
P k 1 0 = P ¯ k 1 , P k 1 i = P ¯ k 1 + ( ( L + λ ) P k 1 ) i for i = 1 , , L , P k 1 i = P ¯ k 1 ( ( L + λ ) P k 1 ) i L for i = ( L + 1 ) , , 2 L .
The corresponding mean weights w m i and covariance weights w c i are given by:
w m 0 = λ L + λ , w c 0 = λ L + λ + 1 α 2 + β , w m i = w c i = 1 2 ( L + λ ) i = 1 , , 2 L ,
where α , β , and κ are parameters, the variable λ = α 2 ( L + κ ) L . The formula ( ( L + λ ) P k 1 ) i is the i t h column of ( L + λ ) P k 1 . The parameter α is a positive scaling parameter and its range (0,1). The parameter κ is a non-negative scaling parameter and its range is [0, ∞). Normally κ is set to 0 [36]. The parameter β is used to incorporate prior knowledge of the distribution of P k 1 . For Gaussian distributions, the optimal choice is 2 [35].
Based on these sigma points, the next pose can be predicted by projecting sigma points through the motion model and new sigma points P k i will be obtained. However, they should be augmented to include the system noise. The first augmented sigma point P k 0 is the same as P k 0 . The other augmented sigma points are given by:
P k i = P k i + ( ( L + λ ) R ) i for i = 1 , , L , P k i ( ( L + λ ) R ) i L for i = ( L + 1 ) , , 2 L .
The mean vector and covariance matrix of the distribution p ( P k Z 0 ) can be respectively approximated as:
P ¯ k i = 0 2 L w m i P k i ,
P k i = 0 2 L w c i ( P k i P ¯ k ) ( P k i P ¯ k ) T .
The objective of the backward step is to estimate p ( Z ζ P k ) , which in general is given by iterating the equation:
p ( Z ζ P k ) = p ( Z ζ P k + 1 ) p ( P k + 1 P k ) d P k + 1 .
This equation means p ( Z ζ P k ) can also be obtained recursively based on the robot motion model.
As in the forward step, Equation (88) is difficult to integrate due to the nonlinear characteristics of the motion model, and the same approach based on the unscented transformation is used. The sigma points for the predicted observation are given by:
z ζ i = P ζ i + [ 4.75 , 0 , 0 ] T .
The mean vector and covariance matrix of the predicted measurement are approximated, respectively, by:
z ¯ ζ P ¯ ζ + [ 4.75 , 0 , 0 ] T ,
P z P ζ + Q .
For the pose P k , every sigma point P k i corresponds to a sigma point z ζ i at the end of the time horizon. The corrected sigma points P k i + used to approximate the corrected distribution p ( P k Z 0 , Z ζ ) , which already include the backward step, are computed by:
P k i + = P k i + K ( Z ζ z ζ i ) .
The Kalman gain K and cross variance P k z are given by:
K = P k z P z 1 ,
P k z = i = 0 2 L w c i ( P k i P ¯ k ) ( z ζ i z ¯ ζ ) T .
The mean vector and covariance matrix of the distribution p ( P k Z 0 , Z ζ ) are finally estimated as:
P ¯ k + = i = 0 2 L w m i P k i + = P ¯ k + K ( Z ζ z ¯ ζ ) ,
P k + = P k K P z K T .
Taking advantage of corrected sigma points P k i + , Equation (74) can be rewritten as:
p ( z i m ) = i = 0 2 L w m i p ( z i m , P k i + ) .
The position of the mark is set to be at coordinates (45, 25), and the coordinates of the track are shown in Figure 5. The two observations Z 0 and Z ζ are (45, 25, π ). The covariance matrices R and Q are set to:
R = 10 5 0 0 0 10 5 0 0 0 5 × 10 5 ,
Q = 8 × 10 6 1 0 0 0 1 0 0 0 1 .
The other three parameters are set to α = 0.00001 , β = 2 , and κ = 0 . The predicted position of the robot before reaching the mark is shown in Figure 10, and the ellipses represent the position uncertainty of the robot (level curve of the distribution at three standard deviations). As time goes by, the uncertainty increases. After a complete loop, the estimated position has drifted to a wrong position, however it is still inside the ellipse. After pose smoothing, the position correction is shown in Figure 11. The estimated positions on the top are out of the outer line of the track with large variances, however the estimated positions near the initial and final positions are more accurate, as expected.

6.4. Results

Regarding the beam model of the two IR sensors, the occupancy and free probabilities p ( z i m c ) of the occupied grid cells in the measurement ranges are set to 0.998 and 0.002, respectively. The two probabilities of the free grid cells in the measurement ranges are set to 0.008 and 0.992. The two probabilities for grid cells outside the measurement ranges are set to 0.5.
The robot follows the track for 100 loops, and an occupancy grid map is built for every loop. Grid cells with posterior occupancy probabilities larger than 0.5 are assumed to be observed occupied. While posterior occupancy probabilities less than 0.5 are assumed to be observed free. The total times the grid cells are observed free and occupied are shown in Figure 12 and Figure 13, respectively. Most of the space in the middle is observed free many times. The space behind the dynamic objects has about half a chance to be observed, and the space behind the static objects is never observed. For the static objects, their borders are observed partially. Due to the uncertainty of sensors and robot poses, the space around the objects is sometimes observed to be occupied. Similarly to most of the observed space, the number of observed times for dynamic object 6 in Figure 13 is close to 0, possibly due to the small size of the object combined with the fact that the robot is turning when the range finder crosses the object.
The central points of grid cells in observed space are the training data to test the proposed method, and the test points are only chosen from unobserved space. The initial values of the probabilities are set to 0.5, the length-scale of the covariance function is set to 3, and the signal variance σ f 2 is set to 25. The mean vectors μ 1 and μ 1 * of the occupied-to-occupied probabilities for the training and test points are set to log 9 , which corresponds to a probability of 0.9. The mean vectors μ 2 and μ 2 * are set to log 99 , which corresponds to a probability of 0.99. It means the prior knowledge of the environment is slow dynamic. The maximum number of iterations of the optimisation process is set to 800, and the results are shown in Figure 14 and Figure 15, where the unobserved space is covered by asterisks and has no estimates of transition probabilities. For most of the free space, all the observations are free. The parameter a 11 of most of the observed free space in Figure 14 are close to the initial value 0.5, which should be close to 0. In this area, most of the observations are free. In contrast, the other observed free space with more unknown observations has a better parameter estimate.
In order to discover the reason, several free points without occupied observations are chosen from the observed space and their parameters are individually estimated using the method in Section 3. Table 1 shows the numbers of observations of four free points selected. All of them have no occupied observations and different numbers of free observations. The optimisation processes of their parameters are shown in Figure 16 and Figure 17, where the optimisation processes with more free observations converge faster. The derivatives of Q ( θ c , θ c ( k ) ) with respect to a 11 and a 22 are shown in Figure 18 and Figure 19, respectively. Even though there is no occupied observation, the derivatives of the Q function with respect to a 11 are not always zeros and converge to zeros. When the parameters a 22 converge to 1, the derivatives of Q function with respect to a 22 converge to nonzero constants. The best estimates of a 22 for these free points are 1. When a 22 reaches 0.9, the derivative for corresponding a 11 is close to 0. For the space without unknown observation, the corresponding parameter a 11 converge very quickly and a 11 has lesser chance to be optimised. With different numbers of observations, the estimation processes converge at different speeds.
In order to decrease the convergence speed of a 22 , for the space with more than 95 free observations, 45 of them are replaced by 45 fake observations corresponding to unknown space. the derivative of Q with respect to a 11 for occupied space and the derivative of Q with respect to a 22 for free space never converge to zeros. The LSM will always search for the estimates for them even though their estimates are close to 1. In order to give more chances to other parameters, the optimisation process halts searching for them when their estimates reach 0.995. The grid cells with more observations will converge faster. For the border of observed space and unobserved space, there are fewer or no observations, and it will take a long period of time to converge.
Since the points with more observations converge quickly, it will take a long period of time to obtain the best estimates for the points with fewer observations. The maximum number of iterations of the optimisation process is set to 1500. The new results are shown in Figure 20 and Figure 21, where most of the observed free space has low a 11 and high a 22 . This means that the state stays free for a long time and changes from occupied to free quickly. The static objects 2, 5, and 7 have the opposite behaviour and parameters. The state of the dynamic object 1 alternates between free and occupied quickly. For the dynamic objects 3 and 4, the colour becomes darker corresponding to slower dynamics. Due to the lack of observations, the dynamic object 6 is estimated as free space. The other two dynamic objects 8 and 9 change their states slowly. The space behind these dynamic objects has fewer observations, the corresponding areas are darker than the space with more free observations. The space behind static objects 2 and 5 is never observed, and therefore there is no estimate. Due to the uncertainty of the robot pose, the space behind the static object 7 has a similar estimate to free space.
The parameter prediction for unobserved space is shown in Figure 22 and Figure 23. The border of the observed space in Figure 22 is a little fuzzy and the estimate of most of the unobserved space is similar to the prior. In Figure 23, most of the parameters on the borders of observed space are close to 1, and the parameters of the unobserved space near these areas are also predicted to be close to one. Since the parameters of the borders of observed space near the static objects are close to 0.5, the darkness near these areas is lighter. Similarly to Figure 22, the prediction of the other unobserved space is similar to the prior.
Based on parameters a 11 and a 22 , the space in dynamic environments can be classified as Table 2. Based on the table, the objects 1, 3, 4, and 6 in the experimental map are high dynamic, and the objects 8 and 9 are low dynamic. The classification results are shown as Figure 24 and Table 3. Due to pose uncertainty, the positions of the objects 8 and 9 are different from the truth. Even though they are obvious in Figure 24, all the True Low Dynamic (TLD) space is wrong. For the same reason, the dynamic objects 3 and 6 are estimated as free space. Due to the prior low dynamic assumption, there is more False Low Dynamic (FLD) space. As the proposed method can smooth the map, there must be more FHD space. The prediction variance increases with the distance to the observed space. As a result, only the predictions near the observed space are more believable. Moreover, the proposed method can predict more free space correctly. The classification accuracy for observed space is 96%.
Given the transition probabilities, the overall expected duration is shown in Figure 25 and the version in log scale is shown in Figure 26. The observed free space, the static objects, and the low dynamic objects have long overall expected expectations. The dynamic objects 3 and 6 are mostly invisible and have similar overall expected durations to the free space. The dynamic objects with higher switching frequencies, 1 and 4, have shorter overall expected durations and are clearly visible in log scale. For the unobserved space behind the static objects, the overall expected duration is short. The remaining unobserved space has a long overall expected duration.

7. Conclusions

In this paper, a GRF-based mapping method for dynamic environments is proposed, where the dynamic behaviour is modelled by HMMs. The HMM with normalised emission probabilities is introduced and used to conveniently estimate the parameters. In order to deal with the inconsistency in the parameter maps, GRFs are applied to consider the correlations between different points in continue space. The parameter estimation is factorised to reduce computational complexity. The EM algorithm is used to estimate the parameters for the observed space, where the Q function is optimised by the line search method. The predictive equation of the Gaussian process is used to deal with the parameters for the unobserved space. The pose uncertainty is incorporated into the measurement model and a 3pi robot with two IR sensors is used to evaluate the proposed method. Experiment results show that parameter estimation depends on robot poses. Even though the proposed method identifies the low dynamic objects, the number of TLD is 0. The classification accuracy for observed space is 96%. Compared with the state-of-the-art approaches, the proposed method takes the parameter dependence into consideration and builds smooth maps for observed space. Moreover, the dynamic behaviour near the observed space can be predicted, which is significant for path planning. The main disadvantage is that it takes a long period of time to search for the parameters of points with fewer observations. In future work, we plan to reduce the computational complexity.

Author Contributions

Conceptualisation, H.L., M.B. and L.R.; methodology, H.L., M.B. and L.R.; software, H.L., M.B. and L.R.; validation, H.L., M.B. and L.R.; formal analysis, H.L., M.B. and L.R.; investigation, H.L., M.B. and L.R.; resources, H.L., M.B. and L.R.; data curation, H.L., M.B. and L.R.; writing—original draft preparation, H.L., M.B. and L.R.; writing—review and editing, M.B., L.R. and S.W.; visualization, H.L.; supervision, M.B., L.R. and S.W.; project administration, M.B. and L.R.; funding acquisition, M.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by EACEA under the Erasmus Mundus Action 2, Strand 1 project LEADER and Scientific and Technological Project in Henan Province (grant number 212102210080 and 222102210019).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Moravec, H.; Elfes, A. High resolution maps from wide angle sonar. In Proceedings of the IEEE International Conference on Robotics and Automation, St. Louis, MO, USA, 25–28 March 1985; pp. 116–121. [Google Scholar]
  2. Plebe, A.; Kooij, J.F.; Papini, G.P.R.; Da Lio, M. Occupancy grid mapping with cognitive plausibility for autonomous driving applications. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada, 11–17 October 2021; pp. 2934–2941. [Google Scholar]
  3. Mugnai, F.; Ridolfi, A.; Bianchi, M.; Franchi, M.; Tucci, G. Developing affordable bathymetric analysis techniques using non-conventional payload for cultural heritage inspections. Int. Arch. Photogramm. Remote Sens. Spat. Inf. Sci. 2019, 42, 807–811. [Google Scholar] [CrossRef] [Green Version]
  4. Wang, C.-C.; Thorpe, C. Simultaneous localization and mapping with detection and tracking of moving objects. In Proceedings of the IEEE International Conference on Robotics and Automation, Washington, DC, USA, 11–15 May 2002; pp. 2918–2924. [Google Scholar]
  5. Steyer, S.; Lenk, C.; Kellner, D.; Tanzmeister, G.; Wollherr, D. Grid-based object tracking with nonlinear dynamic state and shape estimation. IEEE Trans. Intell. Transp. Syst. 2019, 21, 2874–2893. [Google Scholar] [CrossRef] [Green Version]
  6. Schreiber, M.; Belagiannis, V.; Gläser, C.; Dietmayer, K. Dynamic occupancy grid mapping with recurrent neural networks. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA), Xi’an, China, 30 May–5 June 2021; pp. 6717–6724. [Google Scholar]
  7. Bengio, Y.; Frasconi, P. An input output hmm architecture. In Proceedings of the Advances in Neural Information Processing Systems, Denver, CO, USA, 27–30 November 1995; pp. 427–434. [Google Scholar]
  8. Meyer-Delius, D.; Beinhofer, M.; Burgard, W. Occupancy grid models for robot mapping in changing environments. In Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence, Toronto, ON, Canada, 22 July 2012; pp. 2024–2030. [Google Scholar]
  9. Luber, M.; Arras, K.O.; Plagemann, C.; Burgard, W. Classifying dynamic objects. Auton. Robot. 2009, 26, 141–151. [Google Scholar] [CrossRef]
  10. Tipaldi, G.D.; Meyer-Delius, D.; Burgard, W. Lifelong localization in changing environments. Int. J. Robot. Res. 2013, 32, 1662–1678. [Google Scholar] [CrossRef]
  11. Wang, Z.; Ambrus, R.; Jensfelt, P.; Folkesson, J. Modeling motion patterns of dynamic objects by iohmm. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, Chicago, IL, USA, 14–18 September 2014; pp. 1832–1838. [Google Scholar]
  12. Dadhich, A.; Koganti, N.; Shibata, T. Modeling occupancy grids using edhmm for dynamic environments. In Proceedings of the 2015 Conference on Advances in Robotics, New York, NY, USA, 2 July 2015; pp. 1–6. [Google Scholar]
  13. Rapp, M.; Dietmayer, K.; Hahn, M.; Duraisamy, B.; Dickmann, J. Hidden markov model-based occupancy grid maps of dynamic environments. In Proceedings of the 19th International Conference on Information Fusion (FUSION), Heidelberg, Germany, 5–8 July 2016; pp. 1780–1788. [Google Scholar]
  14. Rabiner, L.R. A tutorial on hidden markov models and selected applications in speech recognition. Proc. IEEE 1989, 7, 257–286. [Google Scholar] [CrossRef] [Green Version]
  15. Tingdahl, D.; Gool, L.V. A public system for image based 3d model generation. In Proceedings of the International Conference on Computer Vision/Computer Graphics Collaboration Techniques and Applications, Rocquencourt, France, 10–11 October 2011; pp. 262–273. [Google Scholar]
  16. Li, H.; Barão, M.; Rato, L. Mapping dynamic environments using markov random field models. In Proceedings of the 24th International Conference on Automation and Computing (ICAC), Newcastle Upon Tyne, UK, 6–7 September 2018; pp. 1–5. [Google Scholar]
  17. O’Callaghan, S.T.; Ramos, F.T. Gaussian process occupancy maps. Int. J. Robot. Res. 2012, 31, 42–62. [Google Scholar] [CrossRef]
  18. Kim, S.; Kim, J. Building occupancy maps with a mixture of gaussian processes. In Proceedings of the IEEE International Conference on Robotics and Automation, Saint Paul, MA, USA, 14–18 May 2012; pp. 4756–4761. [Google Scholar]
  19. Kim, S.; Kim, J. Continuous occupancy maps using overlapping local gaussian processes. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems, Tokyo, Japan, 3–7 November 2013; pp. 4709–4714. [Google Scholar]
  20. Kim, S.; Kim, J. Recursive bayesian updates for occupancy mapping and surface reconstruction. In Proceedings of the Australasian Conference on Robotics and Automation, Melbourne, Australia, 2–4 December 2014; pp. 1–8. [Google Scholar]
  21. Vido, C.E.; Ramos, F. From grids to continuous occupancy maps through area kernels. In Proceedings of the IEEE International Conference on Robotics and Automation, Stockholm, Sweden, 16–21 May 2016; pp. 1043–1048. [Google Scholar]
  22. Wang, J.; Englot, B. Fast, accurate gaussian process occupancy maps via test-data octrees and nested bayesian fusion. In Proceedings of the IEEE International Conference on Robotics and Automation, Stockholm, Sweden, 16–21 May 2016; pp. 1003–1010. [Google Scholar]
  23. Lee, B.; Zhang, C.; Huang, Z.; Lee, D.D. Online continuous mapping using gaussian process implicit surfaces. In Proceedings of the International Conference on Robotics and Automation, Montreal, QC, Canada, 20–24 May 2019; pp. 6884–6890. [Google Scholar]
  24. Ossevorth, F.; Schegner, P. Approximating stochastic loads using the em-algorithm. IFAC J. Syst. Control 2021, 18, 100175. [Google Scholar] [CrossRef]
  25. Scaradozzi, D.; Zingaretti, S.; Ferrari, A. Simultaneous localization and mapping (slam) robotics techniques: A possible application in surgery. Shanghai Chest 2018, 2, 1–11. [Google Scholar] [CrossRef]
  26. Bibby, C.; Reid, I. Simultaneous localisation and mapping in dynamic environments (slamide) with reversible data association. In Proceedings of the Robotics: Science and Systems, Atlanta, GA, USA, 27–30 June 2007; pp. 105–112. [Google Scholar]
  27. Campos, C.; Elvira, R.; Rodríguez, J.J.G.; Montiel, J.M.; Tardós, J.D. Orb-slam3: An accurate open-source library for visual, visual–Inertial, and multimap slam. IEEE Trans. Robot. 2021, 37, 1874–1890. [Google Scholar] [CrossRef]
  28. Rocher, G.; Lavirotte, S.; Tigli, J.-Y.; Cotte, G.; Dechavanne, F. An iohmm-based framework to investigate drift in effectiveness of iot-based systems. Sensors 2021, 21, 527. [Google Scholar] [CrossRef] [PubMed]
  29. Rato, L. Controlo Comutado Baseado em Modelos Múltiplos. Ph.D. Thesis, Technical University of Lisbon, Lisbon, Portugal, 2002. [Google Scholar]
  30. Elfes, A. Using occupancy grids for mobile robot perception and navigation. Computer 1989, 22, 46–57. [Google Scholar] [CrossRef]
  31. Thrun, S.; Burgard, W.; Fox, D. Probabilistic Robotics; MIT Press: London, UK, 2005; pp. 74–77. [Google Scholar]
  32. Gupta, M.R.; Chen, Y. Theory and use of the em algorithm. Found. Trends Signal Process. 2011, 4, 223–296. [Google Scholar] [CrossRef]
  33. Nocedal, J.; Wright, S. Numerical Optimization; Springer Science & Business Media: Berlin, Germany, 2006. [Google Scholar]
  34. Rasmussen, C.E.; Williams, C.K. Gaussian Processes for Machine Learning; MIT Press: London, UK, 2006; pp. 13–19. [Google Scholar]
  35. Julier, S.J. The scaled unscented transformation. In Proceedings of the American Control Conference, Anchorage, MI, USA, 8–10 May 2002; pp. 4555–4559. [Google Scholar]
  36. Van Der Merwe, R. Sigma-point Kalman Filters for Probabilistic Inference in Dynamic State-Space Models. Ph.D. Thesis, Oregon Health & Science University, Portland, ON, USA, 2004. [Google Scholar]
Figure 1. Markov chain for one point.
Figure 1. Markov chain for one point.
Electronics 11 00722 g001
Figure 2. HMM for one point.
Figure 2. HMM for one point.
Electronics 11 00722 g002
Figure 3. An example of a map sequence.
Figure 3. An example of a map sequence.
Electronics 11 00722 g003
Figure 4. Experimental map.
Figure 4. Experimental map.
Electronics 11 00722 g004
Figure 5. Coordinates of the experimental map.
Figure 5. Coordinates of the experimental map.
Electronics 11 00722 g005
Figure 6. Brief top view of the robot.
Figure 6. Brief top view of the robot.
Electronics 11 00722 g006
Figure 7. The pose when the robot goes straight.
Figure 7. The pose when the robot goes straight.
Electronics 11 00722 g007
Figure 8. The pose when the robot turns.
Figure 8. The pose when the robot turns.
Electronics 11 00722 g008
Figure 9. Two observations for the robot.
Figure 9. Two observations for the robot.
Electronics 11 00722 g009
Figure 10. Position prediction.
Figure 10. Position prediction.
Electronics 11 00722 g010
Figure 11. Position correction.
Figure 11. Position correction.
Electronics 11 00722 g011
Figure 12. The total number of free observations.
Figure 12. The total number of free observations.
Electronics 11 00722 g012
Figure 13. The total number of occupied observations.
Figure 13. The total number of occupied observations.
Electronics 11 00722 g013
Figure 14. HMM parameter estimation of a 11 (occupied to occupied).
Figure 14. HMM parameter estimation of a 11 (occupied to occupied).
Electronics 11 00722 g014
Figure 15. HMM parameter estimation of a 22 (free to free).
Figure 15. HMM parameter estimation of a 22 (free to free).
Electronics 11 00722 g015
Figure 16. Optimisation process of a 11 (occupied to occupied).
Figure 16. Optimisation process of a 11 (occupied to occupied).
Electronics 11 00722 g016
Figure 17. Optimisation process of a 22 (free to free).
Figure 17. Optimisation process of a 22 (free to free).
Electronics 11 00722 g017
Figure 18. Derivative of Q ( θ c , θ c ( k ) ) with respect to a 11 .
Figure 18. Derivative of Q ( θ c , θ c ( k ) ) with respect to a 11 .
Electronics 11 00722 g018
Figure 19. Derivative of Q ( θ c , θ c ( k ) ) with respect to a 22 .
Figure 19. Derivative of Q ( θ c , θ c ( k ) ) with respect to a 22 .
Electronics 11 00722 g019
Figure 20. HMM parameter estimation of a 11 for observed space.
Figure 20. HMM parameter estimation of a 11 for observed space.
Electronics 11 00722 g020
Figure 21. HMM parameter estimation of a 22 for observed space.
Figure 21. HMM parameter estimation of a 22 for observed space.
Electronics 11 00722 g021
Figure 22. HMM parameter estimation of a 11 for unobserved space.
Figure 22. HMM parameter estimation of a 11 for unobserved space.
Electronics 11 00722 g022
Figure 23. HMM parameter estimation of a 22 for unobserved space.
Figure 23. HMM parameter estimation of a 22 for unobserved space.
Electronics 11 00722 g023
Figure 24. Classification of the results for the dynamic experimental environment.
Figure 24. Classification of the results for the dynamic experimental environment.
Electronics 11 00722 g024
Figure 25. Overall expected duration.
Figure 25. Overall expected duration.
Electronics 11 00722 g025
Figure 26. Overall expected duration in log scale.
Figure 26. Overall expected duration in log scale.
Electronics 11 00722 g026
Table 1. Observation numbers of the selected free points.
Table 1. Observation numbers of the selected free points.
Free Points1234
Free observation number195589100
Occupied observation number0000
Table 2. Classification for the dynamic environments. When the space does not belong to any class in the previous four, it is classified as high dynamic.
Table 2. Classification for the dynamic environments. When the space does not belong to any class in the previous four, it is classified as high dynamic.
ClassificationFreeOccupiedLow DynamicUnknownHigh Dynamic
Parameters a 11 < 0.6 a 11 > 0.85 a 11 > 0.85 0.53 > a 11 > 0.47 Others
a 22 > 0.85 a 22 < 0.6 a 22 > 0.85 0.53 > a 22 > 0.47
Table 3. Classification results for the dynamic experimental environment. TF = True free, TO = True occupied, FF = False free, FO = False occupied, TLD = True low dynamic, FLD = False low dynamic, THD = True high dynamic, FHD = False high dynamic, UN = Unknown.
Table 3. Classification results for the dynamic experimental environment. TF = True free, TO = True occupied, FF = False free, FO = False occupied, TLD = True low dynamic, FLD = False low dynamic, THD = True high dynamic, FHD = False high dynamic, UN = Unknown.
ClassificationTFFFTOFOTLDFLDTHDFHDUN
46481461611075227250
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Li, H.; Barão, M.; Rato, L.; Wen, S. HMM-Based Dynamic Mapping with Gaussian Random Fields. Electronics 2022, 11, 722. https://doi.org/10.3390/electronics11050722

AMA Style

Li H, Barão M, Rato L, Wen S. HMM-Based Dynamic Mapping with Gaussian Random Fields. Electronics. 2022; 11(5):722. https://doi.org/10.3390/electronics11050722

Chicago/Turabian Style

Li, Hongjun, Miguel Barão, Luís Rato, and Shengjun Wen. 2022. "HMM-Based Dynamic Mapping with Gaussian Random Fields" Electronics 11, no. 5: 722. https://doi.org/10.3390/electronics11050722

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop