1 #ifndef MODEL_BASE_ANALYSIS_H
2 #define MODEL_BASE_ANALYSIS_H
5 #include <Eigen/Geometry>
11 using namespace Eigen;
14 namespace terrain_estimator
46 void addSVMClassifier(std::vector<SVMConfiguration> svm_functions){ this->svm_functions = svm_functions; }
53 TerrainType getTerrainClassification(std::vector<double> histogram);
66 void calculateSVMValue();
70 std::vector < SVMConfiguration > svm_functions;
72 std::vector<TerrainType> terrain_types;
74 int min_number_of_votes;
76 std::vector<double> probability;
107 bool addHistogram(std::vector<double> histogram, std::vector<double> histogram_angular_velocity, std::vector<double> histogram_linear_velocity );
112 std::vector<double> getCombinedHistogram();
116 std::deque < std::vector<double> > histogram_list;
118 std::vector<double> combined_histogram;
120 uint number_histograms;
170 void addTraction(
double traction,
double encoder);
177 void addRobotVelocities(
double angular_velocity,
double linear_velocity);
182 double getCompletedStepId();
187 Step getCompletedStep();
192 double getMaximalTractionEitherStep();
197 double getMinimalTractionEitherStep();
213 bool isCurrentStepCompleted();
219 double getStepId(
double encoder);
224 void initCurrentStep();
230 double getLegAngle(
double encoder );
232 double angle_between_legs;
260 Histogram(
int numb_bins,
double min_value,
double max_value);
265 void addValue(
double value );
270 void clearHistogram();
275 std::vector<double> getHistogram();
294 std::vector<double> histogram;
297 double number_points;
328 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
339 ~SlipDetectionModelBased();
349 bool slipDetection(Vector4d translation,
double delta_heading_measured,
double slip_threashold);
354 double getWheelSlipSingleCase();
359 bool hasWheelSingleSliped(
int wheel);
364 bool hasWheelSliped(
int wheel);
369 bool hasWheelConsecutivelySliped(
int wheel);
374 void analyzeConsecutiveSlips();
394 bool hasSingleWheelSliped();
399 Eigen::Vector4d slipValue(Vector4d translation,
double right_translation,
double left_translation);
401 double axis_rotation;
427 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
429 LegWheelOdometry(
double angle_between_legs,
double radius){this->angle_between_legs = angle_between_legs; this->radius = radius; }
437 Vector4d translationAxes(Vector4d encoder);
442 double translationAxis(
double encoder,
double initial_encoder);
449 double numberOfCycles(
double encoder);
454 double getLegPos(
double external_encoder_value);
456 Vector4d init_encoder;
460 double angle_between_legs;
A list of the last N histograms of traction values are combined into a single histogram.
Definition: ModelBaseAnalysis.hpp:92
Definition: ModelBaseAnalysis.hpp:124
double delta_theta_model
Definition: ModelBaseAnalysis.hpp:377
Using asguard model it calculates the translation of each axis in the plane paralel to the ground Thi...
Definition: ModelBaseAnalysis.hpp:424
Groups traction force measurement into a vector corresponding to a step A step is caracterize by the ...
Definition: ModelBaseAnalysis.hpp:158
double getNumberPoints()
Definition: ModelBaseAnalysis.hpp:280
Estimates slip using the vehicle model constrains.
Definition: ModelBaseAnalysis.hpp:326
Eigen::Vector4d total_slip
Definition: ModelBaseAnalysis.hpp:383
Creates a Histogram for measured values All value beneath min value are grouped in the first bin All ...
Definition: ModelBaseAnalysis.hpp:248
A batch of SVM function is used to classify the histogram.
Definition: ModelBaseAnalysis.hpp:27
double max_traction
Definition: ModelBaseAnalysis.hpp:132
Vector4d slip_votes
Definition: ModelBaseAnalysis.hpp:386
Vector4d consectuive_slip_votes
Definition: ModelBaseAnalysis.hpp:389
void addSVMClassifier(std::vector< SVMConfiguration > svm_functions)
Definition: ModelBaseAnalysis.hpp:46
double delta_theta_measured
Definition: ModelBaseAnalysis.hpp:380
Definition: TerrainConfiguration.hpp:149
std::vector< double > traction
Definition: ModelBaseAnalysis.hpp:126
std::vector< double > angular_velocity
Definition: ModelBaseAnalysis.hpp:128
EIGEN_MAKE_ALIGNED_OPERATOR_NEW LegWheelOdometry(double angle_between_legs, double radius)
Definition: ModelBaseAnalysis.hpp:429
TerrainType
Definition: TerrainConfiguration.hpp:10
double id
Definition: ModelBaseAnalysis.hpp:140
double max_angle
Definition: ModelBaseAnalysis.hpp:138
double min_traction
Definition: ModelBaseAnalysis.hpp:134
double last_encoder
Definition: ModelBaseAnalysis.hpp:142
double min_angle
Definition: ModelBaseAnalysis.hpp:136
void setInitialEncoder(Vector4d encoder)
Definition: ModelBaseAnalysis.hpp:432
std::vector< double > linear_velocity
Definition: ModelBaseAnalysis.hpp:130