large merge for kde 3d
This commit is contained in:
@@ -51,7 +51,12 @@ if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio*")
|
|||||||
-D_USE_MATH_DEFINES
|
-D_USE_MATH_DEFINES
|
||||||
-DUNICODE
|
-DUNICODE
|
||||||
-D_UNICODE
|
-D_UNICODE
|
||||||
|
-DNOGDI
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive-")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:__cplusplus")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17")
|
||||||
else()
|
else()
|
||||||
# system specific compiler flags
|
# system specific compiler flags
|
||||||
ADD_DEFINITIONS(
|
ADD_DEFINITIONS(
|
||||||
@@ -66,7 +71,7 @@ else()
|
|||||||
-fstack-protector-all
|
-fstack-protector-all
|
||||||
|
|
||||||
-g3
|
-g3
|
||||||
-O2
|
#-O2
|
||||||
-march=native
|
-march=native
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
13
Settings.h
13
Settings.h
@@ -9,7 +9,7 @@ namespace Settings {
|
|||||||
|
|
||||||
bool useKLB = false;
|
bool useKLB = false;
|
||||||
|
|
||||||
const int numParticles = 1000;
|
const int numParticles = 5000;
|
||||||
const int numBSParticles = 50;
|
const int numBSParticles = 50;
|
||||||
|
|
||||||
namespace IMU {
|
namespace IMU {
|
||||||
@@ -38,13 +38,14 @@ namespace Settings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace KDE {
|
namespace KDE {
|
||||||
const Point2 bandwidth(100,100);
|
const Point2 bandwidth(1,1);
|
||||||
|
const float gridSize = 0.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace KDE3D {
|
namespace KDE3D {
|
||||||
const Point3 bandwidth(1, 1, 1);
|
const Point3 bandwidth(1, 1, 1);
|
||||||
const Point3 gridSize(0.2, 0.2, 1); // in meter
|
const Point3 gridSize(0.2, 0.2, 1); // in meter
|
||||||
}
|
}
|
||||||
|
|
||||||
//const GridPoint destination = GridPoint(70*100, 35*100, 0*100); // use destination
|
//const GridPoint destination = GridPoint(70*100, 35*100, 0*100); // use destination
|
||||||
const GridPoint destination = GridPoint(0,0,0); // do not use destination
|
const GridPoint destination = GridPoint(0,0,0); // do not use destination
|
||||||
|
|||||||
26
main.cpp
26
main.cpp
@@ -171,7 +171,7 @@ Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std::string
|
|||||||
auto trans = std::make_unique<MyPFTrans>(mesh, *wifiModel);
|
auto trans = std::make_unique<MyPFTrans>(mesh, *wifiModel);
|
||||||
|
|
||||||
//auto resample = std::make_unique<SMC::ParticleFilterResamplingSimple<MyState>>();
|
//auto resample = std::make_unique<SMC::ParticleFilterResamplingSimple<MyState>>();
|
||||||
auto resample = std::make_unique<SMC::ParticleFilterResamplingKDE<MyState, MyNavMeshTriangle>>(mesh, Settings::KDE3D::gridSize, Settings::KDE3D::bandwidth);
|
auto resample = std::make_unique<SMC::ParticleFilterResamplingKDE<MyState, MyNavMeshTriangle>>(&mesh, Settings::KDE3D::gridSize, Settings::KDE3D::bandwidth);
|
||||||
//auto resample = std::make_unique<SMC::ParticleFilterResamplingSimpleImpoverishment<MyState, MyNavMeshTriangle>>();
|
//auto resample = std::make_unique<SMC::ParticleFilterResamplingSimpleImpoverishment<MyState, MyNavMeshTriangle>>();
|
||||||
//auto resample = std::make_unique<SMC::ParticleFilterResamplingKLD<MyState>>();
|
//auto resample = std::make_unique<SMC::ParticleFilterResamplingKLD<MyState>>();
|
||||||
|
|
||||||
@@ -262,11 +262,11 @@ Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std::string
|
|||||||
|
|
||||||
plot.showParticles(pf.getParticles());
|
plot.showParticles(pf.getParticles());
|
||||||
plot.setCurEst(est.pos.pos);
|
plot.setCurEst(est.pos.pos);
|
||||||
//plot.setGroundTruth(gtPos);
|
plot.setGroundTruth(gtPos);
|
||||||
plot.addEstimationNode(est.pos.pos);
|
plot.addEstimationNode(est.pos.pos);
|
||||||
plot.setActivity((int) act.get());
|
plot.setActivity((int) act.get());
|
||||||
|
|
||||||
//plot.plot();
|
plot.plot();
|
||||||
|
|
||||||
// error calc
|
// error calc
|
||||||
// float err_m = gtPos.getDistance(est.pos.pos);
|
// float err_m = gtPos.getDistance(est.pos.pos);
|
||||||
@@ -282,15 +282,16 @@ Stats::Statistics<float> run(Settings::DataSetup setup, int numFile, std::string
|
|||||||
errorFile << ts.ms() << " " << err_m << "\n";
|
errorFile << ts.ms() << " " << err_m << "\n";
|
||||||
|
|
||||||
|
|
||||||
plot.gp << "set terminal png size 1280,720\n";
|
//stuff for drawing
|
||||||
plot.gp.setOutput("/tmp/videoSparkasse/" + std::to_string(i++) + ".png");
|
// plot.gp << "set terminal png size 1280,720\n";
|
||||||
|
// plot.gp.setOutput("/tmp/videoSparkasse/" + std::to_string(i++) + ".png");
|
||||||
|
|
||||||
int degree = ((30 - i) % 360);
|
// int degree = ((30 - i) % 360);
|
||||||
if (degree < 0){degree += 360;}
|
// if (degree < 0){degree += 360;}
|
||||||
plot.gp << "set view 63,"<< degree << "\n";
|
// plot.gp << "set view 63,"<< degree << "\n";
|
||||||
plot.gp << "set autoscale xy\n";
|
// plot.gp << "set autoscale xy\n";
|
||||||
plot.gp << "set autoscale z\n";
|
// plot.gp << "set autoscale z\n";
|
||||||
plot.plot();
|
// plot.plot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -357,8 +358,7 @@ int main(int argc, char** argv) {
|
|||||||
Stats::Statistics<float> statsQuantil;
|
Stats::Statistics<float> statsQuantil;
|
||||||
Stats::Statistics<float> tmp;
|
Stats::Statistics<float> tmp;
|
||||||
|
|
||||||
//Path2_Museum_KDE_SimpleResampling
|
std::string evaluationName = "museum/tmp";
|
||||||
std::string evaluationName = "museum/videoSparkasse";
|
|
||||||
|
|
||||||
for(int i = 0; i < 1; ++i){
|
for(int i = 0; i < 1; ++i){
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include <Indoor/smc/filtering/resampling/ParticleFilterResamplingSimple.h>
|
#include <Indoor/smc/filtering/resampling/ParticleFilterResamplingSimple.h>
|
||||||
#include <Indoor/smc/filtering/resampling/ParticleFilterResamplingKLD.h>
|
#include <Indoor/smc/filtering/resampling/ParticleFilterResamplingKLD.h>
|
||||||
#include <Indoor/smc/filtering/estimation/ParticleFilterEstimationBoxKDE.h>
|
#include <Indoor/smc/filtering/estimation/ParticleFilterEstimationBoxKDE.h>
|
||||||
|
#include <Indoor/smc/filtering/estimation/ParticleFilterEstimationBoxKDE3D.h>
|
||||||
#include <Indoor/smc/filtering/estimation/ParticleFilterEstimationWeightedAverage.h>
|
#include <Indoor/smc/filtering/estimation/ParticleFilterEstimationWeightedAverage.h>
|
||||||
#include <Indoor/smc/filtering/estimation/ParticleFilterEstimationMax.h>
|
#include <Indoor/smc/filtering/estimation/ParticleFilterEstimationMax.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user