Decorate a trajectory to make time scalable. More...
#include <roboptim/trajectory/fwd.hh>
Public Types | |
typedef T | fixedTimeTrajectory_t |
Fixed point trajectory type. More... | |
typedef FreeTimeTrajectory< T > | self_t |
Self type. More... | |
typedef parent_t::interval_t | interval_t |
Import interval type. More... | |
Public Types inherited from roboptim::trajectory::Trajectory< T::derivabilityOrder > | |
typedef parent_t::interval_t | interval_t |
Import interval type. More... | |
Public Member Functions | |
ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS_ (Trajectory< T::derivabilityOrder >) | |
Parent type and imports. More... | |
FreeTimeTrajectory (const fixedTimeTrajectory_t &traj, value_type s) | |
Constructor with fixed definition interval trajectory. More... | |
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. More... | |
virtual jacobian_t | variationDerivWrtParam (double t, size_type order) const |
Get the variation of a derivative with respect to parameter vector. More... | |
virtual value_type | singularPointAtRank (size_type rank) const |
Get singular point at given rank. More... | |
virtual vector_t | derivBeforeSingularPoint (size_type rank, size_type order) const |
Get left limit value of derivative at given singular point. More... | |
virtual vector_t | derivAfterSingularPoint (size_type rank, size_type order) const |
Get right limit value of derivative at given singular point. More... | |
virtual void | setParameters (const_vector_ref) |
Set parameters. More... | |
value_type | timeScale () const |
Get time scale factor. More... | |
size_type | getTimeScalingIndex () const |
virtual std::ostream & | print (std::ostream &o) const |
Display the function on the specified output stream. More... | |
virtual void | normalizeAngles (size_type index) |
Normalize angles in parameters array. More... | |
const fixedTimeTrajectory_t & | getFixedTimeTrajectory () const |
self_t * | resize (interval_t) const |
Clone and resize a trajectory. More... | |
fixedTimeTrajectory_t * | makeFixedTimeTrajectory () const |
double | scaleTime (double t) const |
Scale input time argument. More... | |
double | unscaleTime (double t) const |
jacobian_t | variationConfigWrtParam (StableTimePoint tp) const |
jacobian_t | variationDerivWrtParam (StableTimePoint tp, size_type order) const |
Public Member Functions inherited from roboptim::trajectory::Trajectory< T::derivabilityOrder > | |
ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS_ (NTimesDerivableFunction< DerivabilityOrder >) | |
Parent type and imports. More... | |
virtual | ~Trajectory () |
result_t | operator() (StableTimePoint argument) const |
void | operator() (result_ref result, StableTimePoint argument) const |
derivative_t | derivative (StableTimePoint argument, size_type order=1) const |
void | derivative (derivative_ref derivative, StableTimePoint argument, size_type order=1) const |
bool | isValidTime (value_type t) const |
virtual Trajectory < DerivabilityOrder > * | clone () const =0 |
const vector_t & | parameters () const |
interval_t | timeRange () const |
value_type | length () const |
virtual vector_t | state (double t, size_type order) const |
Get state along trajectory. More... | |
virtual vector_t | state (StableTimePoint t, size_type order) const |
jacobian_t | variationStateWrtParam (double t, size_type order) const |
Get the variation of the state with respect to parameter vector. More... | |
jacobian_t | variationStateWrtParam (StableTimePoint stp, size_type order) const |
size_type | singularPoints () const |
Get number of singular points. More... | |
void | tolerance (const double &tolerance) |
double | tolerance () const |
Get tolerance for inclusion of parameter in interval of definition. More... | |
Protected Member Functions | |
void | impl_compute (result_ref, double) const |
void | impl_derivative (derivative_ref g, double x, size_type order) const |
void | impl_derivative (derivative_ref g, StableTimePoint, size_type order) const |
Protected Member Functions inherited from roboptim::trajectory::Trajectory< T::derivabilityOrder > | |
virtual void | normalizeAngles (size_type index, size_type offset) |
Internal version of normalizeAngles allowing an optional offset. More... | |
void | impl_compute (result_ref, StableTimePoint) const |
Trajectory (interval_t, size_type, const vector_t &, std::string name=std::string()) | |
Additional Inherited Members | |
Protected Attributes inherited from roboptim::trajectory::Trajectory< T::derivabilityOrder > | |
interval_t | timeRange_ |
vector_t | parameters_ |
size_type | singularPoints_ |
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.
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 | ) |
|
virtual |
|
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 >.
|
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 >.
|
inline |
|
inline |
|
protected |
|
protected |
|
protectedvirtual |
|
inline |
|
virtual |
Normalize angles in parameters array.
Make sure angles are continuous.
index | Angles index in parameter array. |
Reimplemented from roboptim::trajectory::Trajectory< T::derivabilityOrder >.
|
virtual |
Display the function on the specified output stream.
o | output stream used for display |
Reimplemented from roboptim::trajectory::Trajectory< T::derivabilityOrder >.
|
inlinevirtual |
Clone and resize a trajectory.
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
References roboptim::trajectory::FreeTimeTrajectory< T >::scaleTime(), roboptim::trajectory::Trajectory< dorder >::timeRange(), roboptim::trajectory::Trajectory< T::derivabilityOrder >::timeRange(), and roboptim::trajectory::tMax.
roboptim::trajectory::FreeTimeTrajectory< T >::ROBOPTIM_NTIMES_DERIVABLE_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:
\[t' = t_{min} + \lambda * (t - t_{min})\]
where \([t_{min}, t_{max}]\) is the input trajectory time range and
\[\lambda\]
the scale factor.
t | input time |
References roboptim::trajectory::detail::fixTime().
Referenced by roboptim::trajectory::FreeTimeTrajectory< T >::resize().
|
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().
|
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.
|
virtual |
Get the variation of a configuration with respect to parameter vector.
t | value \(t\) in the definition interval. |
\[\frac{\partial\Gamma_{\textbf{p}}(t)}{\partial\textbf{p}}\]
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
|
virtual |
|
virtual |
Get the variation of a derivative with respect to parameter vector.
t | value \(t\) in the definition interval. |
order | order \(r\) of the derivative. |
\[ \frac{\partial}{\partial\textbf{p}} \left(\frac{d^r\Gamma_{\textbf{p}}}{dt^r}(t)\right) \]
Implements roboptim::trajectory::Trajectory< T::derivabilityOrder >.
|
virtual |