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

Reparamterize a Spline to satisfy derivative constraints. More...

#include "spline.hpp"
#include "detail/reparameterize_impl.hpp"
Include dependency graph for reparameterize.hpp:

Go to the source code of this file.

Concepts

concept  SplineLike
 SplineLike concept.
 

Functions

Spline< 2, double > reparameterize_spline (const SplineLike auto &spline, const auto &vel_min, const auto &vel_max, const auto &acc_min, const auto &acc_max, const double start_vel=1, const double end_vel=std::numeric_limits< double >::infinity(), const std::size_t N=100)
 Reparameterize a spline to satisfy velocity and acceleration constraints.
 

Detailed Description

Reparamterize a Spline to satisfy derivative constraints.

Definition in file reparameterize.hpp.

Function Documentation

◆ reparameterize_spline()

Spline< 2, double > reparameterize_spline ( const SplineLike auto &  spline,
const auto &  vel_min,
const auto &  vel_max,
const auto &  acc_min,
const auto &  acc_max,
const double  start_vel = 1,
const double  end_vel = std::numeric_limits< double >::infinity(),
const std::size_t  N = 100 
)

Reparameterize a spline to satisfy velocity and acceleration constraints.

If \( x(\cdot) \) is a Spline, then this function generates a function \( s(t) \) s.t. the reparamterized spline \( x(s(t)) \) has body velocity bounded between vel_min and vel_max, and body acceleration bounded between acc_min and acc_max.

Parameters
splinespline \( x(t) \) to reparameterize.
vel_min,vel_maxvelocity bounds, must be s.t. vel_min < 0 < vel_max (component-wise).
acc_min,acc_maxacceleration bounds, must be s.t. acc_min < 0 < acc_max (component-wise).
start_veltarget value for \( s'(0) \) (must be non-negative).
end_veltarget value for \( s'(t_{max}) \) (must be non-negative).
Npartition size. A larger value implies smaller bound violations.
Note
Allocates heap memory.
For best results the input spline should be twice continously differentiable.
It may not be feasible to satisfy the target boundary velocities. In those cases the resulting velocities will be lower than the desired values.