How can i find time taken in generate map

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How can i find time taken in generate map

vinit payal
I want to compare performance of rtabmap on different systems which are of different configuration having different processors for our research work .
How can we find the time taken by rtabmap to generate any 2D map .
Reply | Threaded
Open this post in threaded view
|

Re: How can i find time taken in generate map

matlabbe
Administrator
Hi,

You can take a look on the Statistics panel view (Menu Window -> Show view... -> Statistics). The total time used by RTAB-Map can be found under "Timing->Total". For odometry (if you use rgbd_odometry or stereo_odometry), total time is shown under "Odometry->Time". You can show up a Plot of the timings by clicking the button next to any statistic. See Plot statistics page for examples. If you need to save the values of the Plot, you can right-click on the legend and select "Copy curve data to clipboard".

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: How can i find time taken in generate map

vinit payal
i am using rtabmap with ros in rviz there is no option for time taken in map generation. Please let me know how can i find time in this situation .
Reply | Threaded
Open this post in threaded view
|

Re: How can i find time taken in generate map

matlabbe
Administrator
You can catch the rtabmap_ros/Info topic sent from rtabmap node and get the statistics in it.

$ rostopic echo /rtabmap/info

A node recording the timings could use this:
#include <rtabmap/core/Statistics.h>
#include <rtabmap_ros/Info.h>
#include <rtabmap_ros/MsgConversion.h>

void infoCallback(const rtabmap_ros::InfoConstPtr & infoMsg)
{
   rtabmap::Statistics stat;
   rtabmap_ros::infoFromROS(*infoMsg, stat);
   
   // Get total time:
   float totalTime = stat.data().at(Statistics::kTimingTotal()); // in ms
}


For the rtabmap_ros odometry, there is the rtabmap_ros/OdomInfo topic:
$ rostopic echo /rtabmap/odom_info/time