Go to the documentation of this file. 1 #ifndef AIKIDO_TRAJECTORY_SPLINETRAJECTORY2_HPP_
2 #define AIKIDO_TRAJECTORY_SPLINETRAJECTORY2_HPP_
61 const Eigen::MatrixXd& _coefficients,
77 void addSegment(
const Eigen::MatrixXd& _coefficients,
double _duration);
107 Eigen::VectorXd& _tangentVector)
const override;
133 Eigen::VectorXd& _tangentVector)
const;
149 std::size_t _index)
const;
160 const Eigen::MatrixXd& _coefficients,
double _t,
int _derivative);
172 #endif // ifndef AIKIDO_TRAJECTORY_SPLINETRAJECTORY2_HPP_
statespace::ConstStateSpacePtr getStateSpace() const override
Gets the StateSpace that this trajectory is defined in.
double getSegmentDuration(std::size_t _index) const
Gets the duration of a segment.
double getEndTime() const override
Time at which the trajectory ends.
Format of serialized trajectory in YAML.
Definition: algorithm.hpp:4
static Eigen::VectorXd evaluatePolynomial(const Eigen::MatrixXd &_coefficients, double _t, int _derivative)
void evaluateDerivative(double _t, int _derivative, Eigen::VectorXd &_tangentVector) const override
Evaluates the derivative of the trajectory at time _t.
std::size_t getNumWaypoints() const
Gets the number of waypoints.
std::shared_ptr< const StateSpace > ConstStateSpacePtr
Definition: StateSpace.hpp:15
void evaluate(double _t, statespace::StateSpace::State *_state) const override
Evaluates the state of the trajectory at time _t and store the result in a _state allocated by getSta...
Eigen::MatrixXd mCoefficients
Definition: Spline.hpp:155
const aikido::statespace::StateSpace::State * getSegmentStartState(std::size_t _index) const
Gets the start state of a segment.
void addSegment(const Eigen::MatrixXd &_coefficients, double _duration, const statespace::StateSpace::State *_startState)
Add a segment to the end of this trajectory that starts at _startState, lasts for _duration,...
void getWaypoint(std::size_t _index, statespace::StateSpace::State *state) const
Gets a waypoint.
double mStartTime
Definition: Spline.hpp:165
std::vector< PolynomialSegment > mSegments
Definition: Spline.hpp:166
double getDuration() const override
Duration of the trajectory.
Definition: Spline.hpp:152
std::size_t getNumDerivatives() const override
Gets an upper bound on the number of non-zero derivatives available in this parameterization.
const Eigen::MatrixXd & getSegmentCoefficients(std::size_t _index) const
Gets the coefficients of a segment.
std::size_t getNumSegments() const
Gets the number of segments in this spline.
Spline(statespace::ConstStateSpacePtr _stateSpace, double _startTime=0.)
Constructs an empty trajectory.
double getStartTime() const override
Time at which the trajectory starts.
void getWaypointDerivative(std::size_t _index, int _derivative, Eigen::VectorXd &_tangentVector) const
Gets the derivative of a waypoint.
std::pair< std::size_t, double > getSegmentForTime(double _t) const
Definition: StateSpace.hpp:167
statespace::ConstStateSpacePtr mStateSpace
Definition: Spline.hpp:164
statespace::StateSpace::State * mStartState
Definition: Spline.hpp:154
double mDuration
Definition: Spline.hpp:156
#define AIKIDO_DECLARE_POINTERS(X)
Definition: pointers.hpp:21
Polynomial spline trajectory defined in a StateSpace.
Definition: Spline.hpp:25
double getWaypointTime(std::size_t _index) const
Gets the time of a waypoint.
Time-parameterized path in a StateSpace.
Definition: Trajectory.hpp:20