hpp-manipulation
9.0.2
Classes for manipulation planning.
Toggle main menu visibility
Loading...
Searching...
No Matches
manipulation-planner.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_MANIPULATION_PLANNER_HH
30
#define HPP_MANIPULATION_MANIPULATION_PLANNER_HH
31
32
#include <
hpp/core/path-planner.hh
>
33
#include <
hpp/statistics/success-bin.hh
>
34
35
#include "
hpp/manipulation/config.hh
"
36
#include "
hpp/manipulation/fwd.hh
"
37
#include "
hpp/manipulation/graph/fwd.hh
"
38
#include "
hpp/manipulation/graph/graph.hh
"
39
#include "
hpp/manipulation/graph/statistics.hh
"
40
41
namespace
hpp
{
42
namespace
manipulation
{
45
46
class
HPP_MANIPULATION_DLLAPI
ManipulationPlanner
47
:
public
hpp::core::PathPlanner
{
48
public
:
49
typedef
std::list<std::size_t>
ErrorFreqs_t
;
50
52
static
ManipulationPlannerPtr_t
create
(
const
core::ProblemConstPtr_t
&
problem
,
53
const
core::RoadmapPtr_t
&
roadmap
);
54
60
virtual
void
oneStep
();
61
68
bool
extend
(
RoadmapNodePtr_t
q_near,
ConfigurationIn_t
q_rand,
69
core::PathPtr_t
& validPath);
70
74
ErrorFreqs_t
getEdgeStat
(
const
graph::EdgePtr_t
& edge)
const
;
75
79
static
StringList_t
errorList
();
80
81
protected
:
83
ManipulationPlanner
(
const
ProblemConstPtr_t
&
problem
,
84
const
RoadmapPtr_t
&
roadmap
);
85
87
void
init
(
const
ManipulationPlannerWkPtr_t& weak);
88
89
private
:
92
std::size_t tryConnectToRoadmap(
const
core::Nodes_t
nodes);
95
std::size_t tryConnectNewNodes(
const
core::Nodes_t
nodes);
96
98
ConfigurationShooterPtr_t
shooter_;
100
ProblemConstPtr_t
problem_;
102
RoadmapPtr_t
roadmap_;
104
ManipulationPlannerWkPtr_t weakPtr_;
105
108
typedef
::hpp::statistics::SuccessStatistics
SuccessStatistics;
109
typedef
::hpp::statistics::SuccessBin
SuccessBin;
110
typedef
::hpp::statistics::SuccessBin::Reason
Reason;
111
SuccessStatistics& edgeStat(
const
graph::EdgePtr_t
& edge);
112
std::vector<size_type> indexPerEdgeStatistics_;
113
std::vector<SuccessStatistics> perEdgeStatistics_;
114
116
enum
TypeOfFailure {
117
PATH_PROJECTION_SHORTER = 0,
118
PATH_VALIDATION_SHORTER = 1,
119
REACHED_DESTINATION_NODE = 2,
120
FAILURE = 3,
121
PROJECTION = 4,
122
STEERING_METHOD = 5,
123
PATH_VALIDATION_ZERO = 6,
124
PATH_PROJECTION_ZERO = 7
125
};
126
static
const
std::vector<Reason> reasons_;
127
128
value_type
extendStep_;
129
130
mutable
Configuration_t
qProj_;
131
};
132
133
}
// namespace manipulation
134
}
// namespace hpp
135
136
#endif
// HPP_MANIPULATION_MANIPULATION_PLANNER_HH
hpp::core::PathPlanner
hpp::core::PathPlanner::problem
ProblemConstPtr_t problem() const
hpp::core::PathPlanner::roadmap
virtual const RoadmapPtr_t & roadmap() const
hpp::manipulation::ManipulationPlanner::ManipulationPlanner
ManipulationPlanner(const ProblemConstPtr_t &problem, const RoadmapPtr_t &roadmap)
Protected constructor.
hpp::manipulation::ManipulationPlanner::ErrorFreqs_t
std::list< std::size_t > ErrorFreqs_t
Definition
manipulation-planner.hh:49
hpp::manipulation::ManipulationPlanner::create
static ManipulationPlannerPtr_t create(const core::ProblemConstPtr_t &problem, const core::RoadmapPtr_t &roadmap)
Create an instance and return a shared pointer to the instance.
hpp::manipulation::ManipulationPlanner::extend
bool extend(RoadmapNodePtr_t q_near, ConfigurationIn_t q_rand, core::PathPtr_t &validPath)
hpp::manipulation::ManipulationPlanner::oneStep
virtual void oneStep()
hpp::manipulation::ManipulationPlanner::errorList
static StringList_t errorList()
hpp::manipulation::ManipulationPlanner::getEdgeStat
ErrorFreqs_t getEdgeStat(const graph::EdgePtr_t &edge) const
hpp::manipulation::ManipulationPlanner::init
void init(const ManipulationPlannerWkPtr_t &weak)
Store weak pointer to itself.
hpp::statistics::SuccessBin
hpp::statistics::SuccessStatistics
config.hh
HPP_MANIPULATION_DLLAPI
#define HPP_MANIPULATION_DLLAPI
Definition
config.hh:88
fwd.hh
fwd.hh
graph.hh
hpp::core::RoadmapPtr_t
shared_ptr< Roadmap > RoadmapPtr_t
hpp::core::ProblemConstPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
hpp::core::Nodes_t
std::list< NodePtr_t > Nodes_t
hpp::core::PathPtr_t
shared_ptr< Path > PathPtr_t
hpp::manipulation::graph::EdgePtr_t
shared_ptr< Edge > EdgePtr_t
Definition
fwd.hh:49
hpp::manipulation
Definition
main.hh:2
hpp::manipulation::ManipulationPlannerPtr_t
shared_ptr< ManipulationPlanner > ManipulationPlannerPtr_t
Definition
fwd.hh:96
hpp::manipulation::RoadmapPtr_t
shared_ptr< Roadmap > RoadmapPtr_t
Definition
fwd.hh:68
hpp::manipulation::Configuration_t
pinocchio::Configuration_t Configuration_t
Definition
fwd.hh:48
hpp::manipulation::ProblemConstPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
Definition
fwd.hh:66
hpp::manipulation::StringList_t
std::list< std::string > StringList_t
Definition
fwd.hh:158
hpp::manipulation::value_type
core::value_type value_type
Definition
fwd.hh:89
hpp::manipulation::ConfigurationShooterPtr_t
core::ConfigurationShooterPtr_t ConfigurationShooterPtr_t
Definition
fwd.hh:141
hpp::manipulation::ConfigurationIn_t
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition
fwd.hh:49
hpp::manipulation::RoadmapNodePtr_t
RoadmapNode * RoadmapNodePtr_t
Definition
fwd.hh:70
hpp
path-planner.hh
statistics.hh
hpp::statistics::SuccessBin::Reason
success-bin.hh
include
hpp
manipulation
manipulation-planner.hh
Generated by
1.17.0