FindSection.h
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2020,
5  * Max Planck Institute for Intelligent Systems (MPI-IS).
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of the MPI-IS nor the names
19  * of its contributors may be used to endorse or promote products
20  * derived from this software without specific prior written
21  * permission.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  *********************************************************************/
36 
37 /* Author: Andreas Orthey */
38 
39 #ifndef OMPL_MULTILEVEL_PLANNERS_BUNDLESPACE_PATH_RESTRICTION_FIND_SECTION_
40 #define OMPL_MULTILEVEL_PLANNERS_BUNDLESPACE_PATH_RESTRICTION_FIND_SECTION_
41 #include <ompl/multilevel/datastructures/BundleSpaceGraph.h>
42 #include <ompl/multilevel/datastructures/ParameterExponentialDecay.h>
43 #include <ompl/multilevel/datastructures/ParameterSmoothStep.h>
44 
45 namespace ompl
46 {
47  namespace base
48  {
50 
51  OMPL_CLASS_FORWARD(Path);
53  }
54  namespace geometric
55  {
57 
58  OMPL_CLASS_FORWARD(PathGeometric);
60  }
61  namespace multilevel
62  {
64 
65  OMPL_CLASS_FORWARD(BundleSpaceGraph);
67  OMPL_CLASS_FORWARD(PathRestriction);
69  OMPL_CLASS_FORWARD(FiberedProjection);
71  OMPL_CLASS_FORWARD(Head);
73 
75 
76  class FindSection
77  {
78  public:
79  FindSection() = delete;
80  FindSection(PathRestriction *);
81 
82  virtual ~FindSection();
83 
84  virtual bool solve(HeadPtr &head) = 0;
85 
87  bool findFeasibleStateOnFiber(const base::State *xBase, base::State *xBundle);
88 
90  bool tripleStep(HeadPtr &head, const base::State *sBundleGoal, double locationOnBasePathGoal);
91 
92  protected:
94  PathRestriction *restriction_;
95 
96  base::State *xBaseTmp_{nullptr};
97  base::State *xBundleTmp_{nullptr};
98 
99  base::State *xFiberStart_{nullptr};
100  base::State *xFiberGoal_{nullptr};
101  base::State *xFiberTmp_{nullptr};
102 
103  protected:
105  ParameterExponentialDecay neighborhoodRadiusBaseSpace_;
106 
107  double neighborhoodRadiusBaseSpaceLambda_{1.0};
108 
109  double neighborhoodRadiusBaseSpaceTarget_{0.5};
110 
113 
114  double validBundleSpaceSegmentLength_;
115 
116  double validFiberSpaceSegmentLength_;
117  };
118  }
119 }
120 
121 #endif
double validBaseSpaceSegmentLength_
Step size to check validity.
Definition: FindSection.h:146
PathRestriction * restriction_
Pointer to associated bundle space.
Definition: FindSection.h:128
bool findFeasibleStateOnFiber(const base::State *xBase, base::State *xBundle)
Sample state on fiber while keeping base state fixed.
bool tripleStep(HeadPtr &head, const base::State *sBundleGoal, double locationOnBasePathGoal)
Triple step pattern.
ParameterExponentialDecay neighborhoodRadiusBaseSpace_
Radius of restriction neighborhood.
Definition: FindSection.h:139
Main namespace. Contains everything in this library.