hpp-manipulation  4.12.0
Classes for manipulation planning.
enforce-transition-semantic.hh
Go to the documentation of this file.
1 // Copyright (c) 2018, 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_PATHOPTIMIZATION_ENFORCE_TRANSITION_SEMANTIC_HH
18 #define HPP_MANIPULATION_PATHOPTIMIZATION_ENFORCE_TRANSITION_SEMANTIC_HH
19 
20 # include <hpp/core/path-optimizer.hh>
21 
23 
24 namespace hpp {
25  namespace manipulation {
26  namespace pathOptimization {
27  using hpp::core::Path;
28  using hpp::core::PathPtr_t;
29  using hpp::core::PathVector;
32 
34  {
35  public:
36  typedef hpp::core::PathVectorPtr_t PathVectorPtr_t;
37  typedef shared_ptr<EnforceTransitionSemantic> Ptr_t;
38 
39  static Ptr_t create (const core::ProblemConstPtr_t& problem) {
40  ProblemConstPtr_t p (HPP_DYNAMIC_PTR_CAST(const Problem, problem));
41  if (!p) throw std::invalid_argument("This is not a manipulation problem.");
42  return Ptr_t (new EnforceTransitionSemantic (p));
43  }
44 
45  virtual PathVectorPtr_t optimize (const PathVectorPtr_t& path);
46 
47  protected:
50  PathOptimizer (problem), problem_ (problem) {}
51 
52  private:
53  ProblemConstPtr_t problem_;
54  };
55 
57  } // namespace pathOptimization
58  } // namespace manipulation
59 } // namespace hpp
60 
61 #endif // HPP_MANIPULATION_PATHOPTIMIZATION_ENFORCE_TRANSITION_SEMANTIC_HH
shared_ptr< EnforceTransitionSemantic > Ptr_t
Definition: enforce-transition-semantic.hh:37
Definition: main.hh:1
Definition: enforce-transition-semantic.hh:33
shared_ptr< const Problem > ProblemConstPtr_t
Definition: fwd.hh:56
Definition: problem.hh:32
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:64
static Ptr_t create(const core::ProblemConstPtr_t &problem)
Definition: enforce-transition-semantic.hh:39
hpp::core::PathVectorPtr_t PathVectorPtr_t
Definition: enforce-transition-semantic.hh:36
EnforceTransitionSemantic(const ProblemConstPtr_t &problem)
Constructor.
Definition: enforce-transition-semantic.hh:49
core::PathOptimizer PathOptimizer
Definition: fwd.hh:94