template<typename T>
class drake::trajectories::FunctionHandleTrajectory< T >
FunctionHandleTrajectory takes a function, value = f(t), and provides a Trajectory interface.
- Template Parameters
-
|
| FunctionHandleTrajectory (std::function< MatrixX< T >(const T &)> func, int rows, int cols=1, double start_time=-std::numeric_limits< double >::infinity(), double end_time=std::numeric_limits< double >::infinity()) |
| Creates the FunctionHandleTrajectory. More...
|
|
| ~FunctionHandleTrajectory () final |
|
void | set_derivative (std::function< MatrixX< T >(const T &, int)> func) |
| Sets a callback function that returns the derivative of the function. More...
|
|
|
| FunctionHandleTrajectory (const FunctionHandleTrajectory &)=default |
|
FunctionHandleTrajectory & | operator= (const FunctionHandleTrajectory &)=default |
|
| FunctionHandleTrajectory (FunctionHandleTrajectory &&)=default |
|
FunctionHandleTrajectory & | operator= (FunctionHandleTrajectory &&)=default |
|
virtual | ~Trajectory () |
|
virtual std::unique_ptr< Trajectory< T > > | Clone () const |
|
virtual MatrixX< T > | value (const T &t) const |
| Evaluates the trajectory at the given time t . More...
|
|
MatrixX< T > | vector_values (const std::vector< T > &t) const |
| If cols()==1, then evaluates the trajectory at each time t , and returns the results as a Matrix with the ith column corresponding to the ith time. More...
|
|
MatrixX< T > | vector_values (const Eigen::Ref< const VectorX< T >> &t) const |
| If cols()==1, then evaluates the trajectory at each time t , and returns the results as a Matrix with the ith column corresponding to the ith time. More...
|
|
bool | has_derivative () const |
| Returns true iff the Trajectory provides and implementation for EvalDerivative() and MakeDerivative(). More...
|
|
MatrixX< T > | EvalDerivative (const T &t, int derivative_order=1) const |
| Evaluates the derivative of this at the given time t . More...
|
|
std::unique_ptr< Trajectory< T > > | MakeDerivative (int derivative_order=1) const |
| Takes the derivative of this Trajectory. More...
|
|
virtual Eigen::Index | rows () const |
|
virtual Eigen::Index | cols () const |
|
virtual T | start_time () const |
|
virtual T | end_time () const |
|
void set_derivative |
( |
std::function< MatrixX< T >(const T &, int)> |
func | ) |
|
Sets a callback function that returns the derivative of the function.
func(t,order)
will only be called with order > 0
. It is recommended that if the derivatives are not implemented for the requested order, the callback should throw an exception.
The size of the output of func
will be checked each time the derivative is evaluated, and a std::exception will be thrown if the size is incorrect.