SplineInterpolationSegment.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
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 SPLINEINTERPOLATIONSEGMENT_H
23#define SPLINEINTERPOLATIONSEGMENT_H
24
25#include "SplineInterpolation.h"
26
27namespace armarx
28{
29 /**
30 * @brief The SplineInterpolationSegment class represents the segment of a parent SplineInterpolation between two control points
31 */
33 {
34 public:
35 /**
36 * @brief SplineInterpolationSegment creates a new SplineInterpolation
37 * @param number the number of the control point at the beginning of the interval (from 0 to #controlPoints-2)
38 * @param parent the SplineInterpolation that the created Object is the segment of
39 */
41
42 /**
43 * @brief getPoseAt returns the Pose defined by f(time)
44 * @param time a time between 0 and 1 with getPoseAt(0) being the startingPose and getPoseAt(1) being the ending Pose
45 * @return the pose of the interpolation-function at time
46 */
47 PoseBasePtr getPoseAt(double time) override;
48
49 /**
50 * @brief always returns 2 as there are always 2 control points in a spline interpolation segment
51 */
53
54 private:
55 double poseAccesFactor;
56 double poseAccesStart;
58 };
59
60 using SplineInterpolationSegmentPtr = std::shared_ptr<SplineInterpolationSegment>;
61} // namespace armarx
62
63#endif
The AbstractInterpolation class represents a function f:t->P with P being the space of all poses The ...
SplineInterpolationSegment(int number, AbstractInterpolationPtr parent)
SplineInterpolationSegment creates a new SplineInterpolation.
int getNumberOfControlPoints()
always returns 2 as there are always 2 control points in a spline interpolation segment
PoseBasePtr getPoseAt(double time) override
getPoseAt returns the Pose defined by f(time)
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< SplineInterpolationSegment > SplineInterpolationSegmentPtr
std::shared_ptr< AbstractInterpolation > AbstractInterpolationPtr