rclpy.experimental.async_clock module

class rclpy.experimental.async_clock.AsyncClock(*args: Any, **kwargs: Any)

Bases: BaseClock

A ROS clock with async sleep.

Experimental

This API is experimental.

async sleep(duration_sec: float) None

Sleep for a duration respecting sim time.

Cancelled on clock destruction. Raises TimeSourceChangedError if ROS time is activated or deactivated during the sleep.