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
30namespace 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
constexpr T c
ParameterTypeList getSupportedTypes(const Ice::Current &c=Ice::emptyCurrent) const override
This filter supports: Int, Long, Float, Double.
ParameterTypeList getSupportedTypes(const Ice::Current &c) const override
This filter supports: Vector3, FramedDirection, FramedPosition.
VariantBasePtr calculate(const Ice::Current &c) const override
const VariantTypeId FramedPosition
Definition FramedPose.h:38
const VariantTypeId FramedDirection
Definition FramedPose.h:37
const VariantTypeId Vector3
Definition Pose.h:38
::IceInternal::Handle<::armarx::VariantBase > VariantBasePtr