Aikido
aikido::planner::parabolic::ParabolicSmoother Class Reference

Class for performing parabolic smoothing on trajectories. More...

#include <aikido/planner/parabolic/ParabolicSmoother.hpp>

Inheritance diagram for aikido::planner::parabolic::ParabolicSmoother:
aikido::planner::TrajectoryPostProcessor

Public Member Functions

 ParabolicSmoother (const Eigen::VectorXd &_velocityLimits, const Eigen::VectorXd &_accelerationLimits, bool _enableShortcut=true, bool _enableBlend=true, double _shortcutTimelimit=DEFAULT_TIMELIMT, double _blendRadius=DEFAULT_BLEND_RADIUS, int _blendIterations=DEFAULT_BLEND_ITERATIONS, double _feasibilityCheckResolution=DEFAULT_CHECK_RESOLUTION, double _feasibilityApproxTolerance=DEFAULT_TOLERANCE)
 
std::unique_ptr< aikido::trajectory::Splinepostprocess (const aikido::trajectory::Interpolated &_inputTraj, const aikido::common::RNG &_rng, const aikido::constraint::TestablePtr &_collisionTestable) override
 Performs parabolic smoothing on an input trajectory. More...
 
std::unique_ptr< aikido::trajectory::Splinepostprocess (const aikido::trajectory::Spline &_inputTraj, const aikido::common::RNG &_rng, const aikido::constraint::TestablePtr &_collisionTestable) override
 Performs parabolic smoothing on an input spline trajectory. More...
 

Private Member Functions

std::unique_ptr< aikido::trajectory::SplinehandleShortcutOrBlend (const aikido::trajectory::Spline &_inputTraj, const aikido::common::RNG &_rng, const aikido::constraint::TestablePtr &_collisionTestable)
 Common logic to do shortcutting and/or blending on the input trajectory as dictated by mEnableShortcut and mEnableBlend. More...
 

Private Attributes

double mFeasibilityCheckResolution
 Set to the value of _feasibilityCheckResolution. More...
 
double mFeasibilityApproxTolerance
 Set to the value of _feasibilityApproxTolerance. More...
 
const Eigen::VectorXd mVelocityLimits
 Set to the value of _velocityLimits. More...
 
const Eigen::VectorXd mAccelerationLimits
 Set to the value of _accelerationLimits. More...
 
bool mEnableShortcut
 Set to the value of _enableShortcut. More...
 
bool mEnableBlend
 Set to the value of _enableBlend. More...
 
double mShortcutTimelimit
 Set to the value of _shortcutTimelimit. More...
 
double mBlendRadius
 Set to the value of _blendRadius. More...
 
int mBlendIterations
 Set to the value of _blendIterations. More...
 

Detailed Description

Class for performing parabolic smoothing on trajectories.

Constructor & Destructor Documentation

◆ ParabolicSmoother()

aikido::planner::parabolic::ParabolicSmoother::ParabolicSmoother ( const Eigen::VectorXd &  _velocityLimits,
const Eigen::VectorXd &  _accelerationLimits,
bool  _enableShortcut = true,
bool  _enableBlend = true,
double  _shortcutTimelimit = DEFAULT_TIMELIMT,
double  _blendRadius = DEFAULT_BLEND_RADIUS,
int  _blendIterations = DEFAULT_BLEND_ITERATIONS,
double  _feasibilityCheckResolution = DEFAULT_CHECK_RESOLUTION,
double  _feasibilityApproxTolerance = DEFAULT_TOLERANCE 
)
Parameters
_velocityLimitsMaximum velocity for each dimension.
_accelerationLimitsMaximum acceleration for each dimension.
_enableShortcutWhether shortcutting is used in smoothing.
_enableBlendWhether blending is used in smoothing.
_shortcutTimelimitTimelimit for shortcutting. It is ineffective when _enableShortcut is false.
_blendRadiusBlend radius for blending. It is ineffective when _enableBlend is false.
_blendIterationsBlend iterations for blending. It is ineffective when _enableBlend is false.
_feasibilityCheckResolutionThe resolution in discretizing a segment in checking the feasibility of the segment.
_feasibilityApproxToleranceThis tolerance is used in a piecewise linear discretization that deviates no more than _feasibilityApproxTolerance from the parabolic ramp along any axis, and then checks for configuration and segment feasibility along that piecewise linear path.

Member Function Documentation

◆ handleShortcutOrBlend()

std::unique_ptr<aikido::trajectory::Spline> aikido::planner::parabolic::ParabolicSmoother::handleShortcutOrBlend ( const aikido::trajectory::Spline _inputTraj,
const aikido::common::RNG _rng,
const aikido::constraint::TestablePtr _collisionTestable 
)
private

Common logic to do shortcutting and/or blending on the input trajectory as dictated by mEnableShortcut and mEnableBlend.

◆ postprocess() [1/2]

std::unique_ptr<aikido::trajectory::Spline> aikido::planner::parabolic::ParabolicSmoother::postprocess ( const aikido::trajectory::Interpolated _inputTraj,
const aikido::common::RNG _rng,
const aikido::constraint::TestablePtr _collisionTestable 
)
overridevirtual

Performs parabolic smoothing on an input trajectory.

Parameters
_inputTrajThe untimed trajectory for the arm to process.
_rngRandom number generator.
_collisionTestableCollision constraint that must be satisfied after prcoessing.

Implements aikido::planner::TrajectoryPostProcessor.

◆ postprocess() [2/2]

std::unique_ptr<aikido::trajectory::Spline> aikido::planner::parabolic::ParabolicSmoother::postprocess ( const aikido::trajectory::Spline _inputTraj,
const aikido::common::RNG _rng,
const aikido::constraint::TestablePtr _collisionTestable 
)
overridevirtual

Performs parabolic smoothing on an input spline trajectory.

Parameters
_inputTrajThe untimed trajectory for the arm to process.
_rngRandom number generator.
_collisionTestableCollision constraint that must be satisfied after prcoessing.

Implements aikido::planner::TrajectoryPostProcessor.

Member Data Documentation

◆ mAccelerationLimits

const Eigen::VectorXd aikido::planner::parabolic::ParabolicSmoother::mAccelerationLimits
private

Set to the value of _accelerationLimits.

◆ mBlendIterations

int aikido::planner::parabolic::ParabolicSmoother::mBlendIterations
private

Set to the value of _blendIterations.

◆ mBlendRadius

double aikido::planner::parabolic::ParabolicSmoother::mBlendRadius
private

Set to the value of _blendRadius.

◆ mEnableBlend

bool aikido::planner::parabolic::ParabolicSmoother::mEnableBlend
private

Set to the value of _enableBlend.

◆ mEnableShortcut

bool aikido::planner::parabolic::ParabolicSmoother::mEnableShortcut
private

Set to the value of _enableShortcut.

◆ mFeasibilityApproxTolerance

double aikido::planner::parabolic::ParabolicSmoother::mFeasibilityApproxTolerance
private

Set to the value of _feasibilityApproxTolerance.

◆ mFeasibilityCheckResolution

double aikido::planner::parabolic::ParabolicSmoother::mFeasibilityCheckResolution
private

Set to the value of _feasibilityCheckResolution.

◆ mShortcutTimelimit

double aikido::planner::parabolic::ParabolicSmoother::mShortcutTimelimit
private

Set to the value of _shortcutTimelimit.

◆ mVelocityLimits

const Eigen::VectorXd aikido::planner::parabolic::ParabolicSmoother::mVelocityLimits
private

Set to the value of _velocityLimits.