Measure code/node running time
I'm running amcl
package for offline data and I want measure its running time, Is there something like MATLAB's tic
and toc
command?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
I'm running amcl
package for offline data and I want measure its running time, Is there something like MATLAB's tic
and toc
command?
I'm not sure this is what you're looking for but Tic Toc in C++.
You could add in your amcl node.
EDIT : I had to use something similar myself and realize the link in made for windows. Here is what you're suppose to use on linux : Clock
ros::WallTime can be used as follows
ros::WallTime start_, end_;
start_ = ros::WallTime::now();
// **** do something here... ****
end_ = ros::WallTime::now();
// print results
double execution_time = (end_ - start_).toNSec() * 1e-6;
ROS_INFO_STREAM("Exectution time (ms): " << execution_time);
Asked: 2014-05-17 21:23:58 -0600
Seen: 5,021 times
Last updated: Jan 29 '18
How do I install a missing ROS package?
ROS Packages vs. Linux Packages
What's the best way to keep track of changes to ROS stacks and packages?
how to find the stack name of the package?
install missing stack failed by apt-get ros-diamondback
Find the name of package containing a file, given the file's path