hpp-manipulation 6.0.0
Classes for manipulation planning.
Loading...
Searching...
No Matches
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
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9// 1. Redistributions of source code must retain the above copyright
10// notice, this list of conditions and the following disclaimer.
11//
12// 2. Redistributions in binary form must reproduce the above copyright
13// notice, this list of conditions and the following disclaimer in the
14// documentation and/or other materials provided with the distribution.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
27// DAMAGE.
28
29#ifndef HPP_MANIPULATION_PATH_OPTIMIZATION_SPLINE_GRADIENT_BASED_HH
30#define HPP_MANIPULATION_PATH_OPTIMIZATION_SPLINE_GRADIENT_BASED_HH
31
32#include <hpp/core/path-optimization/spline-gradient-based.hh>
35
36namespace hpp {
37namespace manipulation {
40namespace pathOptimization {
41template <int _PolynomeBasis, int _SplineOrder>
43 : public core::pathOptimization::SplineGradientBased<_PolynomeBasis,
44 _SplineOrder> {
45 public:
46 enum { PolynomeBasis = _PolynomeBasis, SplineOrder = _SplineOrder };
47 typedef core::pathOptimization::SplineGradientBased<PolynomeBasis,
48 SplineOrder>
50 typedef shared_ptr<SplineGradientBased> Ptr_t;
51
52 using typename Parent_t::Spline;
53 using typename Parent_t::SplinePtr_t;
54 using typename Parent_t::Splines_t;
55
57 static Ptr_t create(const ProblemConstPtr_t& problem);
58
63 static Ptr_t createFromCore(const core::ProblemConstPtr_t& problem);
64
65 protected:
66 typedef
67 typename hpp::core::pathOptimization::LinearConstraint LinearConstraint;
68 using typename Parent_t::SplineOptimizationDatas_t;
69
71
82 virtual void initializePathValidation(const Splines_t& splines);
83
84 virtual void addProblemConstraints(const core::PathVectorPtr_t& init,
85 const Splines_t& splines,
87 SplineOptimizationDatas_t& sods) const;
88
89 virtual void constrainEndIntoState(const core::PathPtr_t& path,
90 const size_type& idxSpline,
91 const SplinePtr_t& spline,
92 const graph::StatePtr_t state,
93 LinearConstraint& lc) const;
94
95 virtual void constraintDerivativesAtEndOfSpline(const size_type& idxSpline,
96 const SplinePtr_t& spline,
97 LinearConstraint& lc) const;
98}; // SplineGradientBased
99} // namespace pathOptimization
101} // namespace manipulation
102} // namespace hpp
103
104#endif // HPP_MANIPULATION_PATH_OPTIMIZATION_GRADIENT_BASED_HH
Definition spline-gradient-based.hh:44
static Ptr_t create(const ProblemConstPtr_t &problem)
Return shared pointer to new object.
SplineGradientBased(const ProblemConstPtr_t &problem)
core::pathOptimization::SplineGradientBased< PolynomeBasis, SplineOrder > Parent_t
Definition spline-gradient-based.hh:49
shared_ptr< SplineGradientBased > Ptr_t
Definition spline-gradient-based.hh:50
virtual void initializePathValidation(const Splines_t &splines)
virtual void constraintDerivativesAtEndOfSpline(const size_type &idxSpline, const SplinePtr_t &spline, LinearConstraint &lc) const
virtual void constrainEndIntoState(const core::PathPtr_t &path, const size_type &idxSpline, const SplinePtr_t &spline, const graph::StatePtr_t state, LinearConstraint &lc) const
static Ptr_t createFromCore(const core::ProblemConstPtr_t &problem)
virtual void addProblemConstraints(const core::PathVectorPtr_t &init, const Splines_t &splines, LinearConstraint &lc, SplineOptimizationDatas_t &sods) const
hpp::core::pathOptimization::LinearConstraint LinearConstraint
Definition spline-gradient-based.hh:67
#define HPP_MANIPULATION_DLLAPI
Definition config.hh:88
shared_ptr< State > StatePtr_t
Definition fwd.hh:48
shared_ptr< const Problem > ProblemConstPtr_t
Definition fwd.hh:66
core::size_type size_type
Definition fwd.hh:90
Definition main.hh:1