ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can you clarify why you want to use a Timer? If you calculate your own timeouts, you could just use ros::Duration(T).sleep(). If you want to sleep, but take execution time of your algorithm into account, use ros::Rate, which already does what you are trying to do.

Can you clarify why you want to use a Timer? If you calculate your own timeouts, you could just use ros::Duration(T).sleep(). If you want to sleep, but take execution time of your algorithm into account, use ros::Rate, which already does what you are trying to do.do (see roscpp/Overview/Time).