class documentation

class Rate(object):

Constructor: Rate(hz, reset)

View In Hierarchy

Convenience class for sleeping in a loop at a specified rate

Method __init__ Constructor. @param hz: hz rate to determine sleeping @type hz: float @param reset: if True, timer is reset when rostime moved backward. [default: False] @type reset: bool
Method remaining Return the time remaining for rate to sleep. @return: time remaining @rtype: L{Time}
Method sleep Attempt sleep at the specified rate. sleep() takes into account the time elapsed since the last successful sleep().
Instance Variable last_time Undocumented
Instance Variable sleep_dur Undocumented
Method _remaining Calculate the time remaining for rate to sleep. @param curr_time: current time @type curr_time: L{Time} @return: time remaining @rtype: L{Time}
Instance Variable _reset Undocumented
def __init__(self, hz, reset=False):

Constructor. @param hz: hz rate to determine sleeping @type hz: float @param reset: if True, timer is reset when rostime moved backward. [default: False] @type reset: bool

def remaining(self):

Return the time remaining for rate to sleep. @return: time remaining @rtype: L{Time}

def sleep(self):

Attempt sleep at the specified rate. sleep() takes into account the time elapsed since the last successful sleep().

@raise ROSInterruptException: if ROS shutdown occurs before sleep completes @raise ROSTimeMovedBackwardsException: if ROS time is set backwards

last_time =

Undocumented

sleep_dur =

Undocumented

def _remaining(self, curr_time):

Calculate the time remaining for rate to sleep. @param curr_time: current time @type curr_time: L{Time} @return: time remaining @rtype: L{Time}

_reset =

Undocumented