rigid_body_motion.ros.play_publisher¶
- rigid_body_motion.ros.play_publisher(publisher, step=1, speed=1.0, skip=None, timestamps=None)[source]¶
Interactive widget for playing back messages from a publisher.
- Parameters
- publisher: object
Any object with a
publish
method that accepts anidx
parameter and publishes a message corresponding to that index.- step: int, default 1
Difference in indexes between consecutive messages, e.g. if
step=2
every second message will be published.- speed: float, default 1.0
Playback speed.
- skip: int, optional
Number of messages to skip with the forward and backward buttons.
- timestamps: array_like, datetime64 dtype, optional
Timestamps of publisher messages that determine time difference between messages and total number of messages. The time difference is calculated as the mean difference between the timestamps, i.e. it assumes that the timestamps are more or less regular. If not provided, the publisher must have a
timestamps
attribute which will be used instead.