ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There's no longer a global instance of the communication library that you can rely on in rclpy.

You need to get a clock instance from your node instance.

my_node.get_clock().now()

More info on the design can be found here: https://design.ros2.org/articles/clock_and_time.html