hpp-manipulation  4.12.0
Classes for manipulation planning.
weighed-distance.hh
Go to the documentation of this file.
1 // Copyright (c) 2015 CNRS
2 // Authors: Joseph Mirabel
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
16 // <http://www.gnu.org/licenses/>.
17 
18 #ifndef HPP_MANIPULATION_DISTANCE_HH
19 # define HPP_MANIPULATION_DISTANCE_HH
20 
21 # include <hpp/core/weighed-distance.hh>
22 
23 # include <hpp/manipulation/fwd.hh>
26 
27 namespace hpp {
28  namespace manipulation {
31 
33  class HPP_MANIPULATION_DLLAPI WeighedDistance : public core::WeighedDistance
34  {
35  public:
36  static WeighedDistancePtr_t create (const DevicePtr_t& robot,
37  const graph::GraphPtr_t& graph);
38 
39  static WeighedDistancePtr_t createCopy
40  (const WeighedDistancePtr_t& distance);
41 
42  virtual core::DistancePtr_t clone () const;
43 
45  void constraintGraph (const graph::GraphPtr_t& graph)
46  {
47  graph_ = graph;
48  }
49 
52  {
53  return graph_;
54  }
55 
56  protected:
57  WeighedDistance (const DevicePtr_t& robot, const graph::GraphPtr_t graph);
58 
59  WeighedDistance (const WeighedDistance& distance);
60 
62  virtual value_type impl_distance (
64  virtual value_type impl_distance (
65  core::NodePtr_t n1, core::NodePtr_t n2) const;
66 
67  void init (WeighedDistanceWkPtr_t self);
68 
69  private:
70  graph::GraphPtr_t graph_;
71  WeighedDistanceWkPtr_t weak_;
72 
73  WeighedDistance() {}
74  HPP_SERIALIZABLE();
75  }; // class Distance
77  } // namespace manipulation
78 } // namespace hpp
79 #endif // HPP_MANIPULATION_DISTANCE_HH
Definition: main.hh:1
void constraintGraph(const graph::GraphPtr_t &graph)
Set the graph of constraints.
Definition: weighed-distance.hh:45
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition: fwd.hh:38
core::value_type value_type
Definition: fwd.hh:82
#define HPP_MANIPULATION_DLLAPI
Definition: config.hh:64
Class for distance between configurations.
Definition: weighed-distance.hh:33
shared_ptr< Graph > GraphPtr_t
Definition: fwd.hh:35
shared_ptr< WeighedDistance > WeighedDistancePtr_t
Definition: fwd.hh:72
shared_ptr< Device > DevicePtr_t
Definition: fwd.hh:29
graph::GraphPtr_t constraintGraph() const
Get the graph of constraints.
Definition: weighed-distance.hh:51