hpp-manipulation 6.0.0
Classes for manipulation planning.
Loading...
Searching...
No Matches
weighed-distance.hh
Go to the documentation of this file.
1// Copyright (c) 2015 CNRS
2// Authors: Joseph Mirabel
3//
4
5// Redistribution and use in source and binary forms, with or without
6// modification, are permitted provided that the following conditions are
7// met:
8//
9// 1. Redistributions of source code must retain the above copyright
10// notice, this list of conditions and the following disclaimer.
11//
12// 2. Redistributions in binary form must reproduce the above copyright
13// notice, this list of conditions and the following disclaimer in the
14// documentation and/or other materials provided with the distribution.
15//
16// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
27// DAMAGE.
28
29#ifndef HPP_MANIPULATION_DISTANCE_HH
30#define HPP_MANIPULATION_DISTANCE_HH
31
32#include <hpp/core/weighed-distance.hh>
36
37namespace hpp {
38namespace manipulation {
41
43class HPP_MANIPULATION_DLLAPI WeighedDistance : public core::WeighedDistance {
44 public:
46 const graph::GraphPtr_t& graph);
47
49
50 virtual core::DistancePtr_t clone() const;
51
53 void constraintGraph(const graph::GraphPtr_t& graph) { graph_ = graph; }
54
56 graph::GraphPtr_t constraintGraph() const { return graph_; }
57
58 protected:
59 WeighedDistance(const DevicePtr_t& robot, const graph::GraphPtr_t graph);
60
62
65 ConfigurationIn_t q2) const;
66 virtual value_type impl_distance(core::NodePtr_t n1,
67 core::NodePtr_t n2) const;
68
69 void init(WeighedDistanceWkPtr_t self);
70
71 private:
72 graph::GraphPtr_t graph_;
73 WeighedDistanceWkPtr_t weak_;
74
76 HPP_SERIALIZABLE();
77}; // class Distance
79} // namespace manipulation
80} // namespace hpp
81#endif // HPP_MANIPULATION_DISTANCE_HH
Class for distance between configurations.
Definition weighed-distance.hh:43
static WeighedDistancePtr_t create(const DevicePtr_t &robot, const graph::GraphPtr_t &graph)
graph::GraphPtr_t constraintGraph() const
Get the graph of constraints.
Definition weighed-distance.hh:56
void constraintGraph(const graph::GraphPtr_t &graph)
Set the graph of constraints.
Definition weighed-distance.hh:53
WeighedDistance(const DevicePtr_t &robot, const graph::GraphPtr_t graph)
virtual core::DistancePtr_t clone() const
static WeighedDistancePtr_t createCopy(const WeighedDistancePtr_t &distance)
void init(WeighedDistanceWkPtr_t self)
virtual value_type impl_distance(core::NodePtr_t n1, core::NodePtr_t n2) const
WeighedDistance(const WeighedDistance &distance)
virtual value_type impl_distance(ConfigurationIn_t q1, ConfigurationIn_t q2) const
Derived class should implement this function.
#define HPP_MANIPULATION_DLLAPI
Definition config.hh:88
shared_ptr< Graph > GraphPtr_t
Definition fwd.hh:47
shared_ptr< WeighedDistance > WeighedDistancePtr_t
Definition fwd.hh:81
core::value_type value_type
Definition fwd.hh:89
shared_ptr< Device > DevicePtr_t
Definition fwd.hh:40
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition fwd.hh:49
Definition main.hh:1