Trajectory cost function defined by state evaluation at parameter. More...
#include <roboptim/trajectory/state-function.hh>
Public Types | |
| typedef T | trajectory_t |
| Trajectory type. More... | |
Public Member Functions | |
| StateFunction (const trajectory_t &gamma, boost::shared_ptr< DerivableFunction > cost, const StableTimePoint tpt, size_type order=1) | |
| Constructor. More... | |
| virtual | ~StateFunction () |
| size_type | order () const |
Static Public Member Functions | |
| template<typename M > | |
| static void | addToProblem (const trajectory_t &trajectory, boost::shared_ptr< DerivableFunction > function, unsigned order, Problem< M > &problem, typename Function::interval_t bounds, unsigned nConstraints) |
| template<typename M > | |
| static void | addToProblem (const trajectory_t &trajectory, boost::shared_ptr< DerivableFunction > function, unsigned order, Problem< M > &problem, const typename Function::intervals_t &bounds, const std::vector< typename Function::value_type > &scales, unsigned nConstraints) |
Protected Member Functions | |
| void | impl_compute (result_ref, const_argument_ref) const |
| void | impl_gradient (gradient_ref, const_argument_ref, size_type) const |
Trajectory cost function defined by state evaluation at parameter.
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) = cost \left({\Gamma(t)}, {\dot{\Gamma}(t)},\cdots,\frac{d^{r}\Gamma}{dt^{r}}(t) \right) \]
where
| T | trajectory type |
| typedef T roboptim::trajectory::StateFunction< T >::trajectory_t |
Trajectory type.
| roboptim::trajectory::StateFunction< T >::StateFunction | ( | const trajectory_t & | gamma, |
| boost::shared_ptr< DerivableFunction > | cost, | ||
| const StableTimePoint | tpt, | ||
| size_type | order = 1 |
||
| ) |
Constructor.
| gamma | Trajectory \(\Gamma\) along which the state is evaluated. |
| cost | state cost: \(cost\). |
| tpt | parameter \(t\) where the state is evaluated. |
| order | order \(r\) of derivation. |
| std::runtime_error |
|
virtual |
|
inlinestatic |
| M | Eigen matrix type |
References roboptim::trajectory::tMax.
|
inlinestatic |
References roboptim::trajectory::tMax.
|
protected |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
|
protected |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
| StateFunction< T >::size_type roboptim::trajectory::StateFunction< T >::order | ( | ) | const |