InterpolationSegmentFactory Class Reference

The InterpolationSegmentFactory class Utility Class used to easily create InterpolationSegments, so that every Interpolation can be threated the same An Interpolation produced by this factory always has exactly two Waypoints and is defined between 0 and 1 With 0 being the starting pose and 1 being the end pose. More...

#include <RobotComponents/gui-plugins/RobotTrajectoryDesignerGuiPlugin/Interpolation/InterpolationSegmentFactory.h>

Static Public Member Functions

static VirtualRobot::IKSolver::CartesianSelection getSmallestDominating (std::vector< VirtualRobot::IKSolver::CartesianSelection > selections)
 getSmallestDominating returns the cartesian selection that dominates all other cartesian selections in selections Examples: (X,Y,Y,Y,Z) -> Pos ; (X,Y, Ori) -> All; (Ori,Ori) -> Ori ; (X,Z,Pos) -> Pos
 
static bool isDominantOver (VirtualRobot::IKSolver::CartesianSelection current, VirtualRobot::IKSolver::CartesianSelection other)
 isDominantOver returns true when current selection dominates other selection Definition: A CartesianSelection dominates another CartesianSelection when additional Information is needed to solve curren after solving other Examples: - X dominates Y ; Y dominates X ; Pos dominates X,Y ans Z but X,Y and Z dont dominate Pos; Pos dominates Ori ; Ori dominates Pos
 
static bool needsOptimizing (std::vector< VirtualRobot::IKSolver::CartesianSelection > &selections)
 needsOptimizing returns true if there is a CartesianSelection at i that dominates a CartesianSelection at i - 1
 
static void optimizeControlPoints (std::vector< PoseBasePtr > &controlPoints, std::vector< VirtualRobot::IKSolver::CartesianSelection > &selections)
 optimizeControlPoints changes the cartian selections and control points so that the IKSolving produces a smooth Trajectory
 
static PoseBasePtr optimizePose (armarx::PoseBasePtr original, armarx::PoseBasePtr corrected, VirtualRobot::IKSolver::CartesianSelection selectionOriginal, VirtualRobot::IKSolver::CartesianSelection selectionCorrected)
 optimizePose changes the original pose so that the interpolation is smove when it changes from selectionOriginal to selectionCorrected
 
static std::vector< AbstractInterpolationPtr > produceInterpolationSegments (std::vector< PoseBasePtr > controlPoints, std::vector< InterpolationType > interpolations)
 produceInterpolationSegments constructs a vector of AbstractInterpolation the concrete Interpolationtype of which is defined by interpolations
 
static std::vector< AbstractInterpolationPtr > produceLinearInterpolationSegments (std::vector< PoseBasePtr > controlPoints)
 produceInterpolationSegments constructs a vector of LinearInterpolations
 
static AbstractInterpolationPtr produceSplineInterpolationSegment (std::vector< PoseBasePtr > controlPoints, PoseBasePtr segmentStart)
 produceSplineInterpolationSegment constructs the splineInterpolationSegment of a splineInterpolation between given controlPoints
 
static std::vector< AbstractInterpolationPtr > produceSplineInterpolationSegments (std::vector< PoseBasePtr > controlPoints)
 produceInterpolationSegments constructs a vector of SplineInterpolations
 

Detailed Description

The InterpolationSegmentFactory class Utility Class used to easily create InterpolationSegments, so that every Interpolation can be threated the same An Interpolation produced by this factory always has exactly two Waypoints and is defined between 0 and 1 With 0 being the starting pose and 1 being the end pose.

Member Function Documentation

◆ getSmallestDominating()

IKSolver::CartesianSelection getSmallestDominating ( std::vector< VirtualRobot::IKSolver::CartesianSelection > selections)
static

getSmallestDominating returns the cartesian selection that dominates all other cartesian selections in selections Examples: (X,Y,Y,Y,Z) -> Pos ; (X,Y, Ori) -> All; (Ori,Ori) -> Ori ; (X,Z,Pos) -> Pos

Parameters
selectionsthe selections to get the smallest dominating selection from
Returns
the smmallestDominating Selection

◆ isDominantOver()

bool isDominantOver ( VirtualRobot::IKSolver::CartesianSelection current,
VirtualRobot::IKSolver::CartesianSelection other )
static

isDominantOver returns true when current selection dominates other selection Definition: A CartesianSelection dominates another CartesianSelection when additional Information is needed to solve curren after solving other Examples: - X dominates Y ; Y dominates X ; Pos dominates X,Y ans Z but X,Y and Z dont dominate Pos; Pos dominates Ori ; Ori dominates Pos

Parameters
currentthe later cartesian selection
otherthe prior cartesian selection
Returns
true if current dominates other

◆ needsOptimizing()

bool needsOptimizing ( std::vector< VirtualRobot::IKSolver::CartesianSelection > & selections)
static

needsOptimizing returns true if there is a CartesianSelection at i that dominates a CartesianSelection at i - 1

Parameters
selectionsthe cartesian selection that should be reached
Returns
true if the cartesian Selection need optimizing for a smooth trajectory

◆ optimizeControlPoints()

void optimizeControlPoints ( std::vector< PoseBasePtr > & controlPoints,
std::vector< VirtualRobot::IKSolver::CartesianSelection > & selections )
static

optimizeControlPoints changes the cartian selections and control points so that the IKSolving produces a smooth Trajectory

InterpolationSegmentFactory::optimizeControlPoints.

Parameters
controlPointsthe controlPoints to change to make the Trajectory smooth
selectionsthe cartesian selections to optimize
controlPoints
selections

◆ optimizePose()

PoseBasePtr optimizePose ( armarx::PoseBasePtr original,
armarx::PoseBasePtr corrected,
VirtualRobot::IKSolver::CartesianSelection selectionOriginal,
VirtualRobot::IKSolver::CartesianSelection selectionCorrected )
static

optimizePose changes the original pose so that the interpolation is smove when it changes from selectionOriginal to selectionCorrected

Parameters
originalthe original Pose
correctedthe absolute corrected Pose
selectionOriginalthe cartesian selection associated with the original Pose
selectionCorrectedthe cartesian selection associated with the corrected Pose
Returns

◆ produceInterpolationSegments()

std::vector< AbstractInterpolationPtr > produceInterpolationSegments ( std::vector< PoseBasePtr > controlPoints,
std::vector< InterpolationType > interpolations )
static

produceInterpolationSegments constructs a vector of AbstractInterpolation the concrete Interpolationtype of which is defined by interpolations

Parameters
controlPointsthe Poses the interpolation curves go through; segment i starts at controlPoint i and ends at control point i + 1
interpolationsthe InterpolationTypes of the Interpolation segments (warning: at least 2 segments in a row have to have spline intepolation)
Returns
a vector of |controlPoints| - 1 AbstractInterpolations between the control points

◆ produceLinearInterpolationSegments()

std::vector< AbstractInterpolationPtr > produceLinearInterpolationSegments ( std::vector< PoseBasePtr > controlPoints)
static

produceInterpolationSegments constructs a vector of LinearInterpolations

Parameters
controlPointsthe Poses the interpolation curves go through; segment i starts at controlPoint i and ends at control point i + 1
Returns
a vector of |controlPoints| - 1 LinearInterpolations between the control points

◆ produceSplineInterpolationSegment()

AbstractInterpolationPtr produceSplineInterpolationSegment ( std::vector< PoseBasePtr > controlPoints,
PoseBasePtr segmentStart )
static

produceSplineInterpolationSegment constructs the splineInterpolationSegment of a splineInterpolation between given controlPoints

Parameters
controlPointsthe controlPoints of the parent SplineInterpolatiom
segmentStartthe first Point in the Interval
Returns
a SplineInterpolationSegment between segmentStart and the following control point

◆ produceSplineInterpolationSegments()

std::vector< AbstractInterpolationPtr > produceSplineInterpolationSegments ( std::vector< PoseBasePtr > controlPoints)
static

produceInterpolationSegments constructs a vector of SplineInterpolations

Parameters
controlPointsthe Poses the interpolation curves go through; segment i starts at controlPoint i and ends at control point i + 1
Returns
a vector of |controlPoints| - 1 SplineInterpolations between the control points

The documentation for this class was generated from the following files: