From 76eb994d0c31b8e3843c1cff5ff97ae96658fadc Mon Sep 17 00:00:00 2001 From: matlabbe Date: Tue, 12 Jan 2016 14:06:35 -0500 Subject: [PATCH] Updated warnings for parameters that are deprecated --- src/CoreWrapper.cpp | 6 +++--- src/GuiWrapper.cpp | 2 +- src/OdometryROS.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CoreWrapper.cpp b/src/CoreWrapper.cpp index 2a333a9e..35a81b50 100644 --- a/src/CoreWrapper.cpp +++ b/src/CoreWrapper.cpp @@ -121,7 +121,7 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) : // ROS related parameters (private) pnh.param("subscribe_depth", subscribeDepth, subscribeDepth); - if(pnh.getParam("subscribe_laserScan", subscribeScan2d)) + if(pnh.getParam("subscribe_laserScan", subscribeScan2d) && subscribeScan2d) { ROS_WARN("rtabmap: \"subscribe_laserScan\" parameter is deprecated, use \"subscribe_scan\" instead. The scan topic is still subscribed."); } @@ -286,12 +286,12 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) : { if(iter->second.second.empty()) { - ROS_WARN("Rtabmap: Parameter \"%s\" doesn't exist anymore!", + ROS_ERROR("Rtabmap: Parameter \"%s\" doesn't exist anymore!", iter->first.c_str()); } else { - ROS_WARN("Rtabmap: Parameter \"%s\" doesn't exist anymore! You may look at this similar parameter: \"%s\"", + ROS_ERROR("Rtabmap: Parameter \"%s\" doesn't exist anymore! You may look at this similar parameter: \"%s\"", iter->first.c_str(), iter->second.second.c_str()); } } diff --git a/src/GuiWrapper.cpp b/src/GuiWrapper.cpp index 57b95675..d8427bf2 100644 --- a/src/GuiWrapper.cpp +++ b/src/GuiWrapper.cpp @@ -128,7 +128,7 @@ GuiWrapper::GuiWrapper(int & argc, char** argv) : pnh.param("frame_id", frameId_, frameId_); pnh.param("odom_frame_id", odomFrameId_, odomFrameId_); // set to use odom from TF pnh.param("subscribe_depth", subscribeDepth, subscribeDepth); - if(pnh.getParam("subscribe_laserScan", subscribeLaserScan2d)) + if(pnh.getParam("subscribe_laserScan", subscribeLaserScan2d) && subscribeLaserScan2d) { ROS_WARN("rtabmapviz: \"subscribe_laserScan\" parameter is deprecated, use \"subscribe_scan\" instead. The scan topic is still subscribed."); } diff --git a/src/OdometryROS.cpp b/src/OdometryROS.cpp index e762303f..67008fac 100644 --- a/src/OdometryROS.cpp +++ b/src/OdometryROS.cpp @@ -201,12 +201,12 @@ OdometryROS::OdometryROS(int argc, char * argv[], bool stereo) : { if(iter->second.second.empty()) { - ROS_WARN("Odometry: Parameter \"%s\" doesn't exist anymore!", + ROS_ERROR("Odometry: Parameter \"%s\" doesn't exist anymore!", iter->first.c_str()); } else { - ROS_WARN("Odometry: Parameter \"%s\" doesn't exist anymore! You may look at this similar parameter: \"%s\"", + ROS_ERROR("Odometry: Parameter \"%s\" doesn't exist anymore! You may look at this similar parameter: \"%s\"", iter->first.c_str(), iter->second.second.c_str()); } }