hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
path-optimizer.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Florent Lamiraux
4 //
5 // This file is part of hpp-core
6 // hpp-core is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-core is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_CORE_PATH_OPTIMIZER_HH
20 # define HPP_CORE_PATH_OPTIMIZER_HH
21 
22 # include <hpp/core/config.hh>
23 # include <hpp/core/fwd.hh>
24 
25 namespace hpp {
26  namespace core {
29 
32  class HPP_CORE_DLLAPI PathOptimizer
33  {
34  public:
35  virtual ~PathOptimizer () {};
36 
38  const Problem& problem () const
39  {
40  return problem_;
41  }
43  virtual PathVectorPtr_t optimize (const PathVectorPtr_t& path) = 0;
45  void interrupt () { interrupt_ = true; }
46 
47  protected:
51  bool interrupt_;
52 
53  PathOptimizer (const Problem& problem) :
54  interrupt_ (false), problem_ (problem)
55  {}
56 
57  PathPtr_t steer (ConfigurationIn_t q1, ConfigurationIn_t q2) const;
58 
59  private:
60  const Problem& problem_;
61  }; // class PathOptimizer;
63  } // namespace core
64 } // namespace hpp
65 #endif // HPP_CORE_PATH_OPTIMIZER_HH
boost::shared_ptr< Path > PathPtr_t
Definition: fwd.hh:170
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:97
Definition: problem.hh:48
bool interrupt_
Definition: path-optimizer.hh:51
virtual ~PathOptimizer()
Definition: path-optimizer.hh:35
void interrupt()
Interrupt path optimization.
Definition: path-optimizer.hh:45
PathOptimizer(const Problem &problem)
Definition: path-optimizer.hh:53
Definition: path-optimizer.hh:32
const Problem & problem() const
Get problem.
Definition: path-optimizer.hh:38
boost::shared_ptr< PathVector > PathVectorPtr_t
Definition: fwd.hh:176