hpp-manipulation 6.1.0
Classes for manipulation planning.
Loading...
Searching...
No Matches
transition-planner.hh
Go to the documentation of this file.
1// Copyright (c) 2023 CNRS
2// Authors: Florent Lamiraux
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_PATH_PLANNER_TRANSITION_PLANNER_HH
30#define HPP_MANIPULATION_PATH_PLANNER_TRANSITION_PLANNER_HH
31
35
36namespace hpp {
37namespace manipulation {
38namespace pathPlanner {
39
42
69 public:
77
81 const core::RoadmapPtr_t& roadmap);
83 PathPlannerPtr_t innerPlanner() const { return innerPlanner_; }
85 void innerPlanner(const PathPlannerPtr_t& planner) {
86 innerPlanner_ = planner;
87 }
89 core::ProblemPtr_t innerProblem() const { return innerProblem_; }
92 virtual void startSolve();
93
96 virtual void oneStep();
97
103 bool resetRoadmap);
113 bool validate, bool& success, std::string& status);
118 core::ValidationReportPtr_t& report) const;
123
129
132 void setEdge(std::size_t id);
133
136 void setEdge(const graph::EdgePtr_t& transition);
137
139 void setReedsAndSheppSteeringMethod(double turningRadius);
140
142 void pathProjector(const PathProjectorPtr_t pathProjector);
143
146
148 void addPathOptimizer(const PathOptimizerPtr_t& pathOptimizer);
149
151 void setParameter(const std::string& key, const Parameter& value);
152
153 protected:
164 const core::RoadmapPtr_t& roadmap);
166 void init(TransitionPlannerWkPtr_t weak);
167
168 private:
170 void checkProblemAndForwardParameters();
172 graph::EdgePtr_t getEdgeOrThrow(std::size_t id) const;
174 core::ProblemPtr_t innerProblem_;
176 PathPlannerPtr_t innerPlanner_;
178 std::vector<PathOptimizerPtr_t> pathOptimizers_;
180 core::PathOptimizerPtr_t timeParameterization_;
182 TransitionPlannerWkPtr_t weakPtr_;
183}; // class TransitionPlanner
184} // namespace pathPlanner
185} // namespace manipulation
186} // namespace hpp
187#endif // HPP_MANIPULATION_PATH_PLANNER_TRANSITION_PLANNER_HH
Definition transition-planner.hh:68
#define HPP_MANIPULATION_DLLAPI
Definition config.hh:88
ProblemConstPtr_t problem() const
core::PathProjectorPtr_t PathProjectorPtr_t
Definition transition-planner.hh:71
TransitionPlanner(const core::ProblemConstPtr_t &problem, const core::RoadmapPtr_t &roadmap)
void setReedsAndSheppSteeringMethod(double turningRadius)
Create a Reeds and Shepp steering method and path it to the problem.
core::PathVector PathVector
Definition transition-planner.hh:74
PathPlannerPtr_t innerPlanner() const
Get the inner planner.
Definition transition-planner.hh:83
void clearPathOptimizers()
Clear path optimizers.
core::PathPlannerPtr_t PathPlannerPtr_t
Definition transition-planner.hh:70
core::PathVectorPtr_t PathVectorPtr_t
Definition transition-planner.hh:75
void setEdge(const graph::EdgePtr_t &transition)
void init(TransitionPlannerWkPtr_t weak)
store weak pointer to itself
bool validateConfiguration(ConfigurationIn_t q, std::size_t id, core::ValidationReportPtr_t &report) const
static TransitionPlannerPtr_t createWithRoadmap(const core::ProblemConstPtr_t &problem, const core::RoadmapPtr_t &roadmap)
Create instance and return share pointer.
void addPathOptimizer(const PathOptimizerPtr_t &pathOptimizer)
Add a path optimizer.
void innerPlanner(const PathPlannerPtr_t &planner)
Set the inner planner.
Definition transition-planner.hh:85
core::ProblemPtr_t innerProblem() const
Get the inner problem.
Definition transition-planner.hh:89
core::Parameter Parameter
Definition transition-planner.hh:76
PathPtr_t directPath(ConfigurationIn_t q1, ConfigurationIn_t q2, bool validate, bool &success, std::string &status)
core::PathPtr_t PathPtr_t
Definition transition-planner.hh:72
PathVectorPtr_t planPath(const Configuration_t qInit, matrixIn_t qGoals, bool resetRoadmap)
void setParameter(const std::string &key, const Parameter &value)
Set parameter to the inner problem.
PathVectorPtr_t timeParameterization(const PathVectorPtr_t &path)
void pathProjector(const PathProjectorPtr_t pathProjector)
Set the path projector.
core::PathOptimizerPtr_t PathOptimizerPtr_t
Definition transition-planner.hh:73
PathVectorPtr_t optimizePath(const PathPtr_t &path)
shared_ptr< PathVector > PathVectorPtr_t
shared_ptr< PathOptimizer > PathOptimizerPtr_t
shared_ptr< PathPlanner > PathPlannerPtr_t
shared_ptr< PathProjector > PathProjectorPtr_t
shared_ptr< Roadmap > RoadmapPtr_t
shared_ptr< Problem > ProblemPtr_t
shared_ptr< ValidationReport > ValidationReportPtr_t
shared_ptr< const Problem > ProblemConstPtr_t
shared_ptr< Path > PathPtr_t
shared_ptr< Edge > EdgePtr_t
Definition fwd.hh:49
shared_ptr< TransitionPlanner > TransitionPlannerPtr_t
Definition fwd.hh:107
pinocchio::Configuration_t Configuration_t
Definition fwd.hh:48
core::matrixIn_t matrixIn_t
Definition fwd.hh:147
pinocchio::ConfigurationIn_t ConfigurationIn_t
Definition fwd.hh:49