hpp-manipulation 6.0.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
32#include <hpp/core/path-planner.hh>
35
36namespace hpp {
37namespace manipulation {
38namespace pathPlanner {
39
42
68class HPP_MANIPULATION_DLLAPI TransitionPlanner : public core::PathPlanner {
69 public:
70 typedef core::PathPlannerPtr_t PathPlannerPtr_t;
71 typedef core::PathProjectorPtr_t PathProjectorPtr_t;
72 typedef core::PathPtr_t PathPtr_t;
73 typedef core::PathOptimizerPtr_t PathOptimizerPtr_t;
74 typedef core::PathVector PathVector;
75 typedef core::PathVectorPtr_t PathVectorPtr_t;
76 typedef core::Parameter Parameter;
77
80 const core::ProblemConstPtr_t& problem,
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
135 void setReedsAndSheppSteeringMethod(double turningRadius);
136
138 void pathProjector(const PathProjectorPtr_t pathProjector);
139
142
144 void addPathOptimizer(const PathOptimizerPtr_t& pathOptimizer);
145
147 void setParameter(const std::string& key, const Parameter& value);
148
149 protected:
159 TransitionPlanner(const core::ProblemConstPtr_t& problem,
160 const core::RoadmapPtr_t& roadmap);
162 void init(TransitionPlannerWkPtr_t weak);
163
164 private:
166 void checkProblemAndForwardParameters();
168 graph::EdgePtr_t getEdgeOrThrow(std::size_t id) const;
170 core::ProblemPtr_t innerProblem_;
172 PathPlannerPtr_t innerPlanner_;
174 std::vector<PathOptimizerPtr_t> pathOptimizers_;
176 core::PathOptimizerPtr_t timeParameterization_;
178 TransitionPlannerWkPtr_t weakPtr_;
179}; // class TransitionPlanner
180} // namespace pathPlanner
181} // namespace manipulation
182} // namespace hpp
183#endif // HPP_MANIPULATION_PATH_PLANNER_TRANSITION_PLANNER_HH
Definition transition-planner.hh:68
#define HPP_MANIPULATION_DLLAPI
Definition config.hh:88
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 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< 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
Definition main.hh:1