|
template<typename Container1 , typename Container2 > |
static Spline | LinearParabolic (const Container1 &x, const Container2 &y, const Real ¶bolicInterval) |
| Generates a piecewise spline with parabolic segments around the given supporting points y and linear segments in between. More...
|
|
template<typename Container1 , typename Container2 > |
static Spline | LinearQuartic (const Container1 &x, const Container2 &y, const Real &quarticInterval) |
| Generates a piecewise spline with quartic polynomial segments around the given supporting points y and linear segments in between. More...
|
|
template<typename Container1 , typename Container2 > |
static Spline | LinearSextic (const Container1 &x, const Container2 &y, const Real &sexticInterval) |
| Generates a piecewise spline with sextic polynomial segments around the given supporting points y and linear segments in between. More...
|
|
template<typename U = T> |
static Spline | QuarticLinearQuarticAtRest (const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type &q0, const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type &q1, const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type &vmax, const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type &amax) |
| Generates a spline of polynomials of degrees 4-1-4 from rest to rest for one dimension. More...
|
|
template<typename U = T> |
static Spline | QuarticLinearQuarticAtRest (const typename ::std::enable_if< ::std::is_class< U >::value, U >::type &q0, const typename ::std::enable_if< ::std::is_class< U >::value, U >::type &q1, const typename ::std::enable_if< ::std::is_class< U >::value, U >::type &vmax, const typename ::std::enable_if< ::std::is_class< U >::value, U >::type &amax) |
| Generates a spline of polynomials of degrees 4-1-4 from rest to rest that is phase-synchronized for multiple degree-of-freedoms. More...
|
|
template<typename U = T> |
static Spline | SexticLinearSexticAtRest (const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type &q0, const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type &q1, const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type &vmax, const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type &amax) |
| Generates a spline of polynomials of degrees 6-1-6 from rest to rest for one dimension. More...
|
|
template<typename U = T> |
static Spline | SexticLinearSexticAtRest (const typename ::std::enable_if< ::std::is_class< U >::value, U >::type &q0, const typename ::std::enable_if< ::std::is_class< U >::value, U >::type &q1, const typename ::std::enable_if< ::std::is_class< U >::value, U >::type &vmax, const typename ::std::enable_if< ::std::is_class< U >::value, U >::type &amax) |
| Generates a spline of polynomials of degrees 6-1-6 from rest to rest that is phase-synchronized for multiple degree-of-freedoms. More...
|
|
static Spline | TrapeziodalAccelerationAtRest (const T &q0, const T &q1, const T &vmax, const T &amax, const T &jmax) |
| Generates a trapezoidal acceleration trajectory from rest to rest for multiple dimensions that are phase-synchronized. More...
|
|
template<typename T>
class rl::math::Spline< T >
A piecewise Function of Polynomial functions.
A Spline is a function that consists of a list of polynomials, which may have different degrees. It is indefinitely often differentiable, and can be scaled algebraically. As all children of Function, its is mapping Real -> T, but a Spline is only defined in the interval [lower() upper()].
- See also
- Polynomial
template<typename T >
template<typename Container1 , typename Container2 >
static Spline rl::math::Spline< T >::LinearParabolic |
( |
const Container1 & |
x, |
|
|
const Container2 & |
y, |
|
|
const Real & |
parabolicInterval |
|
) |
| |
|
inlinestatic |
Generates a piecewise spline with parabolic segments around the given supporting points y and linear segments in between.
Note that the duration of the returned Spline is longer than the given x, because there is one parabolic interval more than segments in x.
- Parameters
-
[in] | parabolicInterval | Gives the duration of a parabolic interval, the following linear interval then has a duration of x(n+1) - x(n) - parabolicInterval |
template<typename T >
template<typename Container1 , typename Container2 >
Generates a piecewise spline with quartic polynomial segments around the given supporting points y and linear segments in between.
Note that the duration of the returned Spline is longer than the given x, because there is one quartic polynomial interval more than segments in x.
- Parameters
-
[in] | quarticInterval | Gives the duration of a quartic interval, the following linear interval then has a duration of x(n+1) - x(n) - quarticInterval |
template<typename T >
template<typename Container1 , typename Container2 >
Generates a piecewise spline with sextic polynomial segments around the given supporting points y and linear segments in between.
Note that the duration of the returned Spline is longer than the given x, because there is one sextic polynomial interval more than segments in x.
- Parameters
-
[in] | sexticInterval | Gives the duration of a sextic interval, the following linear interval then has a duration of x(n+1) - x(n) - sexticInterval |
Evaluates the function or a derivative thereof for a given value x.
Some functions are only defined in the interval [lower(), upper()], and fail to evaluate outside of [lower() - FUNCTION_BOUNDARY, upper() + FUNCTION_BOUNDARY]. In Debug mode, this is signaled by failing asserts. In Release mode, the function is evaluated if algebraically possible, or will return an empty ArrayX otherwise. Some functions are not indefinitely often differentiable, and will return a NaN array for all higher orders.
- Parameters
-
[in] | x | Input value of the function or derivative |
[in] | derivative | Order of the derivative to be evaluated |
Implements rl::math::Function< T >.
template<typename T >
template<typename U = T>
static Spline rl::math::Spline< T >::SexticLinearSexticAtRest |
( |
const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type & |
q0, |
|
|
const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type & |
q1, |
|
|
const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type & |
vmax, |
|
|
const typename ::std::enable_if< ::std::is_floating_point< U >::value, U >::type & |
amax |
|
) |
| |
|
inlinestatic |
Generates a spline of polynomials of degrees 6-1-6 from rest to rest for one dimension.
Its acceleration and deceleration segments are quartic and reach amax. vmax may or may not be reached; in the latter case, the linear segment is omitted. Compared to QuarticLinearQuarticAtRest, SexticLinearSexticAtRest makes sure the jerk is continuous, which results in a smoother and slightly longer trajectory. The result is the shortest such 6-1-6 spline.
template<typename T >
static Spline rl::math::Spline< T >::TrapeziodalAccelerationAtRest |
( |
const T & |
q0, |
|
|
const T & |
q1, |
|
|
const T & |
vmax, |
|
|
const T & |
amax, |
|
|
const T & |
jmax |
|
) |
| |
|
inlinestatic |
Generates a trapezoidal acceleration trajectory from rest to rest for multiple dimensions that are phase-synchronized.
A trapezoidal acceleration trajectory has up to seven segments of constant jerk. Its velocity curve is double-S shaped.
see L. Biagiotti, C. Melchiorri (2008) "Trajectory Planning for Automatic
Machines and Robots", pp. 90ff.