Trajectory that uses an Interpolator
to interpolate between waypoints.
More...
#include <aikido/trajectory/Interpolated.hpp>
Trajectory that uses an Interpolator
to interpolate between waypoints.
◆ Interpolated()
Constructs an empty trajectory.
- Parameters
-
_stateSpace | state space this trajectory is defined in |
_interpolator | interpolator used to interpolate between waypoints |
◆ ~Interpolated()
virtual aikido::trajectory::Interpolated::~Interpolated |
( |
| ) |
|
|
virtual |
◆ addWaypoint()
Add a waypoint to the trajectory at the given time.
- Parameters
-
_t | time of the waypoint |
_state | state at the waypoint |
◆ evaluate()
◆ evaluateDerivative()
void aikido::trajectory::Interpolated::evaluateDerivative |
( |
double |
_t, |
|
|
int |
_derivative, |
|
|
Eigen::VectorXd & |
_tangentVector |
|
) |
| const |
|
overridevirtual |
Evaluates the derivative of the trajectory at time _t
.
The _tangentVector
is defined in the local frame (i.e. "body frame") and is implementation-defined if not between getStartTime()
and getEndTime()
. Derivatives of order higher than getNumDerivatives
are guaranteed to be zero.
- Parameters
-
| _t | time parameter |
| _derivative | order of derivative |
[out] | _tangentVector | output tangent vector in the local frame |
Implements aikido::trajectory::Trajectory.
◆ getDuration()
double aikido::trajectory::Interpolated::getDuration |
( |
| ) |
const |
|
overridevirtual |
◆ getEndTime()
double aikido::trajectory::Interpolated::getEndTime |
( |
| ) |
const |
|
overridevirtual |
◆ getInterpolator()
Gets the interpolator used to interpolate between waypoints.
◆ getNumDerivatives()
std::size_t aikido::trajectory::Interpolated::getNumDerivatives |
( |
| ) |
const |
|
overridevirtual |
Gets an upper bound on the number of non-zero derivatives available in this parameterization.
Note that evaluateDerivative
may return zero before this value for some trajectories.
- Returns
- upper bound on the number of non-zero derivatives
Implements aikido::trajectory::Trajectory.
◆ getNumWaypoints()
std::size_t aikido::trajectory::Interpolated::getNumWaypoints |
( |
| ) |
const |
Gets the number of waypoints.
◆ getStartTime()
double aikido::trajectory::Interpolated::getStartTime |
( |
| ) |
const |
|
overridevirtual |
◆ getStateSpace()
◆ getWaypoint()
Gets a waypoint.
- Parameters
-
- Returns
- state of the waypoint at index
_index
◆ getWaypointIndexAfterTime()
int aikido::trajectory::Interpolated::getWaypointIndexAfterTime |
( |
double |
_t | ) |
const |
|
private |
Get the index of the first waypoint whose time value is larger than _t.
Throws std::domain_error if _t is larger than last waypoint in the trajectory.
◆ getWaypointTime()
double aikido::trajectory::Interpolated::getWaypointTime |
( |
std::size_t |
_index | ) |
const |
Gets the time of a waypoint.
- Parameters
-
- Returns
- time of the waypoint at index
_index
◆ mInterpolator
◆ mStateSpace
◆ mWaypoints
std::vector<Waypoint> aikido::trajectory::Interpolated::mWaypoints |
|
private |