ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
![]() | 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