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 { ABITstar(const ompl::base::SpaceInformationPtr & si,const std::string & name)43 ABITstar::ABITstar(const ompl::base::SpaceInformationPtr &si, const std::string &name /*= "ABITstar"*/) 44 : ompl::geometric::BITstar(si, name) 45 { 46 // Enable cascading rewirings. 47 enableCascadingRewirings(true); 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. 53 setInflationScalingParameter(10.0); 54 55 // Set the default truncation factor parameter to something reasonable. 56 setTruncationScalingParameter(5.0); 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 setInitialInflationFactor(double factor)67 void ABITstar::setInitialInflationFactor(double factor) 68 { 69 BITstar::setInitialInflationFactor(factor); 70 } 71 setInflationScalingParameter(double factor)72 void ABITstar::setInflationScalingParameter(double factor) 73 { 74 BITstar::setInflationScalingParameter(factor); 75 } 76 setTruncationScalingParameter(double factor)77 void ABITstar::setTruncationScalingParameter(double factor) 78 { 79 BITstar::setTruncationScalingParameter(factor); 80 } 81 getInitialInflationFactor() const82 double ABITstar::getInitialInflationFactor() const 83 { 84 return BITstar::getInitialInflationFactor(); 85 } 86 getInflationScalingParameter() const87 double ABITstar::getInflationScalingParameter() const 88 { 89 return BITstar::getInflationScalingParameter(); 90 } 91 getTruncationScalingParameter() const92 double ABITstar::getTruncationScalingParameter() const 93 { 94 return BITstar::getTruncationScalingParameter(); 95 } 96 getCurrentInflationFactor() const97 double ABITstar::getCurrentInflationFactor() const 98 { 99 return BITstar::getCurrentInflationFactor(); 100 } 101 getCurrentTruncationFactor() const102 double ABITstar::getCurrentTruncationFactor() const 103 { 104 return BITstar::getCurrentTruncationFactor(); 105 } 106 107 } // namespace geometric 108 109 } // namespace ompl 110