transition

This commit is contained in:
k-a-z-u
2018-10-16 16:56:25 +02:00
parent 40a0c8cbff
commit 334c237bcf
4 changed files with 59 additions and 36 deletions

View File

@@ -22,10 +22,12 @@
\label{fig:museumMapMesh}
\end{subfigure}
\caption{
Floorplan and transition data structures for the ground floor of the building (\SI{71}{\meter}~x~\SI{53}{\meter}).
To reach every nook and cranny, the graph based approach (b) requires many nodes and edges.
The depicted version uses a coarse node-spacing of \SI{90}{\centi\meter} (1700 nodes) and barely reaches all doors and stairs.
A navigation mesh (c) requires only 320 triangles to tightly reach every corner within the building.
Floorplan and automatically generated transition data structures for the ground floor of the historic building (\SI{71}{\meter}~x~\SI{53}{\meter}).
\add{
To reach every nook and cranny, the generated graph (b) requires many nodes and edges.
The depicted version uses a coarse node-spacing of \SI{90}{\centi\meter} (1700 nodes) but barely reaches all doors and stairs.
A navigation mesh generated for the same building required only 320 triangles (c) and reaches every corner within the building.
}
}
\label{fig:transition}
\end{figure}
@@ -110,18 +112,29 @@
Using variably shaped/sized elements instead of rigid grid-cells
provides both, higher accuracy for reaching every corner, and a reduced
memory footprint as a single polygon is able to cover arbitrarily
large regions. However, polygons impose several drawbacks on
large regions.
\add{
For a rectangular room, the number of elements needed for the graph-based approach depends
on the room's size and the chosen spacing. The navigation mesh, however, only needs
a single, four-sided polygon, to fully cover the rectangular shape of the room, independent of its size.
}
However, polygons impose several drawbacks on
common operations used within the transition step, like checking whether
a point is contained within some region. This is much more costly for polygons
\add{ compared to axis-aligned, rectangular grid-cells. }
\add{ compared to axis-aligned, rectangular grid-cells.}
% museum aus figure: 305 3-ecke
% museum ganz : 789 fuer alles
%
Such issues can be mitigated by using triangles instead of polygons, depicted within \reffig{fig:museumMapMesh}.
Doing so, each element within the mesh has exactly three edges and a maximum of three neighbors.
While this usually requires some additional memory, as more triangles are need compared to polygons,
operations, such as aforementioned contains-check, can now easily be performed,
\eg{} by using barycentric coordinates.
\add{
This usually requires some additional memory, as more triangles are need compared to polygons.
For the example of the rectangular room, two adjacent triangles are required to form
a rectangular shape.
However, using triangles, operations such as aforementioned contains-check, can now easily be performed,
\eg{} by using barycentric coordinates, yielding noticeable speedups compared to polygons.
}
\newcommand{\turnNoise}{\mathcal{T}}
\newcommand{\stepSize}{\mathcal{S}}
@@ -129,8 +142,8 @@
The most simple approach uses an average pedestrian step size together with the
number of detected steps $\mObsSteps$ and change in heading $\mObsHeading$
gathered from sensor observations $\mObsVec_{t-1}$.
Combined with previously estimated position $(x,y)^T$ and heading $\mStateHeading$
%from $\mStateVec_{t-1}$
Combined with previously estimated position $(x,y,z)^T$ and heading $\mStateHeading$
from $\mStateVec_{t-1}$
, including uncertainties for step-size $\stepSize$
and turn-angle $\turnNoise$,
this directly defines new potential whereabouts
@@ -140,26 +153,43 @@
\begin{aligned}
x_t &=& \overbrace{x_{t-1}}^{\text{old pos.}}& & &+& \overbrace{\mObsSteps \cdot \stepSize}^{\text{distance}}& & &\cdot& \overbrace{\cos(\mStateHeading_{t})}^{\text{direction}}& & ,\enskip \turnNoise &\sim \mathcal{N}(\mObsHeading, \sigma_\text{turn}^2) \\
y_t &=& y_{t-1}\phantom{.}& & &+& \mObsSteps \cdot \stepSize& & &\cdot& \sin(\mStateHeading_{t})& & ,\enskip \stepSize &\sim \mathcal{N}(\SI{70}{\centi\meter}, \sigma_\text{step}^2) \\
z_t &=& \text{interpolated} \\
\mStateHeading_{t} &=& \mStateHeading_{t-1} + \turnNoise\\
\end{aligned}
\label{eq:navMeshTrans}
\end{equation}
\noindent{}with
%
\add{
\begin{equation*}
\mObsSteps,\mObsHeading \in \mObsVec_{t-1}
\enskip\enskip\enskip
\quad
\text{,}
\quad
x_{t-1},y_{t-1},z_{t-1},\mStateHeading_{t-1} \in \mStateVec_{t-1}
\quad
\text{and}
\enskip\enskip\enskip
x_{t-1},y_{t-1},\mStateHeading_{t-1} \in \mStateVec_{t-1}
\quad
x_{t},y_{t},z_{t},\mStateHeading_{t} \in \mStateVec_{t}
\enskip.
\end{equation*}
}
Whether the newly obtained destination $(x_t, y_t)^T$ is actually reachable from the start $(x_{t-1}, y_{t-1})^T$ can be determined
by checking if their corresponding triangles are connected with each other.
If so, the corresponding $z_t$ can be interpolated using the barycentric coordinates of $(x_t, y_t)^T$
within a 2D projection of the triangle the position belongs to and applying them to the original 3D triangle.
If the destination is unreachable,
\eg{} due to walls or other obstacles. Those occurrences demand for different handling strategies. Simply trying again might
\add{
The walk's starting triangle is the triangle that contains $(x_{t-1}, y_{t-1}, z_{t-1})^T$.
The $z$-component is hereafter ignored, as it is defined by the mesh's triangles, which denote the walkable floor.
Hereafter, \refeq{eq:navMeshTrans} is used to determine the walk's destination in $x$ and $y$ only.
Whether the newly obtained destination $(x_t, y_t)^T$ is actually reachable from the start $(x_{t-1}, y_{t-1})^T$ can be determined
by checking if there is a way from the starting triangle towards some other, nearby triangle that contains these coordinates.
If so, the discarded $z$-component $z_t$ is determined using the barycentric coordinates of $(x_t, y_t)^T$
within a 2D projection of the triangle the position belongs to, and applying them to the original 3D triangle.
This can be though of walking along a 2D floor, and determining the floor's altitude for the 2D destination.
}
\add{
If this destination is unreachable,
\eg{} due to walls or other obstacles, different handling strategies are required.
}
Simply trying again might
be a viable solution, as uncertainty induced by $\turnNoise$ and $\stepSize$ will yield a slightly different destination
that might be reachable. Increasing $\sigma_\text{step}$ and $\sigma_\text{turn}$ for those cases might also be a viable choice.
Likewise, just using some random position, omitting heading/steps might be viable as well.