hpp-manipulation  4.9.0
Classes for manipulation planning.
spline-gradient-based.hh
Go to the documentation of this file.
1 // Copyright (c) 2017, Joseph Mirabel
2 // Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3 //
4 // This file is part of hpp-manipulation.
5 // hpp-manipulation is free software: you can redistribute it
6 // and/or modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation, either version
8 // 3 of the License, or (at your option) any later version.
9 //
10 // hpp-manipulation is distributed in the hope that it will be
11 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // General Lesser Public License for more details. You should have
14 // received a copy of the GNU Lesser General Public License along with
15 // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef HPP_MANIPULATION_PATH_OPTIMIZATION_SPLINE_GRADIENT_BASED_HH
18 # define HPP_MANIPULATION_PATH_OPTIMIZATION_SPLINE_GRADIENT_BASED_HH
19 
20 #include <hpp/core/path-optimization/spline-gradient-based.hh>
21 
22 #include <hpp/manipulation/config.hh>
24 
25 namespace hpp {
26  namespace manipulation {
29  namespace pathOptimization {
30  template <int _PolynomeBasis, int _SplineOrder>
31  class HPP_MANIPULATION_DLLAPI SplineGradientBased :
32  public core::pathOptimization::SplineGradientBased<_PolynomeBasis, _SplineOrder>
33  {
34  public:
35  enum {
36  PolynomeBasis = _PolynomeBasis,
37  SplineOrder = _SplineOrder
38  };
41  typedef boost::shared_ptr<SplineGradientBased> Ptr_t;
42 
43  using typename Parent_t::Spline;
44  using typename Parent_t::SplinePtr_t;
45  using typename Parent_t::Splines_t;
46 
48  static Ptr_t create (const Problem& problem);
49 
54  static Ptr_t createFromCore (const core::Problem& problem);
55 
56  protected:
59 
61 
72  virtual void initializePathValidation(const Splines_t& splines);
73 
75  const Splines_t& splines, LinearConstraint& lc, SplineOptimizationDatas_t& sods) const;
76 
77  virtual void constrainEndIntoState (const core::PathPtr_t& path,
78  const size_type& idxSpline, const SplinePtr_t& spline,
79  const graph::StatePtr_t state, LinearConstraint& lc) const;
80 
81  virtual void constraintDerivativesAtEndOfSpline (const size_type& idxSpline,
82  const SplinePtr_t& spline, LinearConstraint& lc) const;
83  }; // SplineGradientBased
84  } // namespace pathOptimization
86  } // namespace manipulation
87 } // namespace hpp
88 
89 #endif // HPP_MANIPULATION_PATH_OPTIMIZATION_GRADIENT_BASED_HH
boost::shared_ptr< Path > PathPtr_t
boost::shared_ptr< State > StatePtr_t
Definition: fwd.hh:36
std::vector< SplinePtr_t > Splines_t
virtual void initializePathValidation(const Splines_t &splines)
Definition: problem.hh:32
PolynomeBasis
hpp::core::pathOptimization::LinearConstraint LinearConstraint
Definition: spline-gradient-based.hh:57
Spline::Ptr_t SplinePtr_t
core::pathOptimization::SplineGradientBased< PolynomeBasis, SplineOrder > Parent_t
Definition: spline-gradient-based.hh:40
std::vector< SplineOptimizationData > SplineOptimizationDatas_t
virtual void addProblemConstraints(const PathVectorPtr_t &init, const Splines_t &splines, LinearConstraint &lc, SplineOptimizationDatas_t &sods) const
path::Spline< PolynomeBasis, SplineOrder > Spline
void init(const ConfigurationShooterWkPtr_t &weak)
boost::shared_ptr< SplineGradientBased > Ptr_t
Definition: spline-gradient-based.hh:41
SplineOrder
const Problem & problem() const
Definition: spline-gradient-based.hh:31
static GradientBasedPtr_t create(const Problem &problem)
core::size_type size_type
Definition: fwd.hh:80
boost::shared_ptr< PathVector > PathVectorPtr_t
std::vector< SplineOptimizationData > SplineOptimizationDatas_t
SplineGradientBased(const Problem &problem)