maintain time across callbacks
Hi,
I have a simple ROS node which runs a ros::spin() call after initializing. Now, is there a way to maintain time between these callbacks? I want have a variable that records the time each time the callback is called and compute some stuff using the frequency of these callbacks.
Is there something internal to the callback structure that I can use?
Thank you.
You can just get the current ROS time whenever/wherever you need it. Link