hpp-rbprm  4.12.0
Implementation of RB-PRM planner using hpp.
oriented-path-optimizer.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2017 CNRS
3 // Authors: Pierre Fernbach
4 //
5 // This file is part of hpp-rbprm
6 // hpp-core is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-core is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_RBPRM_ORIENTED_PATH_OPTIMIZER_HH
20 #define HPP_RBPRM_ORIENTED_PATH_OPTIMIZER_HH
21 
22 #include <hpp/core/path-optimizer.hh>
25 
26 namespace hpp {
27 namespace rbprm {
30 
39 
40 // forward declaration
41 HPP_PREDEF_CLASS(OrientedPathOptimizer);
42 // Planner objects are manipulated only via shared pointers
43 typedef std::shared_ptr<OrientedPathOptimizer> OrientedPathOptimizerPtr_t;
44 
45 class OrientedPathOptimizer : public core::PathOptimizer {
46  public:
48  static OrientedPathOptimizerPtr_t create(core::ProblemConstPtr_t problem);
49 
51  virtual core::PathVectorPtr_t optimize(const core::PathVectorPtr_t& path);
52 
53  protected:
54  OrientedPathOptimizer(core::ProblemConstPtr_t problem);
55  bool checkReplaceOrientation(const size_t index, const size_t lastIndex, std::vector<bool> replaceValid,
56  std::vector<bool> orientedValid,
57  std::vector<core::KinodynamicOrientedPathPtr_t> orientedPaths,
58  std::vector<core::KinodynamicPathPtr_t> resultPaths);
59 
60  core::PathPtr_t steer(core::ConfigurationIn_t q1, core::ConfigurationIn_t q2) const;
61 
62  private:
64  const RbPrmPathValidationPtr_t rbprmPathValidation_;
65  double sizeFootX_, sizeFootY_;
66  bool rectangularContact_;
67  bool tryJump_;
68  double mu_;
69  bool orientationIgnoreZValue_;
70 
71 }; // class oriented-path-optimizer
73 } // namespace rbprm
74 } // namespace hpp
75 #endif // HPP_RBPRM_ORIENTED_PATH_OPTIMIZER_HH
bool checkReplaceOrientation(const size_t index, const size_t lastIndex, std::vector< bool > replaceValid, std::vector< bool > orientedValid, std::vector< core::KinodynamicOrientedPathPtr_t > orientedPaths, std::vector< core::KinodynamicPathPtr_t > resultPaths)
std::shared_ptr< OrientedPathOptimizer > OrientedPathOptimizerPtr_t
Definition: oriented-path-optimizer.hh:43
OrientedPathOptimizer(core::ProblemConstPtr_t problem)
Definition: algorithm.hh:27
static OrientedPathOptimizerPtr_t create(core::ProblemConstPtr_t problem)
Return shared pointer to new object.
std::shared_ptr< SteeringMethodKinodynamic > SteeringMethodKinodynamicPtr_t
Definition: rbprm-steering-kinodynamic.hh:33
core::PathPtr_t steer(core::ConfigurationIn_t q1, core::ConfigurationIn_t q2) const
virtual core::PathVectorPtr_t optimize(const core::PathVectorPtr_t &path)
Optimize path.
HPP_PREDEF_CLASS(RbPrmFullBody)
std::shared_ptr< RbPrmPathValidation > RbPrmPathValidationPtr_t
Definition: rbprm-path-validation.hh:31
Definition: oriented-path-optimizer.hh:45