bernstein.h File Reference
#include "curve_abc.h"
#include "MathDefs.h"
#include <math.h>
#include <vector>
#include <stdexcept>
Include dependency graph for bernstein.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  spline::Bern< Numeric >
 

Namespaces

 spline
 

Functions

unsigned int spline::fact (const unsigned int n)
 Computes factorial of a number. More...
 
unsigned int spline::bin (const unsigned int n, const unsigned int k)
 Computes a binomal coefficient. More...
 
template<typename Numeric >
std::vector< Bern< Numeric > > spline::makeBernstein (const unsigned int n)
 Computes all Bernstein polynomes for a certain degree. More...
 
spline::helpers::rotation_spline::operator()
quat_t operator()(const Numeric t) const
Definition: effector_spline_rotation.h:64
spline::helpers::effector_spline_rotation::quat_spline_
const exact_cubic_quat_t quat_spline_
Definition: effector_spline_rotation.h:239
spline::helpers::effector_spline_rotation::min
Numeric min() const
Definition: effector_spline_rotation.h:182
spline::helpers::Waypoint
std::pair< double, Point > Waypoint
Definition: effector_spline.h:30
spline::helpers::rotation_spline::max
virtual time_t max() const
Definition: effector_spline_rotation.h:86
spline::helpers::effector_spline_rotation::operator()
config_t operator()(const Numeric t) const
Evaluation of the effector position and rotation at time t.
Definition: effector_spline_rotation.h:193
spline::helpers::effector_spline_rotation::effector_spline_rotation
effector_spline_rotation(In wayPointsBegin, In wayPointsEnd, quat_ref_const_t &to_quat=quat_t(0, 0, 0, 1), quat_ref_const_t &land_quat=quat_t(0, 0, 0, 1), const Point &lift_normal=Eigen::Vector3d::UnitZ(), const Point &land_normal=Eigen::Vector3d::UnitZ(), const Numeric lift_offset=0.02, const Numeric land_offset=0.02, const Time lift_offset_duration=0.02, const Time land_offset_duration=0.02)
Constructor.
Definition: effector_spline_rotation.h:127
spline::helpers::config_t
Eigen::Matrix< Numeric, 7, 1 > config_t
Definition: effector_spline_rotation.h:32
spline::helpers::rotation_spline::~rotation_spline
~rotation_spline()
Definition: effector_spline_rotation.h:52
spline::bezier_curve::max
virtual time_t max() const
Definition: bezier_curve.h:224
spline::bezier_curve::bezier_curve
bezier_curve(In PointsBegin, In PointsEnd, const curve_constraints_t &constraints, const time_t minBound=0, const time_t maxBound=1)
Constructor This constructor will add 4 points (2 after the first one, 2 before the last one) to ensu...
Definition: bezier_curve.h:66
spline::bezier_curve::num_t
Numeric num_t
Definition: bezier_curve.h:34
spline::bezier_curve::bezier_curve
bezier_curve(In PointsBegin, In PointsEnd, const time_t minBound=0, const time_t maxBound=1)
Constructor.
Definition: bezier_curve.h:46
spline::helpers::rotation_spline::quat_from_
Eigen::Quaterniond quat_from_
Definition: effector_spline_rotation.h:89
spline::makeBernstein
std::vector< Bern< Numeric > > makeBernstein(const unsigned int n)
Computes all Bernstein polynomes for a certain degree.
Definition: bernstein.h:59
spline::helpers::quat_ref_t
Eigen::Ref< quat_t > quat_ref_t
Definition: effector_spline_rotation.h:30
spline::bezier_curve::t_point_t
std::vector< point_t, Eigen::aligned_allocator< point_t > > t_point_t
Definition: bezier_curve.h:36
spline::helpers::spline_t
spline_deriv_constraint_t::spline_t spline_t
Definition: effector_spline.h:36
spline::helpers::compute_offset
Waypoint compute_offset(const Waypoint &source, const Point &normal, const Numeric offset, const Time time_offset)
Definition: effector_spline.h:38
spline::Bern::i_
Numeric i_
Definition: bernstein.h:51
spline::Bern::operator()
Numeric operator()(const Numeric u) const
Definition: bernstein.h:45
spline::Bern::Bern
Bern(const unsigned int m, const unsigned int i)
Definition: bernstein.h:41
bernstein.h
spline::helpers::effector_spline_rotation::~effector_spline_rotation
~effector_spline_rotation()
Definition: effector_spline_rotation.h:177
spline::SplineOptimizer::num_t
Numeric num_t
Definition: OptimizeSpline.h:32
spline::bezier_curve::time_t
Time time_t
Definition: bezier_curve.h:33
spline::bezier_curve::bernstein_
const std::vector< Bern< Numeric > > bernstein_
Definition: bezier_curve.h:231
spline::bezier_curve::compute_primitive
bezier_curve_t compute_primitive(const std::size_t order) const
Computes the primitive of the curve at order N.
Definition: bezier_curve.h:135
spline::SplineOptimizer::time_t
Time time_t
Definition: OptimizeSpline.h:31
spline::helpers::t_spline_t
spline_deriv_constraint_t::t_spline_t t_spline_t
Definition: effector_spline.h:35
spline::helpers::T_Point
std::vector< Point, Eigen::aligned_allocator< Point > > T_Point
Definition: effector_spline.h:29
spline::helpers::Time
double Time
Definition: effector_spline.h:27
spline::SplineOptimizer::~SplineOptimizer
~SplineOptimizer()
Destructor.
Definition: OptimizeSpline.h:45
spline::bezier_curve::evalBernstein
point_t evalBernstein(const Numeric u) const
Evaluates all Bernstein polynomes for a certain degree.
Definition: bezier_curve.h:165
spline::helpers::effector_spline_rotation::land_quat_
const Eigen::Quaterniond land_quat_
Definition: effector_spline_rotation.h:236
spline::helpers::rotation_spline::quat_to_
Eigen::Quaterniond quat_to_
Definition: effector_spline_rotation.h:90
spline::helpers::t_waypoint_quat_t
std::vector< waypoint_quat_t > t_waypoint_quat_t
Definition: effector_spline_rotation.h:35
spline::SplineOptimizer
Mosek connection to produce optimized splines.
Definition: OptimizeSpline.h:28
spline::bezier_curve::size_
const std::size_t size_
Definition: bezier_curve.h:229
spline::helpers::waypoint_quat_t
std::pair< Numeric, quat_t > waypoint_quat_t
Definition: effector_spline_rotation.h:34
spline::helpers::effector_spline_rotation::to_quat_
const Eigen::Quaterniond to_quat_
Definition: effector_spline_rotation.h:235
spline::helpers::point_one_dim_t
Eigen::Matrix< Numeric, 1, 1 > point_one_dim_t
Definition: effector_spline_rotation.h:36
spline::SplineOptimizer::SplineOptimizer
SplineOptimizer()
Initializes optimizer environment.
Definition: OptimizeSpline.h:39
spline::helpers::rotation_spline::computeWayPoints
spline_deriv_constraint_one_dim computeWayPoints() const
Definition: effector_spline_rotation.h:77
spline::helpers::effector_spline_rotation::spline_
const exact_cubic_t * spline_
Definition: effector_spline_rotation.h:234
spline::bin
unsigned int bin(const unsigned int n, const unsigned int k)
Computes a binomal coefficient.
Definition: bernstein.h:34
spline::helpers::effector_spline_rotation::effector_spline_rotation
effector_spline_rotation(In wayPointsBegin, In wayPointsEnd, InQuat quatWayPointsBegin, InQuat quatWayPointsEnd, const Point &lift_normal=Eigen::Vector3d::UnitZ(), const Point &land_normal=Eigen::Vector3d::UnitZ(), const Numeric lift_offset=0.02, const Numeric land_offset=0.02, const Time lift_offset_duration=0.02, const Time land_offset_duration=0.02)
Constructor.
Definition: effector_spline_rotation.h:162
spline::bezier_curve::evalHorner
point_t evalHorner(const Numeric t) const
Evaluates all Bernstein polynomes for a certain degree using horner's scheme.
Definition: bezier_curve.h:177
spline::bezier_curve::operator()
virtual point_t operator()(const time_t t) const
Evaluation of the cubic spline at time t.
Definition: bezier_curve.h:94
spline::helpers::Numeric
double Numeric
Definition: effector_spline.h:26
spline::Bern
Definition: bernstein.h:40
MathDefs.h
spline::Bern::m_minus_i
Numeric m_minus_i
Definition: bernstein.h:50
spline::bezier_curve::~bezier_curve
~bezier_curve()
Destructor.
Definition: bezier_curve.h:80
spline::SplineOptimizer::splineOptimizer_t
SplineOptimizer< time_t, Numeric, Dim, Safe, Point > splineOptimizer_t
Definition: OptimizeSpline.h:34
spline::SplineOptimizer::exact_cubic_t
exact_cubic< time_t, Numeric, Dim, Safe, Point > exact_cubic_t
Definition: OptimizeSpline.h:33
spline::bezier_curve::maxBound_
const time_t maxBound_
Definition: bezier_curve.h:228
spline::helpers::rotation_spline::operator=
rotation_spline & operator=(const rotation_spline &from)
Definition: effector_spline_rotation.h:55
spline::bezier_curve::waypoints
const t_point_t & waypoints() const
Definition: bezier_curve.h:193
spline::helpers::effector_spline_rotation::max
Numeric max() const
Definition: effector_spline_rotation.h:183
spline::helpers::t_waypoint_one_dim_t
std::vector< waypoint_one_dim_t > t_waypoint_one_dim_t
Definition: effector_spline_rotation.h:39
spline::helpers::spline_deriv_constraint_one_dim
spline_deriv_constraint< Numeric, Numeric, 1, false, point_one_dim_t > spline_deriv_constraint_one_dim
Definition: effector_spline_rotation.h:37
spline::helpers::rotation_spline::time_reparam_
spline_deriv_constraint_one_dim time_reparam_
Definition: effector_spline_rotation.h:93
spline::SplineOptimizer::GenerateOptimizedCurve
exact_cubic_t * GenerateOptimizedCurve(In wayPointsBegin, In wayPointsEnd) const
Starts an optimization loop to create curve.
spline::helpers::waypoint_one_dim_t
std::pair< Numeric, point_one_dim_t > waypoint_one_dim_t
Definition: effector_spline_rotation.h:38
spline::bezier_curve::compute_derivate
bezier_curve_t compute_derivate(const std::size_t order) const
Computes the derivative curve at order N.
Definition: bezier_curve.h:122
spline::helpers::rotation_spline::rotation_spline
rotation_spline(quat_ref_const_t quat_from=quat_t(0, 0, 0, 1), quat_ref_const_t quat_to=quat_t(0, 0, 0, 1), const double min=0., const double max=1.)
Definition: effector_spline_rotation.h:43
spline::helpers::exact_cubic_t
spline_deriv_constraint_t::exact_cubic_t exact_cubic_t
Definition: effector_spline.h:34
spline::helpers::effector_spline_rotation::time_lift_offset_
const double time_lift_offset_
Definition: effector_spline_rotation.h:237
spline::Bern::~Bern
~Bern()
Definition: bernstein.h:43
spline::helpers::rotation_spline
Definition: effector_spline_rotation.h:41
spline::bezier_curve::curve_constraints_t
curve_constraints< point_t > curve_constraints_t
Definition: bezier_curve.h:35
spline::helpers::Point
Eigen::Matrix< Numeric, 3, 1 > Point
Definition: effector_spline.h:28
spline::SplineOptimizer::MatrixX
Eigen::Matrix< Numeric, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Definition: OptimizeSpline.h:29
spline::bezier_curve::cit_point_t
t_point_t::const_iterator cit_point_t
Definition: bezier_curve.h:37
spline::helpers::effector_spline_rotation::time_land_offset_
const double time_land_offset_
Definition: effector_spline_rotation.h:238
spline::helpers::rotation_spline::derivate
virtual quat_t derivate(time_t, std::size_t) const
Definition: effector_spline_rotation.h:73
spline::helpers::spline_constraints_t
spline_deriv_constraint_t::spline_constraints spline_constraints_t
Definition: effector_spline.h:33
spline::bezier_curve::minBound_
const time_t minBound_
Definition: bezier_curve.h:228
spline::helpers::effector_spline_rotation::interpolate_quat
quat_t interpolate_quat(const Numeric t) const
Definition: effector_spline_rotation.h:201
spline::helpers::compute_required_offset_velocity_acceleration
spline_constraints_t compute_required_offset_velocity_acceleration(const spline_t &end_spline, const Time time_offset)
Definition: effector_spline.h:65
spline::fact
unsigned int fact(const unsigned int n)
Computes factorial of a number.
Definition: bernstein.h:24
spline::bezier_curve::bezier_curve_t
bezier_curve< Time, Numeric, Dim, Safe, Point > bezier_curve_t
Definition: bezier_curve.h:38
spline::SplineOptimizer::point_t
Point point_t
Definition: OptimizeSpline.h:30
spline::helpers::exact_cubic_quat_t
exact_cubic< Time, Numeric, 4, false, quat_t, std::vector< quat_t, Eigen::aligned_allocator< quat_t > >, rotation_spline > exact_cubic_quat_t
Definition: effector_spline_rotation.h:98
spline::helpers::quat_ref_const_t
const typedef Eigen::Ref< const quat_t > quat_ref_const_t
Definition: effector_spline_rotation.h:31
spline::bezier_curve
Definition: bezier_curve.h:31
spline::helpers::spline_deriv_constraint_t
spline_deriv_constraint< Time, Numeric, 3, true, Point, T_Point > spline_deriv_constraint_t
Definition: effector_spline.h:32
spline::bezier_curve::min
virtual time_t min() const
Definition: bezier_curve.h:223
spline::bezier_curve::derivate
virtual point_t derivate(const time_t t, const std::size_t order) const
Evaluates the derivative at order N of the curve.
Definition: bezier_curve.h:157
spline::helpers::rotation_spline::min
virtual time_t min() const
Definition: effector_spline_rotation.h:85
spline::bezier_curve::point_t
Point point_t
Definition: bezier_curve.h:32
parametriccurves
Definition: MathDefs.h:24
spline::Bern::bin_m_i_
Numeric bin_m_i_
Definition: bernstein.h:52
spline::bezier_curve::degree_
const std::size_t degree_
Definition: bezier_curve.h:230
spline::helpers::rotation_spline::min_
double min_
Definition: effector_spline_rotation.h:91
spline
Definition: bernstein.h:20
spline::helpers::effector_spline
exact_cubic_t * effector_spline(In wayPointsBegin, In wayPointsEnd, const Point &lift_normal=Eigen::Vector3d::UnitZ(), const Point &land_normal=Eigen::Vector3d::UnitZ(), const Numeric lift_offset=0.02, const Numeric land_offset=0.02, const Time lift_offset_duration=0.02, const Time land_offset_duration=0.02)
Helper method to create a spline typically used to guide the 3d trajectory of a robot end effector.
Definition: effector_spline.h:90
spline::helpers::T_Waypoint
std::vector< Waypoint > T_Waypoint
Definition: effector_spline.h:31
spline::helpers::curve_abc_quat_t
curve_abc< Time, Numeric, 4, false, quat_t > curve_abc_quat_t
Definition: effector_spline_rotation.h:33
spline::helpers::rotation_spline::max_
double max_
Definition: effector_spline_rotation.h:92
spline::helpers::quat_t
Eigen::Matrix< Numeric, 4, 1 > quat_t
Definition: effector_spline_rotation.h:29
spline::helpers::make_end_spline
spline_t make_end_spline(const Point &normal, const Point &from, const Numeric offset, const Time init_time, const Time time_offset)
Definition: effector_spline.h:45
spline::helpers::effector_spline_rotation
Represents a trajectory for and end effector uses the method effector_spline to create a spline traje...
Definition: effector_spline_rotation.h:107
parametriccurves::PseudoInverse
void PseudoInverse(_Matrix_Type_ &pinvmat)
Definition: MathDefs.h:28