Abstract trajectory. More...
#include <roboptim/trajectory/trajectory.hh>
Public Types | |
typedef NTimesDerivableFunction < DerivabilityOrder > | parent_t |
Parent type. | |
typedef parent_t::value_type | value_type |
Import value type. | |
typedef parent_t::size_type | size_type |
Import size type. | |
typedef parent_t::vector_t | vector_t |
Import vector type. | |
typedef parent_t::result_t | result_t |
Import result type. | |
typedef parent_t::gradient_t | gradient_t |
Import gradient type. | |
typedef parent_t::jacobian_t | jacobian_t |
Import jacobian type. | |
typedef parent_t::interval_t | interval_t |
Import interval type. |
Public Member Functions | |
virtual | ~Trajectory () throw () |
result_t | operator() (StableTimePoint argument) const throw () |
void | operator() (result_t &result, StableTimePoint argument) const throw () |
gradient_t | derivative (StableTimePoint argument, size_type order=1) const throw () |
void | derivative (gradient_t &derivative, StableTimePoint argument, size_type order=1) const throw () |
virtual jacobian_t | variationConfigWrtParam (StableTimePoint tp) const =0 throw () |
virtual jacobian_t | variationDerivWrtParam (StableTimePoint tp, size_type order) const =0 throw () |
bool | isValidTime (value_type t) const throw () |
virtual void | normalizeAngles (size_type index) throw () |
Normalize angles in parameters array. | |
virtual Trajectory < DerivabilityOrder > * | clone () const =0 throw () |
virtual Trajectory < DerivabilityOrder > * | resize (interval_t timeRange) const =0 throw () |
Clone and resize a trajectory. | |
virtual std::ostream & | print (std::ostream &) const throw () |
Accessing parameters, and state. | |
const vector_t & | parameters () const throw () |
virtual void | setParameters (const vector_t &) throw () |
interval_t | timeRange () const throw () |
value_type | length () const throw () |
virtual vector_t | state (double t, size_type order) const throw () |
Get state along trajectory. | |
virtual vector_t | state (StableTimePoint t, size_type order) const throw () |
Accessing parameters and gradients | |
virtual jacobian_t | variationConfigWrtParam (double t) const =0 throw () |
Get the variation of a configuration with respect to parameter vector. | |
virtual jacobian_t | variationDerivWrtParam (double t, size_type order) const =0 throw () |
Get the variation of a derivative with respect to parameter vector. | |
jacobian_t | variationStateWrtParam (double t, size_type order) const throw () |
Get the variation of the state with respect to parameter vector. | |
jacobian_t | variationStateWrtParam (StableTimePoint stp, size_type order) const throw () |
Singular points | |
size_type | singularPoints () const throw () |
Get number of singular points. | |
virtual value_type | singularPointAtRank (size_type rank) const =0 |
Get singular point at given rank. | |
virtual vector_t | derivBeforeSingularPoint (size_type rank, size_type order) const =0 |
Get left limit value of derivative at given singular point. | |
virtual vector_t | derivAfterSingularPoint (size_type rank, size_type order) const =0 |
Get right limit value of derivative at given singular point. |
Protected Member Functions | |
void | impl_compute (result_t &, StableTimePoint) const throw () |
virtual void | impl_derivative (gradient_t &g, StableTimePoint, size_type order) const =0 throw () |
Trajectory (interval_t, size_type, const vector_t &, std::string name=std::string()) throw () | |
virtual void | normalizeAngles (size_type index, size_type offset) throw () |
Internal version of normalizeAngles allowing an optional offset. |
Protected Attributes | |
interval_t | timeRange_ |
vector_t | parameters_ |
size_type | singularPoints_ |
Abstract trajectory.
A trajectory is a piecewise smooth mapping from
DerivabilityOrder | derivability order |
typedef parent_t::gradient_t roboptim::Trajectory< DerivabilityOrder >::gradient_t |
Import gradient type.
typedef parent_t::interval_t roboptim::Trajectory< DerivabilityOrder >::interval_t |
Import interval type.
typedef parent_t::jacobian_t roboptim::Trajectory< DerivabilityOrder >::jacobian_t |
Import jacobian type.
typedef NTimesDerivableFunction<DerivabilityOrder> roboptim::Trajectory< DerivabilityOrder >::parent_t |
Parent type.
typedef parent_t::result_t roboptim::Trajectory< DerivabilityOrder >::result_t |
Import result type.
typedef parent_t::size_type roboptim::Trajectory< DerivabilityOrder >::size_type |
Import size type.
typedef parent_t::value_type roboptim::Trajectory< DerivabilityOrder >::value_type |
Import value type.
typedef parent_t::vector_t roboptim::Trajectory< DerivabilityOrder >::vector_t |
Import vector type.
|
virtual |
|
protected |
|
pure virtual |
|
pure virtual |
Get right limit value of derivative at given singular point.
rank | rank of the singular points. |
order | order of derivation. |
derivative | Limit of the derivative at singular point for decreasing parameter values. |
Implemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
|
inline |
Referenced by roboptim::Trajectory< T::derivabilityOrder >::derivative().
|
inline |
|
pure virtual |
Get left limit value of derivative at given singular point.
rank | rank of the singular points. |
order | order of derivation. |
Implemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
|
protected |
References roboptim::StableTimePoint::getTime().
Referenced by roboptim::Trajectory< T::derivabilityOrder >::operator()().
|
protectedpure virtual |
Implemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
Referenced by roboptim::Trajectory< T::derivabilityOrder >::derivative().
bool roboptim::Trajectory< dorder >::isValidTime | ( | value_type | t | ) | const throw () |
Trajectory< dorder >::value_type roboptim::Trajectory< dorder >::length | ( | ) | const throw () |
|
virtual |
Normalize angles in parameters array.
Make sure angles are continuous.
index | Angles index in parameter array. |
Reimplemented in roboptim::FreeTimeTrajectory< T >.
|
protectedvirtual |
Internal version of normalizeAngles allowing an optional offset.
Used to factorize code between trajectories and free time trajectories.
index | Angles index in parameter array. |
offset | Index of the first control point in the parameter vector. |
|
inline |
|
inline |
const Trajectory< dorder >::vector_t & roboptim::Trajectory< dorder >::parameters | ( | ) | const throw () |
|
virtual |
Reimplemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
|
pure virtual |
Clone and resize a trajectory.
Implemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
|
virtual |
Reimplemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
|
pure virtual |
Get singular point at given rank.
Implemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
Trajectory< dorder >::size_type roboptim::Trajectory< dorder >::singularPoints | ( | ) | const throw () |
Get number of singular points.
|
virtual |
Get state along trajectory.
t | value ![]() |
order | the higher order ![]() |
|
virtual |
Trajectory< dorder >::interval_t roboptim::Trajectory< dorder >::timeRange | ( | ) | const throw () |
|
pure virtual |
Get the variation of a configuration with respect to parameter vector.
t | value ![]() |
Implemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
|
pure virtual |
Implemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
|
pure virtual |
Get the variation of a derivative with respect to parameter vector.
t | value ![]() |
order | order ![]() |
Implemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
|
pure virtual |
Implemented in roboptim::FreeTimeTrajectory< T >, and roboptim::CubicBSpline.
Trajectory< dorder >::jacobian_t roboptim::Trajectory< dorder >::variationStateWrtParam | ( | double | t, |
size_type | order | ||
) | const throw () |
Get the variation of the state with respect to parameter vector.
t | value ![]() |
order | order ![]() |
Trajectory< dorder >::jacobian_t roboptim::Trajectory< dorder >::variationStateWrtParam | ( | StableTimePoint | stp, |
size_type | order | ||
) | const throw () |
|
protected |
|
protected |
|
protected |