hpp-manipulation 9.3.0
Classes for manipulation planning.
Loading...
Searching...
No Matches
graph.hh
Go to the documentation of this file.
1// Copyright (c) 2014, LAAS-CNRS
2// Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
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_STEERING_METHOD_GRAPH_HH
30#define HPP_MANIPULATION_STEERING_METHOD_GRAPH_HH
31
33#include <hpp/manipulation/config.hh>
37
38namespace hpp {
39namespace manipulation {
42class HPP_MANIPULATION_DLLAPI SteeringMethod : public core::SteeringMethod {
43 public:
47
51
52 protected:
55
58
59 void init(SteeringMethodWkPtr_t weak) { core::SteeringMethod::init(weak); }
60
65};
66
67namespace steeringMethod {
69
70class HPP_MANIPULATION_DLLAPI Graph : public SteeringMethod {
71 typedef core::SteeringMethodBuilder_t SteeringMethodBuilder_t;
72
73 public:
76 static GraphPtr_t create(const problem);
77
78 template <typename T>
79 static GraphPtr_t problem);
80
82 static GraphPtr_t createCopy(const GraphPtr_t& other);
83
86 return createCopy(weak_.lock());
87 }
88
89 protected:
92
94 Graph(const Graph&);
95
97 ConfigurationIn_t q2) const;
98
99 void init(GraphWkPtr_t weak) {
101 weak_ = weak;
102 }
103
104 private:
106 GraphWkPtr_t weak_;
107};
108
109template <typename T>
112 gsm->innerSteeringMethod(T::create(problem));
113 return gsm;
114}
115} // namespace steeringMethod
117} // namespace manipulation
118} // namespace hpp
119
120#endif // HPP_MANIPULATION_STEERING_METHOD_GRAPH_HH
ProblemConstPtr_t problem() const
void init(SteeringMethodWkPtr_t weak)
SteeringMethod(const SteeringMethod &other)
Copy constructor.
void innerSteeringMethod(const core::SteeringMethodPtr_t &sm)
Definition graph.hh:48
core::SteeringMethodPtr_t steeringMethod_
The encapsulated steering method.
Definition graph.hh:64
ProblemConstPtr_t problem_
A pointer to the manipulation problem.
Definition graph.hh:62
SteeringMethod(const ProblemConstPtr_t &problem)
Constructor.
void init(SteeringMethodWkPtr_t weak)
Definition graph.hh:59
const core::SteeringMethodPtr_t & innerSteeringMethod() const
Definition graph.hh:44
Graph(const Graph &)
Copy constructor.
void init(GraphWkPtr_t weak)
Definition graph.hh:99
static GraphPtr_t create(const core::ProblemConstPtr_t &problem)
Graph(const ProblemConstPtr_t &problem)
Constructor.
static GraphPtr_t createCopy(const GraphPtr_t &other)
Create copy and return shared pointer.
virtual core::SteeringMethodPtr_t copy() const
Copy instance and return shared pointer.
Definition graph.hh:85
virtual PathPtr_t impl_compute(ConfigurationIn_t q1, ConfigurationIn_t q2) const
static GradientBasedPtr_t create(const ProblemConstPtr_t &problem)
static StraightPtr_t createCopy(const StraightPtr_t &other)
shared_ptr< SteeringMethod > SteeringMethodPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
std::function< SteeringMethodPtr_t(const ProblemConstPtr_t &)> SteeringMethodBuilder_t
shared_ptr< Path > PathPtr_t
shared_ptr< Graph > GraphPtr_t
Definition fwd.hh:41
Definition connected-component.hh:39
shared_ptr< const Problem > ProblemConstPtr_t
Definition fwd.hh:66
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition fwd.hh:49