added activity recognition to smoothing transition
This commit is contained in:
@@ -245,12 +245,12 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
case s_accel: {
|
||||
float acc[3];
|
||||
SensorReaderAccel sre; sre.read(se, acc);
|
||||
actDet.addAccel(acc);
|
||||
break;
|
||||
}
|
||||
case s_accel: {
|
||||
float acc[3];
|
||||
SensorReaderAccel sre; sre.read(se, acc);
|
||||
actDet.addAccel(acc);
|
||||
break;
|
||||
}
|
||||
|
||||
// case s_linearAcceleration:{
|
||||
// baroSensorReader.readVerticalAcceleration(se);
|
||||
@@ -284,9 +284,10 @@ public:
|
||||
|
||||
// currently detected activity
|
||||
// TODO: feed sensor values!
|
||||
ctrl.currentActivitiy = actDet.getCurrentActivity();
|
||||
|
||||
ctrl.currentActivitiy = actDet.getCurrentActivity();
|
||||
|
||||
// this is just for testing purposes
|
||||
obs.currentActivity = actDet.getCurrentActivity();
|
||||
|
||||
// time for a transition?
|
||||
if (se.ts - lastTransitionTS > MiscSettings::timeSteps) {
|
||||
|
||||
@@ -51,37 +51,44 @@ public:
|
||||
|
||||
|
||||
//create the backward smoothing filter
|
||||
//bf = new K::BackwardSimulation<MyState>(50);
|
||||
bf = new K::CondensationBackwardFilter<MyState>;
|
||||
//bf->setSampler( std::unique_ptr<K::CumulativeSampler<MyState>>(new K::CumulativeSampler<MyState>()));
|
||||
bf = new K::BackwardSimulation<MyState>(500);
|
||||
//bf = new K::CondensationBackwardFilter<MyState>;
|
||||
bf->setSampler( std::unique_ptr<K::CumulativeSampler<MyState>>(new K::CumulativeSampler<MyState>()));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
void fixedIntervallSimpleTransPath1() {
|
||||
void fixedIntervallSimpleTransPath1(){
|
||||
|
||||
runName = "fixedIntervallSimpleTransPath1";
|
||||
bool smoothing_resample = false;
|
||||
smoothing_time_delay = 1;
|
||||
|
||||
BarometerEvaluation::barometerSigma = 0.10;
|
||||
sr = new SensorReader("./measurements/bergwerk/path1/nexus/vor/1454775984079.csv"); // forward
|
||||
srt = new SensorReaderTurn("./measurements/bergwerk/path1/nexus/vor/Turns.txt");
|
||||
srs = new SensorReaderStep("./measurements/bergwerk/path1/nexus/vor/Steps2.txt");
|
||||
gtw = getGroundTruthWay(*sr, floors.gtwp, path1dbl);
|
||||
sr = new SensorReader("./measurements/bergwerk/path3/nexus/vor/1454782562231.csv"); // forward
|
||||
srt = new SensorReaderTurn("./measurements/bergwerk/path3/nexus/vor/Turns.txt");
|
||||
srs = new SensorReaderStep("./measurements/bergwerk/path3/nexus/vor/Steps2.txt");
|
||||
gtw = getGroundTruthWay(*sr, floors.gtwp, path3dbl);
|
||||
|
||||
MyGridNode& end = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[path1dbl.back()]) );
|
||||
MyGridNode& end = (MyGridNode&)grid.getNodeFor( conv(floors.gtwp[path4dbl.back()]) );
|
||||
GridWalkPathControl<MyGridNode>* walk = new GridWalkPathControl<MyGridNode>(grid, DijkstraMapper(grid), end);
|
||||
pf->setTransition( std::unique_ptr<MyTransition>( new MyTransition(grid, *walk)) );
|
||||
|
||||
|
||||
//Smoothing Variables
|
||||
smoothing_walk_mu = 0.7;
|
||||
smoothing_walk_sigma = 0.5;
|
||||
smoothing_heading_sigma = 5.0;
|
||||
smoothing_baro_sigma = 0.05;
|
||||
|
||||
bool smoothing_resample = false;
|
||||
smoothing_time_delay = 1;
|
||||
|
||||
//Smoothing using Simple Trans
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverage<MyState>>(new K::ParticleFilterEstimationWeightedAverage<MyState>()));
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>>(new K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionSimple>( new MySmoothingTransitionSimple()) );
|
||||
|
||||
}
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
}
|
||||
|
||||
void fixedIntervallSimpleTransPath4(){
|
||||
|
||||
@@ -111,7 +118,7 @@ public:
|
||||
bf->setEstimation(std::unique_ptr<K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>>(new K::ParticleFilterEstimationWeightedAverageWithAngle<MyState>()));
|
||||
if(smoothing_resample)
|
||||
bf->setResampling( std::unique_ptr<K::ParticleFilterResamplingSimple<MyState>>(new K::ParticleFilterResamplingSimple<MyState>()) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionExperimental>( new MySmoothingTransitionExperimental) );
|
||||
bf->setTransition(std::unique_ptr<MySmoothingTransitionSimple>( new MySmoothingTransitionSimple) );
|
||||
}
|
||||
|
||||
// ============================================================ Dijkstra ============================================== //
|
||||
|
||||
Reference in New Issue
Block a user