Updated warnings for parameters that are deprecated

This commit is contained in:
matlabbe
2016-01-12 14:06:35 -05:00
parent 8dacddb110
commit 76eb994d0c
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -121,7 +121,7 @@ CoreWrapper::CoreWrapper(bool deleteDbOnStart) :
// ROS related parameters (private) // ROS related parameters (private)
pnh.param("subscribe_depth", subscribeDepth, subscribeDepth); 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."); 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()) 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()); iter->first.c_str());
} }
else 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()); iter->first.c_str(), iter->second.second.c_str());
} }
} }
+1 -1
View File
@@ -128,7 +128,7 @@ GuiWrapper::GuiWrapper(int & argc, char** argv) :
pnh.param("frame_id", frameId_, frameId_); pnh.param("frame_id", frameId_, frameId_);
pnh.param("odom_frame_id", odomFrameId_, odomFrameId_); // set to use odom from TF pnh.param("odom_frame_id", odomFrameId_, odomFrameId_); // set to use odom from TF
pnh.param("subscribe_depth", subscribeDepth, subscribeDepth); 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."); ROS_WARN("rtabmapviz: \"subscribe_laserScan\" parameter is deprecated, use \"subscribe_scan\" instead. The scan topic is still subscribed.");
} }
+2 -2
View File
@@ -201,12 +201,12 @@ OdometryROS::OdometryROS(int argc, char * argv[], bool stereo) :
{ {
if(iter->second.second.empty()) 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()); iter->first.c_str());
} }
else 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()); iter->first.c_str(), iter->second.second.c_str());
} }
} }