How to get time for 1 looping program in ROS node ??
Hi ROS fans..
How to get time for 1 looping program in ROS node ??
I hope someone can help me ^_^
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Hi ROS fans..
How to get time for 1 looping program in ROS node ??
I hope someone can help me ^_^
I am not sure exactly what you mean.
But if you want to know how many time does the loop you've written in a node last, you can use a time library.
I don't know about which library it is in C++, but in Python you can import 'time' and use the function 'clock()'. This function will return you the current date on your computer. Just call it at the beginning of the loop and have it printed in your terminal.
If you don't want to know the date but the time elapsed, just use a variable that your initialise once before the beginning of your loop and then, in your loop don't print 'clock()' value but clock() minus your initialised variable.
Hope that helps.
Asked: 2013-05-30 20:46:28 -0500
Seen: 296 times
Last updated: May 30 '13
Different time zones between ros nodes
ros::Time.now().toSec() optimized out
How to convert a timestamp from std::chrono::nanoseconds to ros::Time ?
Pause execution of program from callback function
How do I change the filename_format of picture to rostime?
TypeError: Cannot compare to non-Duration
Initialize a ros::Time instance on the heap
Please edit your question, adding some pseudo-code showing what you want to measure.