smooth
A C++ library for Lie theory
Loading...
Searching...
No Matches
Functions
cumulative_spline.hpp File Reference

Evaluation of cumulative Lie group splines. More...

#include <cassert>
#include <optional>
#include "../detail/traits.hpp"
#include "../lie_groups.hpp"
#include "../polynomial/basis.hpp"
#include "common.hpp"
#include "detail/cumulative_spline_impl.hpp"
Include dependency graph for cumulative_spline.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<int K, LieGroup G>
requires (K > 0)
SMOOTH_BEGIN_NAMESPACE G cspline_eval_vs (std::ranges::sized_range auto &&vs, const MatrixType auto &Bcum, Scalar< G > u, OptTangent< G > vel={}, OptTangent< G > acc={}, OptTangent< G > jer={}) noexcept
 Evaluate a cumulative spline of order \(K\) from differences.
 
template<int K, LieGroup G>
requires (K > 0)
SplineJacobian< G, K - 1 > cspline_eval_dg_dvs (std::ranges::sized_range auto &&vs, const MatrixType auto &Bcum, const Scalar< G > &u, OptSplineJacobian< G, K - 1 > dvel_dvs={}, OptSplineJacobian< G, K - 1 > dacc_dvs={}) noexcept
 Derivatives of a cumulative spline w.r.t. the differences.
 
template<int K, std::ranges::sized_range R, LieGroup G = std::ranges::range_value_t<R>>
requires (K > 0)
cspline_eval_gs (R &&gs, const MatrixType auto &Bcum, Scalar< G > u, OptTangent< G > vel={}, OptTangent< G > acc={}, OptTangent< G > jer={}) noexcept
 Evaluate a cumulative basis spline of order K from coefficients.
 
template<int K, std::ranges::sized_range R, LieGroup G = std::ranges::range_value_t<R>>
requires (K > 0)
SplineJacobian< G, K > cspline_eval_dg_dgs (R &&gs, const MatrixType auto &Bcum, const Scalar< G > &u, OptSplineJacobian< G, K > dvel_dgs={}, OptSplineJacobian< G, K > dacc_dgs={}) noexcept
 Derivatives of a cumulative spline w.r.t. the coefficients.
 

Detailed Description

Evaluation of cumulative Lie group splines.

Definition in file cumulative_spline.hpp.

Function Documentation

◆ cspline_eval_dg_dgs()

template<int K, std::ranges::sized_range R, LieGroup G = std::ranges::range_value_t<R>>
requires (K > 0)
SplineJacobian< G, K > cspline_eval_dg_dgs ( R &&  gs,
const MatrixType auto &  Bcum,
const Scalar< G > &  u,
OptSplineJacobian< G, K >  dvel_dgs = {},
OptSplineJacobian< G, K >  dacc_dgs = {} 
)
noexcept

Derivatives of a cumulative spline w.r.t. the coefficients.

\[ \mathrm{d}^r \left( \prod_{i=1}^{K} \exp ( \tilde B_i(u) * v_i ) \right)_{g_0, \ldots, g_k} \]

where \( \tilde B_i \) are cumulative basis functins and \( v_i = g_i - g_{i-1} \).

Template Parameters
Kspline order (number of basis functions)
Parameters
[in]gsLieGroup control points \( g_0, g_1, \ldots, g_K \) (must be of size K + 1)
[in]Bcummatrix of cumulative base coefficients (size K+1 x K+1)
[in]utime point to evaluate spline at (clamped to [0, 1])
[out]dvel_dgsderivatives of velocity w.r.t. gs
[out]dacc_dgsderivatives of acceleration w.r.t. gs
Returns
dg_dgs derivatives of value w.r.t. gs

◆ cspline_eval_dg_dvs()

template<int K, LieGroup G>
requires (K > 0)
SplineJacobian< G, K - 1 > cspline_eval_dg_dvs ( std::ranges::sized_range auto &&  vs,
const MatrixType auto &  Bcum,
const Scalar< G > &  u,
OptSplineJacobian< G, K - 1 >  dvel_dvs = {},
OptSplineJacobian< G, K - 1 >  dacc_dvs = {} 
)
noexcept

Derivatives of a cumulative spline w.r.t. the differences.

\[ \mathrm{d}^r \left( \prod_{i=1}^{K} \exp ( \tilde B_i(u) * v_i ) \right)_{v_1, \ldots, v_k} \]

where \( \tilde B_i \) are cumulative basis functins and \( v_i = g_i - g_{i-1} \).

Template Parameters
Kspline order (number of basis functions)
Glie group type
Parameters
[in]vsrange of differences v_i (must be of size K)
[in]Bcummatrix of cumulative base coefficients (size K+1 x K+1)
[in]utime point to evaluate spline at (clamped to [0, 1])
[out]dvel_dvsderivatives of velocity w.r.t. vs
[out]dacc_dvsderivatives of acceleration w.r.t. vs
Returns
dg_dvs derivatives of value w.r.t. vs

◆ cspline_eval_gs()

template<int K, std::ranges::sized_range R, LieGroup G = std::ranges::range_value_t<R>>
requires (K > 0)
G cspline_eval_gs ( R &&  gs,
const MatrixType auto &  Bcum,
Scalar< G >  u,
OptTangent< G >  vel = {},
OptTangent< G >  acc = {},
OptTangent< G >  jer = {} 
)
inlinenoexcept

Evaluate a cumulative basis spline of order K from coefficients.

\[ g = g_0 * \prod_{i=1}^{K} \exp ( \tilde B_i(u) * v_i ), \]

where \( \tilde B \) are cumulative basis functions and \( v_i = g_i - g_{i-1} \).

Template Parameters
Kspline order
Parameters
[in]gsLieGroup control points \( g_0, g_1, \ldots, g_K \) (must be of size K + 1)
[in]Bcummatrix of cumulative base coefficients (size K+1 x K+1)
[in]utime point to evaluate spline at (clamped to [0, 1])
[out]velcalculate first order derivative w.r.t. u
[out]acccalculate second order derivative w.r.t. u
[out]jercalculate third order derivative w.r.t. u

◆ cspline_eval_vs()

template<int K, LieGroup G>
requires (K > 0)
SMOOTH_BEGIN_NAMESPACE G cspline_eval_vs ( std::ranges::sized_range auto &&  vs,
const MatrixType auto &  Bcum,
Scalar< G >  u,
OptTangent< G >  vel = {},
OptTangent< G >  acc = {},
OptTangent< G >  jer = {} 
)
inlinenoexcept

Evaluate a cumulative spline of order \(K\) from differences.

\[ g = \prod_{i=1}^{K} \exp ( \tilde B_i(u) * v_i ) \]

Template Parameters
Kspline order (number of basis functions)
Glie group type
Parameters
[in]vsrange of differences v_i (must be of size K)
[in]Bcummatrix of cumulative base coefficients (size K+1 x K+1)
[in]utime point to evaluate spline at (clamped to [0, 1])
[out]velcalculate first order derivative w.r.t. u
[out]acccalculate second order derivative w.r.t. u
[out]jercalculate third order derivative w.r.t. u
Returns
g