hpp-manipulation  4.9.0
Classes for manipulation planning.
roadmap.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-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_ROADMAP_HH
18 # define HPP_MANIPULATION_ROADMAP_HH
19 
20 # include <hpp/core/roadmap.hh>
21 
22 # include "hpp/manipulation/config.hh"
23 # include "hpp/manipulation/fwd.hh"
25 # include <hpp/manipulation/deprecated.hh>
27 
28 namespace hpp {
29  namespace manipulation {
32 
35  class HPP_MANIPULATION_DLLAPI Roadmap : public core::Roadmap
36  {
37  public:
39 
42 
45  void insertHistogram (const graph::HistogramPtr_t hist);
46 
48  void constraintGraph (const graph::GraphPtr_t& graph);
49 
51  void clear ();
52 
54  void push_node (const core::NodePtr_t& n);
55 
58  RoadmapNodePtr_t nearestNode (const ConfigurationPtr_t& configuration,
59  const ConnectedComponentPtr_t& connectedComponent,
60  const graph::StatePtr_t& state,
61  value_type& minDistance) const;
62 
66 
70  void connect (const LeafConnectedCompPtr_t& cc1,
71  const LeafConnectedCompPtr_t& cc2);
72 
76  void merge (const LeafConnectedCompPtr_t& cc1,
78 
80  graph::StatePtr_t getState(RoadmapNodePtr_t node);
81 
88  {
89  return leafCCs_;
90  }
91 
92  protected:
94  void statInsert (const RoadmapNodePtr_t& n);
95 
98 
100  core::NodePtr_t createNode (const ConfigurationPtr_t& config) const;
101 
102  void init (const RoadmapPtr_t& shPtr)
103  {
104  Parent::init (shPtr);
105  weak_ = shPtr;
106  }
107 
108  virtual void addEdge (const core::EdgePtr_t& edge);
109 
110  private:
114  Histograms_t histograms_;
115  graph::GraphPtr_t graph_;
116  RoadmapWkPtr_t weak_;
117  LeafConnectedComps_t leafCCs_;
118  };
120  } // namespace manipulation
121 } // namespace hpp
122 
123 #endif // HPP_MANIPULATION_ROADMAP_HH
StateHistogram NodeHistogram HPP_MANIPULATION_DEPRECATED
Definition: statistics.hh:200
Vec3f n
pinocchio::DevicePtr_t DevicePtr_t
boost::shared_ptr< ConnectedComponent > ConnectedComponentPtr_t
Definition: fwd.hh:62
void init(const RoadmapPtr_t &shPtr)
Definition: roadmap.hh:102
std::set< RawPtr_t > LeafConnectedComps_t
Definition: leaf-connected-comp.hh:38
boost::shared_ptr< State > StatePtr_t
Definition: fwd.hh:36
core::value_type value_type
Definition: fwd.hh:79
boost::shared_ptr< Histogram > HistogramPtr_t
Definition: fwd.hh:58
boost::shared_ptr< LeafConnectedComp > LeafConnectedCompPtr_t
Definition: fwd.hh:64
std::list< HistogramPtr_t > Histograms_t
Definition: fwd.hh:62
const LeafConnectedComps_t & leafConnectedComponents() const
Definition: roadmap.hh:87
boost::shared_ptr< Roadmap > RoadmapPtr_t
Definition: fwd.hh:57
void init(const ConfigurationShooterWkPtr_t &weak)
Definition: roadmap.hh:35
static GradientBasedPtr_t create(const Problem &problem)
std::set< LeafConnectedCompPtr_t > LeafConnectedComps_t
Definition: fwd.hh:67
boost::shared_ptr< Graph > GraphPtr_t
Definition: fwd.hh:35
boost::shared_ptr< Distance > DistancePtr_t
core::Roadmap Parent
Definition: roadmap.hh:38
Definition: roadmap-node.hh:32
core::ConfigurationPtr_t ConfigurationPtr_t
Definition: fwd.hh:40
FCL_REAL distance(const KDOP< N > &other, Vec3f *P=NULL, Vec3f *Q=NULL) const