smooth
A C++ library for Lie theory
|
Single-parameter Lie group-valued function. More...
#include <spline.hpp>
Public Member Functions | |
Spline (const G &ga=Identity< G >()) | |
Default constructor creates an empty Spline starting at a given point. | |
Spline (double T, Eigen::Matrix< double, Dof< G >, K > &&V, G &&ga=Identity< G >()) | |
Create Spline with one segment and given velocity control points. | |
template<typename Derived > | |
Spline (double T, const Eigen::MatrixBase< Derived > &V, const G &ga=Identity< G >()) | |
Create Spline with one segment and given velocity control points. | |
template<std::ranges::range Rv> requires (std::is_same_v<std::ranges::range_value_t<Rv>, Tangent<G>>) | |
Spline (double T, const Rv &vs, const G &ga=Identity< G >()) | |
Create Spline with one segment and given velocities. | |
Spline (const Spline &)=default | |
Copy constructor. | |
Spline (Spline &&)=default | |
Move constructor. | |
Spline & | operator= (const Spline &)=default |
Copy assignment. | |
Spline & | operator= (Spline &&)=default |
Move assignment. | |
~Spline ()=default | |
Destructor. | |
std::size_t | size () const |
Number of Spline segments. | |
bool | empty () const |
True if Spline has zero size() | |
void | reserve (std::size_t capacity) |
Allocate space for capacity segments. | |
double | t_min () const |
Start time of Spline (always equal to zero). | |
double | t_max () const |
End time of Spline. | |
G | start () const |
Spline start value (always equal to identity). | |
G | end () const |
Spline end value. | |
void | make_local () |
Move start of Spline to Identity() | |
Spline & | concat_global (const Spline &other) |
In-place concatenation with a global Spline. | |
Spline & | concat_local (const Spline &other) |
In-place local concatenation. | |
Spline & | operator+= (const Spline &other) |
Operator overload for local concatenation. | |
Spline | operator+ (const Spline &other) |
Local Spline concatenation. | |
template<typename S = double> | |
CastT< S, G > | operator() (const S &t, OptTangent< CastT< S, G > > vel={}, OptTangent< CastT< S, G > > acc={}) const |
Evaluate Spline at given time. | |
Tangent< G > | arclength (double t) const |
Get approximate arclength traversed at time T. | |
Spline | crop (double ta, double tb=std::numeric_limits< double >::infinity(), bool localize=true) const |
Crop Spline. | |
Static Public Member Functions | |
static Spline | ConstantVelocityGoal (const G &gb, double T=1, const G &ga=Identity< G >()) |
Create constant-velocity Spline that reaches a given target state. | |
static Spline | ConstantVelocity (const Tangent< G > &v, double T=1, const G &ga=Identity< G >()) |
Create constant-velocity Spline. | |
static Spline | FixedCubic (const G &gb, const Tangent< G > &va, const Tangent< G > &vb, double T=1, const G &ga=Identity< G >()) |
Create Spline with given start and end position and velocities. | |
Single-parameter Lie group-valued function.
K | Spline degree |
G | Lie group |
A Spline is a continuous function \( x : [0, T] \rightarrow \mathbb{G} \). Internally it is a piecewise collection of cumulative polynomial segments.
Definition at line 27 of file spline.hpp.
Get approximate arclength traversed at time T.
The arclength is defined as
\[ A(t) = \int_{0}^t \left| \mathrm{d}^r x_s \right| \mathrm{d} s, \]
where the absolute value is component-wise.
CastT< S, G > Spline< K, G >::operator() | ( | const S & | t, |
OptTangent< CastT< S, G > > | vel = {} , |
||
OptTangent< CastT< S, G > > | acc = {} |
||
) | const |
Evaluate Spline at given time.
S | time type |
[in] | t | time |
[out] | vel | output body velocity at evaluation time |
[out] | acc | output body acceleration at evaluation time |
Local Spline concatenation.
Operator overload for local concatenation.