template<typename T>
class drake::trajectories::BsplineTrajectory< T >
Represents a B-spline curve using a given basis
with ordered control_points
such that each control point is a matrix in ℝʳᵒʷˢ ˣ ᶜᵒˡˢ.
- See also
- math::BsplineBasis
- Template Parameters
-
|
| BsplineTrajectory () |
|
| BsplineTrajectory (math::BsplineBasis< T > basis, std::vector< MatrixX< T >> control_points) |
| Constructs a B-spline trajectory with the given basis and control_points . More...
|
|
| BsplineTrajectory (math::BsplineBasis< double > basis, std::vector< MatrixX< T >> control_points) |
| Constructs a T-valued B-spline trajectory from a double-valued basis and T-valued control_points . More...
|
|
| ~BsplineTrajectory () final |
|
MatrixX< T > | value (const T &t) const final |
| Evaluates the BsplineTrajectory at the given time t. More...
|
|
Eigen::SparseMatrix< T > | AsLinearInControlPoints (int derivative_order=1) const |
| Supports writing optimizations using the control points as decision variables. More...
|
|
VectorX< T > | EvaluateLinearInControlPoints (const T &t, int derivative_order=0) const |
| Returns the vector, M, such that. More...
|
|
int | num_control_points () const |
| Returns the number of control points in this curve. More...
|
|
const std::vector< MatrixX< T > > & | control_points () const |
| Returns the control points of this curve. More...
|
|
MatrixX< T > | InitialValue () const |
| Returns this->value(this->start_time()) More...
|
|
MatrixX< T > | FinalValue () const |
| Returns this->value(this->end_time()) More...
|
|
const math::BsplineBasis< T > & | basis () const |
| Returns the basis of this curve. More...
|
|
void | InsertKnots (const std::vector< T > &additional_knots) |
| Adds new knots at the specified additional_knots without changing the behavior of the trajectory. More...
|
|
BsplineTrajectory< T > | CopyWithSelector (const std::function< MatrixX< T >(const MatrixX< T > &)> &select) const |
| Returns a new BsplineTrajectory that uses the same basis as this , and whose control points are the result of calling select(point) on each point in this->control_points() . More...
|
|
BsplineTrajectory< T > | CopyBlock (int start_row, int start_col, int block_rows, int block_cols) const |
| Returns a new BsplineTrajectory that uses the same basis as this , and whose control points are the result of calling point.block(start_row, start_col, block_rows, block_cols) on each point in this->control_points() . More...
|
|
BsplineTrajectory< T > | CopyHead (int n) const |
| Returns a new BsplineTrajectory that uses the same basis as this , and whose control points are the result of calling point.head(n) on each point in this->control_points() . More...
|
|
boolean< T > | operator== (const BsplineTrajectory< T > &other) const |
|
template<typename Archive > |
void | Serialize (Archive *a) |
| Passes this object to an Archive. More...
|
|
|
| BsplineTrajectory (const BsplineTrajectory &)=default |
|
BsplineTrajectory & | operator= (const BsplineTrajectory &)=default |
|
| BsplineTrajectory (BsplineTrajectory &&)=default |
|
BsplineTrajectory & | operator= (BsplineTrajectory &&)=default |
|
virtual | ~Trajectory () |
|
virtual std::unique_ptr< Trajectory< T > > | Clone () const |
|
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 |
|
Eigen::SparseMatrix<T> AsLinearInControlPoints |
( |
int |
derivative_order = 1 | ) |
const |
Supports writing optimizations using the control points as decision variables.
This method returns the matrix, M
, defining the control points of the order
derivative in the form:
derivative.control_points() = this.control_points() * M
See BezierCurve::AsLinearInControlPoints()
for more details.
- Precondition
- derivative_order >= 0.
VectorX<T> EvaluateLinearInControlPoints |
( |
const T & |
t, |
|
|
int |
derivative_order = 0 |
|
) |
| const |
Returns the vector, M, such that.
EvalDerivative(t, derivative_order) = control_points() * M
where cols()==1 (so control_points() is a matrix). This is useful for writing linear constraints on the control points. Note that if the derivative order is greater than or equal to the order of the basis, then the result is a zero vector.
- Precondition
- t ≥ start_time()
-
t ≤ end_time()