Trajectory cost function defined by sum of state evaluations at parameters. More...
#include <roboptim/trajectory/trajectory-sum-cost.hh>
Public Types | |
typedef DerivableFunction | parent_t |
Parent type. More... | |
typedef T | trajectory_t |
Trajectory type. More... | |
typedef parent_t::vector_t | vector_t |
Import vector type. More... | |
typedef parent_t::gradient_t | gradient_t |
Import gradient type. More... | |
typedef parent_t::discreteInterval_t | discreteInterval_t |
Import discrete interval type. More... | |
Public Member Functions | |
TrajectorySumCost (const trajectory_t &gamma, boost::shared_ptr< DerivableFunction > cost, const discreteStableTimePointInterval_t &interval, size_type order=1) | |
Constructor. More... | |
virtual | ~TrajectorySumCost () |
size_type | order () const |
Protected Member Functions | |
void | impl_compute (result_ref, const_argument_ref) const |
void | impl_gradient (gradient_ref, const_argument_ref, size_type) const |
Discrete interval of stable time points. | |
typedef boost::tuple < StableTimePoint, StableTimePoint, StableTimePoint > | discreteStableTimePointInterval_t |
Types representing a discrete interval of stable time points. More... | |
static discreteStableTimePointInterval_t | makeDiscreteInterval (StableTimePoint min, StableTimePoint max, StableTimePoint step) |
Construct a discrete interval. More... | |
static discreteStableTimePointInterval_t | makeDiscreteInterval (interval_t interval, StableTimePoint step) |
Construct a discrete interval. More... | |
static StableTimePoint | getLowerBound (const discreteStableTimePointInterval_t &interval) |
Get the lower bound of a discrete interval. More... | |
static StableTimePoint | getUpperBound (const discreteStableTimePointInterval_t &interval) |
Get the upper bound of a discrete interval. More... | |
static StableTimePoint | getStep (const discreteStableTimePointInterval_t &interval) |
Get the upper step of a discrete interval. More... | |
Trajectory cost function defined by sum of state evaluations at parameters.
The state along a trajectory is defined as the vector containing the configuration and derivatives up to order \(r\) of the configuration.
\[ \textbf{Cost}(\Gamma) = \sum_{i=1}{n} cost \left({\Gamma(t_i)}, {\dot{\Gamma}(t_i)},\cdots,\frac{d^{r}\Gamma}{dt^{r}}(t_i) \right) \]
where
T | trajectory type |
typedef parent_t::discreteInterval_t roboptim::trajectory::TrajectorySumCost< T >::discreteInterval_t |
Import discrete interval type.
typedef boost::tuple<StableTimePoint, StableTimePoint, StableTimePoint> roboptim::trajectory::TrajectorySumCost< T >::discreteStableTimePointInterval_t |
Types representing a discrete interval of stable time points.
A discrete interval is a triplet of values:
typedef parent_t::gradient_t roboptim::trajectory::TrajectorySumCost< T >::gradient_t |
Import gradient type.
typedef DerivableFunction roboptim::trajectory::TrajectorySumCost< T >::parent_t |
Parent type.
typedef T roboptim::trajectory::TrajectorySumCost< T >::trajectory_t |
Trajectory type.
typedef parent_t::vector_t roboptim::trajectory::TrajectorySumCost< T >::vector_t |
Import vector type.
roboptim::trajectory::TrajectorySumCost< T >::TrajectorySumCost | ( | const trajectory_t & | gamma, |
boost::shared_ptr< DerivableFunction > | cost, | ||
const discreteStableTimePointInterval_t & | interval, | ||
size_type | order = 1 |
||
) |
Constructor.
gamma | Trajectory \(\Gamma\) along which the state is evaluated. |
cost | state cost: \(cost\). |
interval | Stable time points list where cost will be evaluated. |
order | order \(r\) of derivation. |
|
virtual |
|
inlinestatic |
Get the lower bound of a discrete interval.
interval | accessed discrete interval |
|
inlinestatic |
Get the upper step of a discrete interval.
interval | accessed discrete interval |
|
inlinestatic |
Get the upper bound of a discrete interval.
interval | accessed discrete interval |
|
protected |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
|
protected |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
|
inlinestatic |
Construct a discrete interval.
min | miminum value of the interval |
max | maxinum value of the interval |
step | discretization step |
|
inlinestatic |
Construct a discrete interval.
interval | continuous interval |
step | discretization step |
TrajectorySumCost< T >::size_type roboptim::trajectory::TrajectorySumCost< T >::order | ( | ) | const |