hpp-manipulation 9.3.0
Classes for manipulation planning.
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
34
35#include "hpp/manipulation/config.hh"
40
41namespace hpp {
42namespace manipulation {
45
47class HPP_MANIPULATION_DLLAPI ManipulationPlanner
49 public:
50 typedef std::list<std::size_t> ErrorFreqs_t;
51
54 const roadmap);
55
61 virtual void oneStep();
62
70 core::PathPtr_t& validPath);
71
76
81
82 protected:
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
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;
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
ProblemConstPtr_t problem() const
virtual const RoadmapPtr_t & roadmap() const
ManipulationPlanner(const ProblemConstPtr_t &problem, const RoadmapPtr_t &roadmap)
Protected constructor.
std::list< std::size_t > ErrorFreqs_t
Definition manipulation-planner.hh:50
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.
bool extend(RoadmapNodePtr_t q_near, ConfigurationIn_t q_rand, core::PathPtr_t &validPath)
ErrorFreqs_t getEdgeStat(const graph::EdgePtr_t &edge) const
void init(const ManipulationPlannerWkPtr_t &weak)
Store weak pointer to itself.
shared_ptr< Roadmap > RoadmapPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
std::list< NodePtr_t > Nodes_t
shared_ptr< Path > PathPtr_t
shared_ptr< Edge > EdgePtr_t
Definition fwd.hh:49
Definition connected-component.hh:39
shared_ptr< ManipulationPlanner > ManipulationPlannerPtr_t
Definition fwd.hh:96
shared_ptr< Roadmap > RoadmapPtr_t
Definition fwd.hh:68
pinocchio::Configuration_t Configuration_t
Definition fwd.hh:48
shared_ptr< const Problem > ProblemConstPtr_t
Definition fwd.hh:66
std::list< std::string > StringList_t
Definition fwd.hh:158
core::value_type value_type
Definition fwd.hh:89
core::ConfigurationShooterPtr_t ConfigurationShooterPtr_t
Definition fwd.hh:141
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition fwd.hh:49
RoadmapNode * RoadmapNodePtr_t
Definition fwd.hh:70