vector_t basisFunctions(value_type t, size_type order) const ROBOPTIM_TRAJECTORY_DEPRECATED
Compute the basis functions for a given instant t.
Definition: cubic-b-spline.cc:270
roboptim::visualization::matplotlib::Command Command
Definition: b-spline-matplotlib.hh:38
value_type t0() const
Const getter to t0.
Definition: polynomial.hxx:323
virtual jacobian_t variationConfigWrtParam(value_type t) const
Definition: b-spline.hxx:554
bool isValidTime(value_type t) const
Definition: trajectory.hxx:156
virtual std::ostream & print(std::ostream &) const
Definition: trajectory.hxx:200
virtual std::ostream & print(std::ostream &o) const
Display the function on the specified output stream.
Definition: cubic-b-spline.cc:543
void operator()(const frozenArguments_t fa)
Apply modification.
Definition: freeze.hxx:39
Polynomial< N > operator*(typename Polynomial< N >::value_type lambda, const Polynomial< N > &poly)
Definition: polynomial.hxx:295
value_type singularPointAtRank(size_type rank) const
Get singular point at given rank.
Definition: vector-interpolation.hxx:190
~FrontalSpeed()
Definition: frontal-speed.cc:33
virtual void normalizeAngles(size_type index)
Normalize angles in parameters array.
Definition: trajectory.hxx:165
Command plot_speeds(const T &traj, typename T::value_type step=.01)
Definition: speed.hh:48
void translateInPlace(value_type t1)
Translate the polynomial (in place) from (t-t₀) to (t-t₁).
Definition: polynomial.hxx:234
Monomial< N > monomial_t
Definition: b-spline.hh:52
static vector_t defaultAlpha()
Definition: anthropomorphic-cost-function.hh:49
parent_t::interval_t interval_t
Definition: b-spline.hh:49
matrix_t constraints_
Matrix storing constraints.
Definition: constrained-b-spline.hh:110
Definition: limit-omega.hh:33
Monomial< 3 > Monomial3
Monomial3.
Definition: polynomial-3.hh:39
ComputeIntegral(const T &traj, Function::const_vector_ref alpha, const double &alpha3, double &res)
Definition: anthropomorphic-cost-function.hxx:66
Definition: anthropomorphic-cost-function.hxx:64
DerivableFunction parent_t
Parent type.
Definition: trajectory-sum-cost.hh:58
Trajectory cost function defined by state evaluation at parameter.
Definition: fwd.hh:33
Command plot_limitSpeed(const Trajectory< dorder > &trajectory, boost::optional< double > vMax=boost::optional< double >(), typename Trajectory< dorder >::value_type step=.01)
Plot a speed limit constraint.
Definition: visualization/limit-speed.hh:79
size_type getNumberControlPoints() const
Get the number of control points of the spline.
Definition: b-spline.hh:156
static log4cxx::LoggerPtr logger
Pointer to B-spline logger (see log4cxx documentation).
Definition: b-spline.hh:261
SplineLength(const CubicBSpline &spline, const size_type nDiscretizationPoints=100, boost::optional< interval_t > interval=boost::none)
Construct the function from a Spline and a definition interval.
Definition: spline-length.cc:71
virtual ~StateFunction()
Definition: state-function.hxx:57
parent_t::discreteInterval_t discreteInterval_t
Import discrete interval type.
Definition: trajectory-sum-cost.hh:67
T trajectory_t
Trajectory type.
Definition: trajectory-sum-cost.hh:60
roots_t realRoots(value_type epsilon=1e-6) const
Return the real roots of the polynomial.
Definition: polynomial.hxx:359
Polynomial< N-K > derivative() const
Compute the derivative polynomial of a given order.
Definition: polynomial.hxx:242
size_type order() const
Definition: stable-point-state-function.hxx:55
virtual ~BSpline()
Virtual destructor.
Definition: b-spline.hh:118
Polynomial< 3 > Polynomial3
Polynomial of degree at most 3.
Definition: polynomial-3.hh:33
void impl_gradient(gradient_ref, const_argument_ref, size_type) const
Definition: stable-point-state-function.hxx:82
static value_type defaultKsi2()
Definition: anthropomorphic-cost-function.hh:64
parent_t::gradient_t gradient_t
Import gradient type.
Definition: trajectory-sum-cost.hh:65
#define ROBOPTIM_TRAJECTORY_DEPRECATED
Definition: deprecated.hh:42
ROBOPTIM_IMPLEMENT_CLONE(VectorInterpolation)
void translateBasisPolynomials(double t1)
Translate the basis polynomials to a given time t1.
Definition: cubic-b-spline.cc:367
::roboptim::Polynomial< Function::traits_t > polynomialFunction_t
Polynomial function.
Definition: polynomial.hh:67
size_type singularPoints() const
Get number of singular points.
Definition: trajectory.hxx:140
void impl_gradient(gradient_ref grad, const_argument_ref p, size_type i) const
Definition: limit-speed.hxx:92
TrajectoryCost(const trajectory_t &traj, std::string name=std::string())
Concret class should call this constructor.
Definition: trajectory-cost.hxx:26
void impl_gradient(gradient_ref, const_argument_ref, size_type) const
Definition: trajectory-sum-cost.hxx:96
const vector_t & knotVector() const
Return the knot vector of the spline.
Definition: b-spline.hxx:642
virtual void setParameters(const vector_t &)
Modify spline parameters.
Definition: cubic-b-spline.cc:186
void freezeCurveEnd(P &problem, size_type offset=0) const
Add a constraint to a problem in order to freeze the B-spline at its end.
Definition: cubic-b-spline.hxx:55
virtual ~FreeTimeTrajectory()
Definition: free-time-trajectory.hxx:70
Trajectory cost function defined by sum of state evaluations at parameters.
Definition: trajectory-sum-cost.hh:54
ROBOPTIM_FUNCTION_FWD_TYPEDEFS_(Function)
LimitOmega(StableTimePoint timePoint, const T &trajectory)
Definition: limit-omega.hxx:35
const basisPolynomialsVector_t & basisPolynomials() const
Constant getter for the basis polynomials of the B-spline.
Definition: b-spline.hh:172
vector_t projector_offset_
Result of: Constraints * X = Constraint values.
Definition: constrained-b-spline.hh:122
void impl_compute(result_ref, value_type) const
Definition: b-spline.hxx:404
Freeze< P > makeFreeze(P &problem)
Definition: freeze.hh:82
FrontalSpeed()
Definition: frontal-speed.cc:28
self_t * resize(interval_t) const
Clone and resize a trajectory.
Definition: free-time-trajectory.hh:116
bool isLinear(value_type epsilon=Function::epsilon()) const
Return whether the polynomial is linear.
Definition: polynomial.hxx:521
ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS_(Trajectory< T::derivabilityOrder >)
Parent type and imports.
std::pair< value_type, value_type > max_t
Type of a maximum query: (t_max, P(t_max))
Definition: polynomial.hh:61
const vector_t & parameters() const
Definition: trajectory.hxx:49
interval_t timeRange_
Definition: trajectory/trajectory.hh:273
virtual std::ostream & print(std::ostream &o) const
Display the function on the specified output stream.
Definition: free-time-trajectory.hxx:294
void computeBasisPolynomials()
Compute the basis polynomials.
Definition: b-spline.hxx:376
max_t max(const interval_t &interval, bool acceptConstant=true) const
Compute the maximum of the polynomial on an interval.
Definition: polynomial.hxx:476
void impl_derivative(derivative_ref g, value_type x, size_type order) const
Definition: b-spline.hxx:506
Abstract trajectory.
Definition: fwd.hh:30
values_t critPoints(const interval_t &interval) const
Compute the critical values of the polynomial on an interval.
Definition: polynomial.hxx:408
virtual Trajectory< N > * resize(interval_t timeRange) const
Clone and resize a trajectory.
Definition: constrained-b-spline.hxx:175
virtual ~SplineLength()
Definition: spline-length.cc:80
void impl_compute(result_ref, double) const
Definition: cubic-b-spline.cc:193
virtual ~TrajectorySumCost()
Definition: trajectory-sum-cost.hxx:48
Decorate a trajectory to make time scalable.
Definition: free-time-trajectory.hh:39
static int order()
Return the order of such a polynomial.
Definition: polynomial.hh:237
virtual vector_t derivAfterSingularPoint(size_type rank, size_type order) const
Get right limit value of derivative at given singular point.
Definition: cubic-b-spline.cc:537
virtual vector_t derivBeforeSingularPoint(size_type rank, size_type order) const =0
Get left limit value of derivative at given singular point.
Function::value_type value_type
Definition: stable-time-point.hh:34
void computeBasisPolynomials()
Compute the basis polynomials for the cubic B-spline.
Definition: cubic-b-spline.cc:127
virtual jacobian_t variationConfigWrtParam(double t) const =0
Get the variation of a configuration with respect to parameter vector.
void freezeCurveStart(P &problem, size_type offset=0) const
Add a constraint to a problem in order to freeze the B-spline at its start.
Definition: cubic-b-spline.hxx:29
virtual void setParameters(const vector_t &)
Set parameters.
Definition: trajectory.hxx:57
BSpline< N > derivative() const
Compute the derivative of the B-spline for a given order.
Definition: b-spline.hxx:121
Polynomial< N > parent_t
Definition: polynomial.hh:318
value_type operator[](int i) const
Get the i-th polynomial coefficient.
Definition: polynomial.hxx:351
StablePointStateFunction(const trajectory_t &gamma, boost::shared_ptr< DerivableFunction > cost, const StableTimePoint tpt, size_type order=1)
Constructor.
Definition: stable-point-state-function.hxx:31
value_type operator()(value_type t) const
Evaluate the polynomial with Horner's method.
Definition: polynomial.hxx:309
virtual jacobian_t variationDerivWrtParam(double t, size_type order) const =0
Get the variation of a derivative with respect to parameter vector.
polynomialFunction_t asFunction() const
Get the equivalent Polynomial function.
Definition: polynomial.hxx:544
VectorInterpolation(const_vector_ref x, size_type outputSize, value_type dt)
Vector interpolation constructor.
Definition: vector-interpolation.hxx:29
void operator()(const typename T::value_type) const
Definition: trajectory/visualization/trajectory.hh:65
void operator()(const double &t)
Definition: anthropomorphic-cost-function.hxx:76
virtual value_type singularPointAtRank(size_type rank) const
Get singular point at given rank.
Definition: b-spline.hxx:607
#define ROBOPTIM_IMPLEMENT_CLONE(C)
Definition: trajectory/trajectory.hh:29
value_type getTime(Function::interval_t timeRange) const
Definition: stable-time-point.hh:47
ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS(Trajectory< 3 >)
Constrained B-spline.
Definition: constrained-b-spline.hh:37
parent_t::interval_t interval_t
Definition: constrained-b-spline.hh:43
Polynomial< N > polynomial_t
Definition: b-spline.hh:51
void impl_compute(result_ref res, const_argument_ref p) const
Definition: limit-omega.hxx:74
virtual void impl_derivative(derivative_ref g, StableTimePoint, size_type order) const =0
Polynomial()
Default constructor: return a null polynomial.
Definition: polynomial.hxx:37
virtual Trajectory< DerivabilityOrder > * clone() const =0
void toPolynomials(polynomials3vector_t &res) const
Return the polynomial expression of the cubic B-spline on each time interval.
Definition: cubic-b-spline.cc:381
Cost function from `‘An optimal control model unifying holonomic and nonholonomic walking’' Katja Mom...
Definition: anthropomorphic-cost-function.hh:37
size_type getNumberControlPoints() const
Get the number of control points of the spline.
Definition: cubic-b-spline.hh:162
virtual vector_t derivBeforeSingularPoint(size_type rank, size_type order) const
Get left limit value of derivative at given singular point.
Definition: cubic-b-spline.cc:531
static const TMax tMax
Definition: stable-time-point.hh:29
T trajectory_t
Trajectory type.
Definition: stable-point-state-function.hh:65
virtual vector_t derivBeforeSingularPoint(size_type rank, size_type order) const
Get left limit value of derivative at given singular point.
Definition: free-time-trajectory.hxx:215
Eigen::Matrix< value_type, N+1, 1 > coefs_t
Fixed-size coefficient vector (N+1 if N is the polynomial degree).
Definition: polynomial.hh:55
void impl_compute(result_ref res, const_argument_ref p) const
Definition: anthropomorphic-cost-function.hxx:102
T trajectory_t
Trajectory type.
Definition: trajectory-cost.hh:45
Definition: frontal-speed.hh:28
bool isNull(value_type epsilon=Function::epsilon()) const
Return whether the polynomial is null.
Definition: polynomial.hxx:503
ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS_(Trajectory< N >)
Parent type and imports.
static const int order_
order of the polynomial.
Definition: polynomial.hh:278
@ all_zero_coefficients
Null polynomial: 0.
Definition: polynomial.hh:284
double fixTime(double t, const T &trajectory)
Definition: trajectory/trajectory.hh:45
std::vector< polynomial_t, Eigen::aligned_allocator< polynomial_t > > basisPolynomials_t
Definition: b-spline.hh:64
Polynomial< N > operator-(const Polynomial< N > &poly) const
Subtraction of polynomials.
Definition: polynomial.hxx:282
~OrthogonalSpeed()
Definition: orthogonal-speed.cc:31
Cubic B-Spline trajectory.
Definition: cubic-b-spline.hh:38
virtual jacobian_t variationConfigWrtParam(double t) const
Get the variation of a configuration with respect to parameter vector.
Definition: free-time-trajectory.hxx:107
virtual value_type singularPointAtRank(size_type rank) const
Get singular point at given rank.
Definition: free-time-trajectory.hxx:206
virtual Trajectory< N > * resize(interval_t timeRange) const
Clone and resize a trajectory.
Definition: b-spline.hxx:141
virtual ~CubicBSpline()
Definition: cubic-b-spline.cc:181
jacobian_t variationStateWrtParam(double t, size_type order) const
Get the variation of the state with respect to parameter vector.
Definition: trajectory.hxx:108
Command plot_xy(const Trajectory< N > &traj, typename Trajectory< N >::value_type step=.01)
Plot a 2D trajectory with Gnuplot.
Definition: trajectory/visualization/trajectory.hh:75
void addCoupledConstraint(value_type t_1, size_type dimension_1, value_type t_2, size_type dimension_2, size_type derivative=0, value_type factor=1.)
Create a constraint against another part of the spline.
Definition: constrained-b-spline.hxx:93
bool isConstant(value_type epsilon=Function::epsilon()) const
Return whether the polynomial is constant.
Definition: polynomial.hxx:510
virtual jacobian_t variationConfigWrtParam(double t) const
Get the variation of a configuration with respect to parameter vector.
Definition: cubic-b-spline.cc:471
Freeze(problem_t &problem)
Create the constraint from a vector of pairs.
Definition: freeze.hxx:27
double scaleTime(double t) const
Scale input time argument.
Definition: free-time-trajectory.hxx:254
void operator+=(const Polynomial< N > &poly)
Addition of polynomials.
Definition: polynomial.hxx:302
double tolerance() const
Get tolerance for inclusion of parameter in interval of definition.
Definition: trajectory.hxx:193
Definition: visualization/limit-speed.hh:51
void setParameters(const vector_t &)
Overloaded setParameters method from Trajectory<N>.
Definition: constrained-b-spline.hxx:138
virtual vector_t derivAfterSingularPoint(size_type rank, size_type order) const
Get right limit value of derivative at given singular point.
Definition: free-time-trajectory.hxx:224
CubicBSpline operator+(const CubicBSpline &s) const
Add two cubic B-splines, supposing they have the same dimensions.
Definition: cubic-b-spline.cc:430
parent_t::vector_t vector_t
Import vector type.
Definition: trajectory-sum-cost.hh:63
virtual ~TrajectoryCost()
Definition: trajectory-cost.hxx:34
virtual Trajectory< DerivabilityOrder > * resize(interval_t timeRange) const =0
Clone and resize a trajectory.
virtual vector_t state(double t, size_type order) const
Get state along trajectory.
Definition: trajectory.hxx:80
PlotTrajectory(const T &traj, std::string &str)
Definition: trajectory/visualization/trajectory.hh:60
Polynomial< N > operator+(const Polynomial< N > &poly) const
Addition of polynomials.
Definition: polynomial.hxx:275
static const size_type order_
Order of the B-Spline.
Definition: b-spline.hh:226
std::map< int, polynomial_t, std::less< int >, Eigen::aligned_allocator< std::pair< const int, polynomial_t > > > cox_map
Definition: b-spline.hh:58
Command plot_xytheta(const T &traj, typename T::value_type step=.01)
Definition: trajectory/visualization/trajectory.hh:106
size_type order() const
Definition: trajectory-sum-cost.hxx:54
BSpline(const interval_t &timeRange, size_type dimension, const vector_t ¶meters, const std::string name="B-Spline", bool clamped=false)
Instantiate a B-Spline from its definition.
Definition: b-spline.hxx:31
StableTimePoint(value_type alpha)
Definition: stable-time-point.hh:36
Definition: b-spline.hh:42
int trueOrder(value_type epsilon=Function::epsilon()) const
Return the "true" order of the polynomial.
Definition: polynomial.hxx:532
void impl_gradient(gradient_ref, const_argument_ref, size_type) const
Definition: spline-length.cc:111
static void addToProblem(const T &, Problem< F, CLIST > &, typename Function::interval_t, unsigned)
Definition: limit-speed.hxx:115
derivative_t derivative(StableTimePoint argument, size_type order=1) const
Definition: trajectory/trajectory.hh:209
parent_t::interval_t interval_t
Import interval type.
Definition: trajectory/trajectory.hh:89
Definition: trajectory/visualization/trajectory.hh:58
virtual void setParameters(const vector_t &)
Set parameters.
Definition: free-time-trajectory.hxx:232
void derivative(derivative_ref derivative, StableTimePoint argument, size_type order=1) const
Definition: trajectory/trajectory.hh:217
Monomial(value_type t0)
Constructor of a monomial: (t-t₀)
Definition: polynomial.hh:325
#define ONLY_DEBUG(x)
Definition: debug.hh:25
T trajectory_t
Trajectory type.
Definition: state-function.hh:66
void addFixedConstraint(double t, size_type dimension, value_type value, size_type derivative=0)
Creates a constraint on the basic spline.
Definition: constrained-b-spline.hxx:61
boost::shared_ptr< VectorInterpolation > trim(size_type start, size_type length) const
Instantiate a trajectory corresponding to a sub-part of this trajectory.
Definition: vector-interpolation.hxx:62
virtual vector_t derivBeforeSingularPoint(size_type rank, size_type order) const
Get left limit value of derivative at given singular point.
Definition: b-spline.hxx:614
virtual value_type singularPointAtRank(size_type rank) const
Get singular point at given rank.
Definition: cubic-b-spline.cc:525
jacobian_t variationDerivWrtParam(double t, size_type order) const
Get the variation of a derivative with respect to parameter vector.
Definition: vector-interpolation.hxx:143
P problem_t
Problem type.
Definition: freeze.hh:51
CubicBSpline(interval_t timeRange, size_type dimension, const vector_t ¶meters, const std::string name="cubic B-Spline", bool clamped=false)
Instantiate a uniform cubic B-Spline from its definition.
Definition: cubic-b-spline.cc:35
Function::interval_t unscaleInterval(const Trajectory< dorder > &traj, typename Function::value_type scale)
Definition: free-time-trajectory.hxx:39
static void addToProblem(const trajectory_t &trajectory, boost::shared_ptr< DerivableFunction > function, unsigned order, Problem< F, CLIST > &problem, typename Function::interval_t bounds, unsigned nConstraints)
Definition: state-function.hh:85
Monomial.
Definition: polynomial.hh:316
TrajectorySumCost(const trajectory_t &gamma, boost::shared_ptr< DerivableFunction > cost, const discreteStableTimePointInterval_t &interval, size_type order=1)
Constructor.
Definition: trajectory-sum-cost.hxx:31
void impl_gradient(gradient_ref, const_argument_ref, size_type) const
Definition: state-function.hxx:90
coefs_t impl_translate(value_type t1) const
Definition: polynomial.hxx:204
std::string getLimitSpeedName(const StableTimePoint &timePoint)
Definition: limit-speed.hxx:38
std::vector< frozenArgument_t > frozenArguments_t
Vector of pairs (argument index, value).
Definition: freeze.hh:57
value_type timeScale() const
Get time scale factor.
Definition: free-time-trajectory.hxx:247
virtual std::ostream & print(std::ostream &o) const
Display the function on the specified output stream.
Definition: b-spline.hxx:627
size_type numFrames() const
Definition: vector-interpolation.hxx:54
jacobian_t variationDerivWrtParam(double t, size_type order) const
Get the variation of a derivative with respect to parameter vector.
Definition: constrained-b-spline.hxx:197
Takes a vector or argument and differentiate it.
Definition: vector-interpolation.hh:43
const trajectory_t & trajectory_
Input trajectory.
Definition: trajectory-cost.hh:56
jacobian_t variationConfigWrtParam(double t) const
Get the variation of a configuration with respect to parameter vector.
Definition: vector-interpolation.hxx:136
virtual ~Freeze()
Definition: freeze.hxx:33
matrix_t projector_
Projector matrix.
Definition: constrained-b-spline.hh:119
const polynomials3vectors_t & basisPolynomials() const
Constant getter for the basis polynomials of the cubic B-spline.
Definition: cubic-b-spline.hh:150
size_type interval(value_type t) const
Definition: b-spline.hxx:421
vector_t basisFunctions(value_type t, size_type order) const ROBOPTIM_TRAJECTORY_DEPRECATED
Definition: b-spline.hxx:490
void impl_derivative(derivative_ref g, double x, size_type order) const
Definition: cubic-b-spline.cc:331
virtual ~ConstrainedBSpline()
Destructor of constrained B-spline.
Definition: constrained-b-spline.hxx:58
virtual value_type singularPointAtRank(size_type rank) const =0
Get singular point at given rank.
OrthogonalSpeed()
Definition: orthogonal-speed.cc:27
void operator()(const Function::value_type &t)
Definition: visualization/limit-speed.hh:58
void operator+=(const CubicBSpline &s)
Add a second B-spline to this B-spline.
Definition: cubic-b-spline.cc:447
virtual void normalizeAngles(size_type index)
Normalize angles in parameters array.
Definition: free-time-trajectory.hxx:302
void impl_compute(result_ref, const_argument_ref) const
Definition: stable-point-state-function.hxx:62
T fixedTimeTrajectory_t
Fixed point trajectory type.
Definition: free-time-trajectory.hh:50
vector_t parameters_
Definition: trajectory/trajectory.hh:274
@ UNINITIALIZED
Do not generate basis functions or knot vector automatically.
Definition: b-spline.hh:188
Meta-function for trajectory cost.
Definition: fwd.hh:39
virtual Trajectory< derivabilityOrder > * resize(interval_t timeRange) const
Clone and resize a trajectory.
Definition: cubic-b-spline.hh:96
void impl_compute(result_ref result, double t) const
Definition: vector-interpolation.hxx:86
size_type singularPoints_
Definition: trajectory/trajectory.hh:275
size_type order() const
Definition: state-function.hxx:63
const knots_t & knotVector() const
Return the knot vector of the spline.
Definition: cubic-b-spline.hh:169
value_type Dt() const ROBOPTIM_TRAJECTORY_DEPRECATED
Definition: b-spline.hxx:413
FreeTimeTrajectory< T > self_t
Self type.
Definition: free-time-trajectory.hh:52
LimitSpeed(StableTimePoint timePoint, const T &spline)
Definition: limit-speed.hxx:47
void impl_gradient(gradient_ref grad, const_argument_ref p, size_type i) const
Definition: anthropomorphic-cost-function.hxx:129
Polynomial< N-K > impl_derivative() const
Implementation of the compile-time derivative.
Definition: polynomial.hxx:140
void impl_compute(result_ref, StableTimePoint) const
Definition: trajectory.hxx:148
virtual std::ostream & print(std::ostream &o) const
Print the polynomial.
Definition: polynomial.hxx:87
virtual void setParameters(const vector_t &)
Modify spline parameters.
Definition: b-spline.hxx:397
size_type interval(value_type t) const
Find the index of the interval in which t is.
Definition: cubic-b-spline.cc:208
const T & trajectory() const
Definition: limit-speed.hxx:61
std::vector< value_type > knots_t
Definition: cubic-b-spline.hh:47
BOOST_STATIC_ASSERT(N >=0)
Polynomial degree >= 0.
void impl_gradient(gradient_ref grad, const_argument_ref t, size_type i) const
Definition: frontal-speed.cc:49
basisPolynomialsVector_t deriveBasisPolynomials() const
Derive basis polynomials, but express the result as polynomials of BSpline<N> instead of BSpline<N-M>...
Definition: b-spline.hxx:196
void impl_compute(result_ref res, const_argument_ref t) const
Definition: frontal-speed.cc:38
static StableTimePoint getStep(const discreteStableTimePointInterval_t &interval)
Get the upper step of a discrete interval.
Definition: trajectory-sum-cost.hh:135
void impl_compute(result_ref, const_argument_ref) const
Definition: trajectory-sum-cost.hxx:61
std::vector< value_type > values_t
Type of the critical points.
Definition: polynomial.hh:58
std::vector< Polynomial3, Eigen::aligned_allocator< Polynomial3 > > polynomials3vector_t
Definition: cubic-b-spline.hh:43
void impl_gradient(gradient_ref grad, const_argument_ref p, size_type i) const
Definition: orthogonal-speed.cc:46
std::pair< Function::size_type, Function::value_type > frozenArgument_t
Pair representing an argument index and a value.
Definition: freeze.hh:48
static discreteStableTimePointInterval_t makeDiscreteInterval(interval_t interval, StableTimePoint step)
Construct a discrete interval.
Definition: trajectory-sum-cost.hh:101
void impl_compute(result_ref, const_argument_ref) const
Definition: spline-length.cc:85
boost::shared_ptr< VectorInterpolation > vectorInterpolation(VectorInterpolation::vector_t x, VectorInterpolation::size_type outputSize, VectorInterpolation::value_type dt=1.)
Definition: vector-interpolation.hh:107
min_t min(const interval_t &interval, bool acceptConstant=true) const
Compute the minimum of the polynomial on an interval.
Definition: polynomial.hxx:448
ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS_(NTimesDerivableFunction< DerivabilityOrder >)
Parent type and imports.
static value_type defaultKsi1()
Definition: anthropomorphic-cost-function.hh:59
ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS_(BSpline< N >)
Parent type and imports.
Command plot_spline(const BSpline< N > &spline, typename BSpline< N >::value_type step)
Definition: b-spline-matplotlib.hh:41
static void addToProblem(const trajectory_t &trajectory, boost::shared_ptr< DerivableFunction > function, unsigned order, Problem< F, CLIST > &problem, typename Function::interval_t bounds, unsigned nConstraints)
Definition: stable-point-state-function.hh:83
virtual ~Trajectory()
Definition: trajectory.hxx:42
Definition: stable-time-point.hh:31
ConstrainedBSpline(interval_t timeRange, size_type dimension, const vector_t ¶meters, const std::string name="Constrained B-Spline")
see B-Spline constructors for documentation
Definition: constrained-b-spline.hxx:31
@ NORMAL
Automatically generate basis functions and knot vector.
Definition: b-spline.hh:185
Definition: anthropomorphic-cost-function.hh:30
virtual vector_t derivAfterSingularPoint(size_type rank, size_type order) const =0
Get right limit value of derivative at given singular point.
Polynomial< N > translate(value_type t1) const
Return a new polynomial translated from (t-t₀) to (t-t₁).
Definition: polynomial.hxx:228
static discreteStableTimePointInterval_t makeDiscreteInterval(StableTimePoint min, StableTimePoint max, StableTimePoint step)
Construct a discrete interval.
Definition: trajectory-sum-cost.hh:89
parent_t::value_type value_type
Definition: polynomial.hh:319
roboptim::visualization::gnuplot::Command Command
Definition: visualization/limit-speed.hh:37
cox_map cox_de_boor(size_type j, size_type n) const
Generate base polynomial set For the basic spline formula noted in the pdf from the docs section,...
Definition: b-spline.hxx:219
fixedTimeTrajectory_t * makeFixedTimeTrajectory() const
Definition: free-time-trajectory.hh:137
vector_t tunables_
Tunable parameters, i.e. the free parameters.
Definition: constrained-b-spline.hh:116
vector_t constraint_values_
Constraint values.
Definition: constrained-b-spline.hh:113
vector_t derivAfterSingularPoint(size_type rank, size_type order) const
Get right limit value of derivative at given singular point.
Definition: vector-interpolation.hxx:210
~LimitSpeed()
Definition: limit-speed.hxx:56
std::pair< value_type, value_type > min_t
Type of a minimum query: (t_min, P(t_min))
Definition: polynomial.hh:64
static StableTimePoint getUpperBound(const discreteStableTimePointInterval_t &interval)
Get the upper bound of a discrete interval.
Definition: trajectory-sum-cost.hh:125
PlotLimitSpeed(const T &trajectory, std::string &str)
Definition: visualization/limit-speed.hh:53
void impl_gradient(gradient_ref grad, const_argument_ref p, size_type i) const
Definition: limit-omega.hxx:93
value_type length() const
Definition: trajectory.hxx:72
FreeTimeTrajectory(const fixedTimeTrajectory_t &traj, value_type s)
Constructor with fixed definition interval trajectory.
Definition: free-time-trajectory.hxx:52
double unscaleTime(double t) const
Definition: free-time-trajectory.hxx:274
Function::vector_t addScaleToParameters(Function::const_vector_ref p, Function::value_type t=1.)
Definition: free-time-trajectory.hh:183
boost::tuple< StableTimePoint, StableTimePoint, StableTimePoint > discreteStableTimePointInterval_t
Types representing a discrete interval of stable time points.
Definition: trajectory-sum-cost.hh:80
const coefs_t & coefs() const
Const getter to coefs.
Definition: polynomial.hxx:337
virtual vector_t derivAfterSingularPoint(size_type rank, size_type order) const
Get right limit value of derivative at given singular point.
Definition: b-spline.hxx:621
std::ostream & operator<<(std::ostream &stream, const Polynomial< N > &p)
Print a polynomial to a given output stream.
Definition: polynomial.hxx:132
Trajectory< 3 > * resize(interval_t timeRange) const
Clone and resize a trajectory.
Definition: vector-interpolation.hxx:284
Trajectory cost function defined by state evaluation at parameter.
Definition: stable-point-state-function.hh:58
void impl_compute(result_ref, double) const
Definition: free-time-trajectory.hxx:77
void impl_compute(result_ref, const_argument_ref) const
Definition: state-function.hxx:70
virtual jacobian_t variationDerivWrtParam(value_type t, size_type order) const
Definition: b-spline.hxx:562
const fixedTimeTrajectory_t & getFixedTimeTrajectory() const
Definition: free-time-trajectory.hh:109
virtual ~StablePointStateFunction()
Definition: stable-point-state-function.hxx:49
ConstructionMode
Enum for special constructors.
Definition: b-spline.hh:182
Polynomial< N+M > operator*(const Polynomial< M > &poly) const
Multiply polynomials of different orders.
Definition: polynomial.hxx:256
void toPolynomials(basisPolynomials_t &res) const
Return the polynomial expression of the B-spline on each time interval.
Definition: b-spline.hxx:335
static StableTimePoint getLowerBound(const discreteStableTimePointInterval_t &interval)
Get the lower bound of a discrete interval.
Definition: trajectory-sum-cost.hh:115
Polynomial of degree at most N (N >= 0).
Definition: polynomial.hh:40
const value_type & getAlpha() const
Definition: stable-time-point.hh:42
Trajectory(interval_t, size_type, const vector_t &, std::string name=std::string())
Definition: trajectory.hxx:26
Function::vector_t removeScaleFromParameters(Function::const_vector_ref v)
Definition: free-time-trajectory.hh:194
void impl_derivative(derivative_ref derivative, double argument, size_type order=1) const
Definition: vector-interpolation.hxx:237
std::vector< basisPolynomials_t > basisPolynomialsVector_t
Definition: b-spline.hh:66
AnthropomorphicCostFunction(const T &trajectory, const typename boost::optional< vector_t > alpha=typename boost::optional< vector_t >(), const typename boost::optional< value_type > ksi1=typename boost::optional< value_type >(), const typename boost::optional< value_type > ksi2=typename boost::optional< value_type >())
Definition: anthropomorphic-cost-function.hxx:32
interval_t timeRange() const
Definition: trajectory.hxx:65
~LimitOmega()
Definition: limit-omega.hxx:45
Definition: stable-time-point.hh:28
void impl_compute(result_ref res, const_argument_ref p) const
Definition: limit-speed.hxx:68
cox_map::iterator cox_map_itr_t
Definition: b-spline.hh:59
~VectorInterpolation()
Definition: vector-interpolation.hxx:41
~AnthropomorphicCostFunction()
Definition: anthropomorphic-cost-function.hxx:58
special_polynomials
Enum for special polynomials.
Definition: polynomial.hh:281
vector_t derivBeforeSingularPoint(size_type rank, size_type order) const
Get left limit value of derivative at given singular point.
Definition: vector-interpolation.hxx:198
std::vector< polynomials3vector_t > polynomials3vectors_t
Definition: cubic-b-spline.hh:45
Definition: limit-speed.hh:33
virtual jacobian_t variationDerivWrtParam(double t, size_type order) const
Get the variation of a derivative with respect to parameter vector.
Definition: free-time-trajectory.hxx:129
parent_t::interval_t interval_t
Import interval type.
Definition: free-time-trajectory.hh:56
Function::interval_t interval_t
Definition: polynomial.hh:45
virtual jacobian_t variationDerivWrtParam(double t, size_type order) const
Get the variation of a derivative with respect to parameter vector.
Definition: cubic-b-spline.cc:477
void initializeKnots(bool clamped)
Initialize the knot vector.
Definition: b-spline.hxx:152
std::vector< value_type > roots_t
Type of the vector of roots.
Definition: polynomial.hh:51
static void addToProblem(const T &trajectory, Problem< F, CLIST > &problem, typename Function::interval_t vRange, unsigned nConstraints)
Definition: limit-omega.hxx:51
const vector_t & parameters() const
Overloaded parameters method from Trajectory<N>.
Definition: constrained-b-spline.hxx:132
result_t operator()(StableTimePoint argument) const
Definition: trajectory/trajectory.hh:194
void impl_compute(result_ref res, const_argument_ref p) const
Definition: orthogonal-speed.cc:35
StateFunction(const trajectory_t &gamma, boost::shared_ptr< DerivableFunction > cost, const StableTimePoint tpt, size_type order=1)
Constructor.
Definition: state-function.hxx:31
boost::shared_ptr< VectorInterpolation > VectorInterpolationShPtr_t
Definition: vector-interpolation.hh:51
Approximate the length of a Spline.
Definition: spline-length.hh:43
void setParameters(const vector_t &)
Store parameters and update coefficients.
Definition: vector-interpolation.hxx:120
Function::value_type unscaleTime(Function::value_type unscaled, Function::value_type min, Function::value_type scale)
Definition: free-time-trajectory.hxx:30
void impl_derivative(derivative_ref g, double x, size_type order) const
Definition: free-time-trajectory.hxx:85
Add constraints that freeze parameters.
Definition: freeze.hh:43
@ monomial_coefficients
Monomial polynomial: (t-t₀)
Definition: polynomial.hh:286
void updateProjector()
Update the projector matrix. Called after adding a constraint.
Definition: constrained-b-spline.hxx:148
Definition: orthogonal-speed.hh:28
value_type Dt() const ROBOPTIM_TRAJECTORY_DEPRECATED
Regular spacing between B-spline knots.
Definition: cubic-b-spline.cc:201
size_type getTimeScalingIndex() const
Definition: free-time-trajectory.hh:89
Meta-functions, functions and solvers related classes.
Definition: anthropomorphic-cost-function.hh:28