ABITstar.cpp
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2020, University of Oxford
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of the University of Toronto nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Authors: Marlin Strub */
36 
37 #include "ompl/geometric/planners/informedtrees/ABITstar.h"
38 
39 namespace ompl
40 {
41  namespace geometric
42  {
43  ABITstar::ABITstar(const ompl::base::SpaceInformationPtr &si, const std::string &name /*= "ABITstar"*/)
44  : ompl::geometric::BITstar(si, name)
45  {
46  // Enable cascading rewirings.
48 
49  // Set the default initial inflation factor to very high.
50  setInitialInflationFactor(1000000.0);
51 
52  // Set the default inflation factor parameter to something reasonable.
54 
55  // Set the default truncation factor parameter to something reasonable.
57 
58  // Declare the planner parameters.
59  Planner::declareParam<double>("initial_inflation_factor", this, &ABITstar::setInitialInflationFactor,
60  &ABITstar::getInitialInflationFactor, "1.0:0.01:1000000.0");
61  Planner::declareParam<double>("inflation_scaling_parameter", this, &ABITstar::setInflationScalingParameter,
62  &ABITstar::getInflationScalingParameter, "1.0:0.01:1000000.0");
63  Planner::declareParam<double>("truncation_scaling_parameter", this, &ABITstar::setTruncationScalingParameter,
64  &ABITstar::getTruncationScalingParameter, "1.0:0.01:1000000.0");
65  }
66 
67  void ABITstar::setInitialInflationFactor(double factor)
68  {
70  }
71 
72  void ABITstar::setInflationScalingParameter(double factor)
73  {
75  }
76 
77  void ABITstar::setTruncationScalingParameter(double factor)
78  {
80  }
81 
83  {
85  }
86 
88  {
90  }
91 
93  {
95  }
96 
98  {
100  }
101 
103  {
105  }
106 
107  } // namespace geometric
108 
109 } // namespace ompl
A shared pointer wrapper for ompl::base::SpaceInformation.
double getInitialInflationFactor() const
Get the inflation factor for the initial search.
Definition: ABITstar.cpp:146
double getCurrentTruncationFactor() const
Get the truncation factor for the current search.
Definition: ABITstar.cpp:166
void setInflationScalingParameter(double parameter)
The parameter that scales the inflation factor on the second search of each RGG approximation....
Definition: BITstar.cpp:1165
double getInitialInflationFactor() const
Get the inflation factor for the initial search.
Definition: BITstar.cpp:1180
void setInitialInflationFactor(double factor)
Set the inflation factor for the initial search.
Definition: ABITstar.cpp:131
double getCurrentTruncationFactor() const
Get the truncation factor for the current search.
Definition: BITstar.cpp:1200
void enableCascadingRewirings(bool enable)
Set whether cascading of rewirings is enabled.
void setInflationScalingParameter(double parameter)
Set the parameter for the inflation factor update policy.
Definition: ABITstar.cpp:136
double getInflationScalingParameter() const
Get the inflation scaling parameter.
Definition: ABITstar.cpp:151
void setTruncationScalingParameter(double parameter)
Sets the parameter that scales the truncation factor for the searches of each RGG approximation....
Definition: BITstar.cpp:1170
double getCurrentInflationFactor() const
Get the inflation factor for the current search.
Definition: BITstar.cpp:1195
void setTruncationScalingParameter(double parameter)
Set the parameter for the truncation factor update policy.
Definition: ABITstar.cpp:141
double getInflationScalingParameter() const
Get the inflation scaling parameter.
Definition: BITstar.cpp:1185
double getTruncationScalingParameter() const
Get the truncation factor parameter.
Definition: BITstar.cpp:1190
double getTruncationScalingParameter() const
Get the truncation scaling parameter.
Definition: ABITstar.cpp:156
double getCurrentInflationFactor() const
Get the inflation factor for the current search.
Definition: ABITstar.cpp:161
Main namespace. Contains everything in this library.
Definition: AppBase.h:21
void setInitialInflationFactor(double factor)
Set the inflation for the initial search of RGG approximation. See ABIT*'s class description for more...
Definition: BITstar.cpp:1159