hpp-core  4.12.0
Implement basic classes for canonical path planning for kinematic chains.
dichotomy.hh
Go to the documentation of this file.
1 // Copyright (c) 2014, LAAS-CNRS
2 // Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
3 //
4 // This file is part of hpp-core.
5 // hpp-core 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-core 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-core. If not, see <http://www.gnu.org/licenses/>.
16 
17 #ifndef HPP_CORE_PATHPROJECTOR_DICHOTOMY_HH
18 # define HPP_CORE_PATHPROJECTOR_DICHOTOMY_HH
19 
21 
22 # include "hpp/core/problem.hh"
23 
24 namespace hpp {
25  namespace core {
26  namespace pathProjector {
28  {
29  public:
32  static DichotomyPtr_t create
33  (const DistancePtr_t& distance,
34  const SteeringMethodPtr_t& steeringMethod,
35  value_type maxPathLength)
36  {
37  return DichotomyPtr_t (new Dichotomy (distance, steeringMethod,
38  maxPathLength));
39  }
40 
41  static DichotomyPtr_t create
42  (const ProblemConstPtr_t& problem,
43  value_type maxPathLength)
44  {
45  return create (problem->distance(), problem->steeringMethod(),
46  maxPathLength);
47  }
48 
49  protected:
50  bool impl_apply (const PathPtr_t& path,
51  PathPtr_t& projection) const;
52 
53  Dichotomy (const DistancePtr_t& distance,
54  const SteeringMethodPtr_t& steeringMethod,
55  value_type maxPathLength);
56 
57  bool applyToStraightPath (const StraightPathPtr_t& path,
58  PathPtr_t& projection) const;
59 
60  private:
61  value_type maxPathLength_;
62  };
63  } // namespace pathProjector
64  } // namespace core
65 } // namespace hpp
66 #endif // HPP_CORE_PATHPROJECTOR_DICHOTOMY_HH
hpp::core::PathPtr_t PathPtr_t
Definition: path-projector.hh:30
Definition: dichotomy.hh:27
Definition: bi-rrt-planner.hh:24
shared_ptr< const Problem > ProblemConstPtr_t
Definition: fwd.hh:180
shared_ptr< StraightPath > StraightPathPtr_t
Definition: fwd.hh:183
This class projects a path using constraints.
Definition: path-projector.hh:26
shared_ptr< Dichotomy > DichotomyPtr_t
Definition: fwd.hh:312
shared_ptr< Distance > DistancePtr_t
Definition: fwd.hh:122
pinocchio::value_type value_type
Definition: fwd.hh:157
Definition: straight-path.hh:42
hpp::core::StraightPathPtr_t StraightPathPtr_t
Definition: dichotomy.hh:31
hpp::core::StraightPath StraightPath
Definition: dichotomy.hh:30
shared_ptr< SteeringMethod > SteeringMethodPtr_t
Definition: fwd.hh:195
#define HPP_CORE_DLLAPI
Definition: config.hh:64