Main Page · Modules · All Classes · Class Hierarchy
MASurfaceAnalyzer.hpp
1 /*
2  * This file is part of the AiBO+ project
3  *
4  * Copyright (C) 2005-2016 Csaba Kertész (csaba.kertesz@gmail.com)
5  *
6  * AiBO+ is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * AiBO+ is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
19  *
20  */
21 
22 #pragma once
23 
24 #include "MAAnalyzer.hpp"
25 
26 #include "core/MACoreTypes.hpp"
27 
28 #include <MCDefs.hpp>
29 #include <MCSamples.hpp>
30 
31 class MARobotState;
32 
42 {
43 public:
45  explicit MASurfaceAnalyzer(int sample_size);
46 
47  virtual void AddSamples(const MARobotState& robot_state) override;
48  virtual void Reset() override;
49  virtual bool IsValid() const override;
50  virtual MC::FloatList GetFeatureVector() override;
51 
52 protected:
58  MC::DoubleList AccelXRawSamples;
60  MC::DoubleList AccelYRawSamples;
62  MC::DoubleList AccelZRawSamples;
72  MC::DoubleList IrChestRawSamples;
84  MC::DoubleList LegLHJ1ForceRawSamples;
88  MC::DoubleList LegRHJ1ForceRawSamples;
89 };
90 
MCSamples< double > LegRHJ1ForceSamples
Force samples (RH/joint1)
int IrSampleSize
Infrared sample size.
MC::DoubleList IrChestRawSamples
Infrared (chest) raw samples.
MCSamples< double > PawLFSamples
Paw (LF) samples.
MCSamples< double > AccelYSamples
Accelerometer (y dimension) samples.
virtual void AddSamples(const MARobotState &robot_state) override
Add new samples from the robot state.
Analyzer base class.
Definition: MAAnalyzer.hpp:67
MC::DoubleList AccelXRawSamples
Accelerometer X raw samples.
Surface analyzer class.
MC::DoubleList LegLHJ1ForceRawSamples
Force raw samples (LH/joint1)
MCSamples< double > IrChestSamples
Infrared (chest) samples.
virtual MC::FloatList GetFeatureVector() override
Get a feature vector.
MASurfaceAnalyzer(int sample_size)
Class constructor.
virtual bool IsValid() const override
Check if enough samples were added to the analyzer.
MCSamples< double > PawRFSamples
Paw (RF) samples.
MC::DoubleList AccelYRawSamples
Accelerometer Y raw samples.
virtual void Reset() override
Reset the analyzer and drop all samples.
MCSamples< double > AccelZSamples
Accelerometer (z dimension) samples.
int SampleSize
Sample size.
MC::DoubleList AccelZRawSamples
Accelerometer Z raw samples.
MCSamples< double > PawLHSamples
Paw (LH) samples.
MCSamples< double > PawRHSamples
Paw (RH) samples.
Robot state.
MC::DoubleList LegRHJ1ForceRawSamples
Force raw samples (RH/joint1)
MCSamples< double > LegLHJ1ForceSamples
Force samples (LH/joint1)
MCSamples< double > AccelXSamples
Accelerometer (x dimension) samples.