hpp-manipulation
9.0.2
Classes for manipulation planning.
Toggle main menu visibility
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
32
#include <
hpp/core/problem-solver.hh
>
// SteeringMethodBuilder_t
33
#include <
hpp/core/steering-method.hh
>
34
#include <
hpp/manipulation/config.hh
>
35
#include <
hpp/manipulation/fwd.hh
>
36
#include <
hpp/manipulation/graph/fwd.hh
>
37
#include <
hpp/manipulation/steering-method/fwd.hh
>
38
39
namespace
hpp
{
40
namespace
manipulation
{
43
class
HPP_MANIPULATION_DLLAPI
SteeringMethod
:
public
core::SteeringMethod
{
44
public
:
45
const
core::SteeringMethodPtr_t
&
innerSteeringMethod
()
const
{
46
return
steeringMethod_
;
47
}
48
49
void
innerSteeringMethod
(
const
core::SteeringMethodPtr_t
& sm) {
50
steeringMethod_
= sm;
51
}
52
53
protected
:
55
SteeringMethod
(
const
ProblemConstPtr_t
&
problem
);
56
58
SteeringMethod
(
const
SteeringMethod
& other);
59
60
void
init
(SteeringMethodWkPtr_t weak) {
core::SteeringMethod::init
(weak); }
61
63
ProblemConstPtr_t
problem_
;
65
core::SteeringMethodPtr_t
steeringMethod_
;
66
};
67
68
namespace
steeringMethod
{
69
using
core::PathPtr_t
;
70
71
class
HPP_MANIPULATION_DLLAPI
Graph
:
public
SteeringMethod
{
72
typedef
core::SteeringMethodBuilder_t
SteeringMethodBuilder_t;
73
74
public
:
77
static
GraphPtr_t
create
(
const
core::ProblemConstPtr_t
&
problem
);
78
79
template
<
typename
T>
80
static
GraphPtr_t
create
(
const
core::ProblemConstPtr_t
&
problem
);
81
83
static
GraphPtr_t
createCopy
(
const
GraphPtr_t
& other);
84
86
virtual
core::SteeringMethodPtr_t
copy
()
const
{
87
return
createCopy
(weak_.lock());
88
}
89
90
protected
:
92
Graph
(
const
ProblemConstPtr_t
&
problem
);
93
95
Graph
(
const
Graph
&);
96
97
virtual
PathPtr_t
impl_compute
(
ConfigurationIn_t
q1,
98
ConfigurationIn_t
q2)
const
;
99
100
void
init
(GraphWkPtr_t weak) {
101
SteeringMethod::init
(weak);
102
weak_ = weak;
103
}
104
105
private
:
107
GraphWkPtr_t weak_;
108
};
109
110
template
<
typename
T>
111
GraphPtr_t
Graph::create
(
const
core::ProblemConstPtr_t
&
problem
) {
112
GraphPtr_t
gsm =
Graph::create
(
problem
);
113
gsm->innerSteeringMethod(T::create(
problem
));
114
return
gsm;
115
}
116
}
// namespace steeringMethod
118
}
// namespace manipulation
119
}
// namespace hpp
120
121
#endif
// HPP_MANIPULATION_STEERING_METHOD_GRAPH_HH
hpp::core::SteeringMethod
hpp::core::SteeringMethod::problem
ProblemConstPtr_t problem() const
hpp::core::SteeringMethod::init
void init(SteeringMethodWkPtr_t weak)
hpp::manipulation::SteeringMethod::SteeringMethod
SteeringMethod(const SteeringMethod &other)
Copy constructor.
hpp::manipulation::SteeringMethod::innerSteeringMethod
void innerSteeringMethod(const core::SteeringMethodPtr_t &sm)
Definition
graph.hh:49
hpp::manipulation::SteeringMethod::steeringMethod_
core::SteeringMethodPtr_t steeringMethod_
The encapsulated steering method.
Definition
graph.hh:65
hpp::manipulation::SteeringMethod::problem_
ProblemConstPtr_t problem_
A pointer to the manipulation problem.
Definition
graph.hh:63
hpp::manipulation::SteeringMethod::SteeringMethod
SteeringMethod(const ProblemConstPtr_t &problem)
Constructor.
hpp::manipulation::SteeringMethod::init
void init(SteeringMethodWkPtr_t weak)
Definition
graph.hh:60
hpp::manipulation::SteeringMethod::innerSteeringMethod
const core::SteeringMethodPtr_t & innerSteeringMethod() const
Definition
graph.hh:45
hpp::manipulation::steeringMethod::Graph::Graph
Graph(const Graph &)
Copy constructor.
hpp::manipulation::steeringMethod::Graph::init
void init(GraphWkPtr_t weak)
Definition
graph.hh:100
hpp::manipulation::steeringMethod::Graph::create
static GraphPtr_t create(const core::ProblemConstPtr_t &problem)
hpp::manipulation::steeringMethod::Graph::Graph
Graph(const ProblemConstPtr_t &problem)
Constructor.
hpp::manipulation::steeringMethod::Graph::createCopy
static GraphPtr_t createCopy(const GraphPtr_t &other)
Create copy and return shared pointer.
hpp::manipulation::steeringMethod::Graph::copy
virtual core::SteeringMethodPtr_t copy() const
Copy instance and return shared pointer.
Definition
graph.hh:86
hpp::manipulation::steeringMethod::Graph::impl_compute
virtual PathPtr_t impl_compute(ConfigurationIn_t q1, ConfigurationIn_t q2) const
config.hh
HPP_MANIPULATION_DLLAPI
#define HPP_MANIPULATION_DLLAPI
Definition
config.hh:88
fwd.hh
fwd.hh
create
static GradientBasedPtr_t create(const ProblemConstPtr_t &problem)
createCopy
static StraightPtr_t createCopy(const StraightPtr_t &other)
hpp::core::SteeringMethodPtr_t
shared_ptr< SteeringMethod > SteeringMethodPtr_t
hpp::core::ProblemConstPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
hpp::core::SteeringMethodBuilder_t
std::function< SteeringMethodPtr_t(const ProblemConstPtr_t &)> SteeringMethodBuilder_t
hpp::core::PathPtr_t
shared_ptr< Path > PathPtr_t
hpp::manipulation::steeringMethod
Definition
fwd.hh:113
hpp::manipulation::steeringMethod::GraphPtr_t
shared_ptr< Graph > GraphPtr_t
Definition
fwd.hh:41
hpp::manipulation
Definition
main.hh:2
hpp::manipulation::ProblemConstPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
Definition
fwd.hh:66
hpp::manipulation::ConfigurationIn_t
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition
fwd.hh:49
hpp
problem-solver.hh
fwd.hh
steering-method.hh
include
hpp
manipulation
steering-method
graph.hh
Generated by
1.17.0