Constrained B-spline. More...
#include <roboptim/trajectory/constrained-b-spline.hh>
  
 Public Types | |
| typedef parent_t::interval_t | interval_t | 
| Import interval type.   | |
Public Member Functions | |
| ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS_ (BSpline< N >) | |
| Parent type and imports.   | |
| ConstrainedBSpline (interval_t timeRange, size_type dimension, const vector_t ¶meters, const std::string name="Constrained B-Spline") | |
| see B-Spline constructors for documentation   | |
| ConstrainedBSpline (interval_t tr, size_type dimension, const vector_t ¶meters, const_vector_ref knots, std::string name="Constrained B-Spline") | |
| see B-Spline constructors for documentation   | |
| virtual | ~ConstrainedBSpline () | 
| Destructor of constrained B-spline.   | |
| void | addFixedConstraint (double t, size_type dimension, value_type value, size_type derivative=0) | 
| Creates a constraint on the basic spline.   | |
| 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.   | |
| const vector_t & | parameters () const | 
| Overloaded parameters method from Trajectory<N>.   | |
| void | setParameters (const_vector_ref) | 
| Overloaded setParameters method from Trajectory<N>.   | |
| virtual Trajectory< N > * | resize (interval_t timeRange) const | 
| Clone and resize a trajectory.   | |
| jacobian_t | variationDerivWrtParam (double t, size_type order) const | 
| Get the variation of a derivative with respect to parameter vector.   | |
Protected Member Functions | |
| void | updateProjector () | 
| Update the projector matrix. Called after adding a constraint.   | |
Protected Attributes | |
| matrix_t | constraints_ | 
| Matrix storing constraints.   | |
| vector_t | constraint_values_ | 
| Constraint values.   | |
| vector_t | tunables_ | 
| Tunable parameters, i.e. the free parameters.   | |
| matrix_t | projector_ | 
| Projector matrix.   | |
| vector_t | projector_offset_ | 
| Result of: Constraints * X = Constraint values.   | |
Constrained B-spline.
| N | B-spline order. | 
| typedef parent_t::interval_t roboptim::trajectory::ConstrainedBSpline< N >::interval_t | 
Import interval type.
Reimplemented from roboptim::trajectory::BSpline< N >.
| roboptim::trajectory::ConstrainedBSpline< N >::ConstrainedBSpline | ( | interval_t | timeRange, | 
| size_type | dimension, | ||
| const vector_t & | parameters, | ||
| const std::string | name = "Constrained B-Spline"  | 
        ||
| ) | 
see B-Spline constructors for documentation
| roboptim::trajectory::ConstrainedBSpline< N >::ConstrainedBSpline | ( | interval_t | tr, | 
| size_type | dimension, | ||
| const vector_t & | parameters, | ||
| const_vector_ref | knots, | ||
| std::string | name = "Constrained B-Spline"  | 
        ||
| ) | 
see B-Spline constructors for documentation
| roboptim::trajectory::ConstrainedBSpline< N >::~ConstrainedBSpline | ( | ) |  [virtual] | 
        
Destructor of constrained B-spline.
| void roboptim::trajectory::ConstrainedBSpline< N >::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.
\(\frac{\partial^d}{\partial t^d} f_{d_1}(t_1) = factor * \frac{\partial^d}{\partial t^d} f_{d_2}(t_2) \)
| t_1 | first time. | 
| dimension_1 | first dimension. | 
| t_2 | second time. | 
| dimension_2 | second dimension. | 
| derivative | derivative order ( \(d\)). | 
| factor | scalar factor. | 
References roboptim::trajectory::detail::fixTime().
| void roboptim::trajectory::ConstrainedBSpline< N >::addFixedConstraint | ( | double | t, | 
| size_type | dimension, | ||
| value_type | value, | ||
| size_type | derivative = 0  | 
        ||
| ) | 
Creates a constraint on the basic spline.
This reduces the number of parameter by one. The constraint equation is: \(value = \frac{\partial^derivative}{\partial t^derivative} f_{dimension}(t) \)
| t | time in the spline to constrain. | 
| dimension | Which dimension of the spline to constrain. | 
| value | Desired spline value at t. | 
| derivative | Which derivative of the spline to constrain. | 
References roboptim::trajectory::detail::fixTime().
| const ConstrainedBSpline< N >::vector_t & roboptim::trajectory::ConstrainedBSpline< N >::parameters | ( | ) | const | 
Overloaded parameters method from Trajectory<N>.
Returns only the tunable parameters.
Reimplemented from roboptim::trajectory::Trajectory< N >.
| Trajectory< N > * roboptim::trajectory::ConstrainedBSpline< N >::resize | ( | interval_t | timeRange | ) |  const [virtual] | 
        
Clone and resize a trajectory.
| timeRange | new time range. | 
Reimplemented from roboptim::trajectory::BSpline< N >.
References roboptim::trajectory::ConstrainedBSpline< N >::constraint_values_, roboptim::trajectory::ConstrainedBSpline< N >::constraints_, and roboptim::trajectory::ConstrainedBSpline< N >::tunables_.
| roboptim::trajectory::ConstrainedBSpline< N >::ROBOPTIM_NTIMES_DERIVABLE_FUNCTION_FWD_TYPEDEFS_ | ( | BSpline< N > | ) | 
Parent type and imports.
| void roboptim::trajectory::ConstrainedBSpline< N >::setParameters | ( | const_vector_ref | parameters_in | ) |  [virtual] | 
        
Overloaded setParameters method from Trajectory<N>.
Given the free parameters, it calculates the spline parameters.
Reimplemented from roboptim::trajectory::BSpline< N >.
| void roboptim::trajectory::ConstrainedBSpline< N >::updateProjector | ( | ) |  [protected] | 
        
Update the projector matrix. Called after adding a constraint.
| ConstrainedBSpline< N >::jacobian_t roboptim::trajectory::ConstrainedBSpline< N >::variationDerivWrtParam | ( | double | t, | 
| size_type | order | ||
| ) |  const [virtual] | 
        
Get the variation of a derivative with respect to parameter vector.
| t | value \(t\) in the definition interval. | 
| order | order \(r\) of the derivative. | 
\[ \frac{\partial}{\partial\textbf{p}} \left(\frac{d^r\Gamma_{\textbf{p}}}{dt^r}(t)\right) \]
Implements roboptim::trajectory::Trajectory< N >.
References roboptim::trajectory::Polynomial< N >::derivative().
vector_t roboptim::trajectory::ConstrainedBSpline< N >::constraint_values_ [protected] | 
        
Constraint values.
Referenced by roboptim::trajectory::ConstrainedBSpline< N >::resize().
matrix_t roboptim::trajectory::ConstrainedBSpline< N >::constraints_ [protected] | 
        
Matrix storing constraints.
One row per constraint, one column per parameter.
Referenced by roboptim::trajectory::ConstrainedBSpline< N >::resize().
matrix_t roboptim::trajectory::ConstrainedBSpline< N >::projector_ [protected] | 
        
Projector matrix.
vector_t roboptim::trajectory::ConstrainedBSpline< N >::projector_offset_ [protected] | 
        
Result of: Constraints * X = Constraint values.
vector_t roboptim::trajectory::ConstrainedBSpline< N >::tunables_ [protected] | 
        
Tunable parameters, i.e. the free parameters.
Referenced by roboptim::trajectory::ConstrainedBSpline< N >::resize().