hpp-core  4.11.0
Implement basic classes for canonical path planning for kinematic chains.
path-planner.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_PLANNER_HH
20 # define HPP_CORE_PATH_PLANNER_HH
21 
22 # include <hpp/core/fwd.hh>
23 # include <hpp/core/config.hh>
24 
25 namespace hpp {
26  namespace core {
29 
35  public:
36  virtual ~PathPlanner ();
37 
39  virtual const RoadmapPtr_t& roadmap () const;
41  ProblemConstPtr_t problem () const;
45  virtual void startSolve ();
54  virtual PathVectorPtr_t solve ();
56  virtual void tryConnectInitAndGoals ();
57 
59  virtual void oneStep () = 0;
61  virtual PathVectorPtr_t finishSolve (const PathVectorPtr_t& path);
63  void interrupt ();
65  void maxIterations (const unsigned long int& n);
67  void timeOut(const double& timeOut);
72  void stopWhenProblemIsSolved(bool enable);
73 
75  PathVectorPtr_t computePath () const;
76  protected:
80  PathPlanner (const ProblemConstPtr_t& problem);
84  PathPlanner (const ProblemConstPtr_t& problem,
85  const RoadmapPtr_t& roadmap);
87  void init (const PathPlannerWkPtr_t& weak);
88  private:
90  const ProblemConstWkPtr_t problem_;
92  const RoadmapPtr_t roadmap_;
93  bool interrupt_;
96  unsigned long int maxIterations_;
98  double timeOut_;
100  bool stopWhenProblemIsSolved_;
101 
103  PathPlannerWkPtr_t weakPtr_;
104  }; // class PathPlanner
106  } // namespace core
107 } // namespace hpp
108 #endif // HPP_CORE_PATH_PLANNER_HH
shared_ptr< PathVector > PathVectorPtr_t
Definition: fwd.hh:176
Definition: bi-rrt-planner.hh:24
Definition: path-planner.hh:34
shared_ptr< const Problem > ProblemConstPtr_t
Definition: fwd.hh:180
shared_ptr< Roadmap > RoadmapPtr_t
Definition: fwd.hh:182
#define HPP_CORE_DLLAPI
Definition: config.hh:64