LinearInterpolation.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package ArmarXGuiPlugins::RobotTrajectoryDesigner::Interpolation
17  * @author Timo Birr
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 #ifndef LINEARINTERPOLATION_H
23 #define LINEARINTERPOLATION_H
24 
25 #include "AbstractInterpolation.h"
26 
27 
28 #include <Eigen/Eigen>
29 
30 namespace armarx
31 {
32  /**
33  * @brief The LinearInterpolation class represents a linear Interpolation between a series of control points
34  * Linear means that the position is calcualed by a function with the Form a + time * b (with a and b as three-dimensional Vectors)
35  */
37  {
38 
39  public:
40  /**
41  * @brief LinearInterpolation creates a new LinearInterPolation defined by controlPoints
42  * @param controlPoints a vector of Poses that define the Interpolation-Function
43  */
44  LinearInterpolation(std::vector<PoseBasePtr> controlPoints);
45 
46  /**
47  * @brief getPoseAt returns the Pose defined by f(time)
48  * @param time a time between 0 and 1 with getPoseAt(0) being the startingPose and getPoseAt(1) being the ending Pose
49  * @return the pose of the interpolation-function at time
50  */
51  PoseBasePtr getPoseAt(double time) override;
52 
53  private:
54  std::vector<Eigen::Vector3f> connectingVector;
55  };
56 
57  using LinearInterpolationPtr = std::shared_ptr <LinearInterpolation>;
58 
59 
60 }
61 
62 #endif
armarx::LinearInterpolationPtr
std::shared_ptr< LinearInterpolation > LinearInterpolationPtr
Definition: LinearInterpolation.h:57
AbstractInterpolation.h
armarx::AbstractInterpolation
The AbstractInterpolation class represents a function f:t->P with P being the space of all poses The ...
Definition: AbstractInterpolation.h:36
armarx::LinearInterpolation::getPoseAt
PoseBasePtr getPoseAt(double time) override
getPoseAt returns the Pose defined by f(time)
Definition: LinearInterpolation.cpp:52
armarx::LinearInterpolation
The LinearInterpolation class represents a linear Interpolation between a series of control points Li...
Definition: LinearInterpolation.h:36
armarx::LinearInterpolation::LinearInterpolation
LinearInterpolation(std::vector< PoseBasePtr > controlPoints)
LinearInterpolation creates a new LinearInterPolation defined by controlPoints.
Definition: LinearInterpolation.cpp:33
armarx::AbstractInterpolation::controlPoints
std::vector< PoseBasePtr > controlPoints
controlPoints the controlPoints that are interpolated between
Definition: AbstractInterpolation.h:57
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28