Home | Trees | Indices | Help |
|
---|
|
object --+ | genpy.rostime.TVal --+ | genpy.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 | |||
|
|||
|
|||
Inherited from Inherited from Inherited from |
Class Methods | |
Inherited from |
Properties | |
Inherited from Inherited from |
Method Details |
Create new Duration instance. secs and nsecs are integers and correspond to the ROS 'duration' primitive type.
|
repr(x)
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Nov 2 03:52:39 2020 | http://epydoc.sourceforge.net |