hpp-manipulation
9.3.0
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
47
class
HPP_MANIPULATION_DLLAPI
ManipulationPlanner
48
:
public
hpp::core::PathPlanner
{
49
public
:
50
typedef
std::list<std::size_t>
ErrorFreqs_t
;
51
53
static
ManipulationPlannerPtr_t
create
(
const
problem
,
54
const
roadmap
);
55
61
virtual
void
oneStep
();
62
69
bool
extend
(
RoadmapNodePtr_t
q_near,
ConfigurationIn_t
q_rand,
70
core::PathPtr_t
& validPath);
71
75
ErrorFreqs_t
getEdgeStat
(
const
graph::EdgePtr_t
& edge)
const
;
76
80
static
StringList_t
errorList
();
81
82
protected
:
84
ManipulationPlanner
(
const
ProblemConstPtr_t
&
problem
,
85
const
RoadmapPtr_t
&
roadmap
);
86
88
void
init
(
const
ManipulationPlannerWkPtr_t& weak);
89
90
private
:
93
std::size_t tryConnectToRoadmap(
const
core::Nodes_t
nodes);
96
std::size_t tryConnectNewNodes(
const
core::Nodes_t
nodes);
97
99
ConfigurationShooterPtr_t
shooter_;
101
ProblemConstPtr_t
problem_;
103
RoadmapPtr_t
roadmap_;
105
ManipulationPlannerWkPtr_t weakPtr_;
106
109
typedef
::hpp::statistics::SuccessStatistics
SuccessStatistics;
110
typedef
::hpp::statistics::SuccessBin
SuccessBin;
111
typedef
::hpp::statistics::SuccessBin::Reason
Reason;
112
SuccessStatistics& edgeStat(
const
graph::EdgePtr_t
& edge);
113
std::vector<size_type> indexPerEdgeStatistics_;
114
std::vector<SuccessStatistics> perEdgeStatistics_;
115
117
enum
TypeOfFailure {
118
PATH_PROJECTION_SHORTER = 0,
119
PATH_VALIDATION_SHORTER = 1,
120
REACHED_DESTINATION_NODE = 2,
121
FAILURE = 3,
122
PROJECTION = 4,
123
STEERING_METHOD = 5,
124
PATH_VALIDATION_ZERO = 6,
125
PATH_PROJECTION_ZERO = 7
126
};
127
static
const
std::vector<Reason> reasons_;
128
129
value_type
extendStep_;
130
131
mutable
Configuration_t
qProj_;
132
};
133
134
}
// namespace manipulation
135
}
// namespace hpp
136
137
#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:50
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
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
connected-component.hh:39
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