hpp-core  4.9.0
Implement basic classes for canonical path planning for kinematic chains.
visibility-prm-planner.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Mylene Campana
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_VISIBILITY_PRM_PLANNER_HH
20 # define HPP_CORE_VISIBILITY_PRM_PLANNER_HH
21 
22 # include <boost/tuple/tuple.hpp>
23 # include <hpp/core/path-planner.hh>
24 
25 namespace hpp {
26  namespace core {
29 
33  class HPP_CORE_DLLAPI VisibilityPrmPlanner : public PathPlanner
34  {
35  public:
37  static VisibilityPrmPlannerPtr_t createWithRoadmap
38  (const Problem& problem, const RoadmapPtr_t& roadmap);
40  static VisibilityPrmPlannerPtr_t create (const Problem& problem);
42  virtual void oneStep ();
43  protected:
45  VisibilityPrmPlanner (const Problem& problem,
46  const RoadmapPtr_t& roadmap);
48  VisibilityPrmPlanner (const Problem& problem);
50  void init (const VisibilityPrmPlannerWkPtr_t& weak);
51  private:
52  typedef boost::tuple <NodePtr_t, ConfigurationPtr_t, PathPtr_t>
53  DelayedEdge_t;
54  typedef std::vector <DelayedEdge_t> DelayedEdges_t;
55  VisibilityPrmPlannerWkPtr_t weakPtr_;
56  DelayedEdges_t delayedEdges_;
57  std::map <NodePtr_t, bool> nodeStatus_; // true for guard node
58 
61  bool visibleFromCC (const Configuration_t q,
62  const ConnectedComponentPtr_t cc);
63 
66  void applyConstraints (
67  const Configuration_t& qFrom,
68  const Configuration_t& qTo,
69  Configuration_t& qOut);
70 
71  bool constrApply_; // True if applyConstraints has successed
72  };
74  } // namespace core
75 } // namespace hpp
76 #endif // HPP_CORE_VISIBILITY_PRM_PLANNER_HH
Definition: problem.hh:48
ObjectFactory * create(ObjectFactory *parent=NULL, const XMLElement *element=NULL)
Definition: path-planner.hh:34
boost::shared_ptr< ConnectedComponent > ConnectedComponentPtr_t
Definition: fwd.hh:107
Definition: visibility-prm-planner.hh:33
boost::shared_ptr< Roadmap > RoadmapPtr_t
Definition: fwd.hh:181
boost::shared_ptr< VisibilityPrmPlanner > VisibilityPrmPlannerPtr_t
Definition: fwd.hh:205
pinocchio::Configuration_t Configuration_t
Definition: fwd.hh:96