Decorate a trajectory to make time scalable. More...
#include <roboptim/trajectory/free-time-trajectory.hh>
Public Types | |
typedef T | fixedTimeTrajectory_t |
Fixed point trajectory type. | |
typedef FreeTimeTrajectory< T > | self_t |
Self type. | |
typedef parent_t::interval_t | interval_t |
Import interval type. | |
Public Member Functions | |
ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (Trajectory< T::derivabilityOrder >) | |
Parent type and imports. | |
FreeTimeTrajectory (const fixedTimeTrajectory_t &traj, value_type s) | |
Constructor with fixed definition interval trajectory. | |
FreeTimeTrajectory (const self_t &traj) | |
virtual | ~FreeTimeTrajectory () |
virtual jacobian_t | variationConfigWrtParam (double t) const |
Get the variation of a configuration with respect to parameter vector. | |
virtual jacobian_t | variationDerivWrtParam (double t, size_type order) const |
Get the variation of a derivative with respect to parameter vector. | |
virtual value_type | singularPointAtRank (size_type rank) const |
Get singular point at given rank. | |
virtual vector_t | derivBeforeSingularPoint (size_type rank, size_type order) const |
Get left limit value of derivative at given singular point. | |
virtual vector_t | derivAfterSingularPoint (size_type rank, size_type order) const |
Get right limit value of derivative at given singular point. | |
virtual void | setParameters (const vector_t &) |
Set parameters. | |
value_type | timeScale () const |
Get time scale factor. | |
size_type | getTimeScalingIndex () const |
virtual std::ostream & | print (std::ostream &o) const |
Display the function on the specified output stream. | |
virtual void | normalizeAngles (size_type index) |
Normalize angles in parameters array. | |
const fixedTimeTrajectory_t & | getFixedTimeTrajectory () const |
self_t * | resize (interval_t) const |
Clone and resize a trajectory. | |
fixedTimeTrajectory_t * | makeFixedTimeTrajectory () const |
double | scaleTime (double t) const |
Scale input time argument. | |
double | unscaleTime (double t) const |
jacobian_t | variationConfigWrtParam (StableTimePoint tp) const |
jacobian_t | variationDerivWrtParam (StableTimePoint tp, size_type order) const |
Protected Member Functions | |
void | impl_compute (result_ref, double) const |
void | impl_derivative (gradient_ref g, double x, size_type order) const |
void | impl_derivative (gradient_ref g, StableTimePoint, size_type order) const |
Decorate a trajectory to make time scalable.
Build a trajectory from an input trajectory and a time scale factor.
typedef T roboptim::trajectory::FreeTimeTrajectory< T >::fixedTimeTrajectory_t |
Fixed point trajectory type.
typedef parent_t::interval_t roboptim::trajectory::FreeTimeTrajectory< T >::interval_t |
Import interval type.
Reimplemented from roboptim::trajectory::Trajectory< T::derivabilityOrder >.
typedef FreeTimeTrajectory<T> roboptim::trajectory::FreeTimeTrajectory< T >::self_t |
Self type.
roboptim::trajectory::FreeTimeTrajectory< T >::FreeTimeTrajectory | ( | const fixedTimeTrajectory_t & | traj, |
value_type | s | ||
) |
Constructor with fixed definition interval trajectory.
traj | trajectory defining this one by reparameterization |
s | time scale |
roboptim::trajectory::FreeTimeTrajectory< T >::FreeTimeTrajectory | ( | const self_t & | traj | ) |
roboptim::trajectory::FreeTimeTrajectory< T >::~FreeTimeTrajectory | ( | ) | [virtual] |
FreeTimeTrajectory< T >::vector_t roboptim::trajectory::FreeTimeTrajectory< T >::derivAfterSingularPoint | ( | size_type | rank, |
size_type | order | ||
) | const [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. |
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
FreeTimeTrajectory< T >::vector_t roboptim::trajectory::FreeTimeTrajectory< T >::derivBeforeSingularPoint | ( | size_type | rank, |
size_type | order | ||
) | const [virtual] |
Get left limit value of derivative at given singular point.
rank | rank of the singular points. |
order | order of derivation. |
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
const fixedTimeTrajectory_t& roboptim::trajectory::FreeTimeTrajectory< T >::getFixedTimeTrajectory | ( | ) | const [inline] |
size_type roboptim::trajectory::FreeTimeTrajectory< T >::getTimeScalingIndex | ( | ) | const [inline] |
void roboptim::trajectory::FreeTimeTrajectory< T >::impl_compute | ( | result_ref | res, |
double | t | ||
) | const [protected] |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
void roboptim::trajectory::FreeTimeTrajectory< T >::impl_derivative | ( | gradient_ref | g, |
double | x, | ||
size_type | order | ||
) | const [protected] |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
void roboptim::trajectory::FreeTimeTrajectory< T >::impl_derivative | ( | gradient_ref | g, |
StableTimePoint | stp, | ||
size_type | order | ||
) | const [protected, virtual] |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
fixedTimeTrajectory_t* roboptim::trajectory::FreeTimeTrajectory< T >::makeFixedTimeTrajectory | ( | ) | const [inline] |
void roboptim::trajectory::FreeTimeTrajectory< T >::normalizeAngles | ( | size_type | index | ) | [virtual] |
Normalize angles in parameters array.
Make sure angles are continuous.
index | Angles index in parameter array. |
Reimplemented from roboptim::trajectory::Trajectory< T::derivabilityOrder >.
std::ostream & roboptim::trajectory::FreeTimeTrajectory< T >::print | ( | std::ostream & | o | ) | const [virtual] |
Display the function on the specified output stream.
o | output stream used for display |
Reimplemented from roboptim::trajectory::Trajectory< T::derivabilityOrder >.
self_t* roboptim::trajectory::FreeTimeTrajectory< T >::resize | ( | interval_t | timeRange | ) | const [inline, virtual] |
Clone and resize a trajectory.
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
References roboptim::trajectory::FreeTimeTrajectory< T >::scaleTime(), roboptim::trajectory::Trajectory< DerivabilityOrder >::timeRange(), roboptim::trajectory::Trajectory< T::derivabilityOrder >::timeRange(), and roboptim::trajectory::tMax.
roboptim::trajectory::FreeTimeTrajectory< T >::ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ | ( | Trajectory< T::derivabilityOrder > | ) |
Parent type and imports.
double roboptim::trajectory::FreeTimeTrajectory< T >::scaleTime | ( | double | t | ) | const |
Scale input time argument.
Scale input argument with the same factor that the input trajectory:
where is the input trajectory time range and
the scale factor.
t | input time |
References roboptim::trajectory::detail::fixTime().
Referenced by roboptim::trajectory::FreeTimeTrajectory< T >::resize().
void roboptim::trajectory::FreeTimeTrajectory< T >::setParameters | ( | const vector_t & | ) | [virtual] |
Set parameters.
vector_t | parameters. |
std::runtime_error |
Reimplemented from roboptim::trajectory::Trajectory< T::derivabilityOrder >.
References roboptim::trajectory::removeScaleFromParameters(), and roboptim::trajectory::detail::unscaleInterval().
FreeTimeTrajectory< T >::value_type roboptim::trajectory::FreeTimeTrajectory< T >::singularPointAtRank | ( | size_type | rank | ) | const [virtual] |
Get singular point at given rank.
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
FreeTimeTrajectory< T >::value_type roboptim::trajectory::FreeTimeTrajectory< T >::timeScale | ( | ) | const |
Get time scale factor.
double roboptim::trajectory::FreeTimeTrajectory< T >::unscaleTime | ( | double | t | ) | const |
References roboptim::trajectory::detail::fixTime(), and roboptim::trajectory::tMax.
FreeTimeTrajectory< T >::jacobian_t roboptim::trajectory::FreeTimeTrajectory< T >::variationConfigWrtParam | ( | double | t | ) | const [virtual] |
Get the variation of a configuration with respect to parameter vector.
t | value in the definition interval. |
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
FreeTimeTrajectory< T >::jacobian_t roboptim::trajectory::FreeTimeTrajectory< T >::variationConfigWrtParam | ( | StableTimePoint | tp | ) | const [virtual] |
FreeTimeTrajectory< T >::jacobian_t roboptim::trajectory::FreeTimeTrajectory< T >::variationDerivWrtParam | ( | double | t, |
size_type | order | ||
) | const [virtual] |
Get the variation of a derivative with respect to parameter vector.
t | value in the definition interval. |
order | order of the derivative. |
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
FreeTimeTrajectory< T >::jacobian_t roboptim::trajectory::FreeTimeTrajectory< T >::variationDerivWrtParam | ( | StableTimePoint | tp, |
size_type | order | ||
) | const [virtual] |