added code from fusion2016
This commit is contained in:
49
code/lukas/TurnEvaluation.h
Executable file
49
code/lukas/TurnEvaluation.h
Executable file
@@ -0,0 +1,49 @@
|
||||
#ifndef TURNEVALUATION_H
|
||||
#define TURNEVALUATION_H
|
||||
|
||||
|
||||
#include "../particles/MyState.h"
|
||||
#include "TurnObservation.h"
|
||||
//#include <boost/math/special_functions/bessel.hpp>
|
||||
#include <math.h>
|
||||
|
||||
//static constexpr double sigma_heading = 5;
|
||||
|
||||
class TurnEvaluation {
|
||||
|
||||
//All calculations use degree not rad!!!
|
||||
|
||||
public:
|
||||
|
||||
double getProbability(const MyState& state, const TurnObservation* obs, bool simple = false) const {
|
||||
|
||||
(void) state;
|
||||
(void) obs;
|
||||
(void) simple;
|
||||
|
||||
return 1;
|
||||
|
||||
// see: particle-filter-control-data
|
||||
// // get the current heading-change
|
||||
// const float delta = Angle::radToDeg(state.walkState.headingChange_rad);
|
||||
|
||||
// // and reset it as it was evaluated
|
||||
// ((MyState&) state).walkState.headingChange_rad = 0;
|
||||
|
||||
// // proability?
|
||||
// const float sigma = 15.0;
|
||||
// const double prob = K::NormalDistribution::getProbability(obs->delta_heading, sigma, delta);
|
||||
|
||||
// if (prob != prob) {
|
||||
// throw 1;
|
||||
// }
|
||||
|
||||
// return prob;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif // TURNEVALUATION_H
|
||||
Reference in New Issue
Block a user