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 -0500
Seen: 4,890 times
Last updated: Jan 29 '18
how using robot pose publisher for links in arm robot?? [closed]
How to run a package with rosrun
Make use of 3rd party packages.
How to find a particular executable file in package?
How to install package from source in groovy?
When should I split my code into multiple packages, and what's a good way to split it?