first draft
This commit is contained in:
@@ -17,9 +17,9 @@ namespace MiscSettings {
|
||||
|
||||
const int timeSteps = 500;
|
||||
|
||||
const int numParticles = 2500;
|
||||
const int numParticles = 500;
|
||||
|
||||
const int numBSParticles = 500;
|
||||
const int numBSParticles = 100;
|
||||
|
||||
const int lag = 5;
|
||||
|
||||
|
||||
@@ -87,42 +87,42 @@ void testModelWalk() {
|
||||
|
||||
int main(void) {
|
||||
|
||||
// {SmoothingEval1 eval;
|
||||
// eval.fixedIntervallSimpleTransPath4();
|
||||
// eval.run();}
|
||||
{SmoothingEval1 eval;
|
||||
eval.fixedIntervallSimpleTransPath4();
|
||||
eval.run();}
|
||||
|
||||
|
||||
for(int i = 0; i < 10; ++i){
|
||||
// for(int i = 0; i < 10; ++i){
|
||||
|
||||
//nexus
|
||||
std::string name = "bergwerk_path1_nexus_simple_interval_" + std::to_string(i);
|
||||
{SmoothingEval1 eval; eval.bergwerk_path1_nexus_multi(name); eval.run();}
|
||||
// //nexus
|
||||
// std::string name = "bergwerk_path1_nexus_simple_interval_" + std::to_string(i);
|
||||
// {SmoothingEval1 eval; eval.bergwerk_path1_nexus_multi(name); eval.run();}
|
||||
|
||||
name = "bergwerk_path2_nexus_simple_interval" + std::to_string(i);
|
||||
{SmoothingEval1 eval; eval.bergwerk_path2_nexus_multi(name); eval.run();}
|
||||
// name = "bergwerk_path2_nexus_simple_interval" + std::to_string(i);
|
||||
// {SmoothingEval1 eval; eval.bergwerk_path2_nexus_multi(name); eval.run();}
|
||||
|
||||
name = "bergwerk_path3_nexus_simple_interval" + std::to_string(i);
|
||||
{SmoothingEval1 eval; eval.bergwerk_path3_nexus_multi(name); eval.run();}
|
||||
// name = "bergwerk_path3_nexus_simple_interval" + std::to_string(i);
|
||||
// {SmoothingEval1 eval; eval.bergwerk_path3_nexus_multi(name); eval.run();}
|
||||
|
||||
name = "bergwerk_path4_nexus_simple_interval" + std::to_string(i);
|
||||
{SmoothingEval1 eval; eval.bergwerk_path4_nexus_multi(name); eval.run();}
|
||||
// name = "bergwerk_path4_nexus_simple_interval" + std::to_string(i);
|
||||
// {SmoothingEval1 eval; eval.bergwerk_path4_nexus_multi(name); eval.run();}
|
||||
|
||||
|
||||
//galaxy
|
||||
name = "bergwerk_path1_galaxy_simple_interval" + std::to_string(i);
|
||||
{SmoothingEval1 eval; eval.bergwerk_path1_galaxy_multi(name); eval.run();}
|
||||
// //galaxy
|
||||
// name = "bergwerk_path1_galaxy_simple_interval" + std::to_string(i);
|
||||
// {SmoothingEval1 eval; eval.bergwerk_path1_galaxy_multi(name); eval.run();}
|
||||
|
||||
name = "bergwerk_path2_galaxy_simple_interval" + std::to_string(i);
|
||||
{SmoothingEval1 eval; eval.bergwerk_path2_galaxy_multi(name); eval.run();}
|
||||
// name = "bergwerk_path2_galaxy_simple_interval" + std::to_string(i);
|
||||
// {SmoothingEval1 eval; eval.bergwerk_path2_galaxy_multi(name); eval.run();}
|
||||
|
||||
name = "bergwerk_path3_galaxy_simple_interval" + std::to_string(i);
|
||||
{SmoothingEval1 eval; eval.bergwerk_path3_galaxy_multi(name); eval.run();}
|
||||
// name = "bergwerk_path3_galaxy_simple_interval" + std::to_string(i);
|
||||
// {SmoothingEval1 eval; eval.bergwerk_path3_galaxy_multi(name); eval.run();}
|
||||
|
||||
name = "bergwerk_path4_galaxy_simple_interval" + std::to_string(i);
|
||||
{SmoothingEval1 eval; eval.bergwerk_path4_galaxy_multi(name); eval.run();}
|
||||
// name = "bergwerk_path4_galaxy_simple_interval" + std::to_string(i);
|
||||
// {SmoothingEval1 eval; eval.bergwerk_path4_galaxy_multi(name); eval.run();}
|
||||
|
||||
std::cout << "We are in loop number: " << i << "of " << 10 << std::endl;
|
||||
}
|
||||
// std::cout << "We are in loop number: " << i << "of " << 10 << std::endl;
|
||||
// }
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
Binary file not shown.
@@ -117,7 +117,7 @@
|
||||
|
||||
|
||||
% gfx include folder
|
||||
\graphicspath{ {gfx/baro/},{gfx/graph/},{gfx/paths/},{gfx/eval/},{gfx/},{gfx/grid/},{gfx/activity/},{gfx/eval/interval_path4_comp/},{gfx/eval/interval_path3_bad/},{gfx/particles/}}
|
||||
\graphicspath{ {gfx/baro/},{gfx/graph/},{gfx/paths/},{gfx/eval/},{gfx/},{gfx/grid/},{gfx/activity/},{gfx/eval/interval_path4_comp/},{gfx/eval/interval_path3_bad/},{gfx/particles/}, {gfx/eval/lag_path4_error/}}
|
||||
|
||||
|
||||
% correct bad hyphenation here
|
||||
|
||||
@@ -60,7 +60,7 @@ Walking upstairs sets $ \mu_{\text{step}} = \SI{0.4}{\meter}$, $ \sigma_{\text{s
|
||||
\label{fig:activityRecognition}
|
||||
\end{figure}
|
||||
By adding the activity recognition to the system of \cite{Ebner-16}, we are able to further improve the overall localisation results.
|
||||
The approximation error decreases by an average of \SI{66666}{\centimeter} for all 4 paths on 10 MC runs.
|
||||
The approximation error decreases by an average of \SI{XX}{\centimeter} for all 4 paths on 10 MC runs.
|
||||
Due to this additional knowledge, the state transition samples mostly depending upon the current activity and therefore limits the possibility of false floor changes.
|
||||
Fig. \ref{fig:activityRecognition} shows the recognized activities for path 4 using the Nexus 6.
|
||||
Despite a short misdetection caused by faulty pressure readings, the recognition can be considered to be very robust and accurate.
|
||||
@@ -69,31 +69,32 @@ Despite a short misdetection caused by faulty pressure readings, the recognition
|
||||
At first, both FBS and BS are compared in context of fixed-interval smoothing.
|
||||
As a reminder, fixed-interval smoother are using all observations until time $T$ and therefore run offline, after the filtering procedure is finished.
|
||||
Thus, we calculate only the positional error between estimation and ground truth, since timely information are negligible.
|
||||
|
||||
%
|
||||
\begin{figure}
|
||||
\input{gfx/particles/particles}
|
||||
\caption{particles. green = avg50, black = avg. gnuplot zickt bei der legende}
|
||||
\label{fig:particles}
|
||||
\end{figure}
|
||||
In contrast to BS, the FBS is not able to improve the results using the weighted arithmetic mean for estimating the current position.
|
||||
As illustrated in fig. \ref{fig:particles}, the estimated position for filtering and FBS is identical although the weights are highly different.
|
||||
To address this problem, we are calculating the average state using the \SI{50}{\percent} best weighted particles.
|
||||
As illustrated in fig. \ref{fig:particles}, the estimated position (black dot) for filtering and FBS is identical although the weights are highly different.
|
||||
To address this problem, we are calculating the average state using the \SI{50}{\percent} best weighted particles (green dot).
|
||||
For evaluating the FBS this estimation method was applied to filtering and smoothing likewise.
|
||||
We deployed 10 MC runs using \SI{2500}{} particles for approximation.
|
||||
%The resulting positional error between estimated and ground truth along path 4 can be seen in fig. \ref{}.
|
||||
Now, the positional error along all 4 paths could be improved from \SI{}{} to \SI{}{} for the galaxy and from \SI{}{} to \SI{}{} for the nexus.
|
||||
Now, the positional average error along all 4 paths could be improved from \SI{2.49}{\meter} to \SI{2.2}{\meter} for the Galaxy and from \SI{1.76}{\meter} to \SI{1.54}{\meter} for the Nexus.
|
||||
%Similar outcomes can be observed by adding a resampling step at the end of every smoothing iteration.
|
||||
|
||||
However, BS still outperforms the FBS by an average of \SI{}{} on all 4 paths using the same number of particles and \SI{500}{} sample realisations.
|
||||
However, BS still outperforms the FBS with an average error of \SI{1.74}{\meter} for the Galaxy and \SI{1.41}{\meter} for the Nexus on all 4 paths using the same number of particles and $500$ sample realisations.
|
||||
A visual example comparing both smoothing methods on path 4 is illustrated in fig. \ref{fig:intcomp}.
|
||||
The estimation of BS (blue) looks way more realistic and adapts better to the ground truth path.
|
||||
However, in this particular example the FBS (red) starts at an earlier position, better handling the initial uniform distribution.
|
||||
The estimation of BS looks way more realistic and adapts better to the ground truth path.
|
||||
However, in this particular example the FBS starts at an earlier position (cf. fig. \ref{fig:intcomp} seg. 2), better handling the initial uniform distribution.
|
||||
Another advantage of BS over FBS, is the ability to still improve the filtering results even while reducing the number of particles radical.
|
||||
For example \SI{50}{} particles and \SI{25}{} sample realisations are providing reliable estimations similar to above experiments, though the risk of losing track is higher.
|
||||
\begin{figure}
|
||||
\input{gfx/eval/interval_path4_comp/path4_interval}
|
||||
\caption{Comparison between FBS (red) and BS (blue) on path 4 (black). Both were approximated using \SI{2500}{} particles and \SI{500}{} sample realisations for BS. The measurements were recorded using the Nexus 6.}
|
||||
\caption{Comparison between FBS (red) and BS (blue) on path 4 (black). Both were approximated using $2500$ particles and \SI{500}{} sample realisations for BS. The measurements were recorded using the Nexus 6. }
|
||||
\label{fig:intcomp}
|
||||
\todo{Filter mit rein}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}
|
||||
@@ -109,25 +110,38 @@ This shows that the smoothing results are of course highly depend upon the filte
|
||||
At next, we discuss the advantages and disadvantages of utilizing FBS and BS as fixed-lag smoother.
|
||||
Compared to fixed-interval smoothing, timely errors are now of higher importance due to an interest on real-time localization.
|
||||
Especially interesting in this context are small lags $\tau < 10$ considering filter updates near \SI{500}{\milli\second}.
|
||||
|
||||
%
|
||||
%wie gut ist fixed-lag mit einem lag = 5. was fällt so auf?
|
||||
Fig. \ref{} illustrates the estimation results for path 4 using \SI{2500}{particles}, \SI{500}{sample realisations} for BS and a fixed-lag $\tau = 5$.
|
||||
It can be seen that again BS provides a better overall estimation, especially in areas where the user is changing floors.
|
||||
Besides the positional quality, also the timely error could be reduced by both algorithms using this fixed-lag.
|
||||
Once more, the BS outperforms the FBS by providing an overall approximation error of $\SI{55}{\centimeter}$ by filtering with $\SI{55}{\centimeter}$, while FBS improves to $\SI{55}{\centimeter}$.
|
||||
The median errors for all conducted walks are listed in table \ref{}.
|
||||
Fig. \ref{fig:lag_error_path4} illustrates the different approximation errors alongside path 4 using $500$ particles, \SI{100}{sample realisations} for BS and a fixed-lag $\tau = 5$.
|
||||
%
|
||||
\begin{figure}
|
||||
\input{gfx/eval/lag_path4_error/error_timed_costum}
|
||||
\caption{Hier muss ich noch was schreiben. Bin aber seeeehr muede. Geh jetzt ins Bett. Nachti.}
|
||||
\label{fig:lag_error_path4}
|
||||
\end{figure}
|
||||
%
|
||||
Due to the small number of sample realisations for BS and the different estimation method for FBS, the errors are changing very frequently in contrast to the filter.
|
||||
It can be seen that again BS provides a better overall estimation, especially in areas where the user is changing floors (cf. fig. \ref{fig:lag_error_path4} seg. 4, 9).
|
||||
Besides the positional quality, also the timely error could be reduced by both algorithms in fig. \ref{fig:lag_error_path4}.
|
||||
Once more, the BS outperforms the FBS by providing an overall approximation error of $\SI{4.86}{\meter}$ for the Galaxy and $\SI{2.97}{\meter}$ for the Nexus by filtering with $\SI{5.68}{\meter}$ and $\SI{3.15}{\meter}$ respectively.
|
||||
Whereas FBS is not able to reduce the filtering error, obtaining $\SI{5.59}{\meter}$ using the Nexus and $\SI{3.12}{\meter}$ the Galaxy.
|
||||
However, this does not mean, that the FBS is unpracticable for problems of fixed-lag smoothing.
|
||||
By looking at the data in detail, high errors similar as seen in fig. \ref{fig:lag_error_path4} occur on path 3, which cause the estimation to behave more natural instead of walking the supposed path.
|
||||
This phenomena could be observed for both smoothers respectively.
|
||||
Also note the difference between this error, including timely information, and the positional error used before.
|
||||
%The median errors for all conducted walks are listed in table \ref{}.
|
||||
Similar to fixed-interval smoothing, decreasing the number of particles does not necessarily worsen the estimation.
|
||||
In most cases smoothing compensates for this reduction and maintains the good results.
|
||||
For example estimating path for using \SI{50}{particles} results in an approximation error for BS of \SI{}{\meter}.
|
||||
%For example estimating path for using \SI{50}{particles} results in an approximation error for BS of \SI{}{\meter}.
|
||||
|
||||
%lag vergrößern was passiert beschreiben
|
||||
Besides changing the number of particles, it is also possible the variate the lag.
|
||||
As one would expect, increasing the lag causes the smoothed estimation to approach the results provided by fixed-interval smoothing.
|
||||
This can be verified by looking at fig. \ref{}, which is a detailed view of segment XX in fig. \ref{}.
|
||||
This can be verified by looking at fig. \ref{}, which is a detailed view of segment XX of path 4 (cf. fig. \ref{fig:intcomp}).
|
||||
It is obvious that a lag of \SI{30}{} time steps has access to much more future observations and is therefore able to obtain such a result.
|
||||
Considering an update interval of \SI{500}{\milli\second}, a lag of \SI{30}{} would however mean that the smoother is \SI{15}{\second} behind the filter.
|
||||
Nevertheless, there are practical applications like accurately verifying hit checkpoints or continuously optimizing a recurring segment of the path.
|
||||
The different approximation errors alongside path 4 can now be seen in fig. \ref{}.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user