From c455c16fd5f2a8664044f34ad844d518b16c49b8 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Wed, 19 Feb 2014 19:10:25 +0000 Subject: [PATCH] ros-pkg: ROS_INFO of rtabmap processing time git-svn-id: http://rtabmap.googlecode.com/svn/trunk/ros-pkg@1128 f169173b-cf89-36c8-b27e-44dbe73f0c83 --- rtabmap/launch/config/rgbd_gui.ini | 2 +- rtabmap/src/CoreWrapper.cpp | 4 +++- rtabmap/src/GuiNode.cpp | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/rtabmap/launch/config/rgbd_gui.ini b/rtabmap/launch/config/rgbd_gui.ini index 4567e8d3..573153d5 100644 --- a/rtabmap/launch/config/rgbd_gui.ini +++ b/rtabmap/launch/config/rgbd_gui.ini @@ -1,6 +1,6 @@ [Gui] General\imagesKept=true -General\loggerLevel=1 +General\loggerLevel=2 General\loggerEventLevel=3 General\loggerPauseLevel=3 General\loggerType=1 diff --git a/rtabmap/src/CoreWrapper.cpp b/rtabmap/src/CoreWrapper.cpp index 59eca826..c87cb722 100644 --- a/rtabmap/src/CoreWrapper.cpp +++ b/rtabmap/src/CoreWrapper.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include @@ -457,7 +458,7 @@ void CoreWrapper::process( const Transform & localTransform, const cv::Mat & scan) { - ROS_INFO("rtabmap: Processing data..."); + UTimer timer; if(rtabmap_.isIDsGenerated() || id > 0) { cv::Mat depth16; @@ -517,6 +518,7 @@ void CoreWrapper::process( "when you need to have IDs output of RTAB-map synchronised with the source " "image sequence ID."); } + ROS_INFO("rtabmap: Processing time = %fs", timer.ticks()); } bool CoreWrapper::updateRtabmapCallback(std_srvs::Empty::Request&, std_srvs::Empty::Response&) diff --git a/rtabmap/src/GuiNode.cpp b/rtabmap/src/GuiNode.cpp index 863f3195..18e4c857 100644 --- a/rtabmap/src/GuiNode.cpp +++ b/rtabmap/src/GuiNode.cpp @@ -10,6 +10,7 @@ #include #include +#include #include void my_handler(int s){ @@ -18,6 +19,11 @@ void my_handler(int s){ int main(int argc, char** argv) { + ROS_INFO("Starting node..."); + + ULogger::setType(ULogger::kTypeConsole); + ULogger::setLevel(ULogger::kWarning); + ros::init(argc, argv, "rtabmapviz"); GuiWrapper gui(argc, argv);