Curves
A library for curves generation.
curves::CubicHermiteSE3Curve Class Reference

#include <CubicHermiteSE3Curve.hpp>

Inheritance diagram for curves::CubicHermiteSE3Curve:
Inheritance graph

Public Types

typedef kindr::HermiteTransformation< double > Coefficient
 
- Public Types inherited from curves::SE3Curve
typedef Curve< SE3ConfigParent
 
typedef Parent::ValueType ValueType
 
typedef Parent::DerivativeType DerivativeType
 
- Public Types inherited from curves::Curve< SE3Config >
typedef SE3Config::ValueType ValueType
 The value type of the curve. More...
 
typedef SE3Config::DerivativeType DerivativeType
 The curve's derivative type. More...
 

Public Member Functions

 CubicHermiteSE3Curve ()
 
virtual ~CubicHermiteSE3Curve ()
 
virtual void print (const std::string &str="") const
 Print the value of the coefficient, for debugging and unit tests. More...
 
virtual bool writeEvalToFile (const std::string &filename, int nSamples) const
 
virtual Time getMinTime () const
 The first valid time for the curve. More...
 
virtual Time getMaxTime () const
 The one past the last valid time for the curve. More...
 
bool isEmpty () const
 
int size () const
 
DerivativeType calculateSlope (const Time &timeA, const Time &timeB, const ValueType &coeffA, const ValueType &coeffB) const
 calculate the slope between 2 coefficients More...
 
virtual void extend (const std::vector< Time > &times, const std::vector< ValueType > &values, std::vector< Key > *outKeys=NULL)
 
virtual void fitCurve (const std::vector< Time > &times, const std::vector< ValueType > &values, std::vector< Key > *outKeys=NULL)
 Fit a new curve to these data points. More...
 
virtual void fitCurveWithDerivatives (const std::vector< Time > &times, const std::vector< ValueType > &values, const DerivativeType &initialDerivative=DerivativeType(), const DerivativeType &finalDerivative=DerivativeType(), std::vector< Key > *outKeys=NULL)
 
virtual void fitPeriodicCurve (const std::vector< Time > &times, const std::vector< ValueType > &values, std::vector< Key > *outKeys=NULL)
 
virtual bool evaluate (ValueType &value, Time time) const
 Evaluate the ambient space of the curve. More...
 
virtual bool evaluateDerivative (DerivativeType &derivative, Time time, unsigned int derivativeOrder) const
 Evaluate the curve derivatives. More...
 
virtual void setTimeRange (Time minTime, Time maxTime)
 
bool evaluateLinearAcceleration (kindr::Acceleration3D &linearAcceleration, Time time)
 
virtual Eigen::Vector3d evaluateAngularVelocityA (Time time)
 Evaluate the angular velocity of Frame b as seen from Frame a, expressed in Frame a. More...
 
virtual Eigen::Vector3d evaluateAngularVelocityB (Time time)
 Evaluate the angular velocity of Frame a as seen from Frame b, expressed in Frame b. More...
 
virtual Eigen::Vector3d evaluateLinearVelocityA (Time time)
 Evaluate the velocity of Frame b as seen from Frame a, expressed in Frame a. More...
 
virtual Eigen::Vector3d evaluateLinearVelocityB (Time time)
 Evaluate the velocity of Frame a as seen from Frame b, expressed in Frame b. More...
 
virtual Vector6d evaluateTwistA (Time time)
 evaluate the velocity/angular velocity of Frame b as seen from Frame a, expressed in Frame a. The return value has the linear velocity (0,1,2), and the angular velocity (3,4,5). More...
 
virtual Vector6d evaluateTwistB (Time time)
 evaluate the velocity/angular velocity of Frame a as seen from Frame b, expressed in Frame b. The return value has the linear velocity (0,1,2), and the angular velocity (3,4,5). More...
 
virtual Eigen::Vector3d evaluateAngularDerivativeA (unsigned derivativeOrder, Time time)
 Evaluate the angular derivative of Frame b as seen from Frame a, expressed in Frame a. More...
 
virtual Eigen::Vector3d evaluateAngularDerivativeB (unsigned derivativeOrder, Time time)
 Evaluate the angular derivative of Frame a as seen from Frame b, expressed in Frame b. More...
 
virtual Eigen::Vector3d evaluateLinearDerivativeA (unsigned derivativeOrder, Time time)
 Evaluate the derivative of Frame b as seen from Frame a, expressed in Frame a. More...
 
virtual Eigen::Vector3d evaluateLinearDerivativeB (unsigned derivativeOrder, Time time)
 Evaluate the derivative of Frame a as seen from Frame b, expressed in Frame b. More...
 
virtual Vector6d evaluateDerivativeA (unsigned derivativeOrder, Time time)
 evaluate the velocity/angular derivative of Frame b as seen from Frame a, expressed in Frame a. The return value has the linear velocity (0,1,2), and the angular velocity (3,4,5). More...
 
virtual Vector6d evaluateDerivativeB (unsigned derivativeOrder, Time time)
 evaluate the velocity/angular velocity of Frame a as seen from Frame b, expressed in Frame b. The return value has the linear velocity (0,1,2), and the angular velocity (3,4,5). More...
 
void setMinSamplingPeriod (Time time)
 set the minimum sampling period More...
 
void setSamplingRatio (const int ratio)
 Set the sampling ratio. eg. 4 will add a coefficient every 4 extend. More...
 
virtual void clear ()
 Clear all the curve coefficients. More...
 
void transformCurve (const ValueType T)
 Perform a rigid transformation on the left side of the curve. More...
 
void saveCurveTimesAndValues (const std::string &filename) const
 
void saveCurveAtTimes (const std::string &filename, std::vector< Time > times) const
 
void saveCorrectionCurveAtTimes (const std::string &filename, std::vector< Time > times) const
 
void getCurveTimes (std::vector< Time > *outTimes) const
 
int correctionSize () const
 Returns the number of coefficients in the correction curve. More...
 
void foldInCorrections ()
 Fold in the correction curve into the base curve and reinitialize correction curve coefficients to identity transformations. More...
 
void setCorrectionTimes (const std::vector< Time > &times)
 Add coefficients to the correction curve at given times. More...
 
void removeCorrectionCoefficientAtTime (Time time)
 Remove a correction coefficient at the specified time. More...
 
void setCorrectionCoefficientAtTime (Time time, ValueType value)
 Set the correction coefficient value at the specified time. More...
 
void resetCorrectionCurve (const std::vector< Time > &times)
 Reset the correction curve to identity values with knots at desired times. More...
 
void setBaseCurve (const std::vector< Time > &times, const std::vector< ValueType > &values)
 Set the base curve to given values with knots at desired times Resets the curve beforehand. More...
 
void setBaseCurvePart (const std::vector< Time > &times, const std::vector< ValueType > &values)
 Add / replace the given coefficients without resetting the curve. More...
 
void modifyBaseCoefficientsValuesInBatch (const std::vector< Time > &times, const std::vector< ValueType > &values)
 Modifies values of the base coefficient in batch, starting at times[0] and assuming that a coefficient exists at all the specified times. More...
 
void getBaseCurveTimes (std::vector< Time > *outTimes) const
 
void getBaseCurveTimesInWindow (std::vector< Time > *outTimes, Time begTime, Time endTime) const
 
int baseSize () const
 
void saveCorrectionCurveTimesAndValues (const std::string &filename) const
 
- Public Member Functions inherited from curves::SE3Curve
 SE3Curve ()
 
virtual ~SE3Curve ()
 
virtual void transformCurve (const ValueType T)=0
 Perform a rigid transformation on the left side of the curve. More...
 
virtual void setCorrectionCoefficientAtTime (Time time, ValueType value)=0
 Set the correction coefficient value at the specified time. More...
 
virtual void setBaseCurve (const std::vector< Time > &times, const std::vector< ValueType > &values)=0
 Set the base curve to given values with knots at desired times Resets the curve beforehand. More...
 
virtual void setBaseCurvePart (const std::vector< Time > &times, const std::vector< ValueType > &values)=0
 Add / replace the given coefficients without resetting the curve. More...
 
virtual void modifyBaseCoefficientsValuesInBatch (const std::vector< Time > &times, const std::vector< ValueType > &values)=0
 Modifies values of the base coefficient in batch, starting at times[0] and assuming that a coefficient exists at all the specified times. More...
 
- Public Member Functions inherited from curves::Curve< SE3Config >
 Curve ()
 
virtual ~Curve ()
 
virtual bool evaluateDerivative (DerivativeType &derivative, Time time, unsigned derivativeOrder) const =0
 

Private Attributes

LocalSupport2CoefficientManager< Coefficientmanager_
 
SamplingPolicy hermitePolicy_
 

Friends

class SamplingPolicy
 

Detailed Description

Implements the Cubic Hermite curve class. See KimKimShin paper. The Hermite interpolation function is defined, with the respective Jacobians regarding A and B: Translations: Equations for the unit interval: Rotations: Equations for the unit interval:

Definition at line 99 of file CubicHermiteSE3Curve.hpp.

Member Typedef Documentation

Constructor & Destructor Documentation

curves::CubicHermiteSE3Curve::CubicHermiteSE3Curve ( )
virtual curves::CubicHermiteSE3Curve::~CubicHermiteSE3Curve ( )
virtual

Member Function Documentation

int curves::CubicHermiteSE3Curve::baseSize ( ) const
inlinevirtual

Implements curves::SE3Curve.

Definition at line 266 of file CubicHermiteSE3Curve.hpp.

DerivativeType curves::CubicHermiteSE3Curve::calculateSlope ( const Time timeA,
const Time timeB,
const ValueType coeffA,
const ValueType coeffB 
) const

calculate the slope between 2 coefficients

virtual void curves::CubicHermiteSE3Curve::clear ( )
virtual

Clear all the curve coefficients.

Implements curves::SE3Curve.

int curves::CubicHermiteSE3Curve::correctionSize ( ) const
inlinevirtual

Returns the number of coefficients in the correction curve.

Implements curves::SE3Curve.

Definition at line 232 of file CubicHermiteSE3Curve.hpp.

virtual bool curves::CubicHermiteSE3Curve::evaluate ( ValueType value,
Time  time 
) const
virtual

Evaluate the ambient space of the curve.

Implements curves::Curve< SE3Config >.

virtual Eigen::Vector3d curves::CubicHermiteSE3Curve::evaluateAngularDerivativeA ( unsigned  derivativeOrder,
Time  time 
)
virtual

Evaluate the angular derivative of Frame b as seen from Frame a, expressed in Frame a.

Implements curves::SE3Curve.

virtual Eigen::Vector3d curves::CubicHermiteSE3Curve::evaluateAngularDerivativeB ( unsigned  derivativeOrder,
Time  time 
)
virtual

Evaluate the angular derivative of Frame a as seen from Frame b, expressed in Frame b.

Implements curves::SE3Curve.

virtual Eigen::Vector3d curves::CubicHermiteSE3Curve::evaluateAngularVelocityA ( Time  time)
virtual

Evaluate the angular velocity of Frame b as seen from Frame a, expressed in Frame a.

Implements curves::SE3Curve.

virtual Eigen::Vector3d curves::CubicHermiteSE3Curve::evaluateAngularVelocityB ( Time  time)
virtual

Evaluate the angular velocity of Frame a as seen from Frame b, expressed in Frame b.

Implements curves::SE3Curve.

virtual bool curves::CubicHermiteSE3Curve::evaluateDerivative ( DerivativeType derivative,
Time  time,
unsigned int  derivativeOrder 
) const
virtual

Evaluate the curve derivatives.

virtual Vector6d curves::CubicHermiteSE3Curve::evaluateDerivativeA ( unsigned  derivativeOrder,
Time  time 
)
virtual

evaluate the velocity/angular derivative of Frame b as seen from Frame a, expressed in Frame a. The return value has the linear velocity (0,1,2), and the angular velocity (3,4,5).

Implements curves::SE3Curve.

virtual Vector6d curves::CubicHermiteSE3Curve::evaluateDerivativeB ( unsigned  derivativeOrder,
Time  time 
)
virtual

evaluate the velocity/angular velocity of Frame a as seen from Frame b, expressed in Frame b. The return value has the linear velocity (0,1,2), and the angular velocity (3,4,5).

Implements curves::SE3Curve.

bool curves::CubicHermiteSE3Curve::evaluateLinearAcceleration ( kindr::Acceleration3D &  linearAcceleration,
Time  time 
)
virtual Eigen::Vector3d curves::CubicHermiteSE3Curve::evaluateLinearDerivativeA ( unsigned  derivativeOrder,
Time  time 
)
virtual

Evaluate the derivative of Frame b as seen from Frame a, expressed in Frame a.

Implements curves::SE3Curve.

virtual Eigen::Vector3d curves::CubicHermiteSE3Curve::evaluateLinearDerivativeB ( unsigned  derivativeOrder,
Time  time 
)
virtual

Evaluate the derivative of Frame a as seen from Frame b, expressed in Frame b.

Implements curves::SE3Curve.

virtual Eigen::Vector3d curves::CubicHermiteSE3Curve::evaluateLinearVelocityA ( Time  time)
virtual

Evaluate the velocity of Frame b as seen from Frame a, expressed in Frame a.

Implements curves::SE3Curve.

virtual Eigen::Vector3d curves::CubicHermiteSE3Curve::evaluateLinearVelocityB ( Time  time)
virtual

Evaluate the velocity of Frame a as seen from Frame b, expressed in Frame b.

Implements curves::SE3Curve.

virtual Vector6d curves::CubicHermiteSE3Curve::evaluateTwistA ( Time  time)
virtual

evaluate the velocity/angular velocity of Frame b as seen from Frame a, expressed in Frame a. The return value has the linear velocity (0,1,2), and the angular velocity (3,4,5).

Implements curves::SE3Curve.

virtual Vector6d curves::CubicHermiteSE3Curve::evaluateTwistB ( Time  time)
virtual

evaluate the velocity/angular velocity of Frame a as seen from Frame b, expressed in Frame b. The return value has the linear velocity (0,1,2), and the angular velocity (3,4,5).

Implements curves::SE3Curve.

virtual void curves::CubicHermiteSE3Curve::extend ( const std::vector< Time > &  times,
const std::vector< ValueType > &  values,
std::vector< Key > *  outKeys = NULL 
)
virtual

Extend the curve so that it can be evaluated at these times. Try to make the curve fit to the values. Note: Assumes that extend times strictly increase the curve time

Implements curves::Curve< SE3Config >.

virtual void curves::CubicHermiteSE3Curve::fitCurve ( const std::vector< Time > &  times,
const std::vector< ValueType > &  values,
std::vector< Key > *  outKeys = NULL 
)
virtual

Fit a new curve to these data points.

The existing curve will be cleared.fitCurveWithDerivatives Underneath the curve should have some default policy for fitting.

Implements curves::Curve< SE3Config >.

virtual void curves::CubicHermiteSE3Curve::fitCurveWithDerivatives ( const std::vector< Time > &  times,
const std::vector< ValueType > &  values,
const DerivativeType initialDerivative = DerivativeType(),
const DerivativeType finalDerivative = DerivativeType(),
std::vector< Key > *  outKeys = NULL 
)
virtual
virtual void curves::CubicHermiteSE3Curve::fitPeriodicCurve ( const std::vector< Time > &  times,
const std::vector< ValueType > &  values,
std::vector< Key > *  outKeys = NULL 
)
virtual
void curves::CubicHermiteSE3Curve::foldInCorrections ( )
inlinevirtual

Fold in the correction curve into the base curve and reinitialize correction curve coefficients to identity transformations.

Implements curves::SE3Curve.

Definition at line 236 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::getBaseCurveTimes ( std::vector< Time > *  outTimes) const
inlinevirtual

Implements curves::SE3Curve.

Definition at line 261 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::getBaseCurveTimesInWindow ( std::vector< Time > *  outTimes,
Time  begTime,
Time  endTime 
) const
inlinevirtual

Implements curves::SE3Curve.

Definition at line 263 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::getCurveTimes ( std::vector< Time > *  outTimes) const
virtual

Implements curves::SE3Curve.

virtual Time curves::CubicHermiteSE3Curve::getMaxTime ( ) const
virtual

The one past the last valid time for the curve.

Implements curves::Curve< SE3Config >.

virtual Time curves::CubicHermiteSE3Curve::getMinTime ( ) const
virtual

The first valid time for the curve.

Implements curves::Curve< SE3Config >.

bool curves::CubicHermiteSE3Curve::isEmpty ( ) const
virtual

Implements curves::SE3Curve.

void curves::CubicHermiteSE3Curve::modifyBaseCoefficientsValuesInBatch ( const std::vector< Time > &  times,
const std::vector< ValueType > &  values 
)
inline

Modifies values of the base coefficient in batch, starting at times[0] and assuming that a coefficient exists at all the specified times.

Definition at line 259 of file CubicHermiteSE3Curve.hpp.

virtual void curves::CubicHermiteSE3Curve::print ( const std::string &  str = "") const
virtual

Print the value of the coefficient, for debugging and unit tests.

Implements curves::Curve< SE3Config >.

void curves::CubicHermiteSE3Curve::removeCorrectionCoefficientAtTime ( Time  time)
inlinevirtual

Remove a correction coefficient at the specified time.

Implements curves::SE3Curve.

Definition at line 242 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::resetCorrectionCurve ( const std::vector< Time > &  times)
inlinevirtual

Reset the correction curve to identity values with knots at desired times.

Implements curves::SE3Curve.

Definition at line 248 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::saveCorrectionCurveAtTimes ( const std::string &  filename,
std::vector< Time times 
) const
inlinevirtual

Implements curves::SE3Curve.

Definition at line 227 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::saveCorrectionCurveTimesAndValues ( const std::string &  filename) const
inlinevirtual

Implements curves::SE3Curve.

Definition at line 268 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::saveCurveAtTimes ( const std::string &  filename,
std::vector< Time times 
) const
virtual

Implements curves::SE3Curve.

void curves::CubicHermiteSE3Curve::saveCurveTimesAndValues ( const std::string &  filename) const
virtual

Implements curves::SE3Curve.

void curves::CubicHermiteSE3Curve::setBaseCurve ( const std::vector< Time > &  times,
const std::vector< ValueType > &  values 
)
inline

Set the base curve to given values with knots at desired times Resets the curve beforehand.

Definition at line 252 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::setBaseCurvePart ( const std::vector< Time > &  times,
const std::vector< ValueType > &  values 
)
inline

Add / replace the given coefficients without resetting the curve.

Definition at line 255 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::setCorrectionCoefficientAtTime ( Time  time,
ValueType  value 
)
inline

Set the correction coefficient value at the specified time.

Definition at line 245 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::setCorrectionTimes ( const std::vector< Time > &  times)
inlinevirtual

Add coefficients to the correction curve at given times.

Implements curves::SE3Curve.

Definition at line 239 of file CubicHermiteSE3Curve.hpp.

void curves::CubicHermiteSE3Curve::setMinSamplingPeriod ( Time  time)
virtual

set the minimum sampling period

Implements curves::SE3Curve.

void curves::CubicHermiteSE3Curve::setSamplingRatio ( const int  ratio)
virtual

Set the sampling ratio. eg. 4 will add a coefficient every 4 extend.

Implements curves::SE3Curve.

virtual void curves::CubicHermiteSE3Curve::setTimeRange ( Time  minTime,
Time  maxTime 
)
virtual
int curves::CubicHermiteSE3Curve::size ( ) const
virtual

Implements curves::SE3Curve.

void curves::CubicHermiteSE3Curve::transformCurve ( const ValueType  T)
virtual

Perform a rigid transformation on the left side of the curve.

Implements curves::Curve< SE3Config >.

virtual bool curves::CubicHermiteSE3Curve::writeEvalToFile ( const std::string &  filename,
int  nSamples 
) const
virtual

Friends And Related Function Documentation

friend class SamplingPolicy
friend

Definition at line 101 of file CubicHermiteSE3Curve.hpp.

Member Data Documentation

SamplingPolicy curves::CubicHermiteSE3Curve::hermitePolicy_
private

Definition at line 271 of file CubicHermiteSE3Curve.hpp.

LocalSupport2CoefficientManager<Coefficient> curves::CubicHermiteSE3Curve::manager_
private

Definition at line 268 of file CubicHermiteSE3Curve.hpp.


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