latest TeX: grid, experiments, conclusion. some gfx changed
This commit is contained in:
@@ -1,54 +1,61 @@
|
||||
\section{Transition Model}
|
||||
\label{sec:trans}
|
||||
|
||||
\newcommand{\spoint}{l}
|
||||
\newcommand{\gHead}{\theta}
|
||||
\newcommand{\gDist}{d}
|
||||
|
||||
To sample only transitions that are actually feasible
|
||||
within the environment, we utilize a \SI{20}{\centimeter}-gridded graph
|
||||
$G = (V,E)$, $v_{x,y,z} \in V$, $e_{v_{x,y,z}}^{v_{x',y',z'}} \in E$
|
||||
derived from the buildings floorplan as described in section \ref{sec:relatedWork}.
|
||||
However, we add improved $z$-transitions by also modelling realistic
|
||||
stairwells using nodes and edges as can be seen in fig. \ref{fig:gridStairs}.
|
||||
stairwells using nodes and edges, depicted in fig. \ref{fig:gridStairs}.
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[trim=0 0 0 0]{grid/grid}
|
||||
\caption{Besides the nodes and edges defined by the distinct floors, we add realistic stairs to interconnect them.}
|
||||
\input{gfx/grid/grid}
|
||||
\caption{
|
||||
Besides the nodes and edges defined by the distinct floors, we add realistic stairs to interconnect them.
|
||||
Stairs are given by three points $\vec{\spoint}_1, \vec{\spoint}_2, \vec{\spoint}_3$, defining the
|
||||
starting-edge and the direction.
|
||||
}
|
||||
\label{fig:gridStairs}
|
||||
\end{figure}
|
||||
|
||||
\newcommand{\spoint}{l}
|
||||
Stairs are defined using three points $\vec{\spoint}_1, \vec{\spoint}_2, \vec{\spoint}_3 \in \R^3$ whereby the segment
|
||||
$[ \vec{\spoint}_1 \vec{\spoint}_2 ]$ describes the starting-edge, and $[ \vec{\spoint}_2 \vec{\spoint}_3 ]$ the stair's direction.
|
||||
The corresponding vertices are determined using intersections of the segments with the bounding-box
|
||||
for each vertex.
|
||||
|
||||
\commentByToni{Der Teil wird mir gar nicht klar irgendwie. Kann mir vor allem den letzten Satz nicht vorstellen.}
|
||||
\commentByFrank{mention?: clean z-transitions, remove x/y nodes by adding bounding boxes}
|
||||
Stairs are defined using three points $\vec{\spoint}_1, \vec{\spoint}_2, \vec{\spoint}_3 \in \R^3$ whereby the segment
|
||||
$[ \vec{\spoint}_1 \vec{\spoint}_2 ]$ describes the starting-edge, and $[ \vec{\spoint}_2 \vec{\spoint}_3 ]$ the stair's direction
|
||||
(see fig. \ref{fig:gridStairs}). The corresponding grid-vertices are determined using an intersection of
|
||||
those segments with the bounding-box for each vertex.
|
||||
|
||||
To reduce the system's memory footprint, we search for the largest connected region within the graph and
|
||||
remove all nodes and edges that are not connected to this region.
|
||||
|
||||
\newcommand{\gHead}{\theta}
|
||||
\newcommand{\gDist}{d}
|
||||
|
||||
Walking the grid is now possible by moving along adjacent nodes into a given walking-direction
|
||||
until a desired distance $\gDist$ is reached \cite{Ebner-15}.
|
||||
In order to use meaningful headings $\gHead$ and distances $\gDist$
|
||||
(matching the pedestrian's real heading and walking speed) for each transition,
|
||||
we use the current sensor-readings $\mObsVec_{t}$ for hinted instead of truly random adjustments.
|
||||
we use the current sensor-readings $\mObsVec_{t}$ for hinted instead of truly random adjustments:
|
||||
%
|
||||
\begin{align}
|
||||
\begin{align}
|
||||
\mStateVec_{t}^{\mStateHeading} = \gHead &= \mStateVec_{t-1}^{\mStateHeading} + \mObsVec_t^{\mObsHeading} + \mathcal{N}(0, \sigma_{\gHead}^2) \\
|
||||
\gDist &= \mObsVec_t^{\mObsSteps} \cdot \SI{0.7}{\meter} + \mathcal{N}(0, \sigma_{\gDist}^2)
|
||||
.
|
||||
\end{align}
|
||||
%
|
||||
During a walk, each edge has an assigned probability $p(e)$ which depends on a chosen implementation.
|
||||
Usually, this probability describes aspects like a comparison of the edge's angle $\angle e$ with the
|
||||
current heading $\gHead$. However, it is also possible to incorporate additional prior knowledge to favor
|
||||
some vertices/edges.
|
||||
This probability describes aspects such as the likelihood for walking into the edge's direction $\angle e$
|
||||
given the current heading heading $\gHead$. Furthermore, we will incorporate additional prior knowledge to
|
||||
favour some vertices/edges. For each single step on the graph, we calculate $p(e)$ for all available edges,
|
||||
and, hereafter, randomly draw the to-be-walked edge depending on those probabilities. The random walk ends,
|
||||
as soon as the distance $d$ is reached. The latter depends on the number of detected steps
|
||||
$\mObsSteps$ and assumes an average step-size of \SI{0.7}{\meter}.
|
||||
|
||||
For comparison purpose we define a simple weighting method that assigns a probability to each edge
|
||||
based on the deviation from the currently estimated heading $\gHead$:
|
||||
just based on the deviation from the currently estimated heading $\gHead$:
|
||||
|
||||
\commentByFrank{das erste $=$ ist komisch. bessere option?}
|
||||
\commentByFrank{das erste $=$ ist komisch. ideen?}
|
||||
\commentByToni{Find ich jetzt nicht tragisch. Eher notwendig fuers Verstaendnis.}
|
||||
\begin{equation}
|
||||
p(e) = p(e \mid \gHead) = N(\angle e \mid \gHead, \sigma_\text{dev}^2).
|
||||
@@ -59,24 +66,28 @@
|
||||
|
||||
|
||||
|
||||
\section{Navigation Knowledge}
|
||||
\section{Navigational Knowledge}
|
||||
|
||||
Assuming navigation, the pedestrian wants to reach a well-known destination and represents additional
|
||||
prior knowledge. Most probably, the pedestrian will stick to the path presented by
|
||||
Considering navigation, a pedestrian wants to reach a well-known destination which represents additional
|
||||
prior knowledge. Most probably, the user will stick to the path presented by
|
||||
a navigation system. However, some deviations like chatting to someone or taking another route
|
||||
cannot be strictly ruled out. We will therefore describe a system that is able to deal with such variants
|
||||
as well as present an algorithm to calculate realistic routes based on the aforementioned grid.
|
||||
cannot be strictly ruled out. We will therefore describe a system that is able to deal with such
|
||||
variations as well as present an algorithm to calculate realistic routes based on the aforementioned grid.
|
||||
|
||||
\subsection{Wall Avoidance}
|
||||
\label{sec:wallAvoidance}
|
||||
|
||||
As discussed in section \ref{sec:relatedWork}, simply running a shortest-path algorithm as Dijkstra or A* using the previously created graph would obviously lead to non-realistic paths sticking to the walls and walking many diagonals.
|
||||
Pedestrian's however, walk either somewhere near (but not close to) a wall or, for larger open spaces, somewhere far from the walls.
|
||||
In order to calculate paths the resemble pedestrian walking behavior, an importance factor is derived for each vertex within the graph.
|
||||
As discussed in section \ref{sec:relatedWork}, simply applying a shortest-path algorithm such as Dijkstra or
|
||||
A* using the previously created graph would obviously lead to non-realistic paths sticking to the walls and
|
||||
walking many diagonals. Pedestrian's however, walk either somewhere near (but not close to) a wall or, for
|
||||
larger open spaces, somewhere far from the walls. In order to calculate paths that resemble such a walking
|
||||
behaviour, an importance factor is derived for each vertex within the graph. Those will be used to
|
||||
adjust weight between two vertices, needed by the shortest-path algorithm.
|
||||
|
||||
To get the distance of each vertex from the nearest wall, an inverted version $G' = (V', E')$ of the graph $G$
|
||||
is built. A nearest-neighbor search $\mNN(v_{x,y,z}, G')$ will then provide the nearest wall-vertex
|
||||
$v'_{x,y,z} \in V'$ from the inverted graph \cite{Cover1967}. The wall avoidance is calculated as follows:
|
||||
To downvote vertices near walls, we need to get the distance of each vertex from its nearest wall.
|
||||
We therefore build an inverted version $G' = (V', E')$ of the graph $G$, just containing walls and other obstacles.
|
||||
A nearest-neighbour search $\mNN(v_{x,y,z}, G')$ will then provide the nearest wall-vertex
|
||||
$v'_{x,y,z} \in V'$ from the inverted graph \cite{Cover1967}. The wall avoidance can now be calculated as follows:
|
||||
%
|
||||
\begin{equation}
|
||||
d_{v, v'} = d(v_{x,y,z}, v'_{x,y,z}), \enskip 0.0 < d_{v, v'} < 2.2 \\
|
||||
@@ -93,7 +104,7 @@ Pedestrian's however, walk either somewhere near (but not close to) a wall or, f
|
||||
The parameters of the normal distribution and the scaling-factors were chosen empirically.
|
||||
While this approach provides good results for most areas, doors are downvoted by
|
||||
\refeq{eq:wallAvoidance}, as they have only vertices that are close to walls.
|
||||
Door detection thus is the next conducted step.
|
||||
Door detection and upvoting thus is the next conducted step.
|
||||
|
||||
|
||||
|
||||
@@ -101,40 +112,36 @@ Pedestrian's however, walk either somewhere near (but not close to) a wall or, f
|
||||
\subsection{Door Detection}
|
||||
\label{sec:doorDetection}
|
||||
|
||||
Doors are usually anchored between two (thin) walls and have a normed width. Examining only a limited region
|
||||
around the door, its surrounding walls describe a flat ellipse with the same center as the door itself. It is thus
|
||||
possible to detect doors within the floorplan using a PCA.
|
||||
Doors are usually anchored between two walls and have a normed width. Examining only a limited region
|
||||
around the door, its surrounding walls describe a flat ellipse with the same center as the door itself.
|
||||
It is thus possible to detect doors within the floorplan using a PCA.
|
||||
|
||||
To decide whether a vertex $v_{x,y,z}$ within the (non-inverted) grid $G$ belongs to a door, we use $k$-NN to fetch its
|
||||
$k$ nearest neighbors $N'$ within the inverted grid $G'$. For this neighborhood the centroid $\vec{c} \in \R^3$ is calculated.
|
||||
If the distance $\| \vec{c} - v_{x,y,z} \|$ between the centroid and the vertex-in-question is above certain threshold,
|
||||
$k$ nearest neighbours $N'$ within the inverted grid $G'$. For this neighbourhood the centroid $\vec{c} \in \R^3$ is calculated.
|
||||
If the distance $\| \vec{c} - v_{x,y,z} \|$ between the centroid and the vertex-in-question is above a certain threshold,
|
||||
the node does not belong to a door.
|
||||
\todo{diese distanzformel oder dist(a,b)?}
|
||||
\commentByToni{dist gibt es doch net, oder? In der Graphentheorie schreibt man einfach d(v, v) (ist im prinzip shortest path). ansonsten müssten wir dist(..) irgendwo einführen als euklidische distanz oder so, find ich aber irgendwie doof. musst du wissen, was dir beser gefällt}
|
||||
%ugly...
|
||||
%\begin{equation}
|
||||
% \vec{c} = \frac{ \sum_{v_{x,y,z} \in N'} v_{x,y,z} }{k}
|
||||
%\end{equation}
|
||||
\todo{Distanzformel centroid/vertex. ideen? $\|v1 - v2\|$ oder $d(v1, v2)$?}
|
||||
|
||||
Assuming the distance was fine, we compare the two eigenvalues $\{\lambda_1, \lambda_2 \mid \lambda_1 > \lambda_2\}$, determined by the PCA.
|
||||
If their ratio $\frac{\lambda_1}{\lambda_2}$ is above a certain threshold (flat ellipse)
|
||||
Assuming the distance is fine, we compare the two eigenvalues $\{\lambda_1, \lambda_2 \mid \lambda_1 > \lambda_2\}$,
|
||||
determined by the PCA. If their ratio $\frac{\lambda_1}{\lambda_2}$ is above a certain threshold (flat ellipse)
|
||||
the node-in-question belongs to a door or some kind of narrow passage.
|
||||
|
||||
\begin{figure}
|
||||
\includegraphics[width=\columnwidth]{door_pca}
|
||||
\caption{Detect doors within the floorplan using $k$-NN and PCA. While the white nodes are walkable, the black ones represent walls. The gray node is the one in question.}
|
||||
\caption{Detect doors within the floorplan using $k$-NN and PCA.
|
||||
While the white nodes are walkable, the black ones represent walls. The grey node is the one in question.}
|
||||
\label{fig:doorPCA}
|
||||
\end{figure}
|
||||
|
||||
Fig. \ref{fig:doorPCA} depicts all three cases where
|
||||
(left) the node is part of a door,
|
||||
(middle) the distance between node and k-NN centroid is above the threshold and
|
||||
(right) the ration between $e_1$ and $e_2$ is below the threshold.
|
||||
\commentByToni{was ist $e_1$ und $e_2$?}
|
||||
(right) the ration between $\lambda_1$ and $\lambda_2$ is below the threshold.
|
||||
|
||||
Like before, we apply a distribution based on the distance from the nearest door to determine
|
||||
an importance-factor for each node:
|
||||
%
|
||||
\commentByFrank{distanzrechnung: formel}
|
||||
\begin{equation}
|
||||
\text{dd}_{x,y,z} = 0.8 \cdot \mathcal{N}( \| \vec{c} - v_{x,y,z} \| \mid 0.0, 1.0 )
|
||||
\end{equation}
|
||||
@@ -148,14 +155,14 @@ Pedestrian's however, walk either somewhere near (but not close to) a wall or, f
|
||||
Based on aforementioned assumptions, the final importance for each node is given by
|
||||
%
|
||||
\begin{equation}
|
||||
\text{imp}_{x,y,z} = 1.0 + \text{wa}_{x,y,z} + \text{dd}_{x,y,z} \enspace ,
|
||||
\text{imp}_{x,y,z} = 1.0 + \text{wa}_{x,y,z} + \text{dd}_{x,y,z} \enspace .
|
||||
\end{equation}
|
||||
%
|
||||
A good visualization of the importance factors can be seen in fig. \ref{fig:importance}.
|
||||
A good visualization of the resulting importance-factors can be seen in fig. \ref{fig:importance}.
|
||||
|
||||
\begin{figure}
|
||||
\includegraphics[angle=-90, width=\columnwidth, trim=20 19 17 9, clip]{floorplan_importance}
|
||||
\caption{The calculated importance factor for each vertex. While the black elements denote an importance-factor
|
||||
\caption{The calculated importance-factor for each vertex. While the black elements denote an importance-factor
|
||||
of about \SI{0.8}{}, the yellow door-regions denote a high importance of about \SI{1.2}{}.}
|
||||
\label{fig:importance}
|
||||
\end{figure}
|
||||
@@ -193,12 +200,13 @@ Pedestrian's however, walk either somewhere near (but not close to) a wall or, f
|
||||
|
||||
\subsection{Guidance}
|
||||
|
||||
Based on the previous calculations, we propose two approaches to incorporate the prior
|
||||
knowledge into the transiton model.
|
||||
Based on the previous calculations, we propose two approaches to utilize the prior
|
||||
knowledge within the transition model.
|
||||
|
||||
\subsubsection{Shortest Path}
|
||||
|
||||
Before every transition, the centroid $\vec{c}$ of the current sample-set $\Upsilon_{t-1}$, representing the posterior distribution at time $t-1$, is calculated:
|
||||
Before every transition, the centroid $\vec{c}$ of the current sample-set $\Upsilon_{t-1}$,
|
||||
representing the posterior distribution at time $t-1$, is calculated:
|
||||
%
|
||||
\begin{equation}
|
||||
\vec{c} = \frac
|
||||
@@ -225,20 +233,20 @@ Pedestrian's however, walk either somewhere near (but not close to) a wall or, f
|
||||
\end{equation}
|
||||
|
||||
\newcommand{\pathRef}{v_{\hat{x},\hat{y},\hat{z}}}
|
||||
\todo{summe laesst sich so nicht schreiben. ideen?}
|
||||
\commentByFrank{avg-state vom sample-set. frank d. meinte ja hier muessen wir aufpassen. bin noch unschluessig wie.}
|
||||
\commentByToni{Das ist gar nicht so einfach... wir haben nie ein Sample Set eingefuehrt. Nicht mal einen Sample. Wir haben immer nur diesen State... Man könnte natuerlich einfach sagen das $\Upsilon_t$ an set of random samples representing the posterior distribution ist oder einfach nur ein set von partikeln. habs mal eingefuegt wie ich denke}
|
||||
|
||||
This center is used as starting-point for the shortest path. As it is not necessarily part of
|
||||
the grid, its nearest-grid-neighbor is determined and used instead.
|
||||
The resulting vertex already knows its way to the pedestrian's destination, but is located somewhere
|
||||
within the sample-set. We thus calculate the standard deviation for the distance
|
||||
of all states from the center. After advancing the starting-vertex by three times the deviation
|
||||
we get a new point outside of the sample-set and closer to the desired destination.
|
||||
\commentByToni{Worauf liegt der Punkt? Sollte man dazu schreiben. }
|
||||
of all samples from the centre. After advancing the starting-vertex by three times this deviation
|
||||
we get a new point that is: part of the shortest path, outside of the sample-set and closer to the
|
||||
desired destination.
|
||||
This new reference node $\pathRef$ serves as a comparison base:
|
||||
\commentByToni{Allgemein mal zur Schreibweise der Vertices. Irgendwie finde ich dieses $v_{x,y,z}$ nicht so gut. Ich denke jeder sieht das wir 3D haben und deswegen könntem man doch schlicht $v$, $v'$, $\hat{v}$ ... nutzen, oder was denkst du?}
|
||||
\commentByFrank{war der vorschlag von frank d. letztes mal, weil man an vertices nicht einfach attribute (x,y,z) anhaengen kann wie wir es bei $\mObsVec$, $\mStateVec$ haben.}
|
||||
|
||||
\todo{bessere ideen fuer die schreibweise?}
|
||||
\begin{equation}
|
||||
\begin{split}
|
||||
p(v_{x',y',z'} \mid v_{x,y,z})
|
||||
@@ -261,9 +269,8 @@ Pedestrian's however, walk either somewhere near (but not close to) a wall or, f
|
||||
\subsubsection{Multipath}
|
||||
|
||||
The Dijkstra calculation mentioned in \ref{sec:pathEstimation} already calculated the
|
||||
cumulative distance $\text{cdst}_{x,y,z}$ to the pedestrian's target for each vertex.
|
||||
\commentByToni{falls wir dist() nutzen sollten wir hier auch cdist machen. }
|
||||
We thus apply the same assumption as above and downvote steps not decreasing
|
||||
cumulative distance $\text{cdist}_{x,y,z}$ to the pedestrian's target for each vertex.
|
||||
We thus apply the same assumption as above and downvote grid-steps not decreasing
|
||||
the distance to the destination:
|
||||
|
||||
\begin{equation}
|
||||
@@ -272,7 +279,7 @@ Pedestrian's however, walk either somewhere near (but not close to) a wall or, f
|
||||
= N(\angle [ v_{x,y,z} v_{x',y',z'} ] \mid \gHead, \sigma_\text{dev}^2) \cdot \alpha \\
|
||||
\alpha =
|
||||
\begin{cases}
|
||||
1.0 & \text{cdst}_{x',y',z'} < \text{cdst}_{x,y,z} \\
|
||||
1.0 & \text{cdist}_{x',y',z'} < \text{cdist}_{x,y,z} \\
|
||||
0.1 & \text{else}
|
||||
\end{cases}
|
||||
\end{split}
|
||||
@@ -290,9 +297,3 @@ Pedestrian's however, walk either somewhere near (but not close to) a wall or, f
|
||||
\label{fig:multiHeatMap}
|
||||
\end{figure}
|
||||
|
||||
|
||||
|
||||
\commentByFrank{angular-change probability as polar-plot}
|
||||
|
||||
\commentByFrank{describe the multi-path version}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user