diff --git a/src/CoreWrapper.cpp b/src/CoreWrapper.cpp index fa4efe9d..87c24a7b 100644 --- a/src/CoreWrapper.cpp +++ b/src/CoreWrapper.cpp @@ -55,6 +55,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #ifdef WITH_OCTOMAP_ROS #ifdef RTABMAP_OCTOMAP @@ -331,16 +332,19 @@ void CoreWrapper::onInit() Parameters::kGridFromDepth().c_str()); parameters_.insert(ParametersPair(Parameters::kGridFromDepth(), "false")); } + int regStrategy = 0; + Parameters::parse(parameters_, Parameters::kRegStrategy(), regStrategy); if(subscribeScan2d && parameters_.find(Parameters::kRGBDProximityPathMaxNeighbors()) == parameters_.end() && - (parameters_.find(Parameters::kRGBDProximityBySpace()) == parameters_.end() || - uStr2Bool(parameters_.at(Parameters::kRGBDProximityBySpace())))) + (regStrategy == Registration::kTypeIcp || regStrategy == Registration::kTypeVisIcp)) { NODELET_WARN("Setting \"%s\" parameter to 10 (default 0) as \"subscribe_scan\" is " - "true. Proximity detection by space will be also done by merging close " - "scans. To disable, set to 0. To suppress this warning, " + "true and \"%s\" uses ICP. Proximity detection by space will be also done by merging close " + "scans. To disable, set \"%s\" to 0. To suppress this warning, " "add ", Parameters::kRGBDProximityPathMaxNeighbors().c_str(), + Parameters::kRegStrategy().c_str(), + Parameters::kRGBDProximityPathMaxNeighbors().c_str(), Parameters::kRGBDProximityPathMaxNeighbors().c_str()); parameters_.insert(ParametersPair(Parameters::kRGBDProximityPathMaxNeighbors(), "10")); }