Trees | Indices | Help |
|
---|
|
object --+ | roslib.rostime.TVal --+ | roslib.rostime.Duration --+ | Duration
Duration represents the ROS 'duration' primitive type, which consists of two integers: seconds and nanoseconds. The Duration class allows you to add and subtract Duration instances, including adding and subtracting from Time instances.
Usage:
five_seconds = Duration(5) five_nanoseconds = Duration(0, 5) print 'Fields are', five_seconds.secs, five_seconds.nsecs # Duration arithmetic ten_seconds = five_seconds + five_seconds five_secs_ago = rospy.Time.now() - five_seconds # Time minus Duration is a Time true_val = ten_second > five_seconds
Instance Methods | |||
|
|||
Duration |
|
||
|
|||
|
|||
Duration |
|
||
|
|||
Duration |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Duration |
|
||
|
|||
Duration |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
Duration |
|
||
|
|||
bool |
|
||
|
|||
long |
|
||
float |
|
||
Inherited from |
Static Methods | |||
Duration |
|
Properties | |
nsecs (Inherited from roslib.rostime.Duration) | |
secs (Inherited from roslib.rostime.Duration) | |
Inherited from |
Method Details |
Create new Duration instance. secs and nsecs are integers and correspond to the ROS 'duration' primitive type.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jan 11 10:11:53 2013 | http://epydoc.sourceforge.net |