PoseAverageFilter.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2017, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package ArmarX
19  * @author Mirko Waechter( mirko.waechter at kit dot edu)
20  * @date 2018
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 #pragma once
25 
27 
29 
30 namespace armarx::filters
31 {
32 
33  class PoseAverageFilter : public ::armarx::PoseAverageFilterBase, public AverageFilter
34  {
35  public:
36  PoseAverageFilter(int windowSize = 11)
37  {
38  this->windowFilterSize = windowSize;
39  }
40 
41  // DatafieldFilterBase interface
42  public:
43  VariantBasePtr calculate(const Ice::Current& c) const override;
44 
45  /**
46  * @brief This filter supports: Vector3, FramedDirection, FramedPosition
47  * @return List of VariantTypes
48  */
49  ParameterTypeList
50  getSupportedTypes(const Ice::Current& c) const override
51  {
52  ParameterTypeList result = AverageFilter::getSupportedTypes(c);
53  result.push_back(VariantType::Vector3);
54  result.push_back(VariantType::FramedDirection);
55  result.push_back(VariantType::FramedPosition);
56  return result;
57  }
58  };
59 
60 } // namespace armarx::filters
armarx::filters::AverageFilter::getSupportedTypes
ParameterTypeList getSupportedTypes(const Ice::Current &c=Ice::emptyCurrent) const override
This filter supports: Int, Long, Float, Double.
Definition: AverageFilter.cpp:65
armarx::filters::PoseAverageFilter::PoseAverageFilter
PoseAverageFilter(int windowSize=11)
Definition: PoseAverageFilter.h:36
armarx::VariantType::Vector3
const VariantTypeId Vector3
Definition: Pose.h:38
armarx::filters::PoseAverageFilter
Definition: PoseAverageFilter.h:33
c
constexpr T c
Definition: UnscentedKalmanFilterTest.cpp:46
armarx::filters::AverageFilter
The AverageFilter class provides a simple filter by calculating the average value of a window for dat...
Definition: AverageFilter.h:42
IceInternal::Handle<::armarx::VariantBase >
armarx::filters
Definition: AverageFilter.h:32
FramedPose.h
AverageFilter.h
armarx::filters::PoseAverageFilter::getSupportedTypes
ParameterTypeList getSupportedTypes(const Ice::Current &c) const override
This filter supports: Vector3, FramedDirection, FramedPosition.
Definition: PoseAverageFilter.h:50
armarx::filters::PoseAverageFilter::calculate
VariantBasePtr calculate(const Ice::Current &c) const override
Definition: PoseAverageFilter.cpp:32
armarx::VariantType::FramedDirection
const VariantTypeId FramedDirection
Definition: FramedPose.h:37
armarx::VariantType::FramedPosition
const VariantTypeId FramedPosition
Definition: FramedPose.h:38