hpp-manipulation  4.9.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>
24 # include <hpp/manipulation/config.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 
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  }; // class Distance
74  } // namespace manipulation
75 } // namespace hpp
76 #endif // HPP_MANIPULATION_DISTANCE_HH
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:79
Class for distance between configurations.
Definition: weighed-distance.hh:33
boost::shared_ptr< Device > DevicePtr_t
Definition: fwd.hh:29
void init(const ConfigurationShooterWkPtr_t &weak)
static StraightPtr_t createCopy(const StraightPtr_t &other)
boost::shared_ptr< WeighedDistance > WeighedDistancePtr_t
Definition: fwd.hh:71
static GradientBasedPtr_t create(const Problem &problem)
graph::GraphPtr_t constraintGraph() const
Get the graph of constraints.
Definition: weighed-distance.hh:51
boost::shared_ptr< Graph > GraphPtr_t
Definition: fwd.hh:35
boost::shared_ptr< Distance > DistancePtr_t
FCL_REAL distance(const KDOP< N > &other, Vec3f *P=NULL, Vec3f *Q=NULL) const